openmm / openmm-plumed

OpenMM plugin to interface with PLUMED
55 stars 23 forks source link

OpenMM-PLUMED with VariableLangevinIntegrator #55

Closed gitkol closed 2 years ago

gitkol commented 2 years ago

Hi, I am trying to run OpenMM-PLUMED with the VariableLangevinIntegrator, but even though PLUMED seems to work (it uses CPU cycles), it does not print any bias log data, and it is hard to tell if whatever it calculates makes sense. I guess, the problem is that no time step information is given to PLUMED, see copy of the PLUMED output below.

PLUMED: PLUMED is starting
PLUMED: Version: 2.7.1 (git: Unknown) compiled on Apr 21 2021 at 15:30:46
PLUMED: Please cite these papers when using PLUMED [1][2]
PLUMED: For further information see the PLUMED web page at http://www.plumed.org
PLUMED: Root: /home/istvan/opt/plumed-2.7.1-istvan-install/lib/plumed
PLUMED: For installed feature, see /home/istvan/opt/plumed-2.7.1-istvan-install/lib/plumed/src/config/config.txt
**PLUMED: Molecular dynamics engine: OpenMM**
PLUMED: Precision of reals: 8
PLUMED: Running over 1 node
PLUMED: Number of threads: 4
PLUMED: Cache line size: 512
PLUMED: Number of atoms: 34181
PLUMED: File suffix: 
**PLUMED: Timestep: -nan**
PLUMED: KbT has not been set by the MD engine
PLUMED: It should be set by hand where needed

I wonder, does this mean that I cannot use VariableLangevinIntegrator?

Thank you very much,

Istvan

raimis commented 2 years ago

As I know, PLUMED assumes a constant timestep, so the variable timestep integrators are incompatible.

We need to implement a check in OpenMM-PLUMED, so it fails with a clear error message.

gitkol commented 2 years ago

Thanks, @raimis. I was afraid of that. Just wondering, couldn't the plugin provide the then current simulation time to PLUMED at every time step? In a number of biasing methods the time step is irrelevant and the simulation time is only used for plotting the time series of bias values, but I don't think it is a requirement that the time step is constant. Of course, I may be wrong.

Istvan

raimis commented 2 years ago

OpenMM passes to PLUMED the time step during the initialization and at each step updates the number of steps. PLUMED API doesn't support passing the simulation time (https://www.plumed.org/doc-v2.7/developer-doc/html/_how_to_plumed_your_m_d.html).

gitkol commented 2 years ago

Got it, thanks!