From: Justin Gullingsrud (
Date: Thu Aug 18 2005 - 13:43:38 CDT


VMD doesn't do any shifting of coordinates. If part of a molecule is
wrapped around a box, VMD will retain the original topology and draw
bonds between the unwrapped and the wrapped part, giving you what
you're seeing. The solution is to wrap the coordinates in such a way
that covalently connected objects are wrapped as a unit. If trjconv
can't do this then it should be possible to process a trajectory in
such a way as to recognize when molecules have been wrapped and map
them back to the same transformation as the rest of the molecule.

Attached is a script I wrote that does something similar for a
membrane: it wraps each residue to a consistent unit cell by checking
the difference between each atom in a residue with a reference atom;
if this differenc is greater than half the box size, it wraps it back.
 Something similar could be done with your piece of DNA, though in
your case you want to wrap the entire chain, not just individual


On 8/18/05, Bob Johnson <> wrote:
> Hello everyone,
> Right now I am simulating the interaction between single stranded DNA and an
> infinite nanotube in GROMACS. In a typical trajectory, the DNA adsorbs to the
> tube and slides along the outer wall of the tube. Sometimes the DNA slides too
> far and a portion of it ends up in the next box. Of course, VMD shifts this
> portion of the DNA back in the original box. However, VMD draws bonds between
> the original DNA molecule and the shifted piece. Is there anyway to turn this
> feature off?
> GROMACS has a program called trjconv that applies formatting to trajectories. It
> has a bunch of options for how the periodic boundary conditions are handled.
> I've tried everything this program has to offer with no success. It seems that
> it's a problem with VMD.
> Thanks,
> Bob Johnson

The spirit of Plato dies hard.  We have been unable to escape the
philosophical tradition that what we can see and measure in the world
is merely the superficial and imperfect representation of an
underlying reality.
                -- S.J. Gould, "The Mismeasure of Man"

  • application/x-tcl attachment: wrap.tcl