An error in clovars to calculate PMF


I utilize colvars module in LAMMPS to calculate PMFs. Use Lammps version 2015-07-21. In this process, I use umbrella sampling method.

My colvars configuration file is:

colvar {

name d

lowerBoundary 15.0

upperBoundary 250.0

distanceZ {

componentCoeff -1

main {

atomNumbersRange 109927-110830 #MOF235


ref { dummyAtom (72.261715, 80.200976, 88)



distanceZ {

componentCoeff 1

main {

atomNumbersRange 7-9 #CH3CN


ref { dummyAtom (72.261715, 80.200976, 88)




harmonic {

name distance

colvars d

forceConstant 100.0

centers 41.51533 # go from 41.51533 A…

targetCenters 135.11534 # … to 135.11534 A

targetNumSteps 5000000 # with these many time steps

outputCenters on


colvarsTrajFrequency 1000

colvarsRestartFrequency 1000

analysis true

and my lammps input file is:

units real

atom_style full

boundary p p f

pair_style lj/cut/coul/long 12.0

pair_modify shift yes mix arithmetic

bond_style harmonic

angle_style harmonic

kspace_style pppm 1.0e-4

kspace_modify slab 3.0


neighbor 2.0 bin

neigh_modify every 1 delay 0 check yes

timestep 1.0

#special_bonds lj/coul 0.0 0.0 0.5

group C2H3N type 1 2 3

group MOF type 4 5 6 7 8 9 10 11 12 13

group FeCl4 type 14 15

neigh_modify exclude group MOF MOF check no

neigh_modify exclude group FeCl4 MOF check no

neigh_modify exclude group FeCl4 FeCl4 check no

neigh_modify exclude group FeCl4 C2H3N check no

velocity C2H3N create 300 4928459

fix 1 FeCl4 setforce 0.0 0.0 0.0

fix 2 all nvt temp 300 300 100.0

#fix 3 C2H3N wall/reflect zlo 75 zhi EDGE units box

fix 4 MOF rigid group 1 MOF force * off off on torque * off off off

#fix 5 MOF setforce 0.0 0.0 NULL

fix 6 all colvars mof235.colvars

compute x MOF com

dump 1 all atom 1000 SMD1.atom

dump_modify 1 scale no

dump_modify 1 sort 1

thermo_style custom step cpu temp press etotal pe vol f_6 c_x[1] c_x[2] c_x[3]

thermo_modify flush yes

thermo 1000

run 1000000

run 1500000

fix 6 all colvars mof235.colvars input out.colvars.state output out2

run 2500000

I want to pull a cluster from a vacuum into solvents for calculate the PMF. But I always got a error:

Error: keyword “ ” is not supported, or not recognized in this context.

Error: in setting up component “distanceZ”.

Could you tell me how to solve this error?


On first look it looks OK, but the message “keyword “ ” is not supported” should give you an actual keyword inside. Check by commenting some sections to see where you have the parsing error.

Also, try to see if you e.g. created the file under Windows but ran it on Linux or vice versa. White space conventions change between operating systems.

Hi, I intend to calculate PMF during desorption of a molecule from the surface based on the same method you are using. However, I am facing these problems:
1- The output file of ColVars after simulations only contains the number of steps and nothing else! Other lammps outputs are fine.
2- The molecule does not move from the surface to the target point specified.

The input file of ColVars is as follows. I don’t know where I am making the mistake…

Thanks a lot for your suggestions.

Sorry, I just help someone to send the email, and I ask him for the problem
1- Take care of the format and extra space should not exit
2- targetCenters 60.0 should be 0.0
centers 22.6837 should be (60-22.6837) 37.3163

在2016-01-01 11:08:23,Daicharliedhw@…5253…写道:

Thank you so much for your help Dai.
It really helped.
I also modified the commands, and solved the issues regarding the parameters for output.

Do you have any suggestion regarding the following values as well?

lowerBoundary 0.0
upperBoundary 40.0

lowerWallConstant 5000
upperWallConstant 5000