From: John Stone (johns_at_ks.uiuc.edu)
Date: Wed Jan 03 2007 - 10:38:43 CST

Hi,
  You can use VMD to alter your atom coordinates by writing a simple
script that does what you want. If you know where you want the center
of mass, it is relatively straightforward to write a script that applies
the appropriate transformation, e.g. something like this, but calculated
once per trajectory frame:
   set centofbox { 50 50 50 }
   set sel [atomselect top all]
   set com [measure center $sel weight mass]
   set trans [vecsub $centofbox $com]
   $sel moveby [split $trans]

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Tue, Dec 26, 2006 at 12:54:20PM +0200, " politr"@huji.ac.il wrote:
> Dear VMD developers
> I'm trying to find some function that allows to recenter my peptide in a
> PBC every couple of frames during the simulation. I want to be able to
> preclude center of mass motion due to external forces as random noise in
> Langevin dynamics. Another option is to use VMD in order be able to
> recenter the peptide in PBC after minimization in the trajectory. I
> know that this question has appeared once. I tried the answers but it
> didn't work. I tried to use ptraj program. It puts the peptide in the
> center (0,0,0) but not at the center of my PBC. Anyone who knows,
> please, answer. Looking for your answer as soon as possible. Thank you
> very much for your help
> Regina

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078