/* * FragmentationChargeDensity.hpp * * Created on: Aug 31, 2012 * Author: heber */ #ifndef FRAGMENTATIONCHARGEDENSITY_HPP_ #define FRAGMENTATIONCHARGEDENSITY_HPP_ // include config.h #ifdef HAVE_CONFIG_H #include #endif #include #include #ifdef HAVE_JOBMARKET #include "JobMarket/types.hpp" #else typedef size_t JobId_t; #endif #include "Fragmentation/Summation/Containers/MPQCData.hpp" #include "Fragmentation/Summation/Containers/MPQCDataMap.hpp" #include "Fragmentation/Summation/SetValues/Fragment.hpp" #include "Fragmentation/Summation/SetValues/SamplingGrid.hpp" #include "Fragmentation/Summation/IndexSet.hpp" class KeySetsContainer; /** This structure is a container for the summed up charge density per level. * */ struct FragmentationChargeDensity { /** Prepare the orthogonal summation. * * @param fragmentData MPQCData resulting from the jobs, each associated to a job */ FragmentationChargeDensity(const std::map &fragmentData); /** Performs the actual orthogonal summation of the charge grids over all * fragments. * * @param fragmentData MPQCData resulting from the jobs, each associated to a job * @param KeySet KeySets of all (non-hydrogen) atoms * @param _zero_globalgrid zero grid to use in summation (i.e. to enforce * downsample() in summation) */ void operator()( const std::map &fragmentData, const KeySetsContainer& KeySet, const SamplingGrid &_zero_globalgrid); std::vector getFullSampledGrid(); //!> results per level of summed up sampled grid charge std::vector Result_Grid_fused; //!> results per IndexSet of summed up sampled grid charge std::map > Result_perIndexSet_Grid; private: /** Helper function to call OrthogonalSummation. * * \param fragmentData map of calculated jobs * \param KeySet container of all keysets * \param MatrixNrLookup map with enumerated job ids */ void sumUp( const std::map &fragmentData, const KeySetsContainer &KeySet, const std::map< JobId_t, size_t > &MatrixNrLookup); //!> lookup from job number to a consecutive index starting at 0 std::map< JobId_t, size_t > MatrixNrLookup; }; #endif /* FRAGMENTATIONCHARGEDENSITY_HPP_ */