source: src/Makefile.am@ 3f9eba

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Added_ParseSaveFragmentResults AddingActions_SaveParseParticleParameters Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_ParticleName_to_Atom Adding_StructOpt_integration_tests AtomFragments 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_BoundInBox_CenterInBox_MoleculeActions 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 FragmentAction_writes_AtomFragments FragmentMolecule_checks_bonddegrees GeometryObjects Gui_Fixes Gui_displays_atomic_force_velocity ImplicitCharges IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix MoreRobust_FragmentAutomation ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PdbParser_setsAtomName PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks Rewrite_FitPartialCharges 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 3f9eba was 3f9eba, checked in by Frederik Heber <heber@…>, 14 years ago

New classes for random number generation.

  • we use boost::random as a basis. It implements a lot of pseudo-random engines and various distributions. However, everything is templated and there are no base classes to store prototypes of the instances in a map. We need these such that we are able to offer the user at run-time every choice possible.
  • Hence, we need to encapsulate all engines, distributions and (engine, distribution) tuples: RandomNumber..._Encapsulation classes.
  • each with an abstract base class as the interface: RandomNumber... classes.
  • RandomNumberGeneratorFactory is then a singleton that contains all the Maps and tables:
    • from string (user input is string) to enum (storing enum is more efficient that a lengthy string)
    • from enum to instance (of the abstract class).
  • RandomNumberGeneratorFactory is a singleton to allow for global control of what kind of numbers are generated, hence there are also two new Actions:
  • The user in the end only uses two classes: RandomNumberGeneratorFactory and RandomNumberGenerator. The first only for obtaining a specific variant of the latter and the latter to generate the numbers (operator() is passed on to boost::variate_generator::operator()).
  • There is a unit test on the RandomNumberGeneratorFactory that checks some of the table entries and whether one of the RandomNumberGenerator is working (uniform_smallint so far).

Details:

  • As there are ~25 engines and ~15 distributions this makes an enormous amount of possible combinations. To automatically construct these, we use some stuff from boost::preprocessor in order to generate enums, tables and maps automatically just from a sequence of the typenames.
  • we have be-friended the unit test a lot to allow for easier testing, e.g. we need access to internal ..._type to test whether their type is correct.
  • cleanUp() purges the instance of RandomNumberGeneratorFactory.
  • in RandomNumber..._Encapsulation::name() functions are only used for the unit tests.
  • this all resides in its own subfolder RandomNumbers. So far, it is completely independent of everything else.
  • Property mode set to 100644
File size: 12.5 KB
Line 
1# PLEASE adhere to the alphabetical ordering in this Makefile!
2# Also indentation by a single tab
3
4SUBDIRS = \
5 Exceptions \
6 Parser \
7 LinearAlgebra \
8 Shapes \
9 Actions \
10 UIElements
11
12AM_CPPFLAGS = ${BOOST_CPPFLAGS} ${CodePatterns_CFLAGS}
13
14ATOMSOURCE = \
15 atom.cpp \
16 AtomicInfo.cpp \
17 atom_atominfo.cpp \
18 atom_bondedparticle.cpp \
19 atom_bondedparticleinfo.cpp \
20 atom_graphnode.cpp \
21 atom_graphnodeinfo.cpp \
22 atom_particleinfo.cpp \
23 atom_trajectoryparticle.cpp \
24 atom_trajectoryparticleinfo.cpp
25ATOMHEADER = \
26 atom.hpp \
27 AtomicInfo.hpp \
28 atom_atominfo.hpp \
29 atom_bondedparticle.hpp \
30 atom_bondedparticleinfo.hpp \
31 atom_graphnode.hpp \
32 atom_graphnodeinfo.hpp \
33 atom_particleinfo.hpp \
34 atom_trajectoryparticle.hpp \
35 atom_trajectoryparticleinfo.hpp
36
37ANALYSISSOURCE = \
38 analysis_bonds.cpp \
39 analysis_correlation.cpp
40ANALYSISHEADER = \
41 analysis_bonds.hpp \
42 analysis_correlation.hpp
43
44ACTIONSSOURCE = \
45 Actions/Action.cpp \
46 Actions/ActionHistory.cpp \
47 Actions/ActionRegistry.cpp \
48 Actions/ActionSequence.cpp \
49 Actions/ActionTraits.cpp \
50 Actions/ErrorAction.cpp \
51 Actions/MakroAction.cpp \
52 Actions/ManipulateAtomsProcess.cpp \
53 Actions/MethodAction.cpp \
54 Actions/OptionRegistry.cpp \
55 Actions/OptionTrait.cpp \
56 Actions/Process.cpp
57
58ACTIONSHEADER = \
59 Actions/Action.hpp \
60 Actions/ActionHistory.hpp \
61 Actions/ActionRegistry.hpp \
62 Actions/ActionSequence.hpp \
63 Actions/ActionTraits.hpp \
64 Actions/Calculation.hpp \
65 Actions/Calculation_impl.hpp \
66 Actions/ErrorAction.hpp \
67 Actions/MakroAction.hpp \
68 Actions/ManipulateAtomsProcess.hpp \
69 Actions/MethodAction.hpp \
70 Actions/OptionRegistry.hpp \
71 Actions/OptionTrait.hpp \
72 Actions/Process.hpp
73
74
75DESCRIPTORSOURCE = \
76 Descriptors/AtomDescriptor.cpp \
77 Descriptors/AtomIdDescriptor.cpp \
78 Descriptors/AtomOfMoleculeSelectionDescriptor.cpp \
79 Descriptors/AtomSelectionDescriptor.cpp \
80 Descriptors/AtomShapeDescriptor.cpp \
81 Descriptors/AtomTypeDescriptor.cpp \
82 Descriptors/MoleculeDescriptor.cpp \
83 Descriptors/MoleculeFormulaDescriptor.cpp \
84 Descriptors/MoleculeIdDescriptor.cpp \
85 Descriptors/MoleculeNameDescriptor.cpp \
86 Descriptors/MoleculeOfAtomSelectionDescriptor.cpp \
87 Descriptors/MoleculeOrderDescriptor.cpp \
88 Descriptors/MoleculePtrDescriptor.cpp \
89 Descriptors/MoleculeSelectionDescriptor.cpp
90
91
92DESCRIPTORHEADER = \
93 Descriptors/AtomDescriptor.hpp \
94 Descriptors/AtomIdDescriptor.hpp \
95 Descriptors/AtomOfMoleculeSelectionDescriptor.hpp \
96 Descriptors/AtomSelectionDescriptor.hpp \
97 Descriptors/AtomShapeDescriptor.hpp \
98 Descriptors/AtomTypeDescriptor.hpp \
99 Descriptors/MoleculeDescriptor.hpp \
100 Descriptors/MoleculeFormulaDescriptor.hpp \
101 Descriptors/MoleculeIdDescriptor.hpp \
102 Descriptors/MoleculeNameDescriptor.hpp \
103 Descriptors/MoleculeOfAtomSelectionDescriptor.hpp \
104 Descriptors/MoleculeOrderDescriptor.hpp \
105 Descriptors/MoleculePtrDescriptor.hpp \
106 Descriptors/MoleculeSelectionDescriptor.hpp
107
108DESCRIPTORIMPLHEADER = \
109 Descriptors/AtomDescriptor_impl.hpp \
110 Descriptors/AtomIdDescriptor_impl.hpp \
111 Descriptors/AtomOfMoleculeSelectionDescriptor_impl.hpp \
112 Descriptors/AtomSelectionDescriptor_impl.hpp \
113 Descriptors/AtomShapeDescriptor_impl.hpp \
114 Descriptors/AtomTypeDescriptor_impl.hpp \
115 Descriptors/MoleculeDescriptor_impl.hpp \
116 Descriptors/MoleculeFormulaDescriptor_impl.hpp \
117 Descriptors/MoleculeIdDescriptor_impl.hpp \
118 Descriptors/MoleculeNameDescriptor_impl.hpp \
119 Descriptors/MoleculeOfAtomSelectionDescriptor_impl.hpp \
120 Descriptors/MoleculeOrderDescriptor_impl.hpp \
121 Descriptors/MoleculePtrDescriptor_impl.hpp \
122 Descriptors/MoleculeSelectionDescriptor_impl.hpp
123
124RANDOMSOURCE = \
125 RandomNumbers/RandomNumberGeneratorFactory.cpp
126
127RANDOMHEADER = \
128 RandomNumbers/RandomNumberGenerator.hpp \
129 RandomNumbers/TemplatePowerSetGenerator.hpp \
130 RandomNumbers/RandomNumberGenerator_Encapsulation.hpp \
131 RandomNumbers/RandomNumberGeneratorFactory.hpp
132
133THERMOSTATSOURCE = \
134 Thermostats/Berendsen.cpp \
135 Thermostats/GaussianThermostat.cpp \
136 Thermostats/Langevin.cpp \
137 Thermostats/NoseHoover.cpp \
138 Thermostats/NoThermostat.cpp \
139 Thermostats/Thermostat.cpp \
140 Thermostats/Woodcock.cpp
141
142THERMOSTATHEADER = \
143 Thermostats/Berendsen.hpp \
144 Thermostats/GaussianThermostat.hpp \
145 Thermostats/Langevin.hpp \
146 Thermostats/NoseHoover.hpp \
147 Thermostats/NoThermostat.hpp \
148 Thermostats/Thermostat.hpp \
149 Thermostats/Woodcock.hpp
150
151TESSELATIONSOURCE = \
152 BoundaryLineSet.cpp \
153 BoundaryPointSet.cpp \
154 BoundaryPolygonSet.cpp \
155 BoundaryTriangleSet.cpp \
156 CandidateForTesselation.cpp \
157 PointCloud.cpp \
158 tesselation.cpp \
159 tesselationhelpers.cpp \
160 TesselPoint.cpp
161
162TESSELATIONHEADER = \
163 BoundaryLineSet.hpp \
164 BoundaryPointSet.hpp \
165 BoundaryPolygonSet.hpp \
166 BoundaryTriangleSet.hpp \
167 CandidateForTesselation.hpp \
168 PointCloud.hpp \
169 tesselation.hpp \
170 tesselationhelpers.hpp \
171 TesselPoint.hpp
172
173MOLECUILDERSOURCE = \
174 ${ANALYSISSOURCE} \
175 ${ACTIONSSOURCE} \
176 ${ATOMSOURCE} \
177 ${DESCRIPTORSOURCE} \
178 ${RANDOMSOURCE} \
179 ${THERMOSTATSOURCE} \
180 ${TESSELATIONSOURCE} \
181 Helpers/defs.cpp \
182 Helpers/helpers.cpp \
183 bond.cpp \
184 bondgraph.cpp \
185 boundary.cpp \
186 Box.cpp \
187 config.cpp \
188 ConfigFileBuffer.cpp \
189 element.cpp \
190 elements_db.cpp \
191 ellipsoid.cpp \
192 Formula.cpp \
193 graph.cpp \
194 linkedcell.cpp \
195 moleculelist.cpp \
196 molecule.cpp \
197 molecule_dynamics.cpp \
198 molecule_fragmentation.cpp \
199 molecule_geometry.cpp \
200 molecule_graph.cpp \
201 molecule_pointcloud.cpp \
202 parser.cpp \
203 periodentafel.cpp \
204 ThermoStatContainer.cpp \
205 triangleintersectionlist.cpp \
206 UIElements/UIFactory.cpp \
207 World.cpp
208
209MOLECUILDERHEADER = \
210 ${ANALYSISHEADER} \
211 ${ACTIONSHEADER} \
212 ${ATOMHEADER} \
213 ${DESCRIPTORHEADER} \
214 ${DESCRIPTORIMPLHEADER} \
215 ${RANDOMSOURCE} \
216 ${THERMOSTATHEADER} \
217 ${TESSELATIONHEADER} \
218 Helpers/defs.hpp \
219 Helpers/fast_functions.hpp \
220 Helpers/helpers.hpp \
221 bond.hpp \
222 bondgraph.hpp \
223 boundary.hpp \
224 Box.hpp \
225 config.hpp \
226 ConfigFileBuffer.hpp \
227 element.hpp \
228 elements_db.hpp \
229 ellipsoid.hpp \
230 Formula.hpp \
231 graph.hpp \
232 linkedcell.hpp \
233 lists.hpp \
234 molecule.hpp \
235 parser.hpp \
236 periodentafel.hpp \
237 ThermoStatContainer.hpp \
238 triangleintersectionlist.hpp \
239 UIElements/UIFactory.hpp \
240 World.hpp
241
242lib_LTLIBRARIES = libMolecuilder.la
243libMolecuilder_la_includedir = $(includedir)/MoleCuilder/
244libMolecuilder_la_LIBADD = \
245 LinearAlgebra/libMolecuilderLinearAlgebra.la \
246 ${CodePatterns_LIBS} \
247 ${BOOST_PROGRAM_OPTIONS_LIB}
248
249nobase_libMolecuilder_la_include_HEADERS = ${MOLECUILDERHEADER}
250
251## Define the source file list for the "libexample-@MOLECUILDER_API_VERSION@.la"
252## target. Note that @MOLECUILDER_API_VERSION@ is not interpreted by Automake and
253## will therefore be treated as if it were literally part of the target name,
254## and the variable name derived from that.
255## The file extension .cc is recognized by Automake, and makes it produce
256## rules which invoke the C++ compiler to produce a libtool object file (.lo)
257## from each source file. Note that it is not necessary to list header files
258## which are already listed elsewhere in a _HEADERS variable assignment.
259libMolecuilder_la_SOURCES = ${MOLECUILDERSOURCE} $(srcdir)/version.c
260
261## Instruct libtool to include ABI version information in the generated shared
262## library file (.so). The library ABI version is defined in configure.ac, so
263## that all version information is kept in one place.
264libMolecuilder_la_LDFLAGS = -version-info $(MOLECUILDER_SO_VERSION)
265
266## The generated configuration header is installed in its own subdirectory of
267## $(libdir). The reason for this is that the configuration information put
268## into this header file describes the target platform the installed library
269## has been built for. Thus the file must not be installed into a location
270## intended for architecture-independent files, as defined by the Filesystem
271## Hierarchy Standard (FHS).
272## The nodist_ prefix instructs Automake to not generate rules for including
273## the listed files in the distribution on 'make dist'. Files that are listed
274## in _HEADERS variables are normally included in the distribution, but the
275## configuration header file is generated at configure time and should not be
276## shipped with the source tarball.
277libMolecuilder_la_libincludedir = $(libdir)/MoleCuilder/include
278nodist_libMolecuilder_la_libinclude_HEADERS = $(top_builddir)/libmolecuilder_config.h
279
280## Install the generated pkg-config file (.pc) into the expected location for
281## architecture-dependent package configuration information. Occasionally,
282## pkg-config files are also used for architecture-independent data packages,
283## in which case the correct install location would be $(datadir)/pkgconfig.
284pkgconfigdir = $(libdir)/pkgconfig
285pkgconfig_DATA = $(top_builddir)/MoleCuilder.pc
286
287
288BOOST_LIB = $(BOOST_LDFLAGS) $(BOOST_MPL_LIB) $(BOOST_PROGRAM_OPTIONS_LIB) $(BOOST_FILESYSTEM_LIB) $(BOOST_SYSTEM_LIB) $(BOOST_THREAD_LIB)
289INCLUDES = -I$(top_srcdir)/src/unittests -I$(top_srcdir)/src/Actions -I$(top_srcdir)/src/UIElements
290
291noinst_LIBRARIES = libmenu.a
292bin_PROGRAMS = molecuilder molecuildergui joiner analyzer SubspaceFactorizer
293EXTRA_PROGRAMS = unity
294
295molecuilderdir = ${bindir}
296
297libmenu_a_SOURCES = ${UISOURCE} ${UIHEADER}
298
299molecuilder_DATA = elements.db valence.db orbitals.db Hbonddistance.db Hbondangle.db
300
301SubspaceFactorizer_CXXFLAGS = $(BOOST_CPPFLAGS)
302SubspaceFactorizer_SOURCES = SubspaceFactorizer.cpp Helpers/defs.cpp Helpers/defs.hpp Helpers/helpers.cpp Helpers/helpers.hpp
303SubspaceFactorizer_LDADD = \
304 LinearAlgebra/libMolecuilderLinearAlgebra.la \
305 Exceptions/libMolecuilderExceptions.la \
306 ${CodePatterns_LIBS} \
307 $(GSLLIB) \
308 $(BOOST_LIB)
309
310molecuilder_CXXFLAGS = $(BOOST_CPPFLAGS)
311#molecuilder_CXXFLAGS += -DNO_CACHING
312molecuilder_LDFLAGS = $(BOOST_LIB)
313molecuilder_SOURCES = builder.cpp builder_init.cpp builder_init.hpp
314molecuilder_LDADD = \
315 UIElements/libMolecuilderUI.la \
316 Actions/libMolecuilderActions.la \
317 libMolecuilder.la \
318 Parser/libMolecuilderParser.la \
319 Shapes/libMolecuilderShapes.la \
320 LinearAlgebra/libMolecuilderLinearAlgebra.la \
321 Exceptions/libMolecuilderExceptions.la \
322 ${CodePatterns_LIBS} \
323 $(BOOST_LIB)
324
325#Stuff for building the GUI using Qt
326molecuildergui_SOURCES = builder.cpp builder_init.cpp builder_init.hpp
327molecuildergui_CXXFLAGS = $(BOOST_CPPFLAGS) -DUSE_GUI_QT
328molecuildergui_LDFLAGS = $(BOOST_LIB)
329
330unity_SOURCES = unity.cpp
331unity_LDADD = $(BOOST_LIB)
332
333molecuildergui_LDADD = \
334 UIElements/libMolecuilderUI.la \
335 UIElements/libMolecuilderQtUI.la \
336 Actions/libMolecuilderActions.la \
337 libMolecuilder.la \
338 Parser/libMolecuilderParser.la \
339 Shapes/libMolecuilderShapes.la \
340 LinearAlgebra/libMolecuilderLinearAlgebra.la \
341 Exceptions/libMolecuilderExceptions.la \
342 ${CodePatterns_LIBS} \
343 $(BOOST_LIB) \
344 ${GUI_LIBS}
345
346joiner_SOURCES = joiner.cpp datacreator.cpp datacreator.hpp periodentafel.hpp
347joiner_LDADD = \
348 UIElements/libMolecuilderUI.la \
349 Actions/libMolecuilderActions.la \
350 libMolecuilder.la \
351 Parser/libMolecuilderParser.la \
352 Shapes/libMolecuilderShapes.la \
353 LinearAlgebra/libMolecuilderLinearAlgebra.la \
354 Exceptions/libMolecuilderExceptions.la \
355 ${CodePatterns_LIBS} \
356 $(BOOST_LIB)
357
358analyzer_SOURCES = analyzer.cpp datacreator.cpp periodentafel.hpp datacreator.hpp
359analyzer_LDADD = \
360 UIElements/libMolecuilderUI.la \
361 Actions/libMolecuilderActions.la \
362 libMolecuilder.la \
363 Parser/libMolecuilderParser.la \
364 Shapes/libMolecuilderShapes.la \
365 LinearAlgebra/libMolecuilderLinearAlgebra.la \
366 Exceptions/libMolecuilderExceptions.la \
367 ${CodePatterns_LIBS} \
368 $(BOOST_LIB)
369
370#EXTRA_DIST = ${molecuilder_DATA}
371
372FORCE:
373$(srcdir)/.git-version: FORCE
374 @if (test -d $(top_srcdir)/.git && cd $(srcdir) \
375 && { git describe --dirty --always || git describe; } ) > .git-version-t 2>/dev/null \
376 && ! diff .git-version-t $(srcdir)/.git-version >/dev/null 2>&1; then \
377 mv -f .git-version-t $(srcdir)/.git-version; \
378 else \
379 rm -f .git-version-t; \
380 fi
381
382EXTRA_DIST = $(srcdir)/.git-version
383
384$(srcdir)/version.c: $(srcdir)/.git-version
385 echo "const char *MOLECUILDERVERSION = \"$(PACKAGE_NAME) version "`cat $(srcdir)/.git-version`"\";" > $@
386
387
388unity.cpp: ${MOLECUILDERSOURCE} ${MOLECUILDERHEADER}
389 echo "#include \"$(srcdir)/Helpers/MemDebug.cpp\"" > unity.cpp; \
390 list='$(MOLECUILDERSOURCE)'; for file in $$list; do \
391 echo "#include \"$(srcdir)/$$file\"" >> unity.cpp; \
392 done; \
393 subdirs='$(SUBDIRS)';for directory in $$subdirs; do\
394 olddir=$$PWD;\
395 cd $$directory && make unity.cpp;\
396 cd $$olddir;\
397 echo "#include \"$$directory/unity.cpp\"" >> unity.cpp;\
398 done;\
399 echo "#include \"$(srcdir)/builder.cpp\"" >> unity.cpp;
400 echo "#include \"$(srcdir)/version.c\"" >> unity.cpp;
401
402MOSTLYCLEANFILES = unity.cpp
403
Note: See TracBrowser for help on using the repository browser.