Including other files

If, for some reason, you want to spread your PLUMED input over a number of files you can use INCLUDE as shown below:

Click on the labels of the actions for more information on what each action computes
INCLUDE FILEcompulsory keyword
file to be included =filename


So, for example, a single "plumed.dat" file:

Click on the labels of the actions for more information on what each action computes
dist: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =1,2
RESTRAINT ARGthe input for this action is the scalar output from one or more other actions. =dist ATcompulsory keyword
the position of the restraint =2.0 KAPPAcompulsory keyword ( default=0.0 )
specifies that the restraint is harmonic and what the values of the force constants
on each of the variables are =1.0


could be split up into two files as shown below:

Click on the labels of the actions for more information on what each action computes
dist: DISTANCE ATOMSthe pair of atom that we are calculating the distance between. =1,2
INCLUDE FILEcompulsory keyword
file to be included =toBeIncluded.inc


plus a "toBeIncluded.inc" file

Click on the labels of the actions for more information on what each action computes
#SETTINGS FILENAME=toBeIncluded.inc
# this is toBeIncluded.inc
RESTRAINT ARGthe input for this action is the scalar output from one or more other actions. =dist ATcompulsory keyword
the position of the restraint =2.0 KAPPAcompulsory keyword ( default=0.0 )
specifies that the restraint is harmonic and what the values of the force constants
on each of the variables are =1.0


However, when you do this it is important to recognize that INCLUDE is a real directive that is only resolved after all the Comments have been stripped and the Continuation lines have been unrolled. This means it is not possible to do things like:

Click on the labels of the actions for more information on what each action computes
# this is wrong:
DISTANCE INCLUDE could not find this keyword  FILE could not find this keyword =options.dat
RESTRAINT ARGthe input for this action is the scalar output from one or more other actions. =dist ATcompulsory keyword
the position of the restraint =2.0 KAPPAcompulsory keyword ( default=0.0 )
specifies that the restraint is harmonic and what the values of the force constants
on each of the variables are =1.0