NVE simulation kinetic and total energy gradually increasing

GROMACS version: 2022
GROMACS modification: Yes

Hello,
I have been trying to run NVE simulations using applied electric and magnetic fields. I saw that the total and kinetic energies were gradually increasing with time. The simulations crashed after 8 ns due to the exceptionally high energy.
Do you think there is a problem with the implementation of the magnetic field?
Please see the energy plot.

If you have molecules with net charge in your system and those can move through a whole periodic image, adding an electric field will continuously pump energy into the system.

Part of this energy increase could be due to inaccuracies in other algorithms. You should decrease the verlet-buffer-tolerance parameter to a value you think corresponds to a tolerable amount of energy drift. You might also need double precision for longer NVE runs.

Dear Professor Hess,
Thank you very much for your prompt reply. It is a system of 1M NaCl solution. Therefore, charge particles are there. Only electric field simulations are running for a long time (test up to 500 ns) with the NVE ensemble. However, I was not able to run an NVE simulation with magnetic and electric fields for a long time. I used
verlet-buffer-tolerance = 0.00001
lincs-order = 2
; Number of iterations in the final step of LINCS. 1 is fine for
; normal simulations, but use 2 to conserve energy in NVE runs.
as these are suggested during the grompp step.

I will give it a try with a double precision version.

Regards,
Jana

With ions your energy will always go up as the electric fields drives a flow of the ions. This is a physical effect, not an artifact.

Dear Professor Hess,
Thank you very much.

Regards,
Jana

Dear Jana,
I also have the trouble of adding the magnetic filed to the GROMACS. Would you mind helping me?We may have a little discussion.

Best,
Shiyang

Dear Shiyang,
Please let me know the details. I will try to help you if I can.
Best,
Jana

Hi Jana. I would like to contact you.There are some details for that. You can easily find me at 1273429732@qq.com

Best,
Shiyang

I think you should post here! If I don’t know what you are looking for, someone else can suggest you.
Btw, I send an email to you as well.
Best,
J

Hi Jana. Thanks a lot for your reply.
I just want to add magnetic fields into my Gromacs to evaluate the reaction between water and peptides. But there is a big issue for modified the Gromacs. I have checked the whole websites and found that you are the only one that could successfully add the magnetic field into the Gromacs.
There are only less research paper on introducing the magnetic field into Gromacs (doi: 10.23919/URSIGASS.2017.8105168 and 10.1109/MELECON53508.2022.9843056), But it was not a open model.
So I want to have a discussion with you.
BTW, I did not receive your e-mail yet.Maybe there is some connecting problems?

Thanks
Shiyang

Dear Shiyang,
I am using a modified version of Gromacs provided by a Gromacs developer as a part of a collaborative work.

An open code of magnetic field is available for the NAMD package (Implementation of magnetic field force in molecular dynamics algorithm: NAMD source code version 2.12 | Journal of Molecular Modeling). To be honest, it is extremely difficult to see any effects of a magnetic field on a real system. Maybe it is impossible to see any effects of the magnetic fields available in daily life using classical MD. Many renowned Gromacs developers are here in the forum and could say better about it.

https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-users/2018-June/120971.html
D. van der Spoel once replied here “Magnetic fields are typically very weak such that they are negligible in realistic cases. This is why nobody bothered to implement it.”
However, many reports suggest that they saw a clear effect of a magnetic field.

See one of the finest articles on the effect of magnetic fields (Redirecting).

But I suggest not spending time on magnetic fields using classical MD.

P.S. I have already sent you an email.
Best,
J

Dear Jana,
Thanks a lot for your kindness and help. After reading the materials you provided, I feel enlightened.

Our work is to using the magnetic field into a fridge. That could be an interesting story about the food preservation.
Would you mind helping me dealing with the modified Gromacs?
BTW, maybe we can try on this e-mail: shiyang.li1995@ndsu.edu

Best,
Shiyang

I sent you an email.