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
.
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
number
# distance Optional
the distance in angstroms away from the atom selection to include atoms in the parent selection
AtomSelectionSpec
# sel Optional
the selection of atoms against which to measure the distance from the parent atom selection