source: src/Potentials/Specifics/PotentialTypes.hpp@ d96482

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator CombiningParticlePotentialParsing Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError Fix_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_PopActions Fix_QtFragmentList_sorted_selection Fix_Restrictedkeyset_FragmentMolecule Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fix_fitting_potentials Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg Switchable_LogView ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps TremoloParser_setsAtomName Ubuntu_1604_changes stable
Last change on this file since d96482 was a86666, checked in by Frederik Heber <heber@…>, 12 years ago

Added PotentialTypes.

  • Property mode set to 100644
File size: 1.6 KB
Line 
1/** \file PotentialTypes.hpp
2 *
3 * This is a enhanced enumeration to make it usable within a loop.
4 *
5 * date: Apr, 09 2013
6 * author: heber
7 *
8 */
9
10#ifndef POTENTIALTYPES_HPP_
11#define POTENTIALTYPES_HPP_
12
13// include config.h
14#ifdef HAVE_CONFIG_H
15#include <config.h>
16#endif
17
18#include <boost/preprocessor/seq/elem.hpp>
19#include <boost/preprocessor/seq/seq.hpp>
20#include <boost/preprocessor/seq/size.hpp>
21#include <boost/preprocessor/iteration/local.hpp>
22
23
24#include "PotentialTypes.def"
25
26//!> function to print each member of the sequence in the enumeration
27#define sequence_print(z,n,seq) \
28 BOOST_PP_SEQ_ELEM(n, seq) ,
29
30 //!> enumeration of all known and createable potentials
31enum PotentialTypes {
32// some proprocessor magic to generate the body from the above sequence
33#if defined PotentialTypes_END // do we have parameters at all?
34#define BOOST_PP_LOCAL_MACRO(n) sequence_print(~, n, POTENTIALSEQUENCE)
35#define BOOST_PP_LOCAL_LIMITS (0, PotentialTypes_END-1)
36#include BOOST_PP_LOCAL_ITERATE()
37#undef BOOST_PP_LOCAL_MACRO
38#undef BOOST_PP_LOCAL_LIMITS
39#endif
40 PotentialTypes_end = PotentialTypes_END,
41 PotentialTypes_begin = BOOST_PP_SEQ_HEAD(POTENTIALSEQUENCE)
42};
43
44#undef sequence_print
45
46//!> Number of known PotentialTypes
47const size_t PotentialTypesMax = PotentialTypes_END;
48
49#include "PotentialTypes.undef"
50
51//!> Typedef for enumeration to ease its use
52typedef enum PotentialTypes PotentialTypes;
53
54/** Increment operator for the enumeration PotentialTypes to allow loops.
55 * \param &type value
56 * \return value incremented by one
57 */
58PotentialTypes &operator++(PotentialTypes &type);
59
60#endif /* POTENTIALTYPES_HPP_ */
61
Note: See TracBrowser for help on using the repository browser.