From: Jérôme Hénin (jerome.henin_at_uhp-nancy.fr)
Date: Tue Jan 31 2006 - 12:57:09 CST

Ana,

Try adding "close $out" at the end of your script.

Jerome

Le Mardi 31 Janvier 2006 17:28, Ana Celia Araujo Vila Verde a écrit :
> 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
>
> avilaverde_at_engr.psu.edu
>
> _________________________________