From: Peter Freddolino (petefred_at_ks.uiuc.edu)
Date: Tue Dec 11 2007 - 10:39:05 CST

Hi Michel,
I'd recommend instead making a selection with the CA atoms of all the
residues you're interested in, and then after going to each frame do

mol reanalyze $mol
set mystruct [$sel get structure]

You can then parse the returned list for the number of "H" entries.
Best,
Peter

L. Michel Espinoza-Fonseca wrote:
> Hi all,
>
> I'm calculating the percentage of helical content of a protein (using
> a NAMD-generated trajectory). I've been using the following script:
>
> set outfile [open protein_SS_16.txt w]
> set numframes [molinfo top get numframes]
> set sel [atomselect top "resid 16 and name CA"]
> for {set frame 0} {$frame < $numframes} {incr frame} {
> animate goto $frame
> display update ui
> vmd_calculate_structure top
> $sel frame $frame
> $sel update
> set helixlist [$sel get alpha_helix]
> set helixcount 0
> puts $outfile " Alpha helix count: $helixcount "
> }
> close $outfile
>
> However, the script calculates the content *ONLY* for one residue at a
> time, so I was wondering if you have any ideas on how to modify it so
> I can get a table of residue vs count of alpha helix, or something
> similar. This is basically to avoid calculating it for every residue
> (which will take forever!). If you have alternative ideas, I'd be more
> than happy to read them.
>
> Thanks!
> Michel
>