// $CVSHeader: pal8e/inc/coordcalc.h,v 1.4 2005/02/15 02:43:50 indraneel Rel $

/*! \file Coordinate usage

  This is the header file to public coordinate data type and functions
  that work on it. */

//! An unit of COORDINATE
/*! This facilitates parameter passing. No need to implement integer
  based calculations (but retain double to speed things slightly). PDB
  coordinates are stored in 8.3 format. This should preferably only be used
  by the class ATOM since all coordinates generally belong to an atom. */
struct COORDINATE {
  /*! Coordinates are stored in double format to speed things up. This in in
    8.3 format in the pdb. */
  double x, y, z;
};
typedef struct COORDINATE COORDINATE;

//! Function to measure distance square between 2 points
double dist_sqr_c ( COORDINATE a, COORDINATE b );

//! Function to measure distance between 2 points
double distance_c ( COORDINATE a, COORDINATE b );

//! Function to calculate torsion angle, given 4 consecutive coordinates
double torsion_c ( COORDINATE a, COORDINATE b, COORDINATE c, COORDINATE d );

//! Function to calculate angle between vectors a and b (0-180)
double v_angle_c ( COORDINATE a, COORDINATE b, int range );
