From: poker_at_physics.usyd.edu.au
Date: Mon Feb 11 2008 - 18:51:32 CST

STRIDE will only do its calculation on the frame displayed in the window -
the key is to animate the display during the script. I've written one that
will work for you, although it's quite slow - you'll see the frames change
as the script runs.

===================
proc helic2 {segname a b} {
display update on

set file "helicS.dat"

 set outfile [open temp.file w];
set nf [molinfo top get numframes]
animate goto 0
set sel [atomselect top "segname $segname and resid $a to $b and name CA
frame 0"]
mol ssrecalc top
puts $outfile "0\t[$sel get structure]"

# ssrecalc loop
for {set i 1 } {$i < $nf } { incr i } {
    animate goto $i
    display update
    $sel frame $i
    $sel update
    mol ssrecalc top
   puts $outfile "$i\t[$sel get structure]"
}

 close $outfile
echo "Run the following command:"
echo "sed \"s/\\\[HGI\\\]/1/g;s/\\\[BCET\\\]/0/g\" < temp.file > $file, or"
echo "sed \"s/\\\[HGI\\\]/1/g;s/\\\[BE\\\]/2/g;s/\\\[CT\\\]/0/g\" <
temp.file > $file"
}

puts "Procedure helic2."
puts "This script calculates the degree of helicity over all frames of the
protein."
puts "It uses the vmd STRIDE algorithm for the sake of standardisation."
puts "You will need to run an additional bash command at prompt to call sed
and edit"
puts "The temp.file output to \"helicS.dat\"."
puts "WARNING: I suspect you should turn off all representations to
maximise the speed."
puts "Usage: helic2 <segname> <resid of 1st residue> <resid of last
residue>"
=====================

Quoting Nuno Loureiro Ferreira <nunolf_at_ci.uc.pt>:

> Hi
>
> "$sel update" should be right after "$sel frame $i".
> Thus, try this:
>
> ===========================================================
> set sel [atomselect top "protein and name CA"]
> set n [molinfo top get numframes]
> set filename "s_s.txt"
> set fileID [open /home/ozengin/remd_vacuum_26/$filename w]
> for { set i 0 } { $i < $n } { incr i } {
> $sel frame $i
> $sel update
> set secstruct [$sel get structure]
> puts $fileID "$i\t$secstruct"
> }
> close $fileID
> ==========================================================
>
> Cheers,
> Nuno
>
> OZGE ENGIN wrote:
> > Hi Rui,
> >
> > I tried to do what you suggested to me. However, I could not update
> the frame for secondary structure calculation. Consequently, I had the
> same secondary structure assignment of the first frame for other frames.
> > I attach the code below. Could you look at it, please?
> >
> > Thank you very much!!!
> > ===========================================================
> > set sel [atomselect top "protein and name CA"]
> > set n [molinfo top get numframes]
> > set filename "s_s.txt"
> > set fileID [open /home/ozengin/remd_vacuum_26/$filename w]
> > for { set i 0 } { $i < $n } { incr i } {
> > $sel frame $i
> > set secstruct [$sel get structure]
> > puts $fileID "$secstruct"
> > $sel update
> > }
> > close $fileID
> > ==========================================================
> > Ozge Engin
> > =================================
> > Computational Science & Engineering
> > Koc University
> >
> >
> >
> >
>
>

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.