VMD-L Mailing List
From: Ana Celia Araujo Vila Verde (avilaverde_at_engr.psu.edu)
Date: Thu Feb 16 2006 - 13:31:28 CST
- Next message: John Stone: "Re: catdcd.LINUX"
- Previous message: lily jin: "catdcd.LINUX"
- Next in thread: John Stone: "Re: problem with script to get RMSD"
- Reply: John Stone: "Re: problem with script to get RMSD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Dear all,
Based on the script to obtain the RMSD of one molecule relative to the same molecule at time 0, which can be found on the VMD manual, I built a very similar one to calculate the RMSD just for certain selections of the protein (see below signature). My problem is that if I do
selection "sheet protein backbone", the RMSD for sheet is OK but for protein and for backbone is wrong (I think).
If I take the exact same procedure and simply change to
selection " protein "
and then to
selection "backbone ",
I get different values for their respective RMSD! This leads me to think that the RMSD I get for protein and for backbone when I use """ selection "sheet protein backbone" """ is incorrect.
Could anyone shine some light on this? Clearly I'm doing something wrong, but I looked at the code for hours and could not find it.
Thanks Ana
_________________________________
Ana Célia Araújo Vila Verde
Penn State University
Department of Chemical Engineering
Fenske Laboratory
University Park, PA 16802
USA
Phone: +(1) (814) 863-2879
Fax: +(1) (814) 865-7846
_________________________________
To execute I type vmd -dispdev text -e nameOfFile.tcl on the unix command line.
proc print_rmsd0_through_time {{mol top}} {
##################################
set selection "sheet protein backbone" ;# the RMSD calculation is done for the elements of this list
#################################
set refFrame 0 ;# the RMDS is calculated against this reference
set incrm 1; # the comparison is done every incrm number of frames
set durTimestep 0.000002; # duration of the timestep in the simulation, in nanoseconds
set stepsFrame 500; # number of timesteps in each frame in *dcd fil
#-----------------------------------------------------------------------------
foreach sel $selection {
set outFile try21RMSD_${sel}_refFrame${refFrame}.txt; # result goes to this file
set out [open $outFile w]
puts $out "computing RMSD for all sheets using frame $refFrame as reference"
puts $out "time (ns) RMSD (angstrom)"
set reference [atomselect $mol "protein and $sel" frame $refFrame]
# the frame being compared
set compare [atomselect $mol "protein and $sel"]
set num_steps [molinfo $mol get numframes]
# Does comparison every incrm 30 frames
for {set frme $refFrame} {$frme <= $num_steps} {incr frme $incrm} {
# get the correct frame
$compare frame $frme
# compute the transformation
set trans_mat [measure fit $compare $reference]
# do the alignment
$compare move $trans_mat
# compute the RMSD
set rmsd [measure rmsd $compare $reference]
# print the RMSD
# puts "RMSD of $frame is $rmsd"
set time [expr {$frme*$stepsFrame*$durTimestep}]
puts $out "$time $rmsd"
}
close $out
$compare delete
unset trans_mat
unset rmsd
unset reference
unset num_steps
}
}
# Call procedure
print_rmsd0_through_time
#
quit
- Next message: John Stone: "Re: catdcd.LINUX"
- Previous message: lily jin: "catdcd.LINUX"
- Next in thread: John Stone: "Re: problem with script to get RMSD"
- Reply: John Stone: "Re: problem with script to get RMSD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]