From: Marcos Sotomayor (sotomayo_at_ks.uiuc.edu)
Date: Wed Mar 29 2006 - 20:43:18 CST

Hi,

I'm glad it worked, but not sure why you have to source both scripts, they
should work independently. Anyway, none of these scripts modify the pdb
file, they just set the value ($res_b set beta $rmsd($r) for the
selections stored in memory. You can check this by coloring the molecule
using the beta value. If you want to store this information in a pdb
file, you may want to add to your script something like "$all writepdb
<name.pdb>".

Marcos

On Wed, 29 Mar 2006, Turman, Cheri M wrote:

> Hi Marcos,
> I was not sourcing residue_rmsd.tcl and consecutivly typing the
  command: set sel_resid [[atomselect top "protein and alpha"] get resid]
  before sourcing the fullthrottle script. Now that I did these in order
  it worked. This generated the .dat file and showed the rmsd in the tk
  console. However, I am still not able to set the color by B value using
  the color method beta. I read somewhere that fullthrottle should write
  the the B values in the pdb file but my pdb file has not been changed nor
  do I see anywhere in the two scripts used where it calls to open the pdb
  file or write to it. Is the pdb file suppose to be altered or are the B
  values stored somewhere else? If so, how do I link them to my .dcd/.pdb
  file in order to color by them?
> Thanks,
> Cheri
>
>
>
>
> -----Original Message-----
> From: Marcos Sotomayor [mailto:sotomayo_at_ks.uiuc.edu]
> Sent: Wed 3/29/2006 7:49 PM
> To: Turman, Cheri M
> Cc: vmd-l_at_ks.uiuc.edu
> Subject: Re: vmd-l: rmsd-fullthrottle.tcl problem
>
>
> Hi Cheri,
>
> What are the labels for chains in your protein?
> Note that this script is using "chain U" to select residues,
> likely your protein has chains labeled A, B, C, etc. and therefore
> you need to replace "chain U and resid $r and noh"
> by "chain <whatever label you have> and resid $r and noh".
> Let us now if that solves the problem.
>
> Marcos
>
>
> On Wed, 29 Mar 2006, Turman, Cheri M wrote:
>
>> Hi all,
> > I am having trouble with the rmsd-fullthrottle.tcl script. I am able
> to run the residue_rmsd.tcl script but not this one. I really would like
> to show B values by the coloring method in VMD from a simulated annealing
> trajectory I ran in NAMD. I have the .dcd, .pdb and .psf files loaded in
> VMD and next go to the tcl script page. I type: source
> rmsd-fullthrottle.tcl and get the output: Calculating rmsd for frame 0
> ...
>> measure rmsd: No atoms selected
>>
>>
>>
>> Here is the rmsd-fullthrottle.tcl script I am calling:
>>
>>
>> # $Id: rmsd-fullthrottle.tcl,v 1.3 2005/03/29 17:58:52 sotomayo Exp $
>>
>> # This script contains a procedure called rmsd_residue_over_time that calculates the average RMSD for each residue in a selection over all frames in a trajectory. The procedure is called as:
>> # rmsd_residue_over_time mol sel_resid
>> #where mol is the molecule in VMD and sel_resid is a list of the residue numbers in that selection.
>>
>> #You can use the procedure for any residue or list of residues. Here, as an example, we will make a selection for all residues in the protein. Note that this will take a long time to calculate:
>>
>> set sel_resid [[atomselect top "protein and alpha"] get resid]
>>
>> #The procedure is presented below. It also sets the B value to the value calculated, so you can color the protein by RMSD. The call for the procedure is at the end of the file.
>>
>> proc rmsd_residue_over_time {{mol top} res} {
>>
>> # use frame 0 for the reference
>> set reference [atomselect $mol "protein" frame 0]
>> # the frame being compared
>> set compare [atomselect $mol "protein"]
>> #make a selection with all atoms
>> set all [atomselect top all]
>> #get the number of frames
>> set num_steps [molinfo $mol get numframes]
>>
>> foreach r $res {
>> set rmsd($r) 0
>> }
>>
>> #loop over all frames in the trajectory
>> for {set frame 0} {$frame < $num_steps} {incr frame} {
>> puts "Calculating rmsd for frame $frame ..."
>> # get the correct frame
>> $compare frame $frame
>> $all frame $frame
>> # compute the transformation
>> set trans_mat [measure fit $compare $reference]
>> # do the alignment
>> $all move $trans_mat
>> # compute the RMSD
>>
>> #loop through all residues
>> foreach r $res {
>> set ref [atomselect $mol "chain U and resid $r and noh" frame 0]
>> set comp [atomselect $mol "chain U and resid $r and noh" frame $frame]
>> set rmsd($r) [expr $rmsd($r) + [measure rmsd $comp $ref]]
>> $comp delete
>> $ref delete
>> }
>> }
>> set ave 0
>> foreach r $res {
>> set rmsd($r) [expr $rmsd($r)/$num_steps]
>> # print the RMSD
>> puts "RMSD of residue $r is $rmsd($r)"
>> set res_b [atomselect $mol "resid $r"]
>> $res_b set beta $rmsd($r)
>> $res_b delete
>> set ave [expr $ave + $rmsd($r)]
>>
>> }
>> set ave [expr $ave/[llength $res]]
>> puts " Average rmsd per residue: $ave"
>>
>> }
>>
>> #Call the procedure
>>
>> rmsd_residue_over_time top $sel_resid
>>
>>
>>
>>
>> Has anyone seen a problem in the script or know of a better way?
>> Cheers,
>> Cheri
>>
>
>