From: John Stone (johns_at_ks.uiuc.edu)
Date: Mon Aug 08 2005 - 19:08:03 CDT

Chris,
  I don't have a turnkey solution for this particular problem at present.
In principle you could write a Tcl script that sorted all of the atom data
according to a file containing an alternate indexing scheme, but I haven't
actually tried it. What one would do would be to read in a list (from file
or a Tcl list for example) which contained the mapping of current atom
indices to their new counterparts. From there, you'd use atom selections
to copy old indices into a new Tcl list of lists, and then you'd copy the
data from the Tcl list into the indices according to your indexing scheme.
VMD won't be terribly happy about all of this as it will retain bond info
etc from the original structure, but if you're just trying to write a new
PDB, that's one step. Once you've got the new PDB, you can do the same
shuffle, one timestep at a time, to your DCD trajectory. Shuffling the
coordinates in the DCD file would actually be much simpler than writing
a new PDB file with the alternate indexing scheme, because VMD is much
less concerned with the coordinates of the atoms and will take what
you give it and just write out a new DCD trajectory. This will involve
a bit of scripting, but you ought to be able to do this by reading through
some atom selection examples, and learn a minimal bit of Tcl scipting to
get the job done. You'll still need to come up with that atom order list
somehow, but I assume you've probably got that already.

  John Stone
  vmd_at_ks.uiuc.edu

On Mon, Aug 08, 2005 at 05:48:33PM -0600, Chang, Christopher wrote:
> Hi,
>
> I am trying to analyze a NAMD dynamics trajectory of a protein-protein complex using CHARMM. The particular analysis method can't use two unconnected molecules as input, but each member's dynamics can be analyzed separately and the results added together. Unfortunately, atom numbers are retained during an "animate write" operation, so once atoms are extracted from the complex DCD file, there is a mismatch in atom numbers between any PSF file CHARMM builds (always starts at 1)and the NAMD trajectory.
> Is there a way to offset the atom numbers in a DCD file? For example, if protein 2 starts at atom 3000, can it be extracted such that this atom becomes number 1 in a new DCD file, 3001 becomes 2, etc.? Even better, can certain atom selections be assigned ranges of numbers?
>
> Thanks,
>
> Chris
>
> Christopher H. Chang, Ph.D.
> Research Associate
> National Renewable Energy Laboratory
> 1617 Cole Blvd., Mail Stop 1608
> Golden, CO 80401
> Phone (303) 275-3751
> Fax (303) 275-4007
>

-- 
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