From: Ashar Malik (
Date: Mon Dec 21 2015 - 05:20:43 CST

I use the following script to write a file holding 1 column with the RMSD
values for each frame of the trajectory compared to the starting structure.
mol delete all
#load PSF
mol new ionized.psf
#load DCD
mol addfile equil_heat_nvt.dcd waitfor all

set outfile [open rmsd.dat w]
set nf [molinfo top get numframes]
set frame0 [atomselect top "not water and not ions" frame 0]
set sel [atomselect top "not water and not ions"]
# rmsd calculation loop
for { set i 1 } { $i <= $nf } { incr i } {
$sel frame $i
$sel move [measure fit $sel $frame0]
puts $outfile "$i [measure rmsd $sel $frame0]"
close $outfile
the selection "not water and not ions" only leaves stuff of my interest.
You can tweak this to fit your needs.

Once you have the file written with 1 column holding RMSD values - you can
use any plotting tool to plot the column (on y-axis) against any array of
values on x-axis. Not specifying anything would equate to x-axis holding
frame numbers. Creating an array of values according to your time step and
plotting that on X versus the rmsd values on Y -- is what you are looking

There might be another way -- but I can't see why you wouldn't want to use
the above method.

On Mon, Dec 21, 2015 at 11:44 PM, Mai Aamer <> wrote:

> Hello,
> I'm trying to calculate RMSD for a trajectory file (.dcd) and I need to
> calculate it according to time steps not according to frames
> all what I reached to, plots the resulted graph between (RMSD and Frame)
> Can anyone help me about this issue???
> Thanks,
> Mai Ibrahim.