The outage for Sunday 24th November has been cancelled.
Bioplib
Protein Structure C Library
 All Data Structures Files Functions Variables Typedefs Macros Pages
Functions
angle.c File Reference

Calculate angles, torsions, etc. More...

#include <math.h>
#include "MathType.h"
#include "macros.h"

Go to the source code of this file.

Functions

REAL blAngle (REAL xi, REAL yi, REAL zi, REAL xj, REAL yj, REAL zj, REAL xk, REAL yk, REAL zk)
 

Detailed Description

Calculate angles, torsions, etc.

Version
V1.6
Date
07.07.14
Author
Dr. Andrew C. R. Martin
Institute of Structural & Molecular Biology, University College London, Gower Street, London. WC1E 6BT.
andre.nosp@m.w@bi.nosp@m.oinf..nosp@m.org..nosp@m.uk andre.nosp@m.w.ma.nosp@m.rtin@.nosp@m.ucl..nosp@m.ac.uk

This code is NOT IN THE PUBLIC DOMAIN, but it may be copied according to the conditions laid out in the accompanying file COPYING.DOC.

The code may be modified as required, but any modifications must be documented so that the person responsible can be identified.

The code may not be sold commercially or included as part of a commercial product except as described in the file COPYING.DOC.

Description:

These routines return angles and torsion angles. The definition of a torsion angle is the chemical definition: i.e. Assuming the atoms are co-planar:

        A---B          A---B
            | = 0.0        |  = 180.0
            |              |
        D---C              C---D

Usage:

  REAL angle(xi,yi,zi,xj,yj,zj,xk,yk,zk)
  Input:   REAL     xi,yi,zi    Input coordinates
  Input:            xj,yj,zj
  Input:            xk,yk,zk
  Returns: REAL                 The angle between the 3 atoms


  REAL phi(xi,yi,zi,xj,yj,zj,xk,yk,zk,xl,yl,zl)
  Input:   REAL     xi,yi,zi    Input coordinates
  Input:            xj,yj,zj
  Input:            xk,yk,zk
  Input:            xl,yl,zl
  Returns: REAL                 The torsion angle between the 4 atoms


  REAL simpleang(ang)
  Input:   REAL     ang         An angle
  Returns: REAL                 Simplified angle

  Simplifies a signed angle to an unsigned angle <=2*PI


  REAL TrueAngle(REAL opp, REAL adj)
  Input:   REAL     opp         Length of opposite side
  Input:   REAL     adj         Length of adjacent side
  Returns: REAL                 The angle from 0 to 2PI

  Returns the true positive angle between 0 and 2PI given the opp and
  adj lengths

Revision History:

Definition in file angle.c.

Function Documentation

REAL blAngle ( REAL  xi,
REAL  yi,
REAL  zi,
REAL  xj,
REAL  yj,
REAL  zj,
REAL  xk,
REAL  yk,
REAL  zk 
)
Parameters
[in]xiInput coordinate
[in]yiInput coordinate
[in]ziInput coordinate
[in]xjInput coordinate
[in]yjInput coordinate
[in]zjInput coordinate
[in]xkInput coordinate
[in]ykInput coordinate
[in]zkInput coordinate
Returns
The angle between the 3 atoms

Calculates the angle between three sets of coordinates

  • 07.02.89 Original By: ACRM
  • 04.03.91 Fixed return value
  • 16.06.93 Changed float to REAL
  • 07.07.14 Use bl prefix for functions By: CTP

Definition at line 150 of file angle.c.