next up previous contents index
Next: Computing the Alignment Up: RMS and scripting Previous: RMS and scripting   Contents   Index


RMSD Computation

There are two atom selections needed to do an RMSD computation, the list of atoms to compare in both molecules. The first atom of the first selection is compared to the first atom of the second selection, fifth to fifth, and so on. The actual order is identical to the order from the input PDB file.

Once the two selections are made, the RMSD calculation is a matter of calling the measure rmsd function. Here's an example:

        set sel1 [atomselect 0 "backbone"]
        set sel2 [atomselect 1 "backbone"]
        measure rmsd $sel1 $sel2
  Info)  10.403014
This prints the RMSD between the backbone atoms of molecule 0 with those of molecule 1. You could also use a weighting factor in these calculations. The best way to understand how to do this is to see another example:
        set weighted_rmsd [measure rmsd $sel1 $sel2 weight mass]
  Info)  10.403022

In this case, the weight is determined by the mass of each atom. Actually, the term is really one of the standard keywords available to an atom selection. Other ones include index and resid (which would both be rather strange to use) as well as charge, beta and occupancy. These last terms useful if you want to specify your own values for the weighting factors.


next up previous contents index
Next: Computing the Alignment Up: RMS and scripting Previous: RMS and scripting   Contents   Index
vmd@ks.uiuc.edu