RPMD Integrator Doesn't Conserve Center of Mass Motion

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Ali Eltareb
Posts: 39
Joined: Tue Jul 30, 2019 10:46 am

RPMD Integrator Doesn't Conserve Center of Mass Motion

Post by Ali Eltareb » Fri Jun 16, 2023 11:47 am

Hi Peter,

I have been using the RPMD Integrator and I found that if you run the simulation for more than a couple of ns, the center of mass motion of the system drifts. This happens if you are using the CUDA platform and the precision is set to single or mixed. Interestingly, if you specify only 1 copy (P = 1), the system doesn't drift. This only happens if you use a P > 1. [P is the number of replicas]. I should also remark that if you use double precision, there is no drift [MSD ~ 1e-5].

At the moment, I'm not sure how to handle this issue. I've checked and the CMMotionRemover force is being added to the system. I wrote my own script to remove the drift from the system [i.e., every 100 steps, I calculate the center of mass velocity and rescale the particle velocities] and this didn't make a difference.

Any ideas on how I can fix this issue?

Ali

User avatar
Peter Eastman
Posts: 2552
Joined: Thu Aug 09, 2007 1:25 pm

Re: RPMD Integrator Doesn't Conserve Center of Mass Motion

Post by Peter Eastman » Mon Jun 19, 2023 5:22 pm

Interesting, I'm not sure why that is happening. The CMMotionRemover should be getting applied separately to each bead. I'll take a look and see if I can figure out what's going on.

User avatar
Peter Eastman
Posts: 2552
Joined: Thu Aug 09, 2007 1:25 pm

Re: RPMD Integrator Doesn't Conserve Center of Mass Motion

Post by Peter Eastman » Wed Jun 21, 2023 4:00 pm

The fact that it works correctly in double precision mode suggests it's an issue with the accuracy of calculations rather than what particular calculations it's doing. I recently fixed a bug that reduced the accuracy of some calculations in mixed precision mode. It was representing certain constants in single precision when it should have been using double. If you don't mind compiling from source, you could test it and see if it fixed the problem for you.

POST REPLY