NGL@1.0.0-beta.7 Home Manual Reference Source Gallery

Selection Language

Selections (or 'Sele' for short) strings can be input at various places in the user interface or when scripting. They are used to limit which atoms/residues are shown in a [molecular representation]{@tutorial molecular-representations} or what atoms are loaded from a trajectory.


Select the side-chain and C-alpha atoms plus the backbone nitrogen in case of proline. not backbone or .CA or (PRO and .N) This selection is useful to display the sidechains together with a backbone trace. Hence there is also the keyword sidechainAttached for it.




Some of these expressions can be combined (in this order) - residue numer (range), insertion code, chain name, atom name, alternate location, model - like this

// select C-alpha atoms of residue 10 with insertion code A
// from chain F in model 0 at alternate location C

which is the same as

10 and ^A and :F and .CA and %C and /0

Single expressions may be left out as long as the order (see above) is kept, for example:

:A/0 # select chain A from model 0


A list of atom indices can be given as a comma seperated list (no spaces in between) prefixed with the @ character.


Logical operators (in order of binding strength)

Additionally, parentheses () can be used for grouping: :A and ( 1 or 10 or 100 ) # select residues 1, 10 and 100 from chain A