Problems with colvars

Recently I performed metadynamics simulations with LAMMPS. However, there are some problems:

  1. In order to calculate velocity auto-correlation function, “corrFunc on” was set in colvar context. However,it ended with “Segmentation fault”.
    In order to output the velocity of colvars, “outputVelocity on” was set in colvar context. However, it ended with “Error: read_velocity is not yet implemented.”
    If the two setting were deleted, no error was reported. So, I don’t konw where the problem is! Are the two key word not supported for now or some problems
    in my installation. After looking into source code, velocity was calculated by enable (task_fdiff_velocity) in colvar.cpp. However, the calculation details
    can’t be found in enable function.
  2. The process of installation of colvars module is:
    (1) update the colvars source code by sh …/lammp ; (2) make lib/colvars
    (3) sh 1 in USER-COLVARS directory. (4) make lammps
    Is it correct??

Any advice welcome!! Thanks very much!

Best regards!

The following is the colvar configuration file

Collective Variable for Metadynamics

colvar {
name amsite1
width 0.10
lowerBoundary 1.0
upperBoundary 3.0
hardLowerBoundary yes
upperWallConstant 921.70
upperWall 2.5

corrFunc on

corrFuncWithColvar amsite1

corrFuncType velocity

corrFuncNormalize on

corrFuncOutputFile amsite1.vacf

corrFuncStride 20

corrFuncOffset 4

outputVelocity on

distance {
group1 { atomNumbers 2611 }
group2 { atomNumbers 1017 }
componentCoeff 1.0
forceNoPBC no

metadynamics {
name amsite
colvars amsite1
hillWeight 1.0
newHillFrequency 20
writeFreeEnergyFile on
saveFreeEnergyFile off
outputEnergy on
hillWidth 1.0
writeHillsTrajectory on

colvarsTrajFrequency 5
colvarsTrajAppend on
colvarsRestartFrequency 20000
analysis true

Hello Yau, that is quite interesting, do you mind posting the version number that appears in the LAMMPS log? It is a numeric string representing a date, e.g. 2014-09-24.

There may be two issues here. One is the seg fault that you encountered when trying to calculate a velocity ACF: does your executable give you different results if you choose different values of stride and offset?

The problem with the output of the velocity is due to the fact that there is currently no mechanism to communicate the instantaneous velocities from the LAMMPS MD integrator to the colvars module.

In any case, please keep in mind that, physically speaking, you shouldn’t calculate an ACF while metadynamics or any other bias is adding forces to the system to bring it out of equilibrium.

If I have to take a guess at what you’re trying to do, the best bet is most likely doing a short MD run without any bias, use colvarsTrajFrequency equal to 1, and analyze the output.