Re: Post processing NAMD trajectory

From: Kodituwakku,Dimuthu Nirmani (
Date: Tue Sep 15 2020 - 20:46:39 CDT

Thank you all for the help !

Get Outlook for Android<>
From: Alex Balaeff <>
Sent: Sunday, September 13, 2020 10:26:34 PM
To: namd-l <>; Kodituwakku,Dimuthu Nirmani <>
Subject: Re: namd-l: Post processing NAMD trajectory

[External Email]

On Sun, Sep 13, 2020 at 2:10 PM Kodituwakku,Dimuthu Nirmani
<> wrote:
> Hi all,
> I want to renumber residues of my trajectory sequentially. Currently, I have numbered my 2 monomers of my dimer starting from 1-587. Is there a way to number residues from 1-1174 in my trajectory?

for {set ires 1} { $ires <= 587 } { incr ires } {
 # Let's say you have 2 segments: PROA:1-587 and PROB:1-587 --> 588-1174
  set a [atomselect top "resid $ires and segid PROB"]
  set newires [expr $ires + 587]
  $a set resid $newires
  $a delete
  # the last command just cleans up the selection so as to not
overload the computer memory with too many selections
  # contrary to what it sounds, no atoms are deleted ;-)

> Also does using the VMD RMSD trajectory tool to calculate RMSD for the entire protein get affected by having residues numbered from 1-587 for the 2 monomers?

The RMSD trajectory tool is affected by whatever selection you put in
it. If you have several molecules in the list, it will apply the same
selection to both. If the different molecules don't have the same
number of atoms in the selection (say, the selection is "name CA" and
one protein is longer than the other), the tool won't work. It's up to
the user to clean up the molecules and make sure the selection refer
to each molecule.

If you want to compute the RMSD between different parts **of the same
molecule** -- say, PROA and PROB above -- then the RMSD tool won't
work straightforwardly and you are better off doing things by hand,
aka a TcL script. See:

If you really want to use the GUI RMSD tool, there is a convoluted
approach I sometimes use. Load the molecule of interest twice, then
label the area of interest in each copy, say, in the beta column. Like

mol new myprotein.pdb waitfor all # molecule ID 0
mol new myprotein.pdb waitfor all # molecule ID 1

# Mark CA atoms in segment PROA in molecule 0
set a [atomselect 0 "all"]
$a set beta 0
set b [atomselect 0 "segid PROA and name CA"]
$b set beta 1

# Mark CA atoms in segment PROB in molecule 1
set c [atomselect 1 "all"]
$c set beta 0
set d [atomselect 1 "segid PROB and name CA"]
$d set beta 1

Now, you can type selection text:

beta 1

into the RMSD tool and use the tool to compare PROA (in molecule 0)
vs. PROB (in molecule 1). Again, make sure the number of atoms in both
selections is the same.

Good luck,


> Thank you,
> Best,
> Dimuthu

This archive was generated by hypermail 2.1.6 : Fri Dec 31 2021 - 23:17:09 CST