Parsing constants

You might have noticed that from time to time constants are specified using strings rather than numbers. An example is the following

Click on the labels of the actions for more information on what each action computes
tested on v2.7
#SETTINGS MOLFILE=regtest/basic/rt65/AA.pdb
MOLINFO 
STRUCTURE
compulsory keyword a file in pdb format containing a reference structure.
=AA.pdb
MOLTYPE
compulsory keyword ( default=protein ) what kind of molecule is contained in the pdb file - usually not needed since protein/RNA/DNA are compatible
=rna e1: TORSION
ATOMS
the four atoms involved in the torsional angle
=@epsilon-1 t: METAD
ARG
the input for this action is the scalar output from one or more other actions.
=e1
SIGMA
compulsory keyword the widths of the Gaussian hills
=0.15
PACE
compulsory keyword the frequency for hill addition
=10
HEIGHT
the heights of the Gaussian hills.
=2
GRID_MIN
the lower bounds for the grid
=-pi
GRID_MAX
the upper bounds for the grid
=pi
GRID_BIN
the number of bins for the grid
=200

Notice that the boundaries for GRID_MIN and GRID_MAX are -pi and pi. Until PLUMED 2.3, we used a very dummy parses that could recognize only pi as a special string, plus strings such as 0.5pi and -pi. However, as of version 2.4, we use the Lepton library in order to parse every constant that we read. This means that you can also employ more complicated expressions such as 1+2 or exp(10):

Click on the labels of the actions for more information on what each action computes
tested on v2.7
#SETTINGS MOLFILE=regtest/basic/rt65/AA.pdb
MOLINFO 
STRUCTURE
compulsory keyword a file in pdb format containing a reference structure.
=AA.pdb
MOLTYPE
compulsory keyword ( default=protein ) what kind of molecule is contained in the pdb file - usually not needed since protein/RNA/DNA are compatible
=rna e1: TORSION
ATOMS
the four atoms involved in the torsional angle
=@epsilon-1 RESTRAINT
ARG
the input for this action is the scalar output from one or more other actions.
=e1
AT
compulsory keyword the position of the restraint
=1+0.5

Notice that this applies to any quantity read by plumed as a real number, but does not apply yet to integer numbers (e.g.: the PACE argument of METAD).