| 1 | /* | 
|---|
| 2 | * FragmentationChargeDensity.hpp | 
|---|
| 3 | * | 
|---|
| 4 | *  Created on: Aug 31, 2012 | 
|---|
| 5 | *      Author: heber | 
|---|
| 6 | */ | 
|---|
| 7 |  | 
|---|
| 8 | #ifndef FRAGMENTATIONCHARGEDENSITY_HPP_ | 
|---|
| 9 | #define FRAGMENTATIONCHARGEDENSITY_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 | 
|---|
| 23 | typedef size_t JobId_t; | 
|---|
| 24 | #endif | 
|---|
| 25 |  | 
|---|
| 26 | #include "Fragmentation/Summation/Containers/MPQCData.hpp" | 
|---|
| 27 | #include "Fragmentation/Summation/Containers/MPQCDataMap.hpp" | 
|---|
| 28 | #include "Fragmentation/Summation/SetValues/Fragment.hpp" | 
|---|
| 29 | #include "Fragmentation/Summation/SetValues/SamplingGrid.hpp" | 
|---|
| 30 | #include "Fragmentation/Summation/IndexSet.hpp" | 
|---|
| 31 |  | 
|---|
| 32 | class KeySetsContainer; | 
|---|
| 33 |  | 
|---|
| 34 | /** This structure is a container for the summed up charge density per level. | 
|---|
| 35 | * | 
|---|
| 36 | */ | 
|---|
| 37 | struct FragmentationChargeDensity | 
|---|
| 38 | { | 
|---|
| 39 | /** Sums up sampled charge grids contained in \a fragmentData. | 
|---|
| 40 | * | 
|---|
| 41 | * @param fragmentData MPQCData resulting from the jobs, each associated to a job | 
|---|
| 42 | * @param KeySet KeySets of all (non-hydrogen) atoms | 
|---|
| 43 | */ | 
|---|
| 44 | FragmentationChargeDensity( | 
|---|
| 45 | const std::map<JobId_t,MPQCData> &fragmentData, | 
|---|
| 46 | const KeySetsContainer& KeySet); | 
|---|
| 47 |  | 
|---|
| 48 | std::vector<SamplingGrid> getFullSampledGrid(); | 
|---|
| 49 |  | 
|---|
| 50 | const Fragment &getFragment(); | 
|---|
| 51 |  | 
|---|
| 52 | //!> results per level of summed up sampled grid charge | 
|---|
| 53 | std::vector<MPQCDataGridMap_t> Result_Grid_fused; | 
|---|
| 54 | //!> results per level of summed up fragment positions and charges | 
|---|
| 55 | std::vector<MPQCDataFragmentMap_t> Result_Fragment_fused; | 
|---|
| 56 |  | 
|---|
| 57 | //!> results per IndexSet of summed up sampled grid charge | 
|---|
| 58 | std::map<IndexSet::ptr, std::pair<MPQCDataGridMap_t, MPQCDataGridMap_t> > Result_perIndexSet_Grid; | 
|---|
| 59 | //!> results per IndexSet of summed up fragment positions and charges | 
|---|
| 60 | std::map<IndexSet::ptr, std::pair<MPQCDataFragmentMap_t, MPQCDataFragmentMap_t> > Result_perIndexSet_Fragment; | 
|---|
| 61 |  | 
|---|
| 62 | private: | 
|---|
| 63 | /** Helper function to call OrthogonalSummation. | 
|---|
| 64 | * | 
|---|
| 65 | * \param fragmentData map of calculated jobs | 
|---|
| 66 | * \param KeySet container of all keysets | 
|---|
| 67 | * \param MatrixNrLookup map with enumerated job ids | 
|---|
| 68 | */ | 
|---|
| 69 | void sumUp( | 
|---|
| 70 | const std::map<JobId_t,MPQCData> &fragmentData, | 
|---|
| 71 | const KeySetsContainer &KeySet, | 
|---|
| 72 | const std::map< JobId_t, size_t > &MatrixNrLookup); | 
|---|
| 73 |  | 
|---|
| 74 | }; | 
|---|
| 75 |  | 
|---|
| 76 | #endif /* FRAGMENTATIONCHARGEDENSITY_HPP_ */ | 
|---|