Update copyright statements and change license to LGPL
[alexxy/gromacs.git] / include / types / enums.h
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  * check out http://www.gromacs.org for more information.
7  * Copyright (c) 2012, by the GROMACS development team, led by
8  * David van der Spoel, Berk Hess, Erik Lindahl, and including many
9  * others, as listed in the AUTHORS file in the top-level source
10  * directory and at http://www.gromacs.org.
11  *
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.
16  *
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.
21  *
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.
26  *
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.
34  *
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.
37  */
38
39 #ifndef ENUMS_H_
40 #define ENUMS_H_
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45 #if 0
46 } /* fixes auto-indentation problems */
47 #endif
48
49 /* note: these enums should correspond to the names in gmxlib/names.c */
50
51 enum {
52   epbcXYZ, epbcNONE, epbcXY, epbcSCREW, epbcNR
53 };
54
55 enum {
56   etcNO, etcBERENDSEN, etcNOSEHOOVER, etcYES, etcANDERSEN, etcANDERSENMASSIVE, etcVRESCALE, etcNR
57 }; /* yes is an alias for berendsen */
58
59 #define ETC_ANDERSEN(e) (((e) == etcANDERSENMASSIVE) || ((e) == etcANDERSEN))
60
61 enum {
62   epcNO, epcBERENDSEN, epcPARRINELLORAHMAN, epcISOTROPIC, epcMTTK, epcNR
63 }; /* isotropic is an alias for berendsen */
64
65 /* trotter decomposition extended variable parts */
66 enum {
67   etrtNONE, etrtNHC, etrtBAROV, etrtBARONHC, etrtNHC2, etrtBAROV2, etrtBARONHC2, 
68   etrtVELOCITY1, etrtVELOCITY2, etrtPOSITION, etrtSKIPALL, etrtNR
69 };
70
71 /* sequenced parts of the trotter decomposition */
72 enum {
73   ettTSEQ0,  ettTSEQ1,  ettTSEQ2,  ettTSEQ3,  ettTSEQ4, ettTSEQMAX
74 };
75
76 enum {
77   epctISOTROPIC, epctSEMIISOTROPIC, epctANISOTROPIC,
78   epctSURFACETENSION, epctNR
79 };
80
81 enum {
82   erscNO, erscALL, erscCOM, erscNR
83 };
84
85 enum {
86   ecutsGROUP, ecutsVERLET, ecutsNR
87 };
88
89 /* Coulomb / VdW interaction modifiers.
90  * grompp replaces eintmodPOTSHIFT_VERLET by eintmodPOTSHIFT or eintmodNONE.
91  * Exactcutoff is only used by Reaction-field-zero, and is not user-selectable.
92  */
93 enum eintmod {
94     eintmodPOTSHIFT_VERLET, eintmodPOTSHIFT, eintmodNONE, eintmodPOTSWITCH, eintmodEXACTCUTOFF, eintmodNR
95 };
96
97 /*
98  * eelNOTUSED1 used to be GB, but to enable generalized born with different
99  * forms of electrostatics (RF, switch, etc.) in the future it is now selected
100  * separately (through the implicit_solvent option).
101  */
102 enum {
103   eelCUT,     eelRF,     eelGRF,   eelPME,  eelEWALD,  eelP3M_AD, 
104   eelPOISSON, eelSWITCH, eelSHIFT, eelUSER, eelGB_NOTUSED, eelRF_NEC, eelENCADSHIFT, 
105   eelPMEUSER, eelPMESWITCH, eelPMEUSERSWITCH, eelRF_ZERO, eelNR
106 };
107
108 /* Ewald geometry */
109 enum { 
110   eewg3D, eewg3DC, eewgNR
111 };
112
113 #define EEL_RF(e) ((e) == eelRF || (e) == eelGRF || (e) == eelRF_NEC || (e) == eelRF_ZERO )
114
115 #define EEL_PME(e)  ((e) == eelPME || (e) == eelPMESWITCH || (e) == eelPMEUSER || (e) == eelPMEUSERSWITCH || (e) == eelP3M_AD)
116 #define EEL_FULL(e) (EEL_PME(e) || (e) == eelPOISSON || (e) == eelEWALD)
117
118 #define EEL_SWITCHED(e) ((e) == eelSWITCH || (e) == eelSHIFT || (e) == eelENCADSHIFT || (e) == eelPMESWITCH || (e) == eelPMEUSERSWITCH)
119
120 #define EEL_USER(e) ((e) == eelUSER || (e) == eelPMEUSER || (e) == (eelPMESWITCH))
121
122 #define EEL_IS_ZERO_AT_CUTOFF(e) (EEL_SWITCHED(e) || (e) == eelRF_ZERO)
123
124 #define EEL_MIGHT_BE_ZERO_AT_CUTOFF(e) (EEL_IS_ZERO_AT_CUTOFF(e) || (e) == eelUSER || (e) == eelPMEUSER)
125
126 enum {
127   evdwCUT, evdwSWITCH, evdwSHIFT, evdwUSER, evdwENCADSHIFT, evdwNR
128 };
129
130 #define EVDW_SWITCHED(e) ((e) == evdwSWITCH || (e) == evdwSHIFT || (e) == evdwENCADSHIFT)
131
132 #define EVDW_IS_ZERO_AT_CUTOFF(e) EVDW_SWITCHED(e)
133
134 #define EVDW_MIGHT_BE_ZERO_AT_CUTOFF(e) (EVDW_IS_ZERO_AT_CUTOFF(e) || (e) == evdwUSER)
135
136 enum { 
137   ensGRID, ensSIMPLE, ensNR
138 };
139
140 /* eiVV is normal velocity verlet -- eiVVAK uses 1/2*(KE(t-dt/2)+KE(t+dt/2)) as the kinetic energy, and the half step kinetic
141    energy for temperature control */
142
143 enum {
144   eiMD, eiSteep, eiCG, eiBD, eiSD2, eiNM, eiLBFGS, eiTPI, eiTPIC, eiSD1, eiVV, eiVVAK, eiNR
145 };
146 #define EI_VV(e) ((e) == eiVV || (e) == eiVVAK)
147 #define EI_MD(e) ((e) == eiMD || EI_VV(e))
148 #define EI_SD(e) ((e) == eiSD1 || (e) == eiSD2)
149 #define EI_RANDOM(e) (EI_SD(e) || (e) == eiBD)
150 /*above integrators may not conserve momenta*/
151 #define EI_DYNAMICS(e) (EI_MD(e) || EI_SD(e) || (e) == eiBD)
152 #define EI_ENERGY_MINIMIZATION(e) ((e) == eiSteep || (e) == eiCG || (e) == eiLBFGS)
153 #define EI_TPI(e) ((e) == eiTPI || (e) == eiTPIC)
154
155 #define EI_STATE_VELOCITY(e) (EI_MD(e) || EI_SD(e))
156
157 enum {
158   econtLINCS, econtSHAKE, econtNR
159 };
160
161 enum {
162   edrNone, edrSimple, edrEnsemble, edrNR
163 };
164
165 enum {
166   edrwConservative, edrwEqual, edrwNR
167 };
168
169 /* Combination rule things */
170 enum { 
171   eCOMB_NONE, eCOMB_GEOMETRIC, eCOMB_ARITHMETIC, eCOMB_GEOM_SIG_EPS, eCOMB_NR 
172 };
173
174 /* NBF selection */
175 enum { 
176   eNBF_NONE, eNBF_LJ, eNBF_BHAM, eNBF_NR 
177 };
178
179 /* simulated tempering methods */
180 enum {
181   esimtempGEOMETRIC, esimtempEXPONENTIAL, esimtempLINEAR, esimtempNR
182 };
183 /* FEP selection */
184 enum {
185   efepNO, efepYES, efepSTATIC, efepSLOWGROWTH, efepEXPANDED, efepNR
186 };
187   /* if efepNO, there are no evaluations at other states.
188      if efepYES, treated equivalently to efepSTATIC.
189      if efepSTATIC, then lambdas do not change during the simulation.
190      if efepSLOWGROWTH, then the states change monotonically throughout the simulation.
191      if efepEXPANDED, then expanded ensemble simulations are occuring.
192   */
193
194 /* FEP coupling types */
195 enum {
196   efptFEP,efptMASS,efptCOUL,efptVDW,efptBONDED,efptRESTRAINT,efptTEMPERATURE,efptNR
197 };
198
199 /* How the lambda weights are calculated:
200    elamstatsMETROPOLIS = using the metropolis criteria
201    elamstatsBARKER = using the Barker critera for transition weights - also called unoptimized Bennett
202    elamstatsMINVAR = using Barker + minimum variance for weights
203    elamstatsWL = Wang-Landu (using visitation counts)
204    elamstatsWWL = Weighted Wang-Landau (using optimized gibbs weighted visitation counts)
205 */
206 enum {
207   elamstatsNO, elamstatsMETROPOLIS, elamstatsBARKER, elamstatsMINVAR, elamstatsWL, elamstatsWWL, elamstatsNR
208 };
209
210 #define ELAMSTATS_EXPANDED(e) ((e) > elamstatsNO)
211
212 #define EWL(e) ((e) == elamstatsWL || (e) == elamstatsWWL)
213
214 /* How moves in lambda are calculated:
215    elmovemcMETROPOLIS - using the Metropolis criteria, and 50% up and down
216    elmovemcBARKER - using the Barker criteria, and 50% up and down
217    elmovemcGIBBS - computing the transition using the marginalized probabilities of the lambdas
218    elmovemcMETGIBBS - computing the transition using the metropolized version of Gibbs (Monte Carlo Strategies in Scientific computing, Liu, p. 134)
219 */
220 enum {
221   elmcmoveNO,elmcmoveMETROPOLIS, elmcmoveBARKER, elmcmoveGIBBS, elmcmoveMETGIBBS, elmcmoveNR
222 };
223
224 /* how we decide whether weights have reached equilibrium
225    elmceqNO - never stop, weights keep going
226    elmceqYES - fix the weights from the beginning; no movement
227    elmceqWLDELTA - stop when the WL-delta falls below a certain level
228    elmceqNUMATLAM - stop when we have a certain number of samples at every step
229    elmceqSTEPS - stop when we've run a certain total number of steps
230    elmceqSAMPLES - stop when we've run a certain total number of samples
231    elmceqRATIO - stop when the ratio of samples (lowest to highest) is sufficiently large
232 */
233 enum {
234   elmceqNO,elmceqYES,elmceqWLDELTA,elmceqNUMATLAM,elmceqSTEPS,elmceqSAMPLES,elmceqRATIO,elmceqNR
235 };
236
237 /* separate_dhdl_file selection */
238 enum
239 {
240   /* NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool */
241   esepdhdlfileYES, esepdhdlfileNO, esepdhdlfileNR
242 };
243
244 /* dhdl_derivatives selection */
245 enum
246 {
247   /* NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool */
248   edhdlderivativesYES, edhdlderivativesNO, edhdlderivativesNR
249 };
250
251 /* Solvent model */
252 enum {
253   esolNO, esolSPC, esolTIP4P, esolNR
254 };
255
256 /* Dispersion correction */
257 enum {
258   edispcNO, edispcEnerPres, edispcEner, edispcAllEnerPres, edispcAllEner, edispcNR
259 }; 
260
261 /* Shell types, for completion stuff */
262 enum {
263   eshellCSH, eshellBASH, eshellZSH, eshellNR
264 }; 
265
266 /* Center of mass motion selection */
267 enum { 
268   ecmLINEAR, ecmANGULAR, ecmNO, ecmNR 
269 };
270
271 /* New version of simulated annealing */
272 enum { 
273   eannNO, eannSINGLE, eannPERIODIC, eannNR 
274 };
275
276 /* Implicit solvent algorithms */
277 enum { 
278   eisNO, eisGBSA, eisNR
279 };
280
281 /* Algorithms for calculating GB radii */
282 enum { 
283   egbSTILL, egbHCT, egbOBC, egbNR 
284 };
285
286 enum {
287   esaAPPROX, esaNO, esaSTILL, esaNR
288 };
289
290 /* Wall types */
291 enum {
292   ewt93, ewt104, ewtTABLE, ewt126, ewtNR
293 };
294
295 /* Pull stuff */
296 enum {
297   epullNO, epullUMBRELLA, epullCONSTRAINT, epullCONST_F, epullNR
298 };
299
300 enum {
301   epullgDIST, epullgDIR, epullgCYL, epullgPOS, epullgDIRPBC, epullgNR
302 };
303
304 #define PULL_CYL(pull) ((pull)->eGeom == epullgCYL)
305
306 /* Enforced rotation groups */
307 enum {
308   erotgISO  , erotgISOPF ,
309   erotgPM   , erotgPMPF  ,
310   erotgRM   , erotgRMPF  ,
311   erotgRM2  , erotgRM2PF ,
312   erotgFLEX , erotgFLEXT ,
313   erotgFLEX2, erotgFLEX2T,
314   erotgNR
315 };
316
317 enum {
318     erotgFitRMSD, erotgFitNORM, erotgFitPOT, erotgFitNR
319 };
320
321 /* QMMM */
322 enum {
323   eQMmethodAM1, eQMmethodPM3, eQMmethodRHF, 
324   eQMmethodUHF, eQMmethodDFT, eQMmethodB3LYP, eQMmethodMP2, eQMmethodCASSCF, eQMmethodB3LYPLAN,
325   eQMmethodDIRECT, eQMmethodNR
326 };
327
328 enum {
329   eQMbasisSTO3G, eQMbasisSTO3G2, eQMbasis321G, 
330   eQMbasis321Gp, eQMbasis321dGp, eQMbasis621G,
331   eQMbasis631G, eQMbasis631Gp, eQMbasis631dGp, 
332   eQMbasis6311G, eQMbasisNR
333 };
334
335 enum {
336   eQMMMschemenormal,eQMMMschemeoniom,eQMMMschemeNR
337 };
338
339 enum {
340   eMultentOptName, eMultentOptNo, eMultentOptLast, eMultentOptNR
341 };
342
343 enum {
344   eAdressOff,eAdressConst, eAdressXSplit, eAdressSphere, eAdressNR
345 };
346
347 enum {
348   eAdressICOff, eAdressICThermoForce, eAdressICNR
349 };
350
351 enum {
352   eAdressSITEcom,eAdressSITEcog, eAdressSITEatom, eAdressSITEatomatom, eAdressSITENR
353 };
354
355
356 /* The interactions contained in a (possibly merged) table
357  * for computing electrostatic, VDW repulsion and/or VDW dispersion 
358  * contributions.
359  */
360 enum gmx_table_interaction
361 {
362     GMX_TABLE_INTERACTION_ELEC,
363     GMX_TABLE_INTERACTION_VDWREP_VDWDISP,
364     GMX_TABLE_INTERACTION_VDWEXPREP_VDWDISP,
365     GMX_TABLE_INTERACTION_VDWDISP,
366     GMX_TABLE_INTERACTION_ELEC_VDWREP_VDWDISP,
367     GMX_TABLE_INTERACTION_ELEC_VDWEXPREP_VDWDISP,
368     GMX_TABLE_INTERACTION_ELEC_VDWDISP,
369     GMX_TABLE_INTERACTION_NR
370 };
371
372 /* Different formats for table data. Cubic spline tables are typically stored
373  * with the four Y,F,G,H intermediate values (check tables.c for format), which
374  * makes it easy to load with a single 4-way SIMD instruction too.
375  * Linear tables only need one value per table point, or two if both V and F
376  * are calculated. However, with SIMD instructions this makes the loads unaligned,
377  * and in that case we store the data as F, D=F(i+1)-F(i), V, and then a blank value,
378  * which again makes it possible to load as a single instruction.
379  */
380 enum gmx_table_format
381 {
382     GMX_TABLE_FORMAT_CUBICSPLINE_YFGH,
383     GMX_TABLE_FORMAT_LINEAR_VF,
384     GMX_TABLE_FORMAT_LINEAR_V,
385     GMX_TABLE_FORMAT_LINEAR_F,
386     GMX_TABLE_FORMAT_LINEAR_FDV0,
387     GMX_TABLE_FORMAT_NR
388 };
389
390 /* Neighborlist geometry type.
391  * Kernels will compute interactions between two particles, 
392  * 3-center water, 4-center water or coarse-grained beads.
393  */
394 enum gmx_nblist_kernel_geometry
395 {
396     GMX_NBLIST_GEOMETRY_PARTICLE_PARTICLE,
397     GMX_NBLIST_GEOMETRY_WATER3_PARTICLE,
398     GMX_NBLIST_GEOMETRY_WATER3_WATER3,
399     GMX_NBLIST_GEOMETRY_WATER4_PARTICLE,
400     GMX_NBLIST_GEOMETRY_WATER4_WATER4,
401     GMX_NBLIST_GEOMETRY_CG_CG,
402     GMX_NBLIST_GEOMETRY_NR
403 };
404
405 /* Types of electrostatics calculations available inside nonbonded kernels.
406  * Note that these do NOT necessarily correspond to the user selections in the MDP file;
407  * many interactions for instance map to tabulated kernels.
408  */
409 enum gmx_nbkernel_elec
410 {
411     GMX_NBKERNEL_ELEC_NONE,
412     GMX_NBKERNEL_ELEC_COULOMB,
413     GMX_NBKERNEL_ELEC_REACTIONFIELD,
414     GMX_NBKERNEL_ELEC_CUBICSPLINETABLE,
415     GMX_NBKERNEL_ELEC_GENERALIZEDBORN,
416     GMX_NBKERNEL_ELEC_EWALD,
417     GMX_NBKERNEL_ELEC_NR
418 };
419
420 /* Types of vdw calculations available inside nonbonded kernels.
421  * Note that these do NOT necessarily correspond to the user selections in the MDP file;
422  * many interactions for instance map to tabulated kernels.
423  */
424 enum gmx_nbkernel_vdw
425 {
426     GMX_NBKERNEL_VDW_NONE,
427     GMX_NBKERNEL_VDW_LENNARDJONES,
428     GMX_NBKERNEL_VDW_BUCKINGHAM,
429     GMX_NBKERNEL_VDW_CUBICSPLINETABLE,
430     GMX_NBKERNEL_VDW_NR
431 };
432
433
434
435 #ifdef __cplusplus
436 }
437 #endif
438
439 #endif /* ENUMS_H_ */