diff --git a/src/setup/MolInfo.cpp b/src/setup/MolInfo.cpp index 7940a61cc14c3a17edfb5341c9c7a2834a1f1ed1..208f27490ff646b94798d30d46697eff1a09703a 100644 --- a/src/setup/MolInfo.cpp +++ b/src/setup/MolInfo.cpp @@ -50,8 +50,23 @@ for known residues from these three types of molecule. In other words, this is a historical reasons and to allow future extensions where alternative lists will be provided. As of now, you can just ignore this keyoword. -Using MOLINFO with a protein's or nucleic acid's pdb extends the possibility of atoms selection using the @ special -symbol in the form +Using \ref MOLINFO extends the possibility of atoms selection using the @ special +symbol. The following shortcuts are available that do not refer to one specific residue: + +\verbatim +@nucleic : all atoms that are part of a DNA or RNA molecule +@protein : all atoms that are part of a protein +@water : all water molecules +@ions : all the ions +@hydrogens : all hydrogen atoms (those for which the first non-number in the name is a H) +@nonhydrogens : all non hydrogen atoms (those for which the first non-number in the name is not a H) +\endverbatim + +\warning +Be careful since these choices are based on common names used in PDB files. Always check if +the selected atoms are correct. + +In addition, atoms from a specific residue can be selected with a symbol in this form: \verbatim @"definition"-chain_residuenum @@ -121,6 +136,10 @@ should not be used on 5' end residue. Furthermore it is also possible to pick single atoms using the syntax `atom-chain_residuenum`, `@atom-chainresiduenum` or `@atom-residuenum`. +As of PLUMED 2.5, this also works when the residue is not a protein/rna/dna residue. +For instance, `@OW-100` will select oxygen of water molecule with residue number 100. + +Finally, notice that other shortcuts are available even when not using the \ref MOLINFO command (see \ref atomSpecs). \warning If a residue-chain is repeated twice in the reference pdb only the first entry will be selected. diff --git a/user-doc/Group.md b/user-doc/Group.md index 5472a030897205221a2a107fa02935d06a4c8cba..c24dea8eb4e04c178d20c35f6f3362f61bca0e8d 100644 --- a/user-doc/Group.md +++ b/user-doc/Group.md @@ -8,11 +8,23 @@ atoms are specified using their numerical indices in the molecular dynamics inpu In PLUMED lists of atoms can be either provided directly inside the definition of each collective variable, or predefined as a \subpage GROUP that can be reused multiple times. Lists of atoms can be written as: -- comma separated lists of numbers (GROUP ATOMS=10,11,15,20 LABEL=g1) -- numerical ranges. So GROUP ATOMS=10-20 LABEL=g2 is equivalent to GROUP ATOMS=10,11,12,13,14,15,16,17,18,19,20 LABEL=g2 -- numerical ranges with a stride. So GROUP ATOMS=10-100:10 LABEL=g3 is equivalent to GROUP ATOMS=10,20,30,40,50,60,70,80,90,100 LABEL=g3 -- atoms ranges with a negative stride. So GROUP ATOMS=100-10:-10 LABEL=g4 is equivalent to GROUP ATOMS=100,90,80,70,60,50,40,30,20,10 LABEL=g4 -- all the above methods together. For example GROUP ATOMS=1,2,10-20,40-60:5,100-70:-2 LABEL=g5. +- comma separated lists of numbers (`GROUP ATOMS=10,11,15,20 LABEL=g1`) +- numerical ranges. So `GROUP ATOMS=10-20 LABEL=g2` is equivalent to `GROUP ATOMS=10,11,12,13,14,15,16,17,18,19,20 LABEL=g2` +- numerical ranges with a stride. So `GROUP ATOMS=10-100:10 LABEL=g3 is equivalent to `GROUP ATOMS=10,20,30,40,50,60,70,80,90,100 LABEL=g3` +- atoms ranges with a negative stride. So `GROUP ATOMS=100-10:-10 LABEL=g4 is equivalent to `GROUP ATOMS=100,90,80,70,60,50,40,30,20,10 LABEL=g4` + +In addition, there are a few shortcuts that can be used: + +- `@physical` indicate all the physical atoms present in the MD engine (e.g. `DUMPATOMS ATOMS=@physical`). +- `@virtual` indicate all the \ref vatoms "virtual atoms" defined within PLUMED (e.g. `DUMPATOMS ATOMS=@virtual`). +- `@all` indicates all atoms (e.g. `DUMPATOMS ATOMS=@all`). + +Other shortcuts are available if you loaded the structure of the molecule using the \ref MOLINFO command. + +All the above methods can be combined just putting one name after the other separated by a comma: +\plumedfile +DUMPATOMS ATOMS=1,2,10-20,40-60:5,100-70:-2,@virtual LABEL=g5 FILE=test.xyz +\endplumedfile Some collective variable must accept a fixed number of atoms, for example a \ref DISTANCE is calculated using two atoms only, an \ref ANGLE is calcuated using either 3 or 4 atoms and \ref TORSION is calculated using 4 atoms.