Added Michael Shirts long-range dispersion and repulsion corrections that are correct...
[gromacs.git] / include / grompp.h
blobd9753826ae45fba4db2b6ddd3fd5022af8497445
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.2.0
11 * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
12 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
13 * Copyright (c) 2001-2004, The GROMACS development team,
14 * check out http://www.gromacs.org for more information.
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.
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.
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.
31 * For more info, check our website at http://www.gromacs.org
33 * And Hey:
34 * Gromacs Runs On Most of All Computer Systems
37 #ifndef _grompp_h
38 #define _grompp_h
40 #ifdef HAVE_CONFIG_H
41 #include <config.h>
42 #endif
44 #include <stdio.h>
45 #include "typedefs.h"
46 #include "macros.h"
48 #define MAXSLEN 32
50 typedef struct {
51 bool bSet; /* Has this combination been set */
52 real c[3]; /* The non-bonded parameters */
53 } t_nbparam;
54 /* The t_nbparam struct is used to temporary store the explicit
55 * non-bonded parameter combinations, which will be copied to t_params.
58 typedef struct {
59 atom_id a[MAXATOMLIST]; /* The atom list (eg. bonds: particle */
60 /* i = a[0] (AI), j = a[1] (AJ)) */
61 real c[MAXFORCEPARAM]; /* Force parameters (eg. b0 = c[0]) */
62 char s[MAXSLEN]; /* A string (instead of parameters), *
63 * read from the .rtp file in pdb2gmx */
64 } t_param;
66 typedef struct {
67 int nr; /* The number of bonds in this record */
68 t_param *param; /* Array of parameters (dim: nr) */
69 } t_params;
71 typedef struct {
72 int nr; /* The number of exclusions */
73 atom_id *e; /* The excluded atoms */
74 } t_excls;
76 typedef struct {
77 char **name;
78 int nrexcl; /* Number of exclusions per atom */
79 bool excl_set; /* Have exclusions been generated? */
80 bool bProcessed; /* Has the mol been processed */
81 t_atoms atoms; /* Atoms */
82 t_block cgs; /* Charge groups */
83 t_block mols; /* Molecules */
84 t_params plist[F_NRE]; /* Parameters in old style */
86 } t_molinfo;
88 typedef struct {
89 int nr; /* The number of atomtypes */
90 t_atom *atom; /* Array of atoms */
91 char ***atomname; /* Names of the atomtypes */
92 t_param *nb; /* Nonbonded force default params */
93 int *bondatomtype; /* The bond_atomtype for each atomtype */
94 real *radius; /* Radius for GBSA stuff */
95 real *vol; /* Effective volume for GBSA */
96 real *surftens; /* Surface tension with water, for GBSA */
97 } t_atomtype;
99 typedef struct {
100 int nr; /* Number of bond_atomtypes */
101 char ***atomname; /* Names of the bond_atomtypes */
102 } t_bond_atomtype;
105 typedef enum {
106 d_defaults,
107 d_atomtypes,
108 d_bondtypes,
109 d_constrainttypes,
110 d_pairtypes,
111 d_angletypes,
112 d_dihedraltypes,
113 d_nonbond_params,
114 d_blocktype,
115 d_moleculetype,
116 d_atoms,
117 d_dum2,
118 d_dum3,
119 d_dum4,
120 d_bonds,
121 d_exclusions,
122 d_pairs,
123 d_angles,
124 d_dihedrals,
125 d_constraints,
126 d_settles,
127 d_polarization,
128 d_water_polarization,
129 d_system,
130 d_molecules,
131 d_position_restraints,
132 d_angle_restraints,
133 d_angle_restraints_z,
134 d_distance_restraints,
135 d_orientation_restraints,
136 d_dihedral_restraints,
137 d_maxdir,
138 d_invalid,
139 d_none
140 } directive;
142 static char *ds[d_maxdir+1] = {
143 "defaults",
144 "atomtypes",
145 "bondtypes",
146 "constrainttypes",
147 "pairtypes",
148 "angletypes",
149 "dihedraltypes",
150 "nonbond_params",
151 "blocktype",
152 /* All the directives above can not appear after moleculetype */
153 "moleculetype",
154 "atoms",
155 "dummies2",
156 "dummies3",
157 "dummies4",
158 "bonds",
159 "exclusions",
160 "pairs",
161 "angles",
162 "dihedrals",
163 "constraints",
164 "settles",
165 "polarization",
166 "water_polarization",
167 "system",
168 "molecules",
169 "position_restraints",
170 "angle_restraints",
171 "angle_restraints_z",
172 "distance_restraints",
173 "orientation_restraints",
174 "dihedral_restraints",
175 "invalid"
178 extern void convert_harmonics(int nrmols,t_molinfo mols[],t_atomtype *atype);
180 #endif /* _grompp_h */