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