This is part of the generic module |
Includes an external input file, similar to "#include" in C preprocessor.
Useful to split very large plumed.dat files. Notice that in PLUMED 2.4 this action cannot be used before the initial setup part of the file (e.g. in the part with UNITS, MOLINFO, etc). As of PLUMED 2.5, INCLUDE can be used in any position of the file.
This input:
c1: COMATOMS=1-100 c2: COMthe list of atoms which are involved the virtual atom's definition.ATOMS=101-202 d: DISTANCEthe list of atoms which are involved the virtual atom's definition.ATOMS=c1,c2 PRINTthe pair of atom that we are calculating the distance between.ARG=dthe input for this action is the scalar output from one or more other actions.
can be replaced with this input:
INCLUDEFILE=pippo.dat d: DISTANCEcompulsory keyword file to be includedATOMS=c1,c2 PRINTthe pair of atom that we are calculating the distance between.ARG=dthe input for this action is the scalar output from one or more other actions.
where the content of file pippo.dat is
#SETTINGS FILENAME=pippo.dat # this is pippo.dat c1: COMATOMS=1-100 c2: COMthe list of atoms which are involved the virtual atom's definition.ATOMS=101-202the list of atoms which are involved the virtual atom's definition.
The files in this example are rather short, but imagine a case like this one:
INCLUDEFILE=groups.dat c: COORDINATIONcompulsory keyword file to be includedGROUPA=groupaFirst list of atoms.GROUPB=groupbSecond list of atoms (if empty, N*(N-1)/2 pairs in GROUPA are counted).R_0=0.5 METADcould not find this keywordARG=cthe input for this action is the scalar output from one or more other actions.HEIGHT=0.2the heights of the Gaussian hills.PACE=100compulsory keyword the frequency for hill additionSIGMA=0.2compulsory keyword the widths of the Gaussian hillsBIASFACTOR=5use well tempered metadynamics and use this bias factor.
Here groups.dat
could be a huge file containing group definitions. This groups.dat file might look something like the following example but with more atom indices in the groups.
#SETTINGS FILENAME=groups.dat # this is groups.dat groupa: GROUP ...ATOMS={ 10 50 60 70 80 120 } ... groupb: GROUP ...the numerical indexes for the set of atoms in the group.ATOMS={ 11 51 61 71 81 121 } ...the numerical indexes for the set of atoms in the group.
So, included files are the best place where one can store long definitions.
Another case where INCLUDE is very useful is when running multi-replica simulations. Here different replicas might have different input files, but perhaps a large part of the input is shared. This part can be put in a common included file. For instance you could have common.dat
:
#SETTINGS FILENAME=common.dat # this is common.dat t: TORSIONATOMS=1,2,3,4the four atoms involved in the torsional angle
Then plumed.0.dat
:
# this is plumed.0.dat INCLUDEFILE=common.dat RESTRAINTcompulsory keyword file to be includedARG=tthe input for this action is the scalar output from one or more other actions.AT=1.0compulsory keyword the position of the restraintKAPPA=10compulsory keyword ( default=0.0 ) specifies that the restraint is harmonic and what the values of the force constants on each of the variables are
And plumed.1.dat
:
# this is plumed.1.dat INCLUDEFILE=common.dat RESTRAINTcompulsory keyword file to be includedARG=tthe input for this action is the scalar output from one or more other actions.AT=1.2compulsory keyword the position of the restraintKAPPA=10compulsory keyword ( default=0.0 ) specifies that the restraint is harmonic and what the values of the force constants on each of the variables are
As an example, the same result of the inputs above could have been obtained using the following plumed.dat
file:
#SETTINGS NREPLICAS=2 t: TORSIONATOMS=1,2,3,4 INCLUDEthe four atoms involved in the torsional angleFILE=other.inccompulsory keyword file to be included
Then other.0.inc
:
#SETTINGS FILENAME=other.0.inc # this is other.0.inc RESTRAINTARG=tthe input for this action is the scalar output from one or more other actions.AT=1.0compulsory keyword the position of the restraintKAPPA=10compulsory keyword ( default=0.0 ) specifies that the restraint is harmonic and what the values of the force constants on each of the variables are
And other.1.inc
:
#SETTINGS FILENAME=other.1.inc # this is other.1.inc RESTRAINTARG=tthe input for this action is the scalar output from one or more other actions.AT=1.2compulsory keyword the position of the restraintKAPPA=10compulsory keyword ( default=0.0 ) specifies that the restraint is harmonic and what the values of the force constants on each of the variables are
FILE | file to be included |