Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / mdtypes / md_enums.cpp
1 /*
2  * This file is part of the GROMACS molecular simulation package.
3  *
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,2017,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.
10  *
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.
15  *
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.
20  *
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.
25  *
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.
33  *
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.
36  */
37 #include "gmxpre.h"
38
39 #include "md_enums.h"
40
41 const char* enum_name(int index, int max_index, const char* names[])
42 {
43     if (index < 0 || index >= max_index)
44     {
45         static const char* undef = "no name defined";
46         return undef;
47     }
48     else
49     {
50         return names[index];
51     }
52 }
53
54 const char* yesno_names[BOOL_NR + 1] = { "no", "yes", nullptr };
55
56 const char* ei_names[eiNR + 1] = { "md",    "steep",      "cg",    "bd",   "sd2 - removed",
57                                    "nm",    "l-bfgs",     "tpi",   "tpic", "sd",
58                                    "md-vv", "md-vv-avek", "mimic", nullptr };
59
60 const char* ecutscheme_names[ecutsNR + 1] = { "Verlet", "Group", nullptr };
61
62 const char* erefscaling_names[erscNR + 1] = { "No", "All", "COM", nullptr };
63
64 const char* eel_names[eelNR + 1] = { "Cut-off",
65                                      "Reaction-Field",
66                                      "Generalized-Reaction-Field (unused)",
67                                      "PME",
68                                      "Ewald",
69                                      "P3M-AD",
70                                      "Poisson",
71                                      "Switch",
72                                      "Shift",
73                                      "User",
74                                      "Generalized-Born (unused)",
75                                      "Reaction-Field-nec",
76                                      "Encad-shift",
77                                      "PME-User",
78                                      "PME-Switch",
79                                      "PME-User-Switch",
80                                      "Reaction-Field-zero",
81                                      nullptr };
82
83 const char* eewg_names[eewgNR + 1] = { "3d", "3dc", nullptr };
84
85 const char* eljpme_names[eljpmeNR + 1] = { "Geometric", "Lorentz-Berthelot", nullptr };
86
87 const char* evdw_names[evdwNR + 1] = { "Cut-off",     "Switch", "Shift", "User",
88                                        "Encad-shift", "PME",    nullptr };
89
90 const char* econstr_names[econtNR + 1] = { "Lincs", "Shake", nullptr };
91
92 const char* eintmod_names[eintmodNR + 1] = {
93     "Potential-shift-Verlet", "Potential-shift", "None", "Potential-switch",
94     "Exact-cutoff",           "Force-switch",    nullptr
95 };
96
97 const char* etcoupl_names[etcNR + 1] = {
98     "No", "Berendsen", "Nose-Hoover", "yes", "Andersen", "Andersen-massive", "V-rescale", nullptr
99 }; /* yes is alias for berendsen */
100
101 const char* epcoupl_names[epcNR + 1] = {
102     "No", "Berendsen", "Parrinello-Rahman", "Isotropic", "MTTK", nullptr
103 }; /* isotropic is alias for berendsen */
104
105 const char* epcoupltype_names[epctNR + 1] = { "Isotropic", "Semiisotropic", "Anisotropic",
106                                               "Surface-Tension", nullptr };
107
108 const char* edisre_names[edrNR + 1] = { "No", "Simple", "Ensemble", nullptr };
109
110 const char* edisreweighting_names[edrwNR + 1] = { "Conservative", "Equal", nullptr };
111
112 const char* enbf_names[eNBF_NR + 1] = { "", "LJ", "Buckingham", nullptr };
113
114 const char* ecomb_names[eCOMB_NR + 1] = { "", "Geometric", "Arithmetic", "GeomSigEps", nullptr };
115
116 const char* esimtemp_names[esimtempNR + 1] = { "geometric", "exponential", "linear", nullptr };
117
118 const char* efep_names[efepNR + 1] = { "no", "yes", "static", "slow-growth", "expanded", nullptr };
119
120 const char* efpt_names[efptNR + 1] = { "fep-lambdas",         "mass-lambdas",   "coul-lambdas",
121                                        "vdw-lambdas",         "bonded-lambdas", "restraint-lambdas",
122                                        "temperature-lambdas", nullptr };
123
124 const char* efpt_singular_names[efptNR + 1] = { "fep-lambda",         "mass-lambda",
125                                                 "coul-lambda",        "vdw-lambda",
126                                                 "bonded-lambda",      "restraint-lambda",
127                                                 "temperature-lambda", nullptr };
128
129 const char* edHdLPrintEnergy_names[edHdLPrintEnergyNR + 1] = { "no", "total", "potential", "yes", nullptr };
130
131 const char* elamstats_names[elamstatsNR + 1] = {
132     "no",     "metropolis-transition", "barker-transition",
133     "minvar", "wang-landau",           "weighted-wang-landau",
134     nullptr
135 };
136
137 const char* elmcmove_names[elmcmoveNR + 1] = { "no",    "metropolis",         "barker",
138                                                "gibbs", "metropolized-gibbs", nullptr };
139
140 const char* elmceq_names[elmceqNR + 1] = { "no",           "yes",
141                                            "wl-delta",     "number-all-lambda",
142                                            "number-steps", "number-samples",
143                                            "count-ratio",  nullptr };
144
145 const char* separate_dhdl_file_names[esepdhdlfileNR + 1] = { "yes", "no", nullptr };
146
147 const char* dhdl_derivatives_names[edhdlderivativesNR + 1] = { "yes", "no", nullptr };
148
149 const char* esol_names[esolNR + 1] = { "No", "SPC", "TIP4p", nullptr };
150
151 const char* edispc_names[edispcNR + 1] = { "No",          "EnerPres", "Ener",
152                                            "AllEnerPres", "AllEner",  nullptr };
153
154 const char* ecm_names[ecmNR + 1] = { "Linear", "Angular", "None", "Linear-acceleration-correction", nullptr };
155
156 const char* eann_names[eannNR + 1] = { "No", "Single", "Periodic", nullptr };
157
158 const char* ewt_names[ewtNR + 1] = { "9-3", "10-4", "table", "12-6", nullptr };
159
160 const char* epull_names[epullNR + 1] = { "umbrella",    "constraint",       "constant-force",
161                                          "flat-bottom", "flat-bottom-high", "external-potential",
162                                          nullptr };
163
164 const char* epullg_names[epullgNR + 1] = { "distance",           "direction",          "cylinder",
165                                            "direction-periodic", "direction-relative", "angle",
166                                            "dihedral",           "angle-axis",         nullptr };
167
168 const char* erotg_names[erotgNR + 1] = { "iso",   "iso-pf",  "pm",     "pm-pf", "rm",
169                                          "rm-pf", "rm2",     "rm2-pf", "flex",  "flex-t",
170                                          "flex2", "flex2-t", nullptr };
171
172 const char* erotg_fitnames[erotgFitNR + 1] = { "rmsd", "norm", "potential", nullptr };
173
174 const char* eSwapTypes_names[eSwapTypesNR + 1] = { "no", "X", "Y", "Z", nullptr };
175
176 const char* eSwapFixedGrp_names[eSwapFixedGrpNR + 1] = { "Split0", "Split1", "Solvent", nullptr };
177
178
179 const char* eQMmethod_names[eQMmethodNR + 1] = { "AM1",      "PM3",    "RHF",  "UHF",
180                                                  "DFT",      "B3LYP",  "MP2",  "CASSCF",
181                                                  "B3LYPLAN", "DIRECT", nullptr };
182
183 const char* eQMbasis_names[eQMbasisNR + 1] = { "STO3G",   "STO-3G", "3-21G", "3-21G*",
184                                                "3-21+G*", "6-21G",  "6-31G", "6-31G*",
185                                                "6-31+G*", "6-311G", nullptr };
186
187 const char* eQMMMscheme_names[eQMMMschemeNR + 1] = { "normal", "ONIOM", nullptr };
188
189 const char* gmx_nblist_geometry_names[GMX_NBLIST_GEOMETRY_NR + 1] = {
190     "Particle-Particle", "Water3-Particle", "Water3-Water3", "Water4-Particle",
191     "Water4-Water4",     "CG-CG",           nullptr
192 };
193
194 const char* gmx_nblist_interaction_names[GMX_NBLIST_INTERACTION_NR + 1] = { "Standard",
195                                                                             "Free_Energy", nullptr };
196
197 const char* gmx_nbkernel_elec_names[GMX_NBKERNEL_ELEC_NR + 1] = {
198     "None", "Coulomb", "Reaction-Field", "Cubic-Spline-Table", "Ewald", nullptr
199 };
200
201 const char* gmx_nbkernel_vdw_names[GMX_NBKERNEL_VDW_NR + 1] = { "None",       "Lennard-Jones",
202                                                                 "Buckingham", "Cubic-Spline-Table",
203                                                                 "LJEwald",    nullptr };