source: src/documentation/constructs/randomnumbers.dox@ 3aa204

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests AutomationFragmentation_failures Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph Fix_ChronosMutex Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids_IntegrationTest JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes
Last change on this file since 3aa204 was 750cff, checked in by Frederik Heber <heber@…>, 13 years ago

HUGE: Update on documenation.

  • a general skeleton of the documentation is now in place with all the major components of MoleCuilder explained to some extent.
  • some information has been transfered from TRAC (e.g. install procecure) into this doxygen documentation where it is general and not specific to the situation at our institute.
  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2 * Project: MoleCuilder
3 * Description: creates and alters molecular systems
4 * Copyright (C) 2010 University of Bonn. All rights reserved.
5 * Please see the LICENSE file or "Copyright notice" in builder.cpp for details.
6 */
7
8/**
9 * \file randomnumbers.dox
10 *
11 * Created on: Oct 28, 2011
12 * Author: heber
13 */
14
15/** \page randomnumbers Random Number Generation
16 *
17 * There is a factory for random number generators present. This implementation
18 * has been necessary due to lack of a common interface on the side of the
19 * boost::random programmer. Hence, we added a RandomNumberInterface for both
20 * engine and distribution and a factory for both and finally the conglomerate
21 * for combining both into a single RandomNumberGenerator.
22 *
23 * Whereever random numbers should be picked with a varying distribution or
24 * even better a user-controlled one, this RandomNumberGenerator should be
25 * used, e.g. as this
26 * \code
27 * RandomNumberGenerator &random = RandomNumberGeneratorFactory::getInstance().makeRandomNumberGenerator();
28 * const double rng_min = random.min();
29 * const double rng_max = random.max();
30 * \endcode
31 * This returns a reference to a random number generator instance. And also we obtain
32 * its RandomNumberGenerator::min() and RandomNumberGenerator::max() values.
33 * Then, we may create random values as simple as this:
34 * \code
35 * double random_value = (random()/((rng_max-rng_min)/2.) - 1.);
36 * \endcode
37 * which creates a random value within [-1,1]. Note that random() here is
38 * RandomNumberGenerator::operator() and not some global function.
39 *
40 * \note Do not necessarily use the random number generation when just a uniform
41 * distribution is required. The implementation is especially designed to allow
42 * the user control over the random number distribution. E.g. when filling the void
43 * space in a simulation box with molecules he may choose a discrete distribution
44 * with a small number of values to have a few, but random orientations of the
45 * molecules (MoleculeFillVoidWithMoleculeAction()).
46 *
47 * \date 2011-10-31
48 *
49 */
Note: See TracBrowser for help on using the repository browser.