1 | /*
|
---|
2 | * FragmentationShortRangeResults.hpp
|
---|
3 | *
|
---|
4 | * Created on: Mar 7, 2013
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 | #ifndef FRAGMENTATIONSHORTRANGERESULTS_HPP_
|
---|
9 | #define FRAGMENTATIONSHORTRANGERESULTS_HPP_
|
---|
10 |
|
---|
11 |
|
---|
12 | // include config.h
|
---|
13 | #ifdef HAVE_CONFIG_H
|
---|
14 | #include <config.h>
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | #include <map>
|
---|
18 | #include <vector>
|
---|
19 |
|
---|
20 | #include "JobMarket/types.hpp"
|
---|
21 |
|
---|
22 | #include "Fragmentation/KeySetsContainer.hpp"
|
---|
23 | #include "Fragmentation/Summation/IndexSet.hpp"
|
---|
24 | #include "Fragmentation/Summation/IndexSetContainer.hpp"
|
---|
25 | #include "Fragmentation/Summation/SubsetMap.hpp"
|
---|
26 |
|
---|
27 | #include "Jobs/MPQCData.hpp"
|
---|
28 | #include "Jobs/MPQCDataMap.hpp"
|
---|
29 |
|
---|
30 | /** FragmentationShortRangeResults contains the summed up results per level resulting
|
---|
31 | * from the fragmentation of the molecular system and clever combination of
|
---|
32 | * fragmentary energies, forces, timings, and so on.
|
---|
33 | *
|
---|
34 | * This structure is mostly a storage wherein the summed up results are
|
---|
35 | * contained for subsequent pretty printing and so on.
|
---|
36 | *
|
---|
37 | */
|
---|
38 | struct FragmentationShortRangeResults
|
---|
39 | {
|
---|
40 | /** Constructor for class FragmentationShortRangeResults, based on KeySets.
|
---|
41 | *
|
---|
42 | * @param fragmentData results from short-range fragment calculations
|
---|
43 | * @param _KeySet KeySets of all (non-hydrogen) atoms
|
---|
44 | * @param _ForceKeySet KeySets of all atoms except those added by saturation
|
---|
45 | */
|
---|
46 | FragmentationShortRangeResults(
|
---|
47 | const std::map<JobId_t,MPQCData> &fragmentData,
|
---|
48 | const KeySetsContainer& _KeySet,
|
---|
49 | const KeySetsContainer& _ForceKeySet);
|
---|
50 |
|
---|
51 | /** Performs the summation and fills all result vectors.
|
---|
52 | *
|
---|
53 | * @param fragmentData results from short-range fragment calculations
|
---|
54 | */
|
---|
55 | void operator()(
|
---|
56 | const std::map<JobId_t,MPQCData> &fragmentData);
|
---|
57 |
|
---|
58 | size_t getMaxLevel() const {
|
---|
59 | return MaxLevel;
|
---|
60 | }
|
---|
61 |
|
---|
62 | IndexSetContainer::Container_t getContainer() const {
|
---|
63 | return container->getContainer();
|
---|
64 | }
|
---|
65 |
|
---|
66 | const KeySetsContainer& getKeySet() const {
|
---|
67 | return KeySet;
|
---|
68 | }
|
---|
69 |
|
---|
70 | const KeySetsContainer& getForceKeySet() const {
|
---|
71 | return ForceKeySet;
|
---|
72 | }
|
---|
73 |
|
---|
74 | private:
|
---|
75 | std::map< JobId_t, size_t > MPQCMatrixNrLookup;
|
---|
76 | KeySetsContainer KeySet;
|
---|
77 | KeySetsContainer ForceKeySet;
|
---|
78 | IndexSetContainer::ptr container;
|
---|
79 | SubsetMap::ptr subsetmap;
|
---|
80 |
|
---|
81 | public:
|
---|
82 | //!> results per level of summed up energy
|
---|
83 | std::vector<MPQCDataEnergyMap_t> Result_Energy_fused;
|
---|
84 | //!> results per level of summed up times
|
---|
85 | std::vector<MPQCDataTimeMap_t> Result_Time_fused;
|
---|
86 | //!> results per level of summed up forces
|
---|
87 | std::vector<MPQCDataForceMap_t> Result_Force_fused;
|
---|
88 |
|
---|
89 | //!> results per IndexSet of summed up energy
|
---|
90 | std::map<IndexSet::ptr, std::pair<MPQCDataEnergyMap_t,MPQCDataEnergyMap_t> > Result_perIndexSet_Energy;
|
---|
91 | //!> results per IndexSet of summed up times
|
---|
92 | std::map<IndexSet::ptr, std::pair<MPQCDataTimeMap_t,MPQCDataTimeMap_t> > Result_perIndexSet_Time;
|
---|
93 | //!> results per IndexSet of summed up forces
|
---|
94 | std::map<IndexSet::ptr, std::pair<MPQCDataForceMap_t, MPQCDataForceMap_t> > Result_perIndexSet_Force;
|
---|
95 | // we don't need the map pendant for Result_LongRangeIntegrated_fused, as this
|
---|
96 | // quantity makes sense only level-wise
|
---|
97 |
|
---|
98 | private:
|
---|
99 | //!> maximum level of summation
|
---|
100 | size_t MaxLevel;
|
---|
101 | };
|
---|
102 |
|
---|
103 |
|
---|
104 | #endif /* FRAGMENTATIONSHORTRANGERESULTS_HPP_ */
|
---|