2 * This file is part of the GROMACS molecular simulation package.
4 * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
5 * Copyright (c) 2001-2004, The GROMACS development team.
6 * Copyright (c) 2013,2014,2015,2016,2018,2019, by the GROMACS development team, led by
7 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
8 * and including many others, as listed in the AUTHORS file in the
9 * top-level source directory and at http://www.gromacs.org.
11 * GROMACS is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU Lesser General Public License
13 * as published by the Free Software Foundation; either version 2.1
14 * of the License, or (at your option) any later version.
16 * GROMACS is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * Lesser General Public License for more details.
21 * You should have received a copy of the GNU Lesser General Public
22 * License along with GROMACS; if not, see
23 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
24 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 * If you want to redistribute modifications to GROMACS, please
27 * consider that scientific software is very special. Version
28 * control is crucial - bugs must be traceable. We will be happy to
29 * consider code for inclusion in the official distribution, but
30 * derived work must not be called official GROMACS. Details are found
31 * in the README & COPYING files - if they are missing, get the
32 * official version at http://www.gromacs.org.
34 * To help us fund GROMACS development, we humbly ask that you cite
35 * the research papers on the package. Check out http://www.gromacs.org.
38 #ifndef GMX_GMXPREPROCESS_GROMPP_IMPL_H
39 #define GMX_GMXPREPROCESS_GROMPP_IMPL_H
43 #include "gromacs/topology/atoms.h"
44 #include "gromacs/topology/block.h"
45 #include "gromacs/topology/idef.h"
46 #include "gromacs/utility/basedefinitions.h"
47 #include "gromacs/utility/real.h"
53 int a[MAXATOMLIST]; /* The atom list (eg. bonds: particle */
54 /* i = a[0] (ai), j = a[1] (aj)) */
55 real c[MAXFORCEPARAM]; /* Force parameters (eg. b0 = c[0]) */
56 char s[MAXSLEN]; /* A string (instead of parameters), *
57 * read from the .rtp file in pdb2gmx */
58 const int &ai() const { return a[0]; }
59 int &ai() { return a[0]; }
60 const int &aj() const { return a[1]; }
61 int &aj() { return a[1]; }
62 const int &ak() const { return a[2]; }
63 int &ak() { return a[2]; }
64 const int &al() const { return a[3]; }
65 int &al() { return a[3]; }
66 const int &am() const { return a[4]; }
67 int &am() { return a[4]; }
69 real &c0() { return c[0]; }
70 real &c1() { return c[1]; }
71 real &c2() { return c[2]; }
75 { // NOLINT (clang-analyzer-optin.performance.Padding)
76 int nr; /* The number of bonds in this record */
77 int maxnr; /* The amount of elements in the array */
78 t_param *param; /* Array of parameters (dim: nr or nr*nr) */
80 /* CMAP tmp data, there are probably better places for this */
81 int grid_spacing; /* Cmap grid spacing */
82 int nc; /* Number of cmap angles */
84 real *cmap; /* Temporary storage of the raw cmap grid data */
85 int ncmap; /* Number of allocated elements in cmap grid*/
87 int *cmap_types; /* Store the five atomtypes followed by a number that identifies the type */
88 int nct; /* Number of allocated elements in cmap_types */
93 int nr; /* The number of exclusions */
94 int *e; /* The excluded atoms */
100 int nrexcl; /* Number of exclusions per atom */
101 bool excl_set; /* Have exclusions been generated? */
102 bool bProcessed; /* Has the mol been processed */
103 t_atoms atoms; /* Atoms */
104 t_block cgs; /* Charge groups */
105 t_block mols; /* Molecules */
106 t_blocka excls; /* Exclusions */
107 t_params plist[F_NRE]; /* Parameters in old style */
116 bool is_int(double x);
117 /* Returns TRUE when x is integer */