[gmx-users] using trjconv to get a 2x2x2 unit cell for traj.xtc

Justin A. Lemkul jalemkul at vt.edu
Tue Dec 8 19:43:48 CET 2009

Jennifer Williams wrote:
> Hi Justin
> Thanks for the suggestions. However, I don't really want to stop the 
> molecule moving into the next image-I start off with an alkyl chain 
> where a large portion of the structure overlaps the pbc.
> i.e C1-C2-C3 \\ C4-C5-C6
> where || is the unit cell boundary. To see the whole alkyl chain I use 
> the graphics/representations/periodic tab in VMD. The problem is that 
> VMD will not allow me to draw a bond between C3 and C4 meaning I get odd 
> looking movies. VMD prefers to join the C3 to the C4 in the same unit 
> cell rather than the C4 sitting right next to it on the other side of 
> the pbc. This means long bonds stretching the length of my unit cell and 
> missing bonds between atoms sitting next to each other! I have spent a 
> while trying to solve this and have posted to the VMD forum (as it is 
> actually a problem with VMD and not gromacs).

I still think trjconv -pbc mol would be useful to you.  It will make the 
"broken" molecules whole, such that they are not split over the periodic 
boundaries, which seems like it would eliminate your problem.  I do the same 
with lipid bilayers all the time.

> If I could somehow do the same thing to the traj.xtc as I did to 
> confgro.out using genconf -nbox 2 2 2 that would solve my visualisation 
> problem. Do you know of a way to do this? Even a round-about way?  I 
> suppose if I dumped each frame in the trajectory as a pdb, used genbox 
> on them to get a 2x2x2 box and then somehow stuck them together into an 
> .xtc this might work (but any suggestions which are less messy are 
> greatly appreciated!)

The only way to do that is indeed the messy way.



Justin A. Lemkul
Ph.D. Candidate
ICTAS Doctoral Scholar
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080


More information about the gromacs.org_gmx-users mailing list