Why track unwrapped particle positions in MD with periodic boundary conditions

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
1 reply · 2K views
picat
Messages
1
Reaction score
0

Homework Statement


I am working on a MD code (http://www.acmm.nl/molsim/frenkel_smit/Exercise_10/index.html) which uses the position Verlet algorithm to integrate the equations of motion and a velocity rescaling algorithm for initialization in periodic boundary conditions.

I wondered why they use a specific step in the integration routine (integrate.f)

Mxx(I) = Mxx(I) + Xxx(I) - Rxx(I)
Myy(I) = Myy(I) + Yyy(I) - Ryy(I)
Mzz(I) = Mzz(I) + Zzz(I) - Rzz(I)

to define particles which are not put back in the box (Mxx). Xxx is the current position and Rxx is the old position.

Mxx is not used in any other way in the propagation itself.

2. The attempt at a solution

Is this step needed to calculate the diffusion coefficient in periodic boundary conditions, i.e. to have some kind of common origin? I cannot imagine what else the usage of this step could be. In the initialization Mxx is set to the current position and the differce (Xxx(I) - Rxx(I)) might give a measure for the drift.
 
Physics news on Phys.org
Hello picat, :welcome:

You want us to follow your crumb trail ? Post the code if you think it's relevant.
Otherwise: if this is fortran, Mxx could also be in a common block and be used elsewhere.