Question
Asked 19 February 2016

How to use pbc wrap command in vmd to re-center a multimeric protein?

During MD simulation, tetrameric protein diffuses in the simulation box and ends up crossing the periodic boundaries. One of four chains is jumping to the other side of the simulation box. For my analysis, I need all chains together and centered. 
I tried to use pbc wrap in VMD. But after wrapping the trajectory file, some of atoms are being transformed in an awkward way so I end up seeing stretches while visualizing the protein in new cartoons mode. I am guessing it's because of center of mass of my selection moving significantly. 
The command I have used:
pbc wrap -center com -centersel "protein" -compound residue -all
I could not find a way to fix that, somebody else reported a similar problem in vmd mailing list, so far no replies.
Any suggestions?

Most recent answer

Ruikang Sun
ShanghaiTech University

Popular answers (1)

Thomas Griffiths
University of Wollongong
If you really want the protein complex to be in the center of your box, for visualisation or some pbc unaware calculation etc, I use two sequential pbc wraps.
I do the same as Nur Öztürk above where I do a wrap where my centersel is one of the chains of my multimer. Then once everything is wrapped to that, the multimer is usually in the same pbc image and I do a second wrap using all the protein as my centersel.
pbc wrap -center com -centersel "protein and chain A" -compound residue -all
pbc wrap -center com -centersel "protein" -compound residue -all
9 Recommendations

All Answers (27)

Tugba Ozturk
Lawrence Livermore National Laboratory
Following command works:
pbc wrap -center com -centersel "segname PROA or segname PROC" -compound residue -all
Instead of selecting all chains, I chose two chains which are not moving to other side of the box so their center of mass is not changing a lot. 
1 Recommendation
Thomas Griffiths
University of Wollongong
If you really want the protein complex to be in the center of your box, for visualisation or some pbc unaware calculation etc, I use two sequential pbc wraps.
I do the same as Nur Öztürk above where I do a wrap where my centersel is one of the chains of my multimer. Then once everything is wrapped to that, the multimer is usually in the same pbc image and I do a second wrap using all the protein as my centersel.
pbc wrap -center com -centersel "protein and chain A" -compound residue -all
pbc wrap -center com -centersel "protein" -compound residue -all
9 Recommendations
Tugba Ozturk
Lawrence Livermore National Laboratory
Thanks a lot. I've found the same solution as well.  Still though, thanks for replying!
Devanand T Santha
Vidyashilp University
Can someone help me for the same? I have a system of 2 proteins (segname U1 and U2 in a complex form) in water. Due to the PBC issues these complexes are diffusing and sometimes crossing the box boundaries. I tried the above commands but with no success. I am not understanding the PBCtool commands either.
Tugba Ozturk
Lawrence Livermore National Laboratory
If pbc wrap -center com -centersel "protein " -compound residue -all did not work, I'd try;
pbc wrap -center com -centersel "protein and segname U1" -compound residue -all
then pbc wrap -center com -centersel "protein and segname U2" -compound residue -all
and then pbc wrap -center com -centersel "protein " -compound residue -all
1 Recommendation
Mousumi Banerjee
University of Calcutta
I also have two (same ) protein system. I have tried all the above suggestions, but still some part of one of my protein is on the parallel face of the water box.
Is their any other solution for this problem
Thanks
Atanu Acharya
Syracuse University
You can also try the following:
Load the trajectory in vmd and wait for all the frames. Then go to frame #0.
Open TkConsole and execute the following commands:
pbc join res -ref "<your selection>" -molid <use your molid> -now -sel all
pbc unwrap -first now
1 Recommendation
Alternatively if you know the dimensions of your box:
pbc set {x y z} -all
pbc wrap -centersel "protein" -center com -compound residue -all
2 Recommendations
Tian Shuaizhen
East China Normal University
two DNA single-strands were apart from each other in my DNA system , I use those two commands , just as Thomas Griffiths said above , only changed the "chain A" into "segname DNAA" and "protein" into "nucleic".
pbc wrap -center com -centersel "nucleic and segname DNAA" -compound residue -all
pbc wrap -center com -centersel "nucleic" -compound residue -all
then , problem was resolved.
Devanand T Santha
Vidyashilp University
@Tugba Ozturk Dalpé: I tried your commands. But in my case I am getting long bonds. And even pbc join is not working. :(
Tugba Ozturk
Lawrence Livermore National Laboratory
@Devanand T Santha sorry for extremely late reply. Have you solved the problem? If not, what kind of error are you getting?
Devanand T Santha
Vidyashilp University
@Tugba Ozturk Dalpé : my protein complex was giving me very long discontinuities (long bonds) between certain regions. In some cases, the commands work. I don't know why is it so. :(
1 Recommendation
Tugba Ozturk
Lawrence Livermore National Laboratory
That is strange. I would try giving the symmetrical parts of the protein as a selection to the pbc wrap and repeat it if necessary. Also, you might want to take a look at the following: "How to wrap a protein correctly using VMD and save a new dcd?" by M. Martínez-Archundia.
2 Recommendations
Jiali Wang
Columbia University
i try to wrap and rewrite the DCD file. still not solve the long bond problems. looks like some residues have not wrap back to origin box
Mohamed Shehata
University of California, San Diego
A new video of my VMD tutorials for beginners
How to use PBC wrap command in vmd to re-center a protein in a simulation box?
#compchem
4 Recommendations
I faced a similar issue as yours few years back. Before my answer, I would like to highlight a few points:
1. I presume your tetrameric complex (starting structure) was at the center of the simulation box and you had provided sufficient padding at all sides using water molecules?
2. The periodic boundary conditions (PBC) were on throughout the simulation?
If the answer to both is yes, then you could use these commands:
#If your coordinates are wrapped, else skip this step
#replace "all" with "-sel <enter your selection>" if required
pbc unwrap -all
#wrap your selection
pbc wrap -compound fragment -center com -centersel "<enter your selection>" -sel "<enter your selection>" -all
Best wishes!
2 Recommendations
Mohamed Shehata
University of California, San Diego
refer to this video it shows how to wrap a trajectory in VMD
2 Recommendations
Vasista Adupa
University of Groningen
Sourav Ray
I am having the same problem
What do you mean by the selection? was it the chains which were coming out of the box and appearing other side?
Hi Vasista Adupa, I have provided another explanation of the "wrap" command below:
pbc wrap -compound fragment -center com -centersel "<enter your selection>: the chain(s) or molecule(s) you want to keep at the center of the box" -sel "<enter your selection>: the chain(s) or molecule(s) you want to keep at the center of the box + any other molecule(s) of interest" -all
Note: Usually water molecules and ions are excluded from the "-centersel" because of their high rate of diffusion (mobility). Also, "-sel" flag is optional, however if you have a large (say > 100000 atoms) system with many water molecules and ions or other large miscellaneous molecules of lesser relevance, it would speed up the wrapping process.
As mentioned earlier, it is very important to give sufficient padding with water molecules at the start of the simulation; to account for the molecular fluctuations within the complex of interest during the simulation period.
For further reading, you may refer to the PBCTools page:
Best of luck!
1 Recommendation
Dear all,
I have a system with graphene sheet (constructed as a hexagonal box). But when I try to wrap the trajectory, the system goes into parallelogram representation, which breaks my trajectory. Kindly advise me on how to solve the problem
Madhur Sharma
Indian Institute of Technology Dhanbad
I tried the above mentioned methods but it didn't work for me.
So i tried to create another nc file using cpptraj with 'autoimage' command and the in vmd Tk console pbc unwrap -all.
I hope it also works for you.
Leyla Rohani
Georgia State University
Greetings,
I had the same issue regarding the protein diffusion after MD.
1- the autoimage command in cpptraj partially was useful, but the issue was not resolved completely.
2- the pbs command in vmd Tk console deformed the shape of the box and protein!
Thus, I solved the issue using cpptraj by using the original topology of the complex and putting the specific residue at the center. You may decide to shift the complex by a certain unit inside the box; look at https://amberhub.chpc.utah.edu/image/
Ruikang Sun
ShanghaiTech University

Similar questions and discussions

How to remove GROMACS periodic boundary conditions?
Question
26 answers
  • Anthony NashAnthony Nash
Hi all, I have done this countless time and I've "googled" this a lot. Unfortunately I have a simulation that simply won't behave. 
I am trying to visualise (and analyse) a trajectory in VMD after removing the periodic boundary conditions. It is a helical dimer (important, as I need to consider bonds over the box and also two separate peptides separating over the box), in a box of water. During the first frame the dimer is whole in the box.
I have tried many combinations of trjconv with little success. The most logical, as per the Gromacs web site was: 
trjconv -f human_npt_0_40ns.trr -s human_npt_0_40ns.tpr -pbc whole -e 2-o firstframe.gro
I checked the first frame - it is present as t=0.000. The protein (dimer) is whole in the box.
trjconv -f human_npt_0_40ns.trr -s firstframe.gro -pbc nojump -o nojump.gro
In VMD this displays lots of very long bonds i.e., passing through the unit cell to the other side - no good. I tried this option again with -center on the protein. Still no good. I tried to centre the protein for the trajectory after -mol nojump. Still wouldn't work. I am technically not sure what has happened here. On a similar simulation of a dimer, from the above two commands I was getting a beautiful trajectory in VMD. This would suggest that my reference file to the -pbc whole is incorrect, it is not. 
Short of listing every possible combination of -pbc I will leave this here and hope that someone has some insight into removing tricky periodicity from GROMACS trajectories. 
Thanks

Related Publications

Article
In order to study the structure-function relationship in the protein which is incorporated with p-nitro-L-phenylalanine, the method of MD(Molecular Dynamics) simulation was established and successfully used in the analysis of protein which contains p-nitro-L-phenylalanine. The force field of CHARMM can only stimulate protein with natural amino acid...
Got a technical question?
Get high-quality answers from experts.