From: Justin Gullingsrud (justin_at_ks.uiuc.edu)
Date: Wed Aug 07 2002 - 15:29:38 CDT

Hi Joe,

The way to do this is to create a dihedral label, like so:

        label add Dihedral m/a1 m/a2 m/a3 m/a4

Here m is the molecule id (0 if you've only loaded one molecule,
and need not be the same for all atoms) and a1-a4 are the atom id's,
which are 0-based indices.

Now, assuming there exists just one dihedral label, you can get the
value of the label for all trajectory frames with the command:

        set divals [label graph Dihedrals 0]

If you had more dihedral labels, you would replace 0 above with 1, 2, ...

This procedure is the most general, but for phi/psi angles you can also get
the values as an atom selection property. Here's an example:

        set sel [atomselect top "name CA and resid 5"]
        set n [molinfo top get numframes]
        for { set i 0 } { $i < $n } { incr i } {
                $sel frame $n
                lappend divals [$sel get phi]
        }

This would give you the phi angle for all frames for residue 5. I specified
"name CA" because all atoms in a residue are considered to have the same phi
angle, so I only need to pick one representative atom.

Hope this helps; let me know if you have any problems getting your results.

Justin

On Wed, Aug 07, 2002 at 03:01:06PM -0500, Joe Huang wrote:
> Dear VMD users,
> I am analyzing the trajectory coordinates of my MD simulations with VMD.
> I wonder if anyone know the TCL syntax under VMD for the measurement of
> the dihedral angles formed by 4 atom points in the MD trajectories.
> It's not necessary to be the phi, psi angles; it can be the other
> dihedral angles formed by picking 4 atoms.
> Your help will be highly appreciated.
>
> Joe
>
> --
> *******************************************
> Hung-Chung(Joe)Huang, M. T., M. Sc., Ph. D.
> Department of Biology and Biochemistry
> University of Houston, Houston, TX 77204
> Tel: (713) 743-8355, Fax: (713) 743-8351
> e-mail: HCHuang_at_uh.edu
> http://adrik.bchs.uh.edu/~jhuang
> *******************************************
>

-- 
  Justin Gullingsrud        3111 Beckman Institute        217-244-8946
  I been dropping the new science, and I be kicking the new knowledge,
  and I'm seeing to a degree that you can't get in college.  -- b.boys