Colvars / colvars

Collective variables library for molecular simulation and analysis programs
http://colvars.github.io/
GNU Lesser General Public License v3.0
209 stars 57 forks source link

Stop accumulating histograms and metadynamics at step 0? #343

Closed giacomofiorin closed 4 years ago

giacomofiorin commented 4 years ago

Currently, the 0-th step is being counted twice (because it is the same as the last step of the preceding job). This adds a tiny error during MD simulations in NAMD or LAMMPS, and no error in a VMD analysis run. So it has been mostly harmless.

But now you have use cases that rely on many short run commands (e.g. constant pH in NAMD, replica exchange, etc), so the error isn't necessarily tiny any more.

ABF and TI currently skip the 0-th step of any run command in NAMD, although for different reasons (the total forces aren't available yet). I need to test with LAMMPS, because there are no ABF inputs in the cross-engine tests folder (and not many in namd/tests/library anyway...).

jhenin commented 4 years ago

That sounds reasonable. And true, there are not many ABF tests.

jhenin commented 4 years ago

It seems that a succession of "run" commands in NAMD do not reset cvm::it_restart. So I'm not sure this is handled correctly by the current implementation.

giacomofiorin commented 4 years ago

True. This is a separate issue, though. It has to do with deciding whether the second "run" command is a continuation of the first one, or a new run altogether (there are examples of both with identical syntax). I'm not sure something as simple as it_restart can track it reliably. Maybe it could.

On Thu, Jun 25, 2020 at 1:30 PM Jérôme Hénin notifications@github.com wrote:

It seems that a succession of "run" commands in NAMD do not reset cvm::it_restart. So I'm not sure this is handled correctly by the current implementation.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/Colvars/colvars/issues/343#issuecomment-649718729, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABCNSWIQKGEPWBKDFVSRLELRYOCUVANCNFSM4MEA3VGA .

-- Giacomo Fiorin Associate Professor of Research, Temple University, Philadelphia, PA Research collaborator, National Institutes of Health, Bethesda, MD http://goo.gl/Q3TBQU https://github.com/giacomofiorin