fcf0342c5b43a5a76c8acc8fa371ae1f14f3b997
[alexxy/gromacs.git] / include / types / atoms.h
1 /*
2  * $Id$
3  * 
4  *       This source code is part of
5  * 
6  *        G   R   O   M   A   C   S
7  * 
8  * GROningen MAchine for Chemical Simulations
9  * 
10  *               VERSION 2.0
11  * 
12  * Copyright (c) 1991-1999
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
16  * Please refer to:
17  * GROMACS: A message-passing parallel molecular dynamics implementation
18  * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19  * Comp. Phys. Comm. 91, 43-56 (1995)
20  * 
21  * Also check out our WWW page:
22  * http://md.chem.rug.nl/~gmx
23  * or e-mail to:
24  * gromacs@chem.rug.nl
25  * 
26  * And Hey:
27  * Green Red Orange Magenta Azure Cyan Skyblue
28  */
29
30 #ifdef HAVE_CONFIG_H
31 #include <config.h>
32 #endif
33
34 enum {
35   eptAtom, eptNucleus, eptShell, eptBond, eptDummy, eptNR
36 };
37 /* The particle type */
38  
39 enum {
40   egcTC,    egcENER,   egcACC,   egcFREEZE, 
41   egcUser1, egcUser2,  egcVCM, egcXTC,
42   egcNR 
43 };
44
45 typedef struct {
46   real          m,q;            /* Mass and charge                      */
47   real          mB,qB;          /* Mass and charge for Free Energy calc */
48   unsigned short        type;           /* Atom type                            */
49   unsigned short        typeB;          /* Atom type for Free Energy calc       */
50   int           ptype;          /* Particle type                        */
51   int           resnr;          /* Residue number                       */
52   unsigned char grpnr[egcNR];   /* Group numbers                        */
53   unsigned char chain;          /* chain identifier                     */
54 } t_atom;
55
56 typedef struct {
57   int  type;                    /* PDB record name                      */
58   int  atomnr;                  /* PDB atom number                      */
59   char altloc;                  /* Alternate location indicator         */
60   char pdbresnr[6];             /* PDB res number                       */
61   real occup;                   /* Occupancy                            */
62   real bfac;                    /* B-factor                             */
63   bool bAnisotropic;            /* (an)isotropic switch                 */
64   int  uij[6];                  /* Anisotropic B-factor                 */
65 } t_pdbinfo;
66
67 typedef struct {
68   int  nr;                      /* Number of different groups           */
69   int  *nm_ind;                 /* Index in the group names             */
70 } t_grps;
71
72 typedef struct {
73   int           nr;             /* Nr of atoms                          */
74   t_atom        *atom;          /* Array of atoms (dim: nr)             */
75                                 /* The following entries will not       */
76                                 /* allways be used (nres==0)            */
77   char          ***atomname;    /* Array of pointers to atom name       */
78                                 /* use: (*(atomname[i]))                */
79   int           nres;           /* Nr of residue names                  */
80   char          ***resname;     /* Array of pointers to residue names   */
81                                 /* use: (*(resname[i]))                 */
82   int           ngrpname;       /* Number of groupnames                 */
83   char          ***grpname;     /* Names of the groups                  */
84   t_block       excl;           /* Exclusions                           */
85   t_grps        grps[egcNR];    /* Groups of things                     */
86   t_pdbinfo     *pdbinfo;       /* PDB Information, such as aniso. Bfac */
87 } t_atoms;
88
89 #define PERTURBED(a) (((a).mB != (a).m) || ((a).qB != (a).q) || ((a).typeB != (a).type))