source: src/Atom/atom_bondedparticleinfo.hpp@ 440ac3

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.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator Combining_Subpackages Debian_Package_split Debian_package_split_molecuildergui_only Disabling_MemDebug Docu_Python_wait EmpiricalPotential_contain_HomologyGraph_documentation Enable_parallel_make_install Enhance_userguide Enhanced_StructuralOptimization Enhanced_StructuralOptimization_continued Example_ManyWaysToTranslateAtom Exclude_Hydrogens_annealWithBondGraph FitPartialCharges_GlobalError 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 JobMarket_unresolvable_hostname_fix PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 440ac3 was a1c8fa, checked in by Frederik Heber <heber@…>, 8 years ago

FIX: BondedParticleInfo::MaxOrder and ::AdapativeOrder are now stored per trajectory step.

  • adapted uses in AdaptivityMap and Fragmentation as members are now protected.
  • Property mode set to 100644
File size: 4.4 KB
Line 
1/*
2 * atom_bondedparticleinfo.hpp
3 *
4 * Created on: Oct 19, 2009
5 * Author: heber
6 */
7
8#ifndef ATOM_BONDEDPARTICLEINFO_HPP_
9#define ATOM_BONDEDPARTICLEINFO_HPP_
10
11
12using namespace std;
13
14/*********************************************** includes ***********************************/
15
16// include config.h
17#ifdef HAVE_CONFIG_H
18#include <config.h>
19#endif
20
21//#include "atom_observable.hpp"
22#include "Bond/bond.hpp"
23
24#include <list>
25#include <vector>
26
27/****************************************** forward declarations *****************************/
28
29class BondedParticle;
30
31typedef std::list<bond::ptr > BondList;
32
33/********************************************** declarations *******************************/
34
35class BondedParticleInfo // : public virtual AtomObservable // must be virtual(!)
36{
37 friend class BondedParticle;
38public:
39
40 virtual ~BondedParticleInfo() {}
41
42 /** Pushes back another step in all trajectory vectors.
43 *
44 * This allows to extend all trajectories contained in different classes
45 * consistently. This is implemented by the topmost class which calls the
46 * real functions, \sa AppendTrajectoryStep(), by all necessary subclasses.
47 */
48 virtual void UpdateStep(const unsigned int _step)=0;
49
50 /** Pops the last step in all trajectory vectors.
51 *
52 * This allows to decrease all trajectories contained in different classes
53 * by one consistently. This is implemented by the topmost class which calls
54 * the real functions, \sa removeTrajectoryStep(), by all necessary subclasses.
55 */
56 virtual void removeStep(const unsigned int _step)=0;
57
58 /** Const accessor to ListOfBonds of WorldTime::CurrentTime.
59 *
60 * @return ListOfBonds[WorldTime::CurrentTime]
61 */
62 const BondList& getListOfBonds() const;
63
64 /** Const Accessor ListOfBonds of any present time step.
65 *
66 * @param _step time step to access
67 * @return ListOfBonds[_step].
68 */
69 const BondList& getListOfBondsAtStep(unsigned int _step) const;
70
71 /** Const getter for the MaxOrder property at current time step.
72 *
73 * @return MaxOrder[Current world time step].
74 */
75 const unsigned char& getMaxOrder() const;
76
77 /** Const getter for the MaxOrder property at given \a _step.
78 *
79 * @param _step time step to access
80 * @return MaxOrder[_step].
81 */
82 const unsigned char& getMaxOrder(const unsigned int _step) const;
83
84 /** Setter for the MaxOrder property at current time step.
85 *
86 * @param _value value to set for MaxOrder at current time step
87 */
88 void setMaxOrder(const unsigned char _value);
89
90 /**Setter for the MaxOrder property at given \a _step.
91 *
92 * @param _step time step to access
93 * @param _value value to set for MaxOrder at the desired time step
94 * @return MaxOrder[_step].
95 */
96 void setMaxOrder(const unsigned int _step, const unsigned char _value);
97
98 /** Const getter for the AdaptiveOrder property at current time step.
99 *
100 * @return AdaptiveOrder[Current world time step].
101 */
102 const unsigned char& getAdaptiveOrder() const;
103
104 /** Const getter for the AdaptiveOrder property at given \a _step.
105 *
106 * @param _step time step to access
107 * @return AdaptiveOrder[_step].
108 */
109 const unsigned char& getAdaptiveOrder(const unsigned int _step) const;
110
111 /** Setter for the AdaptiveOrder property at current time step.
112 *
113 * @param _value value to set for AdaptiveOrder at current time step
114 */
115 void setAdaptiveOrder(const unsigned char _value);
116
117 /** Setter for the AdaptiveOrder property at given \a _step.
118 *
119 * @param _step time step to access
120 * @param _value value to set for AdaptiveOrder at the desired time step
121 * @return AdaptiveOrder[_step].
122 */
123 void setAdaptiveOrder(const unsigned int _step, const unsigned char _value);
124
125protected:
126 /** Function used by this and inheriting classes to extend the ListOfBonds
127 * vector.
128 */
129 void AppendTrajectoryStep(const unsigned int _step);
130
131 /** Function used by this and inheriting classes to reduce the ListOfBonds
132 * vector by one.
133 */
134 void removeTrajectoryStep(const unsigned int _step);
135
136 typedef std::map<unsigned int, BondList> BondTrajectory_t;
137 BondTrajectory_t ListOfBonds; //!< list of all bonds
138 static BondList emptyList; //!< empty list to return when step is not present
139
140 typedef std::map<unsigned int, unsigned char> OrderTrajectory_t;
141 OrderTrajectory_t AdaptiveOrder; //!< current present bond order at site (0 means "not set")
142 OrderTrajectory_t MaxOrder; //!< desired maximum order of this atom (0 means "not set")
143};
144
145
146#endif /* ATOM_BONDEDPARTICLEINFO_HPP_ */
Note: See TracBrowser for help on using the repository browser.