VMD-L Mailing List
From: Ana Celia Araujo Vila Verde (avilaverde_at_engr.psu.edu)
Date: Tue Jan 31 2006 - 10:28:37 CST
- Next message: John Stone: "Re: printing to a file from a procedure to get RMSD"
- Previous message: andrea spitaleri: "Re: vmd installation on the server"
- Next in thread: John Stone: "Re: printing to a file from a procedure to get RMSD"
- Reply: John Stone: "Re: printing to a file from a procedure to get RMSD"
- Reply: Jérôme Hénin: "Re: printing to a file from a procedure to get RMSD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Hi,
I'm using a script I found in the VMD website to compute the RMSD of a molecule relative to the same molecule at frame zero.
I want the output to go to a file, so I added the necessary commands. The file opens when I run the script but nothing gets written in it even though output does make it to the screen!
I'd really appreciate some help. Here's the script (the parts I added are between ######):
# Prints the RMSD of the protein atoms between each \timestep
# and the first \timestep for the given molecule id (default: top)
proc print_rmsd_through_time {{mol top}} {
# use frame 0 for the reference
set reference [atomselect $mol "protein" frame 0]
# the frame being compared
set compare [atomselect $mol "protein"]
set num_steps [molinfo $mol get numframes]
############################
set outFile RSMD_t0.rms
set out [open $outFile w]
############################
# Does this every 30 frames
for {set frame 0} {$frame < $num_steps} {incr frame 30} {
# get the correct frame
$compare frame $frame
# 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"
##############################
puts $out "RMSD of $frame is $rmsd"
##############################
}
}
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
_________________________________
- Next message: John Stone: "Re: printing to a file from a procedure to get RMSD"
- Previous message: andrea spitaleri: "Re: vmd installation on the server"
- Next in thread: John Stone: "Re: printing to a file from a procedure to get RMSD"
- Reply: John Stone: "Re: printing to a file from a procedure to get RMSD"
- Reply: Jérôme Hénin: "Re: printing to a file from a procedure to get RMSD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]