Skip to content
Snippets Groups Projects
Commit 505b4f02 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Added comment on plumed 1.3->2.0 syntax

[makedoc]

closes #147
parent 81192136
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,8 @@ An experimental PDF copy of this manual can be found
To understand the difference between PLUMED 1 and PLUMED 2, and to
follow the development of PLUMED 2, you can look at the detailed \ref Changelog.
A short tutorial explaining how to move from PLUMED 1 to PLUMED 2 is also available (see \ref moving)
A short tutorial explaining why it is a good idea to move from PLUMED 1 to PLUMED 2
and how to do it in practice is also available (see \ref moving).
To install PLUMED 2, see this page: \ref Installation
......
/**
\page moving Moving from Plumed 1 to Plumed 2
\page moving Moving from PLUMED 1 to PLUMED 2
Syntax in PLUMED 2 has been completely redesigned. The main difference is that
Syntax in PLUMED 2 has been completely redesigned based on our experience
using PLUMED 1, hopefully makeing it clearer, more flexible, and less error prone.
The main difference is that
whereas in PLUMED 1 lines could be inserted in any order,
in PLUMED 2 the order of the lines matters. This is due to a major change in
the internal architecture of PLUMED. In version 2, commands (or "actions") are
......@@ -12,9 +14,52 @@ later. More information can be found in the Section about \ref Syntax.
Another very important change is in the way groups are used, discussed below.
Finally, many features appear under a different name in the new version.
\section moving-Syntax New syntax
We know that changing the input syntax requires a lot of work from the user
side to update their input files. However, we believe that the new syntax is
easier to read and that it allows for more flexibility.
As an example, something that in PLUMED 1.3 was:
\verbatim
HILLS HEIGHT 0.4 W_STRIDE 600
WELLTEMPERED SIMTEMP 300 BIASFACTOR 15
RGYR LIST <all>
all->
1 5 6 7 9 11 15 16 17 19
all<-
TORSION LIST 5 7 9 15 SIGMA 0.1
TORSION LIST 7 9 15 17
PRINT W_STRIDE 100
\endverbatim
in PLUMED 2.x becomes:
\verbatim
all: GROUP ATOMS=1,5,6,7,9,11,15,16,17,19
rg: GYRATION ATOMS=all
t1: TORSION ATOMS=5,7,9,15
METAD ...
LABEL=meta
ARG=t1 SIGMA=0.1 HEIGHT=0.4 PACE=600
BIASFACTOR=15 TEMP=300
... METAD
t2: TORSION ATOMS=7,9,15,17
PRINT ARG=t1,t2,meta.bias STRIDE=100 FILE=COLVAR
\endverbatim
Giving all quantities an explicit name makes the input easier to interpret.
Additionally, all the parameters related to \ref METAD are placed on a single line
(actually, this is done here exploiting continuation lines).
Also notice that one can customize the name of the `COLVAR` file.
By specifying to \ref PRINT which collective variables should be printed,
one can easily decide what to print exactly and using which stride.
By repeating the \ref PRINT line one can also monitor very expensive variables
with a larger stride, just putting the result on a separate file.
You might have noticed that ideas that were very difficult to implement in PLUMED 1.3
now become immediately available. As an example, one can now apply
concurrently several \ref METAD potentials \cite gil2015enhanced .
\section moving-Groups Groups
In Plumed 1 groups (lists) were used for two tasks:
In PLUMED 1 groups (lists) were used for two tasks:
- To provide centers of masses to collective variables such as distances, angles, etc. This is
now done by defining virtual atoms using either \ref CENTER or \ref COM
- To provide lists of atoms to collective variables such as coordination, gyration radius, etc.
......@@ -24,11 +69,40 @@ If you would still like to use groups you can use the \ref GROUP commands. When
for a \ref GROUP action appears in the input it is replaced by the list of atoms that were
specified in the \ref GROUP.
A restraint on the distance between centers of mass in PLUMED 1 was something like:
\verbatim
DISTANCE LIST <g1> <g2>
g1->
17 20 22 30
g1<-
g2->
LOOP 37 40
g2<-
UMBRELLA CV 1 KAPPA 200 AT 1.0
PRINT W_STRIDE 100
\endverbatim
The same in PLUMED 2.x reads:
\verbatim
g1: COM ATOMS=17,20,22,30
g2: COM ATOMS=37-40
d: DISTANCE ATOMS=g1,g2
r: RESTRAINT ARG=d KAPPA=200 AT=1.0
PRINT STRIDE=100 FILE=COLVAR ARG=d,r.*
\endverbatim
Notice that virtual atoms are very powerful tools in PLUMED 2. Actually, they can be used
in any collective variable where normal atoms can be used, just by calling them by name.
In this example you can also appreciate the advantage of calling collective variables
by name. It is obvious here that \ref RESTRAINT is acting on distance `d`, whereas in PLUMED 1
one had to keep track of the number of the collective variables. This was easy for a single collective variable,
but could become cumbersome for complex input files.
\section moving-Directives Directives
What follows is a list of all the documented directives of Plumed 1 together with their
What follows is a list of all the documented directives of PLUMED 1 together with their
plumed 2 equivalents. Be aware that the input syntaxes for these directives are not totally
equivalent. You should read the documentation for the Plumed 2 Action.
equivalent. You should read the documentation for the PLUMED 2 Action.
<TABLE>
<TR>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment