MBG wiki | RecentChanges | Blog | 2024-12-23 | 2024-12-22

Calculation of rmsd from the average structure

xplor to save the day :

structure @native.psf end

coordinates disposition=comp @aver_and_rms.pdb

evaluate ($first = 0)
evaluate ($step  = 1)

evaluate ($current = $first)

read trajectory

asci=false
input=fitted.dcd
begin=$first
skip=$step
stop=20000000
end

set display=aver_vs_MD.rmsd end

while ($status # "COMPLETE") loop traj

coor fit selection=(not hydrogen) end
coor rms selection=(not hydrogen) end
evaluate ($rms_ALL_ALL = $RESULT)

coor fit selection=(segid="A   " and not hydrogen) end
coor rms selection=(segid="A   " and not hydrogen) end
evaluate ($rms_ALL_A = $RESULT)

coor fit selection=(segid="B   " and not hydrogen) end
coor rms selection=(segid="B   " and not hydrogen) end
evaluate ($rms_ALL_B = $RESULT)

coor fit selection=(name ca) end
coor rms selection=(name ca) end
evaluate ($rms_CA_ALL = $RESULT)

coor fit selection=(name ca and segid="A   ") end
coor rms selection=(name ca and segid="A   ") end
evaluate ($rms_CA_A = $RESULT)

coor fit selection=(name ca and segid="B   ") end
coor rms selection=(name ca and segid="B   ") end
evaluate ($rms_CA_B = $RESULT)


display $current $rms_CA_ALL $rms_CA_A $rms_CA_B $rms_ALL_ALL $rms_ALL_A $rms_ALL_B


evaluate ($current =$current + $step)

read trajectory next end

end loop traj

stop

Then use something in the line of

xmgr -block aver_vs_MD.rmsd -bxy 1:2 -bxy 1:3 -bxy 1:4
xmgr -block aver_vs_MD.rmsd -bxy 1:5 -bxy 1:6 -bxy 1:7

to view the results :

 rmsd from the average structure (xmgr)