VMD-L Mailing List
From: Jerome Henin (jhenin_at_vitae.cmm.upenn.edu)
Date: Sun Oct 01 2006 - 23:53:13 CDT
- Next message: Mario Valle: "Error on DNA"
 - Previous message: John Stone: "Re: problem loading dcd file"
 - In reply to: tnels_at_sfu.ca: "STRIDE for a trajectory in text mode"
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
 
Hi Nels,
The secondary structure information is stored in the field called "structure", 
accessible to scripts via atomselect. The Tcl fragment below defines a 
procedure that makes use of it and processes a trajectory:
proc stride { selText file } {
    set outfile [open $file w]
    set nf [molinfo top get numframes]
    set a [atomselect top [format "alpha and (%s)" $selText]]
    for { set i 0 } { $i < $nf } { incr i } {
        if {[expr {$i % ($nf/10)}] == 0} { puts stdout "frame $i"}
        molinfo top set frame $i
        mol ssrecalc top
        set s [$a get structure]
        puts $outfile "$i $s"
    }
    close $outfile
}
You should be able to use this almost without modification in your script.
Jerome
>  hello,
>
>  I need to run STRIDE on each frame of a trajectory and output the
> secondary structures for each residue.  The timeline plugin does this but
> is not available in text mode.  I have looked into sscache and it calls
> something from the vmd source called vmd_calculate_structures.  I cannot
> find information on this routine.  Is it possible to modify it and have it
> output to a file?  Or, is there other way to output the file produced by
> timeline without having to go through all the graphics (ie in text mode)?
>
>  thanks,
>  Nels
- Next message: Mario Valle: "Error on DNA"
 - Previous message: John Stone: "Re: problem loading dcd file"
 - In reply to: tnels_at_sfu.ca: "STRIDE for a trajectory in text mode"
 - Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
 



