Partial commit of the project to remove all static variables.
[gromacs.git] / include / grompp.h
blob0286c6d171a31f8d57624090fd787555ba939ce4
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.1
11 * Copyright (c) 1991-2001, University of Groningen, The Netherlands
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * If you want to redistribute modifications, please consider that
18 * scientific software is very special. Version control is crucial -
19 * bugs must be traceable. We will be happy to consider code for
20 * inclusion in the official distribution, but derived work must not
21 * be called official GROMACS. Details are found in the README & COPYING
22 * files - if they are missing, get the official version at www.gromacs.org.
24 * To help us fund GROMACS development, we humbly ask that you cite
25 * the papers on the package - you can find them in the top README file.
27 * For more info, check our website at http://www.gromacs.org
29 * And Hey:
30 * Getting the Right Output Means no Artefacts in Calculating Stuff
33 #ifndef _grompp_h
34 #define _grompp_h
36 #ifdef HAVE_CONFIG_H
37 #include <config.h>
38 #endif
40 #include <stdio.h>
41 #include "typedefs.h"
42 #include "macros.h"
44 #define MAXSLEN 32
46 typedef struct {
47 bool bSet; /* Has this combination been set */
48 real c[3]; /* The non-bonded parameters */
49 } t_nbparam;
50 /* The t_nbparam struct is used to temporary store the explicit
51 * non-bonded parameter combinations, which will be copied to t_params.
54 typedef struct {
55 atom_id a[MAXATOMLIST]; /* The atom list (eg. bonds: particle */
56 /* i = a[0] (AI), j = a[1] (AJ)) */
57 real c[MAXFORCEPARAM]; /* Force parameters (eg. b0 = c[0]) */
58 char s[MAXSLEN]; /* A string (instead of parameters), *
59 * read from the .rtp file in pdb2gmx */
60 } t_param;
62 typedef struct {
63 int nr; /* The number of bonds in this record */
64 t_param *param; /* Array of parameters (dim: nr) */
65 } t_params;
67 typedef struct {
68 int nr; /* The number of exclusions */
69 atom_id *e; /* The excluded atoms */
70 } t_excls;
72 typedef struct {
73 char **name;
74 int nrexcl; /* Number of exclusions per atom */
75 bool excl_set; /* Have exclusions been generated? */
76 bool bProcessed; /* Has the mol been processed */
77 t_atoms atoms; /* Atoms */
78 t_block cgs; /* Charge groups */
79 t_block mols; /* Molecules */
80 t_params plist[F_NRE]; /* Parameters in old style */
82 } t_molinfo;
84 typedef struct {
85 int nr; /* The number of atomtypes */
86 t_atom *atom; /* Array of atoms */
87 char ***atomname; /* Names of the atomtypes */
88 t_param *nb; /* Nonbonded force default params */
89 int *bondatomtype; /* The bond_atomtype for each atomtype */
90 real *radius; /* Radius for GBSA stuff */
91 real *vol; /* Effective volume for GBSA */
92 real *surftens; /* Surface tension with water, for GBSA */
93 } t_atomtype;
95 typedef struct {
96 int nr; /* Number of bond_atomtypes */
97 char ***atomname; /* Names of the bond_atomtypes */
98 } t_bond_atomtype;
101 typedef enum {
102 d_defaults,
103 d_atomtypes,
104 d_bondtypes,
105 d_constrainttypes,
106 d_pairtypes,
107 d_angletypes,
108 d_dihedraltypes,
109 d_nonbond_params,
110 d_blocktype,
111 d_moleculetype,
112 d_atoms,
113 d_dum2,
114 d_dum3,
115 d_dum4,
116 d_bonds,
117 d_exclusions,
118 d_pairs,
119 d_angles,
120 d_dihedrals,
121 d_constraints,
122 d_settles,
123 d_system,
124 d_molecules,
125 d_position_restraints,
126 d_angle_restraints,
127 d_angle_restraints_z,
128 d_distance_restraints,
129 d_orientation_restraints,
130 d_dihedral_restraints,
131 d_maxdir,
132 d_invalid,
133 d_none
134 } directive;
136 static char *ds[d_maxdir+1] = {
137 "defaults",
138 "atomtypes",
139 "bondtypes",
140 "constrainttypes",
141 "pairtypes",
142 "angletypes",
143 "dihedraltypes",
144 "nonbond_params",
145 "blocktype",
146 /* All the directives above can not appear after moleculetype */
147 "moleculetype",
148 "atoms",
149 "dummies2",
150 "dummies3",
151 "dummies4",
152 "bonds",
153 "exclusions",
154 "pairs",
155 "angles",
156 "dihedrals",
157 "constraints",
158 "settles",
159 "system",
160 "molecules",
161 "position_restraints",
162 "angle_restraints",
163 "angle_restraints_z",
164 "distance_restraints",
165 "orientation_restraints",
166 "dihedral_restraints",
167 "invalid"
170 extern void convert_harmonics(int nrmols,t_molinfo mols[],t_atomtype *atype);
172 #endif /* _grompp_h */