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.
FILE | file to be included |
This input:
c1: COM ATOMS=1-100 c2: COM ATOMS=101-202 d: DISTANCE ATOMS=c1,c2 PRINT ARG=d
can be replaced with this input:
INCLUDE FILE=pippo.dat d: DISTANCE ATOMS=c1,c2 PRINT ARG=d
where the content of file pippo.dat is
c1: COM ATOMS=1-100 c2: COM ATOMS=101-202
The files in this example are rather short, but imagine a case like this one:
INCLUDE FILE=groups.dat c: COORDINATION GROUPA=groupa GROUPB=groupb R_0=0.5 METAD ARG=c HEIGHT=0.2 PACE=100 SIGMA=0.2 BIASFACTOR=5
Here groups.dat
could be huge file containing group definitions such as
groupa: GROUP ... ATOMS={ 10 50 60 ## imagine a long list here 70 80 120 } ... groupb: GROUP ... ATOMS={ 11 51 61 ## imagine a long list here 71 81 121 } ...
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
:
# this is common.dat t: TORSION ATOMS=1,2,3,4
Then plumed.0.dat
:
# this is plumed.0.dat INCLUDE FILE=common.dat RESTRAINT ARG=t AT=1.0 KAPPA=10
And plumed.1.dat
:
# this is plumed.1.dat INCLUDE FILE=common.dat RESTRAINT ARG=t AT=1.2 KAPPA=10
As an example, the same result of the inputs above could have been obtained using plumed.dat
:
# this is plumed.dat t: TORSION ATOMS=1,2,3,4 INCLUDE FILE=other.dat
Then other.0.dat
:
# this is other.0.dat RESTRAINT ARG=t AT=1.0 KAPPA=10
And other.1.dat
:
# this is other.1.dat RESTRAINT ARG=t AT=1.2 KAPPA=10