Merge branch 'release-4-6'
[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 /* Shell types, for completion stuff */
259 enum {
260     eshellCSH, eshellBASH, eshellZSH, eshellNR
261 };
262
263 /* Center of mass motion selection */
264 enum {
265     ecmLINEAR, ecmANGULAR, ecmNO, ecmNR
266 };
267
268 /* New version of simulated annealing */
269 enum {
270     eannNO, eannSINGLE, eannPERIODIC, eannNR
271 };
272
273 /* Implicit solvent algorithms */
274 enum {
275     eisNO, eisGBSA, eisNR
276 };
277
278 /* Algorithms for calculating GB radii */
279 enum {
280     egbSTILL, egbHCT, egbOBC, egbNR
281 };
282
283 enum {
284     esaAPPROX, esaNO, esaSTILL, esaNR
285 };
286
287 /* Wall types */
288 enum {
289     ewt93, ewt104, ewtTABLE, ewt126, ewtNR
290 };
291
292 /* Pull stuff */
293 enum {
294     epullNO, epullUMBRELLA, epullCONSTRAINT, epullCONST_F, epullNR
295 };
296
297 enum {
298     epullgDIST, epullgDIR, epullgCYL, epullgPOS, epullgDIRPBC, epullgNR
299 };
300
301 #define PULL_CYL(pull) ((pull)->eGeom == epullgCYL)
302
303 /* Enforced rotation groups */
304 enum {
305     erotgISO, erotgISOPF,
306     erotgPM, erotgPMPF,
307     erotgRM, erotgRMPF,
308     erotgRM2, erotgRM2PF,
309     erotgFLEX, erotgFLEXT,
310     erotgFLEX2, erotgFLEX2T,
311     erotgNR
312 };
313
314 enum {
315     erotgFitRMSD, erotgFitNORM, erotgFitPOT, erotgFitNR
316 };
317
318 /* QMMM */
319 enum {
320     eQMmethodAM1, eQMmethodPM3, eQMmethodRHF,
321     eQMmethodUHF, eQMmethodDFT, eQMmethodB3LYP, eQMmethodMP2, eQMmethodCASSCF, eQMmethodB3LYPLAN,
322     eQMmethodDIRECT, eQMmethodNR
323 };
324
325 enum {
326     eQMbasisSTO3G, eQMbasisSTO3G2, eQMbasis321G,
327     eQMbasis321Gp, eQMbasis321dGp, eQMbasis621G,
328     eQMbasis631G, eQMbasis631Gp, eQMbasis631dGp,
329     eQMbasis6311G, eQMbasisNR
330 };
331
332 enum {
333     eQMMMschemenormal, eQMMMschemeoniom, eQMMMschemeNR
334 };
335
336 enum {
337     eMultentOptName, eMultentOptNo, eMultentOptLast, eMultentOptNR
338 };
339
340 /* flat-bottom posres geometries */
341 enum {
342     efbposresZERO, efbposresSPHERE, efbposresCYLINDER, efbposresX, efbposresY, efbposresZ,
343     efbposresNR
344 };
345
346 enum {
347     eAdressOff, eAdressConst, eAdressXSplit, eAdressSphere, eAdressNR
348 };
349
350 enum {
351     eAdressICOff, eAdressICThermoForce, eAdressICNR
352 };
353
354 enum {
355     eAdressSITEcom, eAdressSITEcog, eAdressSITEatom, eAdressSITEatomatom, eAdressSITENR
356 };
357
358
359 /* The interactions contained in a (possibly merged) table
360  * for computing electrostatic, VDW repulsion and/or VDW dispersion
361  * contributions.
362  */
363 enum gmx_table_interaction
364 {
365     GMX_TABLE_INTERACTION_ELEC,
366     GMX_TABLE_INTERACTION_VDWREP_VDWDISP,
367     GMX_TABLE_INTERACTION_VDWEXPREP_VDWDISP,
368     GMX_TABLE_INTERACTION_VDWDISP,
369     GMX_TABLE_INTERACTION_ELEC_VDWREP_VDWDISP,
370     GMX_TABLE_INTERACTION_ELEC_VDWEXPREP_VDWDISP,
371     GMX_TABLE_INTERACTION_ELEC_VDWDISP,
372     GMX_TABLE_INTERACTION_NR
373 };
374
375 /* Different formats for table data. Cubic spline tables are typically stored
376  * with the four Y,F,G,H intermediate values (check tables.c for format), which
377  * makes it easy to load with a single 4-way SIMD instruction too.
378  * Linear tables only need one value per table point, or two if both V and F
379  * are calculated. However, with SIMD instructions this makes the loads unaligned,
380  * and in that case we store the data as F, D=F(i+1)-F(i), V, and then a blank value,
381  * which again makes it possible to load as a single instruction.
382  */
383 enum gmx_table_format
384 {
385     GMX_TABLE_FORMAT_CUBICSPLINE_YFGH,
386     GMX_TABLE_FORMAT_LINEAR_VF,
387     GMX_TABLE_FORMAT_LINEAR_V,
388     GMX_TABLE_FORMAT_LINEAR_F,
389     GMX_TABLE_FORMAT_LINEAR_FDV0,
390     GMX_TABLE_FORMAT_NR
391 };
392
393 /* Neighborlist geometry type.
394  * Kernels will compute interactions between two particles,
395  * 3-center water, 4-center water or coarse-grained beads.
396  */
397 enum gmx_nblist_kernel_geometry
398 {
399     GMX_NBLIST_GEOMETRY_PARTICLE_PARTICLE,
400     GMX_NBLIST_GEOMETRY_WATER3_PARTICLE,
401     GMX_NBLIST_GEOMETRY_WATER3_WATER3,
402     GMX_NBLIST_GEOMETRY_WATER4_PARTICLE,
403     GMX_NBLIST_GEOMETRY_WATER4_WATER4,
404     GMX_NBLIST_GEOMETRY_CG_CG,
405     GMX_NBLIST_GEOMETRY_NR
406 };
407
408 /* Types of electrostatics calculations available inside nonbonded kernels.
409  * Note that these do NOT necessarily correspond to the user selections in the MDP file;
410  * many interactions for instance map to tabulated kernels.
411  */
412 enum gmx_nbkernel_elec
413 {
414     GMX_NBKERNEL_ELEC_NONE,
415     GMX_NBKERNEL_ELEC_COULOMB,
416     GMX_NBKERNEL_ELEC_REACTIONFIELD,
417     GMX_NBKERNEL_ELEC_CUBICSPLINETABLE,
418     GMX_NBKERNEL_ELEC_GENERALIZEDBORN,
419     GMX_NBKERNEL_ELEC_EWALD,
420     GMX_NBKERNEL_ELEC_NR
421 };
422
423 /* Types of vdw calculations available inside nonbonded kernels.
424  * Note that these do NOT necessarily correspond to the user selections in the MDP file;
425  * many interactions for instance map to tabulated kernels.
426  */
427 enum gmx_nbkernel_vdw
428 {
429     GMX_NBKERNEL_VDW_NONE,
430     GMX_NBKERNEL_VDW_LENNARDJONES,
431     GMX_NBKERNEL_VDW_BUCKINGHAM,
432     GMX_NBKERNEL_VDW_CUBICSPLINETABLE,
433     GMX_NBKERNEL_VDW_NR
434 };
435 /* Types of interactions inside the neighborlist
436  */
437 enum gmx_nblist_interaction_type
438 {
439     GMX_NBLIST_INTERACTION_STANDARD,
440     GMX_NBLIST_INTERACTION_FREE_ENERGY,
441     GMX_NBLIST_INTERACTION_ADRESS,
442     GMX_NBLIST_INTERACTION_NR
443 };
444
445 #ifdef __cplusplus
446 }
447 #endif
448
449 #endif /* ENUMS_H_ */