From: Axel Kohlmeyer (
Date: Mon Nov 15 2010 - 18:34:23 CST

On Mon, Nov 15, 2010 at 6:47 PM, Pat Yee <> wrote:
> Axel,
> Is there any way to save the trajectory with only water molecules within 5 A
> of the protein to a DCD when "Update Selection Every Frame" is activated?

not directly. a dcd format trajectory assumes
that atoms don't change order or identity. so you'd
have to use a different format that allows these changes,
but there also is the problem, that VMD will not be able
to read it back again, since VMD expects each frame to
have the exact same number of atoms in it.
i've written a hack in topotools to emulate this with
.xyz style trajectories, but it is a bit complicated.

there is/was a tool in development called trunctraj
that was supposed to pick the n-nearest molecules
and then write them out, but i have not seen any updates
to that for quite a while.


> Thanks,
> Pat
> -----Original Message-----
> From: [] On Behalf Of
> Axel Kohlmeyer
> Sent: Monday, November 15, 2010 5:23 PM
> To: quantrum75
> Cc:
> Subject: Re: vmd-l: Water molecules within a definite radius
> On Mon, Nov 15, 2010 at 4:26 PM, quantrum75 <> wrote:
>> Hi VMD users,
>> I am running a protein simulation using gromacs. I have an xtc trajectory
> from GMX. When I visualize the trajectory in VMD, I set the water
> representation to be within 5 A of the protein. When I visualize the
> simulation, I see that the water molecules expand in the simulation since I
> believe the initial set of water molecules are tracked for the entirety of
> the simulation and once they go beyond the 5 A, they are still tracked in
> VMD (in the representation). Is there anyway I can set a PBC like setup so
> that only the molecules within 5 A of the protein are visualized in VMD and
> once they go beyond 5 A dissappear?
>> I am sure this question was asked before, I honestly tried hard to find
> that particular thread without success. I would grateful if someone could
> point me to it. If not, is there a way to do it?
> all you have to do is to read the documentation!
> the selection criterion is applied only once, unless
> you activate "Update Selection Every Frame" in the
> 'Trajectory' tab of your representation.
> axel.
>> Thanks!
>> Rama
>> --- On Mon, 11/15/10, David Wedner <> wrote:
>>> From: David Wedner <>
>>> Subject: vmd-l: Measure Radius of gyration
>>> To:
>>> Date: Monday, November 15, 2010, 1:31 PM
>>> Hi,
>>> I want to measure the radius of gyration of some methane
>>> molecules in a cubic water box
>>> the problem is that due to the applied periodic boundary
>>> conditions some molecules are transformed to the other side
>>> of the box
>>> how to transfer these molecules back to their parent
>>> position so that I have all molecules together ?
>>> Thanks
>>> David
> --
> Dr. Axel Kohlmeyer
> Institute for Computational Molecular Science
> Temple University, Philadelphia PA, USA.

Dr. Axel Kohlmeyer
Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.