From: Josh Vermaas (
Date: Wed Sep 10 2014 - 15:44:26 CDT

Hi Luis,

If one of my monomers crosses a periodic boundary, what normally works
for me is:

pbc wrap all -centersel "segment A" -center com -compound fragment

This works if you have some atomselection that can pick out one of the
two monomers (for me, that's segment A), and that the other monomer
isn't so large that it's center of mass extends across periodic boundaries.

Good luck!
-Josh Vermaas

On 09/10/2014 02:49 PM, Luis Agullo wrote:
> In several frames of a dynamics (NAMD) one of the segments of a dimer
> gets out of the box. I thought that this situation would not affect
> the calculation of energies of interaction between the two monomers,
> but I obtain results that do not seem reasonable in those frames.
> Then, I have tried to put both segments of the dimer together in the
> same box following the indications published in other posts of this
> list, as for instance the commands:
> 1) << pbc wrap all -centersel protein -center com -compound res >>
> [the 'standard'] --> WITHOUT SUCCESS
> or 2) pbc wrap -all -centersel "serial 463 482 501 736 746 767 2203
> 2219 2220 2233 2257 2274 2391" -center com -compound chain >> [trying
> to center the box in atoms of monomer 1 and 2 close to the surface of
> interaction and trying to avoid the separation of the monomers that
> belongs to the same chain -different segments-] --> WITHOUT SUCCESS
> or 3) <<pbc set {65.622 95.458 72.223} -all >> and then << pbc wrap
> -center bb -centersel protein -compound res -all >> --> WITHOUT SUCCESS
> or 4) << pbc join chain -ref "serial 1425 2219" >> [trying to force
> atoms of the same chain, but of different segment, to remain together
> and centered in those atoms of the interphase] --> I obtain the error
> 'expected integer but got "P"' !!!??? [the identity of the chain is
> "P", but it is normal, isn it?]
> or many other similar approaches...
> I supposed that I miss something, because it seems to be a frequent
> problem in dynamics.
> Luis