From: Josh Vermaas (
Date: Fri Feb 19 2016 - 09:50:34 CST

Hi Nicholas,

I've never done it with bigdcd, but another alternative is a set of two
wrap commands. I think unwrap depends on a previous set of coordinates
to be loaded, so I'm not sure what it would even do when bigdcd only
loads one frame at a time.

#This gets the protein together into one group, assuming each chain is
its own segment, and isn't too big relative to the periodic box
pbc wrap -compound fragment -center com -centersel "segname PA" -now
-sel "protein"
#This step is optional, and recenters the lipids and waters around the
protein that is put back together.
pbc wrap -compound fragment -center com -centersel "protein" -now

Of course, you'd need to adjust the "segname PA" selection to just pick
one segment of the multimer, preferably the largest one.
-Josh Vermaas

On 02/19/2016 08:30 AM, Nicolas Martin wrote:
> Dear users,
> I recently run a simulation in NAMD of a pentameric membrane protein
> using the wrapping option. Even tough the water and membrane are
> correctly wrapped, the protein diffuse in the simulation box and end
> ups crossing the periodic boundaries. Doing so, the protein is not
> kept full, but 2 chains over 5 jump on the other side of the box. The
> wrapping in namd is made so there is no long bonds and only full
> chains move to the other side of the box.
> I need all the chains to be put back together at the center of the box
> for further analysis.
> I tried to follow the documentation for doing so and the best I could
> end up with is a protein more or less (the com seems to be moving
> significantly) well centered in the box and several frames over a long
> trajectory with stretched bonds. Here is the routine I used over all
> trajectory frames:
> pbc unwrap -sel protein -now
> pbc wrap -compound res -center com -centersel "protein" -now
> I also used bigdcd (that's why the option -now and not -all was used
> above) for reading trajectories and wrote wrapped dcds every 1000
> frames to avoid memory problems (otherwise it's a ~30GB trajectory).
> I also tried using the Join keyword on the first frame which had no
> significant effect.
> What procedure would you advice me to use in order to get a perfectly
> re-centered and wrapped trajectory in the case of my multi-chains system?
> Thanks you in advance for your help,
> NM