Within selection object. Used to find the subset of an atom selection that is within
some distance from another atom selection. When added as a field of an AtomSelectionSpec
,
intersects the set of atoms in that selection with the set of atoms within a given
distance from the given AtomSelectionSpec
.
- Source
Example
$3Dmol.download("pdb:2EJ0",viewer,{},function(){
viewer.setStyle({chain: 'A', within:{distance: 10, sel:{chain: 'B'}}}, {sphere:{}});
viewer.render();
});// stylizes atoms in chain A that are within 10 angstroms of an atom in chain B
Members
distance :number
the distance in angstroms away from the atom selection to include atoms in the parent selection
Type:
- number
- Source
invert :boolean
if set, selects atoms not within distance range for intersection
Type:
- boolean
- Source
sel :AtomSelectionSpec
the selection of atoms against which to measure the distance from the parent atom selection
Type:
- Source