Move symtab.* to topology/
[gromacs.git] / src / gromacs / legacyheaders / types / topology.h
blob95fb9b275a114d862b15d7de4fe558d0714cee3e
1 /*
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) 2011,2014, 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.
37 #ifndef GMX_LEGACYHEADERS_TOPOLOGY_H
38 #define GMX_LEGACYHEADERS_TOPOLOGY_H
40 #include "atoms.h"
41 #include "idef.h"
42 #include "block.h"
43 #include "simple.h"
44 #include "../../topology/symtab.h"
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
50 enum {
51 egcTC, egcENER, egcACC, egcFREEZE,
52 egcUser1, egcUser2, egcVCM, egcCompressedX,
53 egcORFIT, egcQMMM,
54 egcNR
57 typedef struct {
58 char **name; /* Name of the molecule type */
59 t_atoms atoms; /* The atoms */
60 t_ilist ilist[F_NRE];
61 t_block cgs; /* The charge groups */
62 t_blocka excls; /* The exclusions */
63 } gmx_moltype_t;
65 typedef struct {
66 int type; /* The molcule type index in mtop.moltype */
67 int nmol; /* The number of molecules in this block */
68 int natoms_mol; /* The number of atoms in one molecule */
69 int nposres_xA; /* The number of posres coords for top A */
70 rvec *posres_xA; /* The posres coords for top A */
71 int nposres_xB; /* The number of posres coords for top B */
72 rvec *posres_xB; /* The posres coords for top B */
73 } gmx_molblock_t;
75 typedef struct {
76 t_grps grps[egcNR]; /* Groups of things */
77 int ngrpname; /* Number of groupnames */
78 char ***grpname; /* Names of the groups */
79 int ngrpnr[egcNR];
80 unsigned char *grpnr[egcNR]; /* Group numbers or NULL */
81 } gmx_groups_t;
83 /* This macro gives the group number of group type egc for atom i.
84 * This macro is useful, since the grpnr pointers are NULL
85 * for group types that have all entries 0.
87 #define ggrpnr(groups, egc, i) ((groups)->grpnr[egc] ? (groups)->grpnr[egc][i] : 0)
89 /* The global, complete system topology struct, based on molecule types.
90 This structure should contain no data that is O(natoms) in memory. */
91 typedef struct {
92 char **name; /* Name of the topology */
93 gmx_ffparams_t ffparams;
94 int nmoltype;
95 gmx_moltype_t *moltype;
96 int nmolblock;
97 gmx_molblock_t *molblock;
98 int natoms;
99 int maxres_renum; /* Parameter for residue numbering */
100 int maxresnr; /* The maximum residue number in moltype */
101 t_atomtypes atomtypes; /* Atomtype properties */
102 t_block mols; /* The molecules */
103 gmx_groups_t groups;
104 t_symtab symtab; /* The symbol table */
105 } gmx_mtop_t;
107 /* The mdrun node-local topology struct, completely written out */
108 typedef struct {
109 t_idef idef; /* The interaction function definition */
110 t_atomtypes atomtypes; /* Atomtype properties */
111 t_block cgs; /* The charge groups */
112 t_blocka excls; /* The exclusions */
113 } gmx_localtop_t;
115 /* The old topology struct, completely written out, used in analysis tools */
116 typedef struct {
117 char **name; /* Name of the topology */
118 t_idef idef; /* The interaction function definition */
119 t_atoms atoms; /* The atoms */
120 t_atomtypes atomtypes; /* Atomtype properties */
121 t_block cgs; /* The charge groups */
122 t_block mols; /* The molecules */
123 t_blocka excls; /* The exclusions */
124 t_symtab symtab; /* The symbol table */
125 } t_topology;
127 #ifdef __cplusplus
129 #endif
131 #endif