From: Daniela Rivas (
Date: Mon Apr 03 2017 - 02:58:54 CDT

Dear VMD users,

I'd like to measure the RMSD of the center of mass of my protein in a
trajectory, but I haven't found a way to do it. I tried using the "weight
mass" in the trajectory RMSD tool, but it gives me the exact same result as
without the weight.

I also tried writing the following script, but it didn't work either. It
kept giving me the error "measure rmsd: no atom selection". I guess it's
because the center of mass is not an atom.

set chainA_top_reference [atomselect top "protein resid 109 to 225" frame 0]
set CoM1_reference [measure center $chainA_top_reference weight mass]
set chainA_top_compare [atomselect top "protein resid 109 to 225"]

set file1 [open Top_CofM_RMSD_300K.dat w]
set num_steps [molinfo top get numframes]

for {set frame 0} {$frame < $num_steps} {incr frame} {
    $chainA_top_compare frame $frame
    set CoM1_compare [measure center $chainA_top_compare weight mass]
    set RMSD [measure rmsd $CoM1_compare $CoM1_reference]
        puts $file1 "$frame $RMSD"

close $file1

Does anyone know how to do this?

Thanks in advance,