A problem with fix nve

Dear all,

I simulate a system containing two immiscible liquids: water and hexane. If I use ‘fix nve’, the system’s volume is constant. However, the total, kinetic, and potential energy increase over time.

I would appreciate it if I had your advice.

Thanks a lot,

Its difficult to help you as you gave no detail about your simulation.
Bad energy conservation is known to occur when the precision of pppm or shake are too low, can it be the case here?

Hi Simon

Thanks for your quick reply.
Are the following precisions not satisfactory enough?

kspace_style    pppm 1e-4
fix             ShakeE1 water shake 1e-6 1000000 0 b ${ShakeBond} a ${ShakeAngle}


That depends on the rest of your input and your particular system geometry.
There are many other settings that can impact energy conservation (e.g., choice of force field, cutoff, timestep). Also, you can only have conserved (total!) energy, if your system is in equilibrium.

Dear all

I would appreciate it if you let me know of helpful textbooks or papers on the conservation of energy and the impact of different parameters.


This is too generic a question to list all the information on this subject that has been accumulated over the decades while people are using MD simulations.

There should be a discussion of the basics of energy conservation due to time integration algorithms and cutoff in any decent textbook on the subject of MD simulations. For more specifics, it is usually best to discuss your specific research project with somebody that has experience in the same field. By default that would be your adviser/supervisor.