Atom selection object. Used to specify what atoms should be selected. Can include
any field from AtomSpec
in which case atoms must equal the specified value.
All fields must match for the selection to hold. If values
are provided as a list, then only one value of the list must match.
Example
$3Dmol.download("pdb:2EJ0",viewer,{},function(){
viewer.setStyle({chain:'B'},{cartoon:{color:'spectrum'}});
viewer.setStyle({chain:'B',invert:true},{cartoon:{}});
viewer.setStyle({bonds: 0},{sphere:{radius:0.5}}); //water molecules
viewer.setStyle({resn:'PMP',byres:true,expand:5},{stick:{colorscheme:"greenCarbon"}});
viewer.setStyle({resi:["91-95","42-50"]},{cartoon:{color:"green",thickness:1.0}});
viewer.render();
});
Extends
Members
Array
|
object
# and Optional
take the intersection of the provided lists of AtomSelectionSpec
s
Properties:
Name | Type | Description |
---|---|---|
___cached_results |
any
|
string
# atom Optional
Atom name; may be more specific than 'elem' (e.g 'CA' for alpha carbon)
- Inherited From:
Array
# bondOrder Optional
Array of this atom's bond orders, corresponding to bonds identfied by 'bonds'
- Inherited From:
number
# bonds Optional
overloaded to select number of bonds, e.g. {bonds: 0} will select all nonbonded atoms
- Overrides:
boolean
# byres Optional
if set, expands the selection to include all atoms of any residue that has any atom selected
function
# callback Optional
Callback click handler function to be executed on this atom and its parent viewer
- Inherited From:
string
# chain Optional
Chain this atom belongs to, if specified in input file (e.g 'A' for chain A)
- Inherited From:
boolean
# clickable Optional
Set this flag to true to enable click selection handling for this atom
- Inherited From:
number
|
string
# expand Optional
expands the selection to include all atoms within a given distance from the selection
function
# hover_callback Optional
Callback click handler function to be executed on this atom and its parent viewer
- Inherited From:
boolean
# hoverable Optional
Set this flag to true to enable hover selection handling for this atom
- Inherited From:
GLModel
|
number
|
Array
|
Array
# model Optional
a single model or list of models from which atoms should be selected. Can also specify by numerical creation order. Reverse indexing is allowed (-1 specifies last added model).
Array
|
object
# or Optional
take the union of the provided lists of AtomSelectionSpec
s
Properties:
Name | Type | Description |
---|---|---|
___cached_results |
any
|
string
# pdbline Optional
If applicable, this atom's record entry from the input PDB file (used to output new PDB from models)
- Inherited From:
function
# predicate Optional
user supplied function that gets passed an AtomSpec
and should return true if the atom should be selected
Record.<string, any>
# properties Optional
Optional mapping of additional properties
- Inherited From:
boolean
# singleBonds Optional
true if this atom forms only single bonds or no bonds at all
- Inherited From:
string
# ss Optional
Secondary structure identifier (for cartoon render; e.g. 'h' for helix)
- Inherited From:
ColorSpec
# surfaceColor Optional
Hex code for color to be used for surface patch over this atom
- Inherited From:
WithinSelectionSpec
# within Optional
intersects the selection with the set of atoms within a given distance from another selection