VMD-L Mailing List
From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Jan 31 2006 - 10:43:23 CST
- Next message: Paul Van Allsburg: "Re: ntdll.dll problem when changing drawing methods"
- Previous message: Ana Celia Araujo Vila Verde: "printing to a file from a procedure to get RMSD"
- In reply to: Ana Celia Araujo Vila Verde: "printing to a file from a procedure to get RMSD"
- Next in thread: 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 didn't see a matching "close $out" in your script. This is the most
likely cause of your problem.
John Stone
vmd_at_ks.uiuc.edu
On Tue, Jan 31, 2006 at 11:28:37AM -0500, Ana Celia Araujo Vila Verde wrote:
> 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
>
> _________________________________
>
>
>
-- NIH Resource for Macromolecular Modeling and Bioinformatics Beckman Institute for Advanced Science and Technology University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801 Email: johns_at_ks.uiuc.edu Phone: 217-244-3349 WWW: http://www.ks.uiuc.edu/~johns/ Fax: 217-244-6078
- Next message: Paul Van Allsburg: "Re: ntdll.dll problem when changing drawing methods"
- Previous message: Ana Celia Araujo Vila Verde: "printing to a file from a procedure to get RMSD"
- In reply to: Ana Celia Araujo Vila Verde: "printing to a file from a procedure to get RMSD"
- Next in thread: Jérôme Hénin: "Re: printing to a file from a procedure to get RMSD"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]