source: src/documentation/code.dox@ 936a02

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 936a02 was f11c23, checked in by Frederik Heber <heber@…>, 13 years ago

Added documentation on how to understand the code and its (maybe) future extensions.

  • Property mode set to 100644
File size: 4.8 KB
RevLine 
[19bc74]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 code.dox
10 *
11 * Created on: Oct 28, 2011
12 * Author: heber
13 */
14
15/**
[f11c23]16 * \page code How to use and extend the code
17 *
18 * \section code-introduction How to understand the code
19 *
20 * \subsection code-introduction-whats-there What's there already ...
21 *
22 * Generally, you will begin by having to add a certain Action to the code.
23 * Refer to the \ref constructs and (at the very least briefly) go through
24 * all the stuff that is already there. This should give you an idea of what
25 * you do not have to re-invent!
26 *
27 * As soon as you have decided upon all the little things required for your
28 * Action, e.g. you need a LinkedCell construct because of nearest neighbor,
29 * additionally you need access to BondGraph because you need bond distance
30 * information, you want to know how to access and use each of these.
31 *
32 * \subsection code-introduction-whats-not-there What's not there ...
33 *
34 * Not everything is always documented, not everything is always up-to-date.
35 * Search the code or try to look at Actions that are similar to what you
36 * intent. Try to understand how they do and whever your ideas really can't
37 * be realized with the current capabilities of the code.
38 *
39 * If not, it gets more complicated because if one extends the code, one can
40 * proceed in a straight-forward and soon-to-reach-the-goal way or one can
41 * try to realize if one's not generalizing a concept already present and
42 * implement this generalization (and also bring what's already there up to
43 * speed with this new implementation). Of course, before this "refactoring"
44 * (http://en.wikipedia.org/wiki/Code_refactoring) one should have tests in
45 * place that safeguard that the old functionality remains the same, see
46 * \ref tests. From this generalization your concept should then be easier
47 * to implement.
48 *
49 * Last but not least, see \ref future for what some of the areas are where
50 * the code needs extension or refactorization. Maybe somethings close to what
51 * you want and you could do it along the way, at the same time getting to
52 * know the code better?
53 *
54 * \section code-howto-use How to use the code
55 *
56 * There are two things that should make it easy for you to get to know the
57 * constructs, i.e. classes, required for your Action besides the documentation
58 * and serve as tiny examples on how to use them:
59 * - unit tests
60 * - regression tests
61 *
62 * \subsection code-howto-use-unit-tests Unit tests
63 *
64 * Unit tests give you an idea how to use a specific constructs, e.g. they
65 * tell you where to get it (simply \code new LinkedCell \endcode, or rather
66 * \code World::getInstance().getBondGraph() \endcode, because it's a unique
67 * instance) and how to use them because that's exactly what's being tested
68 * there. Just browse through the various(?) test functions implemented in
69 * each of the unit tests or rather the unit tests to the constructs you need.
70 *
71 * \subsection code-howto-use-regression-tests Regression tests
72 *
73 * Regression tests (\ref tests-regressiontests) give you an idea how your
74 * Action eventually can be called (from the command line), what to put in your
75 * \b .def file and how it ends up being the option you have to give.
76 *
77 * \attention Never forget that you are supposed to add a regression test for
78 * your new Action as well, either right now (http://en.wikipedia.org/wiki/Test-driven_development)
79 * or at the very latest once its finished.
80 *
81 * \subsection code-howto-use-last Last but not least
82 *
83 * Search the code with the desired construct as keyword to find out places
84 * where it is internally used, see how it is done there and do the same
85 * in your own Action.
86 *
87 * \section code-introduction-howto-extend How to extend the code
88 *
89 * Once you're certain your requirements are not met, new classes have to be
90 * added. Do some careful thinking whether you add something altogether new or
91 * whether it's already present in some simpler or slightly other form. In the
92 * latter case, try to generalize what's present and build from there. E.g.
93 * FormatParserParameters have been generalized from a simpler implementation
94 * that was just used for the parameters for MpqcParser (know FormatParser<mpqc>
95 * which has been refactored as well). Don't always go all the way, but extend
96 * and generalize when it makes sense, especially when the code is much easier
97 * to use afterwards or just much more powerful (with immediate consequences).
98 *
99 * Again, refer to \ref future to know what's already on the schedule, i. e.
100 * what's already marked for extension or refactoring.
101 *
102 * \section code-reference Further readings
[19bc74]103 *
[750cff]104 * \li \ref faq
105 * \li \ref constructs
106 * \li \ref howto
107 *
108 *
[f11c23]109 * \date 2011-11-03
[19bc74]110 *
111 */
Note: See TracBrowser for help on using the repository browser.