conserved quantity is decreasing linearly

46 views
Skip to first unread message

Nagaprasad

unread,
Feb 7, 2024, 5:54:28 AMFeb 7
to ipi-users
Dear ipi users and developers,

I have run an MD of liquid water with 256 water molecules using MBX with ipi interface, equilibration with NPT followed by a production run with NVT. I have run around 1 ns trajectory and analyzed the energy conservation. From my experience, conserved energy is nothing but potential energy + kinetic energy. I understand from earlier posts that here the conserved{kilocal/mol} quantity is not the total energy, but I am not sure how it behaves in a simulation. It was decreasing with time and I doubted that the behaviour of the data was odd. Attached are the inputs and image for the validation, and there are no issues from MBX side.

1) Can I trust the data and proceed further?
2)If I want to print the total energy which validates "potential energy+kinetic energy" what is the keyword?

Thanks
Naga
test.png
inputs.zip

Michele Ceriotti

unread,
Feb 14, 2024, 8:36:47 AMFeb 14
to ipi-users
Hello. It is not unusual to have a large drift of the conserved quantity when, as in you are case, you use an aggressive thermostat, as this affects the accuracy of the velocity verlet integrator (even though this is usually inconsequential in terms of observables). 

Given that such a strong thermostat (langevin with tau=25fs) can be expected to slow down considerably sampling (see e.g. doi:10.1063/1.3518369) I strongly suggest you use a less aggressive thermostat, such as a stochastic velocity rescaling or a "smart-sampling" generalized Langevin equation thermostat, that is used in most of the i-PI examples (see doi:10.1021/ct900563s and http://gle4md.org). 
If you ever switch to path integrals, as I would given you're simulating water, `pile-g` is the thermostat you may want to use (global PILE, see doi:10.1063/1.3489925). 

All of this said, usually drift is UP, and I am also worried by the fact you see it even with a time step of 0.2fs, which is way lower than what is usually needed for water (0.5 fs is pretty safe). 
I suggest you run short trajectories with very weak thermostats (1ps tau on the barostat, and SVR as the main thermo). If there's still a large drift, there is probably a bug in the MBX driver,
that returns gradients that are inconsistent with the energy. 
 Try also to run in NVT: if you don't see a drift there, I'd put my money on a bug in the implementation of the stress - which might be as silly as using a different convention for the volume scaling than
the one that is expected by i-PI, in which case it should be easy to fix it.

So in short - if you still see a drift with weak thermostats, and/or you don't see a drift in NVT, this is a problem with the MBX driver, and you should get in touch with the MBX developers.

Cheers
Michele
Reply all
Reply to author
Forward
0 new messages