If your input lines get very long then editing them using vi and other such text editors becomes a massive pain in the arse.
We at PLUMED are aware of this fact and thus have provided a way of doing line continuations so as to make your life that much easier - aren't we kind? Well no not really, we have to use this code too. Anyway, you can do continuations by using the "..." syntax as this makes this:
dist: DISTANCES ATOMS1the atoms involved in each of the distances you wish to calculate. =1,300 ATOMS2the atoms involved in each of the distances you wish to calculate. =1,400 ATOMS3the atoms involved in each of the distances you wish to calculate. =1,500
(see DISTANCES)
equivalent to this:
dist: DISTANCES ... # we can also insert comments here ATOMS1the atoms involved in each of the distances you wish to calculate. =1,300 # multiple kewords per line are allowed ATOMS2the atoms involved in each of the distances you wish to calculate. =1,400 ATOMS3the atoms involved in each of the distances you wish to calculate. =1,500 #empty lines are also allowed ...
Notice that the closing ... is followed by the word DISTANCES. This is optional, but might be useful to find more easily which is the matching start of the statement. The following is equally correct
dist: DISTANCES ... # we can also insert comments here ATOMS1the atoms involved in each of the distances you wish to calculate. =1,300 # multiple kewords per line are allowed ATOMS2the atoms involved in each of the distances you wish to calculate. =1,400 ATOMS3the atoms involved in each of the distances you wish to calculate. =1,500 #empty lines are also allowed ...
Notice that PLUMED makes a check that the word following the closing ... is actually identical to the first word in the line with the first .... If not, it will throw an error. Also notice that you might put more than one word in the first line. E.g.
dist: DISTANCES ... # we can also insert comments here ATOMS1the atoms involved in each of the distances you wish to calculate. =1,300 # multiple kewords per line are allowed ATOMS2the atoms involved in each of the distances you wish to calculate. =1,400 ATOMS3the atoms involved in each of the distances you wish to calculate. =1,500 #empty lines are also allowed ...
or, equivalently,
dist: DISTANCES ... # we can also insert comments here ATOMS1the atoms involved in each of the distances you wish to calculate. =1,300 # multiple kewords per line are allowed ATOMS2the atoms involved in each of the distances you wish to calculate. =1,400 ATOMS3the atoms involved in each of the distances you wish to calculate. =1,500 #empty lines are also allowed ...