[gmx-users] getting rid of PBC, completely

Mark Abraham Mark.Abraham at anu.edu.au
Thu Jan 19 07:47:15 CET 2012

On 19/01/2012 5:39 PM, Chandan Choudhury wrote:
> Dear gmx-users,
> I have a simulated a system containing a linear polymer in a cubic box 
> with water molecules.  I need to get rid of PBC effect on the system 
> such that I can execute my own analysis code. I intend to compute the 
> msd of water molecules along the polymer backbone.

You can't "get rid of PBC", you can only manage it. The question reduces 
what you want to see if a molecule diffuses across the periodic boundary 
from near one end of the polymer to the other end.

> So, when I execute my own analysis code, I see the msd's are abrupt 
> (i.e very high), this is due to the pbc. So, for getting rid of PBC 
> effect, I performed the suggested trjconv workflow 
> (http://www.gromacs.org/Documentation/Terminology/Periodic_Boundary_Conditions). 
> Below are my executed commands :
> # Made the system whole
> echo 0 | trjconv_4.5.5 -s md0-4.tpr -f 0-4.xtc -pbc whole -o 0-4_whole.xtc
> # 0 is the whole system. md0-4.tpr is the initial tpr file containing 
> whole (no broken) polymer inside the cubic box.
> # Extracted 1st frame from the initial trajectory
> echo 0 | trjconv_4.5.5 -s md0-4.tpr -f 0-4.xtc -pbc nojump  -o 1st.pdb 
> -dump 0
> # used the whole trajectory to remove jumps with reference to the 1st 
> frame.
> echo 0 | trjconv_4.5.5 -s 1st.pdb -f 0-4_whole.xtc -pbc nojump -o 
> 0-4_nojump.xtc

So here you said "let molecules diffuse away from the solute".

> #system is being centered
> echo "0 0" | trjconv_4.5.5 -s md0-4.tpr -f 0-4_nojump.xtc -o 
> 0-4_center.xtc -center
> #putting every atom in the box
> echo 0 | trjconv -s md0-4.tpr -f 0-4_center.xtc -o 0-4_box.xtc -pbc atom

... and now you said "take all the atoms and put them back in the box", 
creating jumps whenever one crosses the boundaries.

> Still when I execute my analysis code, I do see the abrupt behaviour 
> in the msd plot. Can someone guide me how to completely get rid of PBC 
> artifacts.

Don't simulate with them :-P Is your analysis technique sound for the 
periodic case?


More information about the gromacs.org_gmx-users mailing list