next up previous contents index
Next: Moving frame of reference. Up: Selecting atoms Previous: Selecting atoms   Contents   Index

Atom selection keywords

Selection keywords may be used individually or in combination with each other, and each can be repeated any number of times. Selection is incremental: each keyword adds the corresponding atoms to the selection, so that different sets of atoms can be combined. However, atoms included by multiple keywords are only counted once. Below is an example configuration for an atom group called ``atoms''. Note: this is an unusually varied combination of selection keywords, demonstrating how they can be combined together: most simulations only use one of them.

atoms {

  # add atoms 1 and 3 to this group (note: the first atom in the system is 1)
  atomNumbers {
    1 3
  }

  # add atoms starting from 20 up to and including 50
  atomNumbersRange 20-50

  # add all the atoms with occupancy 2 in the file atoms.pdb
  atomsFile atoms.pdb
  atomsCol O
  atomsColValue 2.0

  # add all the C-alphas within residues 11 to 20 of segments "PR1" and "PR2"
  psfSegID PR1 PR2
  atomNameResidueRange CA 11-20
  atomNameResidueRange CA 11-20

  # add index group (requires a .ndx file to be provided globally)
  indexGroup Water
}

The resulting selection includes atoms 1 and 3, those between 20 and 50, the $ \mathrm{C}_{\alpha}$ atoms between residues 11 and 20 of the two segments PR1 and PR2, and those in the index group called ``Water''. The indices of this group are read from the file provided by the global keyword indexFile.

In the current version, the Colvars module does not manipulate VMD atom selections directly: however, these can be converted to atom groups within the Colvars configuration string, using selection keywords such as atomNumbers. The complete list of selection keywords available in VMD is:


next up previous contents index
Next: Moving frame of reference. Up: Selecting atoms Previous: Selecting atoms   Contents   Index
vmd@ks.uiuc.edu