RE: Aligning structures

From: EPF \(Esben Peter Friis\) (EPF_at_novozymes.com)
Date: Fri Mar 10 2006 - 01:34:40 CST

Hi!

I'm using the Gromacs tools to do the solvent stripping, aligning and
rmsd calculations. I have quoted an earlier post from the PyMOL mailing
list below including how to do this. You can just skip the PyMOL parts
if you don't use that program :-)

VMD can read the Gromacs .trr and .xtc files, so instead of creating a
pdb file as below, you can tell trjconv to create a .trr or .xtc file
instead, if you would like to see the aligned trajectory.

Best wishes

Esben

------------------

A - relatively - easy way to read DCDs into PyMOL is:

* Convert the .dcd to .trr using "catdcd 4.0"
(http://www.ks.uiuc.edu/Development/MDTools/catdcd/). At the same time
you can concatenate multiple .dcd files, remove solvent, skip frames,
etc.

* Convert the .trr file to a multi-model .pdb file using "trjconv" from
the Gromacs package (http://www.gromacs.org/) Here you can select eg.
desired residues (using make_ndx), skip frames, and align each frame to
a reference structure before writing the pdb file.

Using two programs may seem a bit complicated, but most likely you want
to concatenate files, remove solvent or do other processing anyway, so I
think it is ok :-)

This works quite nicely for me. If you want to look at every single
frame of a long MD with many atoms, you may run into problems with very
large pdb files, though.

Having the trajectory as a .trr file also gives the possibility of using
Gromacs' analysis tools, such as g_rms or g_rmsf.

There are some examples below...

Cheers,

Esben

-----------------

# the structure is in "system.pdb", "system.psf" and trajectories in
0000-0100.dcd ... 0900-1000.dcd.

# creating the stripped pdb file (removing solvent (residues called
TIP3)): grep -v TIP ../system.pdb > solute.pdb

# creating the index file for catdcd (for removing solvent): awk '/ATOM/
{print $2-1}' solute.pdb > solute.idx

# making the stripped file in gromacs format.
/z/linux/catdcd4/LINUX/bin/catdcd4.0/catdcd -o wt_strip.trr -otype trr
-i solut.idx ../0000-0100.dcd ../0100-0200.dcd ../0200-0300.dcd
../0300-0400.dcd ../0400-0500.dcd ../0500-0600.dcd ../0600-0700.dcd
../0700-0800.dcd ../0800-0900.dcd ./0900-1000.dcd

----------------------

# The per-residue rms and pdb file for putty cartoon
g_rmsf -f wt_strip.trr -s solute.pdb -oq test.pdb
# select group 4 for backbone
# load "test.pdb" in PyMOL and show it as putty cartoon:

pymol> load "test.pdb"
pymol> cartoon putty, test
pymol> show cartoon, test
pymol> hide lines, test

--------------------

# The overall rmsd as a function of time
g_rms -f wt_strip.trr -s solute.pdb
# selecet group 0, compare to 1, and select group 0 again
# The resulting "rmsd.xvg" can be shown directly with xmgrace
(http://plasma-gate.weizmann.ac.il/Grace/):

xmgrace rmsd.xvg

---------------------

#Showing MD ensemble of specific residues (here
100,101,102,103,200,201):

# run make_ndx

make_ndx -f solute.pdb -o site.ndx
# make a new group
r 100 101 102 103 200 201
# delete the other groups:
keep 14
# call it "site"
name 0 site
# save and quit:
q

# run trjconv to get a pdb file with every 100th frame for the site
residues: trjconv -f wt_strip.trr -o site.pdb -s solute.pdb -n site.ndx
-fit rot+trans-skip 100

# load site.pdb and solute.pdb in pymol

pymol> load site.pdb
pymol> load solute.pdb

# use a similar selection in pymol to align it to the reference
structure:
pymol> select solute and resi 100+101+102+103+200+201
pymol> align site////CA, sele////CA

> -----Original Message-----
> From: owner-namd-l_at_ks.uiuc.edu
> [mailto:owner-namd-l_at_ks.uiuc.edu] On Behalf Of Peter Freddolino
> Sent: 10. marts 2006 04:37
> To: Richard Wood
> Cc: NAMD-L; VMD-L
> Subject: Re: namd-l: Aligning structures
>
>
> Dear Richard,
> you can align multiple frames of a trajectory using the attached tcl
> script. To use it, do the following:
> source align_frames.tcl
> align_frames molid seltext
>
> This will go through the entire trajectory in molecule molid,
> align each
> frame of it to the first (it only aligns the selection of seltext,
> usually "all") and outputs the rmsds of each step to the file
> rmsd.dat.
> The script is fairly short so you should be able to modify it to suit
> your needs.
> Best,
> Peter
>
> Richard Wood wrote:
>
> > Hi all,
> >
> > Is there a way to align all the frames of a dynamics
> calculation using
> > VMD? I know that one can open two or more molecule files and do an
> > alingment on them, but I need to know if I can do this with
> a dynamics
> > trajectory having 100 frames or more. I need to align all the
> > structures and then calculate RMSD's. Any help will be
> most appreciated.
> >
> > Richard
> >
> > Richard L. Wood, Ph. D.
> > Computational Chemist
> > Cockeysville, MD 21030
> > rwoodphd_at_yahoo.com
> >
> >
> >
>

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 05:19:18 CST