Interface

WithinSelectionSpec

WithinSelectionSpec

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.

View Source specs.ts, line 219

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

View Source specs.ts, line 232

boolean

# invert Optional

if set, selects atoms not within distance range for intersection

View Source specs.ts, line 237

AtomSelectionSpec

# sel Optional

the selection of atoms against which to measure the distance from the parent atom selection

View Source specs.ts, line 242