From: Maxim Belkin (mbelkin_at_ks.uiuc.edu)
Date: Fri Feb 07 2014 - 10:23:00 CST

Hi Chandrakala,

When you measure dihedral, you have to specify molecule by adding 'molid $mid' at the end of ‘measure' command. Otherwise it gets atom indices and analyzes top molecule.

Maxim

 
On Feb 7, 2014, at 10:08 AM, chandrakala gowda <chandrakala.gowda_at_gmail.com> wrote:

> 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.?