Re: about long namd trajectory and pbc effect

From: Thomas Evangelidis (
Date: Sun Dec 02 2012 - 15:39:36 CST

Hi Liqun,

Actually this is a VMD question. If your analysis does not require the
waters to be in contact to the part that sticks out of the cell you can
simply use the atomselect macro "pbwithin" to select them. I.e.

atomselect top "water pbwithin 5 of (protein and resid 1 to 20)"

If your analysis requires wrapped water coordinates, then try the following
in VMD Tk console:

pbc wrap -all -parallelepiped -compound fragment -center bb -centersel

If that does not surround the outliers with sufficient waters then you'll
have to use a more drastic solution. I have written a VMD plugin that given
a number of waters N (or other hetero compounds) finds the closest N
waters to your protein and surrounds the whole protein with these N waters.
Instead of the whole protein you can also restrict your analysis to a part
of interest, e.g. the catalytic cleft. So I think this does exactly what
you seek. The plugin is named Truncate Trajectory and you can find more
info at:

If you need any further info then contact me directly.


On 2 December 2012 22:53, Liqun Zhang <> wrote:

> Dear namd users:
> I have run a very long namd simulation for a protein complex (2 proteins
> binded) in a water box to observe the protein complex separation process.
> Because of the pbc effect, I unwrapped the simulation trajectory. So I no
> longer see one protein jumped at the edge of the box frequently. But the
> unwrapped trajectory showed part of the protein outside of the water box.
> Now I like to calculate the interaction between protein and the surrounding
> water. Since one protein is partially outside of the box, I can not select
> water around it. Then what I should do with that? Do I have to readjust the
> simulation trajectory? If yes, how to show waters around the protein
> outside of the box using pbc command in vmd? Any suggestion is welcomed.
> Thanks a lot.
> Best regards,
> lqz

Thomas Evangelidis
PhD student
University of Athens
Faculty of Pharmacy
Department of Pharmaceutical Chemistry
157 71 Athens


This archive was generated by hypermail 2.1.6 : Tue Dec 31 2013 - 23:22:48 CST