ce5eb7d80ebd5f82ac65855cd8e3b16df1f2757a
[alexxy/gromacs.git] / include / types / atoms.h
1 /*
2  * 
3  *                This source code is part of
4  * 
5  *                 G   R   O   M   A   C   S
6  * 
7  *          GROningen MAchine for Chemical Simulations
8  * 
9  *                        VERSION 3.2.0
10  * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
11  * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
12  * Copyright (c) 2001-2004, The GROMACS development team,
13  * check out http://www.gromacs.org for more information.
14
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  * 
20  * If you want to redistribute modifications, please consider that
21  * scientific software is very special. Version control is crucial -
22  * bugs must be traceable. We will be happy to consider code for
23  * inclusion in the official distribution, but derived work must not
24  * be called official GROMACS. Details are found in the README & COPYING
25  * files - if they are missing, get the official version at www.gromacs.org.
26  * 
27  * To help us fund GROMACS development, we humbly ask that you cite
28  * the papers on the package - you can find them in the top README file.
29  * 
30  * For more info, check our website at http://www.gromacs.org
31  * 
32  * And Hey:
33  * GRoups of Organic Molecules in ACtion for Science
34  */
35 #ifndef _atoms_h
36 #define _atoms_h
37
38
39 #include "simple.h"
40
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44
45 enum {
46   eptAtom, eptNucleus, eptShell, eptBond, eptVSite, eptNR
47 };
48 /* The particle type */
49  
50 typedef struct {
51   real          m,q;            /* Mass and charge                      */
52   real          mB,qB;          /* Mass and charge for Free Energy calc */
53   unsigned short type;          /* Atom type                            */
54   unsigned short typeB;         /* Atom type for Free Energy calc       */
55   int           ptype;          /* Particle type                        */
56   int           resind;         /* Index into resinfo (in t_atoms)      */
57   int           atomnumber;     /* Atomic Number or NOTSET              */
58   char          elem[4];        /* Element name                         */
59 } t_atom;
60
61 typedef struct {
62   char          **name;         /* Pointer to the residue name          */
63   int           nr;             /* Residue number                       */
64   unsigned char ic;             /* Code for insertion of residues       */
65   int           chainnum;       /* Iincremented at TER or new chain id  */    
66   char          chainid;        /* Chain identifier written/read to pdb */
67   char          **rtp;          /* rtp building block name (optional)   */
68 } t_resinfo;
69
70 typedef struct {
71   int  type;                    /* PDB record name                      */
72   int  atomnr;                  /* PDB atom number                      */
73   char altloc;                  /* Alternate location indicator         */
74   char atomnm[6];               /* True atom name including leading spaces */
75   real occup;                   /* Occupancy                            */
76   real bfac;                    /* B-factor                             */
77   gmx_bool bAnisotropic;        /* (an)isotropic switch                 */
78   int  uij[6];                  /* Anisotropic B-factor                 */
79 } t_pdbinfo;
80
81 typedef struct {
82   int  nr;                      /* Number of different groups           */
83   int  *nm_ind;                 /* Index in the group names             */
84 } t_grps;
85
86 typedef struct {
87   int           nr;             /* Nr of atoms                          */
88   t_atom        *atom;          /* Array of atoms (dim: nr)             */
89                                 /* The following entries will not       */
90                                 /* always be used (nres==0)             */
91   char          ***atomname;    /* Array of pointers to atom name       */
92                                 /* use: (*(atomname[i]))                */
93   char          ***atomtype;    /* Array of pointers to atom types      */
94                                 /* use: (*(atomtype[i]))                */
95   char          ***atomtypeB;   /* Array of pointers to B atom types    */
96                                 /* use: (*(atomtypeB[i]))               */
97   int           nres;           /* The number of resinfo entries        */
98   t_resinfo     *resinfo;       /* Array of residue names and numbers   */
99   t_pdbinfo     *pdbinfo;       /* PDB Information, such as aniso. Bfac */
100 } t_atoms;
101
102 typedef struct {
103   int           nr;             /* number of atomtypes                          */
104   real         *radius;         /* GBSA radius for each atomtype                */
105   real         *vol;            /* GBSA efective volume for each atomtype       */
106   real         *surftens;       /* implicit solvent surftens for each atomtype  */
107   real         *gb_radius;      /* GB radius for each atom type                 */
108   real         *S_hct;          /* Overlap factors for HCT/OBC GB models        */
109   int          *atomnumber;     /* Atomic number, used for QM/MM                */
110 } t_atomtypes;
111
112
113 #define PERTURBED(a) (((a).mB != (a).m) || ((a).qB != (a).q) || ((a).typeB != (a).type))
114
115 #ifdef __cplusplus
116 }
117 #endif
118
119 #endif