| [27594e] | 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 | 
 | 
|---|
| [8e84fe] | 20 | #ifdef HAVE_JOBMARKET
 | 
|---|
| [27594e] | 21 | #include "JobMarket/types.hpp"
 | 
|---|
| [8e84fe] | 22 | #else
 | 
|---|
 | 23 | typedef size_t JobId_t;
 | 
|---|
 | 24 | #endif
 | 
|---|
| [27594e] | 25 | 
 | 
|---|
| [fbf143] | 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"
 | 
|---|
| [8e84fe] | 30 | #include "Fragmentation/Summation/IndexSet.hpp"
 | 
|---|
| [27594e] | 31 | 
 | 
|---|
| [bae7bc] | 32 | class KeySetsContainer;
 | 
|---|
 | 33 | 
 | 
|---|
| [27594e] | 34 | /** This structure is a container for the summed up charge density per level.
 | 
|---|
 | 35 |  *
 | 
|---|
 | 36 |  */
 | 
|---|
 | 37 | struct FragmentationChargeDensity
 | 
|---|
 | 38 | {
 | 
|---|
| [b5134a] | 39 |   /** Prepare the orthogonal summation.
 | 
|---|
 | 40 |    *
 | 
|---|
 | 41 |    * @param fragmentData MPQCData resulting from the jobs, each associated to a job
 | 
|---|
 | 42 |    */
 | 
|---|
 | 43 |   FragmentationChargeDensity(const std::map<JobId_t,MPQCData> &fragmentData);
 | 
|---|
 | 44 | 
 | 
|---|
 | 45 |   /** Performs the actual orthogonal summation of the charge grids over all
 | 
|---|
 | 46 |    * fragments.
 | 
|---|
| [27594e] | 47 |    *
 | 
|---|
 | 48 |    * @param fragmentData MPQCData resulting from the jobs, each associated to a job
 | 
|---|
| [bae7bc] | 49 |    * @param KeySet KeySets of all (non-hydrogen) atoms
 | 
|---|
| [ebadb4] | 50 |    * @param _zero_globalgrid zero grid to use in summation (i.e. to enforce
 | 
|---|
 | 51 |    *        downsample() in summation)
 | 
|---|
| [27594e] | 52 |    */
 | 
|---|
| [b5134a] | 53 |   void operator()(
 | 
|---|
| [27594e] | 54 |       const std::map<JobId_t,MPQCData> &fragmentData,
 | 
|---|
| [ebadb4] | 55 |       const KeySetsContainer& KeySet,
 | 
|---|
 | 56 |       const SamplingGrid &_zero_globalgrid);
 | 
|---|
| [27594e] | 57 | 
 | 
|---|
 | 58 |   std::vector<SamplingGrid> getFullSampledGrid();
 | 
|---|
 | 59 | 
 | 
|---|
| [b8f0b25] | 60 |   //!> results per level of summed up sampled grid charge
 | 
|---|
| [27594e] | 61 |   std::vector<MPQCDataGridMap_t> Result_Grid_fused;
 | 
|---|
| [b8f0b25] | 62 | 
 | 
|---|
 | 63 |   //!> results per IndexSet of summed up sampled grid charge
 | 
|---|
| [79398d] | 64 |   std::map<IndexSet::ptr, std::pair<MPQCDataGridMap_t, MPQCDataGridMap_t> > Result_perIndexSet_Grid;
 | 
|---|
| [bae7bc] | 65 | 
 | 
|---|
 | 66 | private:
 | 
|---|
 | 67 |   /** Helper function to call OrthogonalSummation.
 | 
|---|
 | 68 |    *
 | 
|---|
 | 69 |    * \param fragmentData map of calculated jobs
 | 
|---|
 | 70 |    * \param KeySet container of all keysets
 | 
|---|
 | 71 |    * \param MatrixNrLookup map with enumerated job ids
 | 
|---|
 | 72 |    */
 | 
|---|
 | 73 |   void sumUp(
 | 
|---|
 | 74 |       const std::map<JobId_t,MPQCData> &fragmentData,
 | 
|---|
 | 75 |       const KeySetsContainer &KeySet,
 | 
|---|
 | 76 |       const std::map< JobId_t, size_t > &MatrixNrLookup);
 | 
|---|
 | 77 | 
 | 
|---|
| [b5134a] | 78 |   //!> lookup from job number to a consecutive index starting at 0
 | 
|---|
 | 79 |   std::map< JobId_t, size_t > MatrixNrLookup;
 | 
|---|
| [27594e] | 80 | };
 | 
|---|
 | 81 | 
 | 
|---|
 | 82 | #endif /* FRAGMENTATIONCHARGEDENSITY_HPP_ */
 | 
|---|