CCL Home Page
Up Directory CCL proja.h
/**************************************************************************/
/******************  Craig projection area calculations  ******************/
/**************************************************************************/

#define  A_IGNORE 0   /* circle provides nothing to area combination      */
#define  A_NORMAL 1   /* normal overlap combo., I's from different atoms  */
#define  A_GCENT  2   /* G at atoms centre                                */
#define  A_NEGS   4   /* ellipse on other side of G (theta > pi)          */
#define  A_INGO   8   /* ignore first intersept vector                    */
#define  A_INGT   16  /* ignore second intersept vector                   */
#define  A_TEMP   32  /* temporary circle for multi atom purposes         */
#define  A_MULTI  64  /* multi atom type (ignore in many cases)           */

#define  A_PERC   5   /* percentage gap between A and G (rel to tradius)  */

typedef struct circlestruct
{
  double radius;                 /* circle radius                         */
  double delta;                  /* atom distance from G                  */
  Atms *A;                       /* pointer to atom                       */
  Vector I[2];                   /* vectors to overlap intersepts         */
  double theta, phi, gamma;      /* angles of intersepts from -A(x,y)     */
  char mode;                     /* mode (normal or multi_atom)           */
#ifdef DEBUG
  int num;                       /* circles number in list                */
#endif
  struct circlestruct *prev;     /* pointer to previous circle structure  */
  struct circlestruct *next;     /* pointer to next circle structure      */
} Circ;

typedef struct interstruct
{
  Vector I;                      /* intersept vector on plane             */
  Atms *A[2];                    /* two atoms intersecting                */
  double phi;                    /* phi angle about G                     */
#ifdef DEBUG
  int num;                       /* intersepts number in list             */
#endif
  struct interstruct *prev;      /* pointer to previous intersept         */
  struct interstruct *next;      /* pointer to previous intersept         */
} Mint;

typedef struct poverlapstruct
{
  Circ *Cr;                      /* circles encompassing overlap          */
  Mint *Mi;                      /* list of intersections                 */
  Vector G;                      /* vector to center of overlap           */
  int order;                     /* overlap order (eg. 3=triple overlap   */
  int ncir;                      /* number of circles bounding overlap    */
  double area;                   /* area calculated                       */
#ifdef DEBUG
  int num;                       /* overlaps number in list               */
#endif
  struct poverlapstruct *prev;   /* pointer to previous overlap structure */
  struct poverlapstruct *next;   /* pointer to next overlap structure     */
} Pover;

Pover *New_Pover(Pover *old);
Pover *Close_Pover(Pover *current);
int Initialize_Pover(Pover *pover, int order);
int Find_2atom_Intersepts_P(double rA, double rB, Vector V[2], Vector I[2]);
void Setup_Two_Circles(Pover *pover, Atms *A[MAX_OVER], char mode);
double Double_Poverlap_Area(Pover *pover, unsigned mode);
double New_Craig_Counting_P(Mol *M, unsigned mode);

/**************************************************************************/
/******************  The End ...  *****************************************/
/**************************************************************************/
Modified: Fri Dec 8 17:00:00 1995 GMT
Page accessed 5897 times since Sat Apr 17 21:59:48 1999 GMT