Tagged files with gromacs 3.0 header and added some license info
[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 3.0
11  * 
12  * Copyright (c) 1991-2001
13  * BIOSON Research Institute, Dept. of Biophysical Chemistry
14  * University of Groningen, The Netherlands
15  * 
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  * 
21  * If you want to redistribute modifications, please consider that
22  * scientific software is very special. Version control is crucial -
23  * bugs must be traceable. We will be happy to consider code for
24  * inclusion in the official distribution, but derived work must not
25  * be called official GROMACS. Details are found in the README & COPYING
26  * files - if they are missing, get the official version at www.gromacs.org.
27  * 
28  * To help us fund GROMACS development, we humbly ask that you cite
29  * the papers on the package - you can find them in the top README file.
30  * 
31  * Do check out http://www.gromacs.org , or mail us at gromacs@gromacs.org .
32  * 
33  * And Hey:
34  * Good ROcking Metal Altar for Chronical Sinners
35  */
36 #ifdef HAVE_CONFIG_H
37 #include <config.h>
38 #endif
39
40 enum {
41   eptAtom, eptNucleus, eptShell, eptBond, eptDummy, eptNR
42 };
43 /* The particle type */
44  
45 enum {
46   egcTC,    egcENER,   egcACC,   egcFREEZE, 
47   egcUser1, egcUser2,  egcVCM, egcXTC,
48   egcNR 
49 };
50
51 typedef struct {
52   real          m,q;            /* Mass and charge                      */
53   real          mB,qB;          /* Mass and charge for Free Energy calc */
54   unsigned short        type;           /* Atom type                            */
55   unsigned short        typeB;          /* Atom type for Free Energy calc       */
56   int           ptype;          /* Particle type                        */
57   int           resnr;          /* Residue number                       */
58   unsigned char grpnr[egcNR];   /* Group numbers                        */
59   unsigned char chain;          /* chain identifier                     */
60 } t_atom;
61
62 typedef struct {
63   int  type;                    /* PDB record name                      */
64   int  atomnr;                  /* PDB atom number                      */
65   char altloc;                  /* Alternate location indicator         */
66   char pdbresnr[6];             /* PDB res number                       */
67   real occup;                   /* Occupancy                            */
68   real bfac;                    /* B-factor                             */
69   bool bAnisotropic;            /* (an)isotropic switch                 */
70   int  uij[6];                  /* Anisotropic B-factor                 */
71 } t_pdbinfo;
72
73 typedef struct {
74   int  nr;                      /* Number of different groups           */
75   int  *nm_ind;                 /* Index in the group names             */
76 } t_grps;
77
78 typedef struct {
79   int           nr;             /* Nr of atoms                          */
80   t_atom        *atom;          /* Array of atoms (dim: nr)             */
81                                 /* The following entries will not       */
82                                 /* allways be used (nres==0)            */
83   char          ***atomname;    /* Array of pointers to atom name       */
84                                 /* use: (*(atomname[i]))                */
85   int           nres;           /* Nr of residue names                  */
86   char          ***resname;     /* Array of pointers to residue names   */
87                                 /* use: (*(resname[i]))                 */
88   int           ngrpname;       /* Number of groupnames                 */
89   char          ***grpname;     /* Names of the groups                  */
90   t_block       excl;           /* Exclusions                           */
91   t_grps        grps[egcNR];    /* Groups of things                     */
92   t_pdbinfo     *pdbinfo;       /* PDB Information, such as aniso. Bfac */
93 } t_atoms;
94
95 #define PERTURBED(a) (((a).mB != (a).m) || ((a).qB != (a).q) || ((a).typeB != (a).type))