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 by the GROMACS development team.
7 * Copyright (c) 2019,2020,2021, by the GROMACS development team, led by
8 * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
9 * and including many others, as listed in the AUTHORS file in the
10 * top-level source directory and at http://www.gromacs.org.
12 * GROMACS is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public License
14 * as published by the Free Software Foundation; either version 2.1
15 * of the License, or (at your option) any later version.
17 * GROMACS is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with GROMACS; if not, see
24 * http://www.gnu.org/licenses, or write to the Free Software Foundation,
25 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
27 * If you want to redistribute modifications to GROMACS, please
28 * consider that scientific software is very special. Version
29 * control is crucial - bugs must be traceable. We will be happy to
30 * consider code for inclusion in the official distribution, but
31 * derived work must not be called official GROMACS. Details are found
32 * in the README & COPYING files - if they are missing, get the
33 * official version at http://www.gromacs.org.
35 * To help us fund GROMACS development, we humbly ask that you cite
36 * the research papers on the package. Check out http://www.gromacs.org.
39 #ifndef GMX_GMXPREPROCESS_TOPPUSH_H
40 #define GMX_GMXPREPROCESS_TOPPUSH_H
44 #include "gromacs/utility/real.h"
46 enum class Directive : int;
47 class PreprocessingAtomTypes;
48 class PreprocessingBondAtomType;
51 struct MoleculeInformation;
53 class InteractionOfType;
54 struct InteractionsOfType;
55 struct PreprocessResidue;
57 enum class CombinationRule : int;
62 struct ExclusionBlock;
65 void generate_nbparams(CombinationRule comb,
67 InteractionsOfType* plist,
68 PreprocessingAtomTypes* atype,
71 void push_at(struct t_symtab* symtab,
72 PreprocessingAtomTypes* at,
73 PreprocessingBondAtomType* bat,
80 void push_bt(Directive d,
81 gmx::ArrayRef<InteractionsOfType> bt,
83 PreprocessingAtomTypes* at,
84 PreprocessingBondAtomType* bat,
88 void push_dihedraltype(Directive d,
89 gmx::ArrayRef<InteractionsOfType> bt,
90 PreprocessingBondAtomType* bat,
94 void push_cmaptype(Directive d,
95 gmx::ArrayRef<InteractionsOfType> bt,
97 PreprocessingAtomTypes* at,
98 PreprocessingBondAtomType* bat,
102 void push_nbt(Directive d, t_nbparam** nbt, PreprocessingAtomTypes* atype, char* plines, int nb_funct, warninp* wi);
104 void push_atom(struct t_symtab* symtab, t_atoms* at, PreprocessingAtomTypes* atype, char* line, warninp* wi);
106 void push_bond(Directive d,
107 gmx::ArrayRef<InteractionsOfType> bondtype,
108 gmx::ArrayRef<InteractionsOfType> bond,
110 PreprocessingAtomTypes* atype,
116 bool* bWarn_copy_A_B,
119 void push_cmap(Directive d,
120 gmx::ArrayRef<InteractionsOfType> bondtype,
121 gmx::ArrayRef<InteractionsOfType> bond,
123 PreprocessingAtomTypes* atype,
127 void push_vsitesn(Directive d, gmx::ArrayRef<InteractionsOfType> bond, t_atoms* at, char* line, warninp* wi);
129 void push_mol(gmx::ArrayRef<MoleculeInformation> mols, char* pline, int* whichmol, int* nrcopies, warninp* wi);
131 void push_molt(struct t_symtab* symtab, std::vector<MoleculeInformation>* mol, char* line, warninp* wi);
133 void push_excl(char* line, gmx::ArrayRef<gmx::ExclusionBlock> b2, warninp* wi);
135 int copy_nbparams(t_nbparam** param, int ftype, InteractionsOfType* plist, int nr);
137 void free_nbparam(t_nbparam** param, int nr);
139 int add_atomtype_decoupled(struct t_symtab* symtab,
140 PreprocessingAtomTypes* at,
141 t_nbparam*** nbparam,
143 /* Add an atom type with all parameters set to zero (no interactions).
144 * Returns the atom type number.
147 void convert_moltype_couple(MoleculeInformation* mol,
148 int atomtype_decouple,
154 InteractionsOfType* nbp,
156 /* Setup mol such that the B-state has no interaction with the rest
157 * of the system, but full interaction with itself.