IUBio

structure calculation

D M Webster bssdmw at bath.ac.uk
Wed May 17 04:01:42 EST 1995


In the referenced article, chan at bioch.ox.ac.uk writes:
>Hi there,
>
>Can anyone tell me is there a software that can calculate the phi and psi 
>angles of each amino acid residue from pdb files. The reason is that I 
>want to know which strach of amino acid is alpha-coil, beta-sheet, turn 
>and random coil _calculated_ from the pdb files. That means, not 
>prediction. I have try to extract the molscript file from rasmol, but the 
>result is not very good.
>
>Thanks in advance!
>
>
>
>
>**********************************************************************
>*         2	*	Christopher Chan			     *
>*   CCCCC	*	Dept. of Biochemistry			     *
>*   C		*	University of Oxford			     *
>*   C		*	Oxford					     *
>*   C		*	U.K.					     *
>*   CCCCC	*	Tel.: 0865-(2)75239			     *
>*		*	E-mail: chan at bioch.ox.ac.uk		     *
>**********************************************************************
>----- PGP public key available upon request -----
>
>

You could easily write your own.  Below is the IMPLEMENTATION module
of a Torsion module written in Modula-2. You should have no trouble
converting it to a language of your choice.  

P.S. I havn't included any of the IMPORTED modules but they are pretty
much self explanatory. If you don't know what DotProduct etc is then
check out any standard graphics text.

David Webster


IMPLEMENTATION MODULE Torsion;
(*=================================================================
  Version   : 1.00  Thu Oct 6 1994
  Author    : Dr David M Webster
  Rights    : Southern Cross Molecular Ltd
  Compiler  : Modula-2
  Component : Torsions

  COPYLEFT
    Copyright (C) 1994,1995. Dr David M Webster.
                             Southern Cross Molecular Ltd.
 
    No claim is made as to the validity of the code in this module.
    No warranty is granted or implied. 
    Users of this code do so at their own risk.
    
    Permission is granted to freely copy, distribute or modify
    this module, provided that 
    
    1. this header section is left intact.
    2. that no charge is made for the modules distribution or 
       distribution of any modified copy. 
    3. Modifications to this module should be entered under the 
       revision history and the name of the author stated. 
    4. All of the above warranties and permissions be included in
       any distribution of this module, modified or not.

  THE ABSTRACTION

  NOTE
    All routines return results as radians
    
  ROUTINES
  
    - Dihedral calculates the torsion angle of a set of four atoms v1-v4.
               The dihedral angle is the angle between the projection of 
	       p1-p2 and the projection of p4-p3 onto a plane normal to 
	       bond p2-p3.

               To calculate Phi, Psi, Omega, Chi or Cad pass as parameters to
               Dihedral as follows

               Psi   : p1 = previous [n-1] carbonyl carbon
                       p2 = nitrogen
                       p3 = calpha
                       p4 = carbonyl carbon

               Phi   : p1 = nitrogen
                       p2 = calpha
                       p3 = carbonyl carbon
                       p4 = next [n+1] nitrogen

               Omega : p1 = previous [n-1] calpha
                       p2 = previous [n-1] carbonyl carbon
                       p3 = nitrogen
                       p4 = calpha

               Chi   : Sidechain E.g. Lys  
	                    
			     Chi1         Chi2       Chi3       Chi4
	       
	               p1 = nitrogen     calpha      cbeta      cgamma   (CG)
		       p2 = calpha       cbeta       cgamma     cdelta   (CD)
		       p3 = cbeta        cgamma      cdelta     cepsilon (CE)
		       p4 = cgamma       cdelta      cepsilon   czeta    (CZ)
		       
               Cad   : p1 = [n-2] calpha
	               p2 = [n-1] calpha
		       p3 = [n]   calpha
		       p4 = [n+1] calpha
		       
		     
    - Angle    calculates the bend angle between adjacent atoms
               
	       E.g. for adjacent calpha atoms
	       
	               p1 = [n-1] calpha
	               p2 = [n  ] calpha
	               p3 = [n+1] calpha

               
  REVISION HISTORY
  v1.00  Thu Oct 6 1994. Initial implementation.
=========================================================================*)


IMPORT 
  B := BIOPT,
  C := Constants,
  Math,
  LM:= LongMath,
  V := Vector3D;



(*
Dihedral calculates the torsion angle of a set of four atoms p1-p4.
The dihedral angle is the angle between the projection of p1-p2 and
the projection of p4-p3 onto a plane normal to bond p2-p3.
*)

PROCEDURE Dihedral ( p1,p2,p3,p4 : B.PointType )     -- in
                                 : LONGREAL;         -- out
  
VAR 
  p12,p43,p23  : B.PointType;
  a,b,c        : B.PointType;
  u,v,dihedral : LONGREAL;

BEGIN
  V.Subtract(p1,p2,p12);
  V.Subtract(p4,p3,p43);
  V.Subtract(p2,p3,p23);
    
  V.CrossProduct(p23,p12,a);
  V.CrossProduct(p23,p43,b);
  V.CrossProduct(p23,b  ,c);
  
  u := V.DotProduct(b,b);
  v := V.DotProduct(c,c);

  dihedral := C.pi2;

  IF (u > 0.0) AND (v > 0.0) THEN
    u := V.DotProduct(a,b)/LM.sqrt(u);
    v := V.DotProduct(a,c)/LM.sqrt(v);
    IF (u <> 0.0) OR (v <> 0.0) THEN
      dihedral := Math.arctan2(v,u);
    END;
  END;

  RETURN dihedral;

END Dihedral;





PROCEDURE Angle ( p1,p2,p3 : B.PointType ) : LONGREAL;

VAR
  u,v : B.PointType;
  dot : LONGREAL;
  
BEGIN
  V.UnitVector( p2,p1,u );
  V.UnitVector( p2,p3,v );
  dot := V.Dot( u,p2,v );
  IF dot > 1.0 THEN
    dot := 1.0;
  ELSIF dot < -1.0 THEN
    dot := -1.0;
  END;
  RETURN LM.arccos(dot);
END Angle;
(*--------------------------------------------*)




END Torsion.






More information about the Bio-soft mailing list

Send comments to us at biosci-help [At] net.bio.net