UNITS
This is part of the setup module

This command sets the internal units for the code.

A new unit can be set by either specifying a conversion factor from the plumed default unit or by using a string corresponding to one of the defined units given below. This directive MUST appear at the BEGINNING of the plumed.dat file. The same units must be used throughout the plumed.dat file.

Notice that all input/output will then be made using the specified units. That is: all the input parameters, all the output files, etc. The only exceptions are file formats for which there is a specific convention concerning the units. For example, trajectories written in .gro format (with DUMPATOMS) are going to be always in nm.

The following strings can be used to specify units. Note that the strings are case sensitive.

  • LENGTH: nm (default), A (for Angstrom), um (for micrometer), Bohr (0.052917721067 nm)
  • ENERGY: kj/mol (default), j/mol, kcal/mol (4.184 kj/mol), eV (96.48530749925792 kj/mol), Ha (for Hartree, 2625.499638 kj/mol)
  • TIME: ps (default), fs, ns, atomic (2.418884326509e-5 ps)
  • MASS: amu (default)
  • CHARGE: e (default)
Examples
Click on the labels of the actions for more information on what each action computes
tested on v2.7
# this is using Angstrom - kj/mol - fs
UNITS 
LENGTH
the units of lengths.
=A
TIME
the units of time.
=fs # compute distance between atoms 1 and 4 d: DISTANCE
ATOMS
the pair of atom that we are calculating the distance between.
=1,4 # print time and distance on a COLVAR file PRINT
ARG
the input for this action is the scalar output from one or more other actions.
=d
FILE
the name of the file on which to output these quantities
=COLVAR # dump atoms 1 to 100 on a 'out.gro' file DUMPATOMS
FILE
compulsory keyword file on which to output coordinates; extension is automatically detected
=out.gro
STRIDE
compulsory keyword ( default=1 ) the frequency with which the atoms should be output
=10
ATOMS
the atom indices whose positions you would like to print out.
=1-100 # dump atoms 1 to 100 on a 'out.xyz' file DUMPATOMS
FILE
compulsory keyword file on which to output coordinates; extension is automatically detected
=out.xyz
STRIDE
compulsory keyword ( default=1 ) the frequency with which the atoms should be output
=10
ATOMS
the atom indices whose positions you would like to print out.
=1-100

In the COLVAR file, time and distance will appear in fs and A respectively, irrespective of which units you are using in the host MD code. The coordinates in the out.gro file will be expressed in nm, since gro files are by convention written in nm. The coordinates in the out.xyz file will be written in Angstrom since we used the UNITS command setting Angstrom units. Indeed, within PLUMED xyz files are using internal PLUMED units and not necessarily Angstrom!

If a number, x, is found instead of a string, the new unit is equal to x times the default units. Using the following command as first line of the previous example would have lead to an identical result:

Click on the labels of the actions for more information on what each action computes
tested on v2.7
UNITS 
LENGTH
the units of lengths.
=0.1
TIME
the units of time.
=0.001
Glossary of keywords and components
Options
NATURAL

( default=off ) use natural units

LENGTH the units of lengths. Either specify a conversion factor from the default, nm, or use one of the defined units, A (for angstroms), um (for micrometer), and Bohr.
ENERGY the units of energy. Either specify a conversion factor from the default, kj/mol, or use one of the defined units, j/mol, kcal/mol and Ha (for Hartree)
TIME the units of time. Either specify a conversion factor from the default, ps, or use one of the defined units, ns, fs, and atomic
MASS the units of masses. Specify a conversion factor from the default, amu
CHARGE the units of charges. Specify a conversion factor from the default, e