# [Chimera-users] plotting RMSD vs Residue number

Eric Pettersen pett at cgl.ucsf.edu
Thu Mar 2 15:47:56 PST 2006

```On Mar 2, 2006, at 7:02 AM, Isherwood, James wrote:
> Hi,
>
> I was wondering if there was a way to use chimera to calculate Root
> Mean Squared Deviations
> for individual residues or backbone atoms. In order to produce a
> graph showing the relative
> freedom of different areas of a protein.
Hi James,
We intend to add features to make this kind of evaluation easier in
the future.  Right now, you can only do pairwise evaluations between
structures.  I'm going to assume that you have the pair of structures
of interest superpositioned by some means (e.g. using the MatchMaker
tool)...

A) the structures have identical residue composition...

method A-1)  You can write a straightforward yet tedious command
script, such as:

echo residue 1; rmsd #0:1 #1:1
echo residue 2; rmsd #0:2 #1:2
echo residue 3; rmsd #0:3 #1:3
etc.

and use the 'source' or 'read' commands to execute it, or just
File...Open (it should have a .com or .cmd extension).  The output
will appear in the reply log, which you can save to a file.

method A-2)  You can use a slightly less tedious Python script:

import chimera
from Midas import rmsd
m1, m2 = chimera.openModels.list()
for r1, r2 in zip(m1.residues, m2.residues):
if r1.atoms[0].surfaceCategory != "main":
# skip ions/solvent/ligand
continue
print r1.oslIdent(), rmsd(r1.atoms, r2.atoms)

(in future Chimera releases, the slightly clunky "print r1.oslIdent
()..." will just be "print r1,...")
The file should end in .py and can be run by using the command 'open'
or the menu File...Open.  Again, the output will appear in the reply
log and can be saved from there.

B) the structures are similar but don't have identical residue
composition

method B-1)  You would use the Match->Align tool (with a generous
distance cutoff) to get as many residues aligned in the resulting
sequence alignment as possible.  You could actually have more than
two structures in this case, though the RMSD values you will
eventually generate will still be pairwise with respect to a chosen
reference structure.  Use the sequence-alignment's Structure->Assess
Match menu item to generate a residue attribute named matchDist for
the structures other than the one you choose to be the reference
structure.  'matchDist' is the distance between the carbon alphas of
corresponding residues of the reference and matched structures.  You
can then select on or color the structures based on this attribute.
You can also use the CalcAttr tool to save the matchDist attribute to
a file (just have CalcAttr copy the attribute to another name as its
"calculation").

method B-2)  There is no method B-2.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab
pett at cgl.ucsf.edu
http://www.cgl.ucsf.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-users/attachments/20060302/4b9be0a8/attachment.html>
```