From: chandrakala gowda (chandrakala.gowda_at_gmail.com)
Date: Fri Feb 07 2014 - 10:08:55 CST

I need to measure dihedral angle of a particular segment
of several calculated protein models.

My code as follows

#==To load the pdb files==#

set filelist [glob *.pdb]
foreach file $filelist {
mol new $file waitfor all
}

#== to measure the dihedral of each file that is loaded==#

foreach mid [molinfo list] {

set Ncax [ atomselect $mid "segid B and resid 1 and name CAX" ]
set Ncay [ atomselect $mid "segid B and resid 1 and name CAY" ]
set Ncaz [ atomselect $mid "segid B and resid 1 and name CAZ" ]
set Ncbg [ atomselect $mid "segid B and resid 1 and name CBG" ]
set ind1 [ $Ncax get index ]
set ind2 [ $Ncay get index ]
set ind3 [ $Ncaz get index ]
set ind4 [ $Ncbg get index ]

set xdihed [ measure dihed [list $ind1 $ind2 $ind3 $ind4]]
puts $xdihed
}

#===#
But the code does not really work. It gives me the same value for the
dihedral angle always.
which in reality is not the case. when I measure for each molecule the
dihedral angle is different.
when i use the code for a single molecule

177.88656616210938
177.88656616210938
177.88656616210938
177.88656616210938
177.88656616210938
177.88656616210938
177.88656616210938
177.88656616210938

please could anyone point out if there is something wrong in the code.?