Re: Help with TCl script

From: Ilya Chorny (ichorny_at_gmail.com)
Date: Fri Oct 26 2007 - 00:38:05 CDT

I made a typo in my script, see below for the fix. It should be
max_resid_val not max_rmsd_val.

On 10/25/07, Ilya Chorny <ichorny_at_gmail.com> wrote:
>
>
> Hi I am writing a tcl script that, for each segment of my trimer protein,
> prints out the RMSD for each residue as a function of time. My protein is
> falling apart in my simulation and I want to track the progression by single
> residue RMSDs.
>
> So first I align all the trajectories by segment. For example I first
> align segment #1. Then I figure out the number of residues in segment #1 and
> compute each rmsd as a function of time. I then repeat for the other
> segments. I could also do this for the whole protein but for some reason
> going by segment makes more sense to me.
>
> My problem is that I do not know how to impliment some simple things using
> TCL. My script is below. The parts in front of the question marks is where I
> do not know how to do something. Any help would be greatly appreciated.
>
> Best,
>
>
>
>
> --
> Ilya Chorny Ph.D.
>
>
>
> proc rmsd{{mol top}} {
> # use frame 0 for the reference
> set reference [atomselect $mol "protein" frame 0]
>
> proc rmsd{{mol top}} {
> # use frame 0 for the reference
>
>
> for {set segment 1} {$segment < $4} {incr segment} {
> # the frame being compared
> set reference [atomselect $mol "protein and segname P$segment and
> backbone" frame 0]
> set compare [atomselect $mol "protein and segname P$segment and
> backbone"]
> set num_steps [molinfo $mol get numframes]
> for {set frame 0} {$frame < $num_steps} {incr frame} {
> # get the correct frame
> $compare frame $frame
> # compute the transformation
> set trans_mat [measure fit $compare $reference]
> # do the alignment
> $compare move $trans_mat
> }
> }
> set resid [atomselect $mol "protein and segname P$segment and name
> CA"]
> ?? set min_resid_val
> ?? set max_resid_val
> ?? for {set num $min_resid_val } {$num < $max_resid_val + 1} {incr
> max_resid_val} {
> ?? print to file $num
>
> set $reference [atomslect $mol "resid $num" frame 0]
> set $compare [atomslect $mol "resid $num"]
> for {set frame 0} {$frame < $num_steps} {incr frame} {
> $compare frame $frame
> set rmsd [measure rmsd $compare $reference]
> ?? print to file $rmsd
> }
> ?? print to file \n (space)
> }
> }
>
>
>
>
>
> --
> Ilya Chorny Ph.D.
>

-- 
Ilya Chorny Ph.D.

This archive was generated by hypermail 2.1.6 : Wed Feb 29 2012 - 15:45:25 CST