proc sec_struct {sel i} { $sel frame $i $sel update set structure [$sel get structure] set H 0;set E 0;set C 0; set T 0; set B 0;set G 0;set I 0; foreach var $structure { incr $var } puts "Frame $i: H:$H E:$E C:$C T:$T B:$B G:$G I:$I" } proc main {} { set num [molinfo top get numframes]; set sel [atomselect top "protein and name CA"] for {set i 0} {$i < $num} {incr i} { sec_struct $sel $i } puts "T Turn; E Extended conformation; B Isolated bridge; H Alpha helix; G 3-10 helix; I Pi-helix; C Coil" } main