source: src/Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp@ d03800

Action_Thermostats Add_AtomRandomPerturbation Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open 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 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 ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since d03800 was ea63cb, checked in by Frederik Heber <heber@…>, 8 years ago

Edges per Fragment passed on to FragmentationShortRangeResults.

  • Property mode set to 100644
File size: 4.3 KB
Line 
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#ifdef HAVE_JOBMARKET
21#include "JobMarket/types.hpp"
22#else
23typedef size_t JobId_t;
24#endif
25
26#include "Fragmentation/EdgesPerFragment.hpp"
27#include "Fragmentation/KeySetsContainer.hpp"
28#include "Fragmentation/Summation/IndexSet.hpp"
29#include "Fragmentation/Summation/IndexSetContainer.hpp"
30#include "Fragmentation/Summation/SubsetMap.hpp"
31
32#include "Fragmentation/Summation/Containers/MPQCData.hpp"
33#include "Fragmentation/Summation/Containers/MPQCDataMap.hpp"
34
35/** FragmentationShortRangeResults contains the summed up results per level resulting
36 * from the fragmentation of the molecular system and clever combination of
37 * fragmentary energies, forces, timings, and so on.
38 *
39 * This structure is mostly a storage wherein the summed up results are
40 * contained for subsequent pretty printing and so on.
41 *
42 */
43struct FragmentationShortRangeResults
44{
45 typedef FragmentationEdges::edges_per_fragment_t edges_per_fragment_t;
46
47 /** Constructor for class FragmentationShortRangeResults, based on KeySets.
48 *
49 * @param fragmentData results from short-range fragment calculations
50 * @param _KeySet KeySets of all (non-hydrogen) atoms
51 * @param _ForceKeySet KeySets of all atoms except those added by saturation
52 * @param _edges_per_fragment edges of the bond graph over all fragment jobs
53 * @param _ValueMask masks whether to use a value (true) or not (false),
54 * default is true for all values
55 */
56 FragmentationShortRangeResults(
57 const std::map<JobId_t,MPQCData> &fragmentData,
58 const KeySetsContainer& _KeySet,
59 const KeySetsContainer& _ForceKeySet,
60 const edges_per_fragment_t &_edges_per_fragment,
61 std::vector<bool> &_ValueMask);
62
63 /** Performs the summation and fills all result vectors.
64 *
65 * @param fragmentData results from short-range fragment calculations
66 */
67 void operator()(
68 const std::map<JobId_t,MPQCData> &fragmentData);
69
70 size_t getMaxLevel() const {
71 return MaxLevel;
72 }
73
74 IndexSetContainer::Container_t getContainer() const {
75 return container->getContainer();
76 }
77
78 const KeySetsContainer& getKeySet() const {
79 return KeySet;
80 }
81
82 const KeySetsContainer& getForceKeySet() const {
83 return ForceKeySet;
84 }
85
86 const edges_per_fragment_t& getEdgesPerFragment() const {
87 return edges_per_fragment;
88 }
89
90 typedef std::map<IndexSet::ptr, std::pair<MPQCData,MPQCData> > summedshortrange_t;
91 const summedshortrange_t getSummedShortRangeResults() const;
92
93private:
94 void initLookups(
95 const std::map<JobId_t,MPQCData> &fragmentData,
96 std::vector<bool> &_ValueMask);
97
98private:
99 std::map< JobId_t, size_t > MPQCMatrixNrLookup;
100 KeySetsContainer KeySet;
101 KeySetsContainer ForceKeySet;
102 edges_per_fragment_t edges_per_fragment;
103 IndexSetContainer::ptr container;
104 SubsetMap::ptr subsetmap;
105
106public:
107 //!> results per level of summed up energy
108 std::vector<MPQCDataEnergyMap_t> Result_Energy_fused;
109 //!> results per level of summed up fragment positions and charges
110 std::vector<MPQCDataFragmentMap_t> Result_Fragment_fused;
111 //!> results per level of summed up times
112 std::vector<MPQCDataTimeMap_t> Result_Time_fused;
113 //!> results per level of summed up forces
114 std::vector<MPQCDataForceMap_t> Result_Force_fused;
115
116 //!> results per IndexSet of summed up energy
117 std::map<IndexSet::ptr, std::pair<MPQCDataEnergyMap_t,MPQCDataEnergyMap_t> > Result_perIndexSet_Energy;
118 //!> results per IndexSet of summed up fragment positions and charges
119 std::map<IndexSet::ptr, std::pair<MPQCDataFragmentMap_t,MPQCDataFragmentMap_t> > Result_perIndexSet_Fragment;
120 //!> results per IndexSet of summed up times
121 std::map<IndexSet::ptr, std::pair<MPQCDataTimeMap_t,MPQCDataTimeMap_t> > Result_perIndexSet_Time;
122 //!> results per IndexSet of summed up forces
123 std::map<IndexSet::ptr, std::pair<MPQCDataForceMap_t, MPQCDataForceMap_t> > Result_perIndexSet_Force;
124 // we don't need the map pendant for Result_LongRangeIntegrated_fused, as this
125 // quantity makes sense only level-wise
126
127private:
128 //!> maximum level of summation
129 size_t MaxLevel;
130};
131
132
133#endif /* FRAGMENTATIONSHORTRANGERESULTS_HPP_ */
Note: See TracBrowser for help on using the repository browser.