Atom Selection Syntax
Atom Selection in the SilcsBio GUI
The SilcsBio GUI uses the same atom selection syntax as the NGL molecular structure viewer. This syntax is described at https://nglviewer.org/ngl/api/manual/selection-language.html and is reproduced below for convenience.
Keywords
all, *
sidechain
sidechainAttached (not backbone or .CA or (PRO and .N))
backbone
protein
nucleic
rna
dna
hetero
ligand (( not polymer or hetero ) and not ( water or ion ))
ion
saccharide/sugar
polymer
water
hydrogen
helix
sheet
turn (not helix and not sheet)
small (Gly or Ala or Ser)
nucleophilic (Ser or Thr or Cys)
hydrophobic (Ala or Val or Leu or Ile or Met or Pro or Phe or Trp)
aromatic (Phe or Tyr or Trp or His)
amid (Asn or Gln)
acidic (Asp or Glu)
basic (His or Lys or Arg)
charged (Asp or Glu or His or Lys or Arg)
polar (Asp or Cys or Gly or Glu or His or Lys or Arg or Asn or Gln or Ser or Thr or Tyr)
nonpolar (Ala or Ile or Leu or Met or Phe or Pro or Val or Trp)
cyclic (His or Phe or Pro or Trp or Tyr)
aliphatic (Ala or Gly or Ile or Leu or Val)
bonded (all atoms with at least one bond)
ring (all atoms within rings)
Expressions
residue number: 1, 2, 100
residue number range: 3-40 (Note that around the dash - no spaces are allowed)
chain name: :A
atom name: .CA, .C, .N, …
model: /0, /1, …
residue name: ALA, GLU, SOL, DMPC, …
numeric residue name: [032], [1AB], …
list of residue names: [ALA,GLU,MET], [ARG,LYS], …
element name: _H, _C, _O, …
alternate location: %A, %B, … or % for non-alternate location atoms
insertion code: ^A, ^B, … or ^ for residues with no insertion code
Some of these expressions can be combined (in this order) - residue number (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 10^A:F.CA%C/0
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
Atomindex
A list of atom indices can be given as a comma seperated list (no spaces in between) prefixed with the @ character.
@0,1,4,5,11,23,42
Logical Operators (in Order of Binding Strength)
NOT
AND
OR
Additionally, parentheses () can be used for grouping:
:A and ( 1 or 10 or 100 ) # select residues 1, 10 and 100 from chain A
Atom Selection in the SilcsBio CLI
The SilcsBio CLI tools that allow users to select specific
atoms follow the same atom selection syntax as GROMACS in
the command line. This syntax is described in the help
menu when entering the command
echo h | $GMXDIR/gmx make_ndx -f <structure file>
.
The syntax is also described here for convenience.
Keywords and Operators
Operators |
Description |
Usage |
---|---|---|
Identifiers |
||
|
Selects an index group by number or quoted string. |
|
|
Selects atoms by index. Atom numbering starts at 1. |
|
|
Selects atoms by atom name. |
|
|
Selects atoms by atom type. A run input file is required. |
|
|
Selects residues by number. |
|
|
Selects residues by resname. |
|
|
Selects residues by number. |
|
|
Selects atoms by chain identifier(s). Not available for use with |
|
Modifiers |
||
|
Selects indicies within the specified range. |
|
|
Wildcard that matches any one character |
|
|
Wildcard allowed at the end of a name to match a pattern of any length |
|
Logical Operators |
||
|
Not. |
|
|
And. |
|
|
Or. |
|
Commands |
||
|
Rename group |
|
|
Deletes specified group(s). |
|
|
Deletes all groups except for the specified group. |
|
|
Make all name comparisons case (in)sensitive. |
|
|
Split specified group into chains using CA distances. |
|
|
Split specified group into residues. |
|
|
Split specified group into atoms. |
|
|
Interpret numbers in specified group as residue numbers. |
|
|
List currently defined groups and commands. |
|
|
List the residues. |
|
|
Show the help menu. |
|
|
Save and quit |
Examples
Selection |
Description |
---|---|
|
selects all atoms from group 2 and 4 that have residue numbers 3, 4 or 5 |
|
selects all atoms starting with ‘C’ but not the atoms ‘C’ and ‘CA’ |
|
selects all atoms that are in group ‘protein’ and not in group ‘backbone’ |