PBC and translation of molecules in openmm-dcdreporter

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
CHANG YUN SON
Posts: 27
Joined: Wed Nov 05, 2014 1:18 pm

PBC and translation of molecules in openmm-dcdreporter

Post by CHANG YUN SON » Thu Jul 14, 2016 1:20 pm

I think this question has been asked multiple times in the past, but I still have some confusion regarding this.

I'm trying to calculate MSD from my trajectory, but wasn't sure how openmm is reporting the coordinates with dcdreporter.

As I read the previous discussions, openmm does not wrap the molecule with the PBC unless one's using MCbarostat.

But from my recently generated nvt simulation in drudelangevinintegrator (my system has drude particles and customnbforce), the trajectory I got shows molecules to be always whole, but jumping across the periodic boundaries.

Any idea what could be the cause of the wrapped trajectory?

Thanks.

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

Re: PBC and translation of molecules in openmm-dcdreporter

Post by Peter Eastman » Thu Jul 14, 2016 1:30 pm

When you're simulating a periodic system, DCDReporter (and all other reporters) does wrap the coordinates to a single periodic box. But wrapping is always done at the level of whole molecules. It positions each molecule based on where its center is, but will never break a molecule in half.

Peter

User avatar
CHANG YUN SON
Posts: 27
Joined: Wed Nov 05, 2014 1:18 pm

Re: PBC and translation of molecules in openmm-dcdreporter

Post by CHANG YUN SON » Thu Jul 14, 2016 1:57 pm

Thank you for clarifying it.

Does the reporters update the positions of the simulation.context too?
I'm curious if I can use unwrapped positions during the simulation, while using the reporters to record the wrapped positions.
If the reporters are updating the positions of the simulation object, I maybe have to unwrap it again to calculate diffusion or write my own reporter, I guess.

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

Re: PBC and translation of molecules in openmm-dcdreporter

Post by Peter Eastman » Thu Jul 14, 2016 2:06 pm

Reporters just report. They don't modify the context. All it's doing is specifying enforcePeriodicBox=True when it calls getState().

Peter

POST REPLY