/* * FragmentationShortRangeResults.hpp * * Created on: Mar 7, 2013 * Author: heber */ #ifndef FRAGMENTATIONSHORTRANGERESULTS_HPP_ #define FRAGMENTATIONSHORTRANGERESULTS_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/KeySetsContainer.hpp" #include "Fragmentation/Summation/IndexSet.hpp" #include "Fragmentation/Summation/IndexSetContainer.hpp" #include "Fragmentation/Summation/SubsetMap.hpp" #include "Fragmentation/Summation/Containers/MPQCData.hpp" #include "Fragmentation/Summation/Containers/MPQCDataMap.hpp" /** FragmentationShortRangeResults contains the summed up results per level resulting * from the fragmentation of the molecular system and clever combination of * fragmentary energies, forces, timings, and so on. * * This structure is mostly a storage wherein the summed up results are * contained for subsequent pretty printing and so on. * */ struct FragmentationShortRangeResults { /** Constructor for class FragmentationShortRangeResults, based on KeySets. * * @param fragmentData results from short-range fragment calculations * @param _KeySet KeySets of all (non-hydrogen) atoms * @param _ForceKeySet KeySets of all atoms except those added by saturation * @param _ValueMask masks whether to use a value (true) or not (false), * default is true for all values */ FragmentationShortRangeResults( const std::map &fragmentData, const KeySetsContainer& _KeySet, const KeySetsContainer& _ForceKeySet, std::vector &_ValueMask); /** Performs the summation and fills all result vectors. * * @param fragmentData results from short-range fragment calculations */ void operator()( const std::map &fragmentData); size_t getMaxLevel() const { return MaxLevel; } IndexSetContainer::Container_t getContainer() const { return container->getContainer(); } const KeySetsContainer& getKeySet() const { return KeySet; } const KeySetsContainer& getForceKeySet() const { return ForceKeySet; } typedef std::map > summedshortrange_t; const summedshortrange_t getSummedShortRangeResults() const; private: void initLookups( const std::map &fragmentData, std::vector &_ValueMask); private: std::map< JobId_t, size_t > MPQCMatrixNrLookup; KeySetsContainer KeySet; KeySetsContainer ForceKeySet; IndexSetContainer::ptr container; SubsetMap::ptr subsetmap; public: //!> results per level of summed up energy std::vector Result_Energy_fused; //!> results per level of summed up fragment positions and charges std::vector Result_Fragment_fused; //!> results per level of summed up times std::vector Result_Time_fused; //!> results per level of summed up forces std::vector Result_Force_fused; //!> results per IndexSet of summed up energy std::map > Result_perIndexSet_Energy; //!> results per IndexSet of summed up fragment positions and charges std::map > Result_perIndexSet_Fragment; //!> results per IndexSet of summed up times std::map > Result_perIndexSet_Time; //!> results per IndexSet of summed up forces std::map > Result_perIndexSet_Force; // we don't need the map pendant for Result_LongRangeIntegrated_fused, as this // quantity makes sense only level-wise private: //!> maximum level of summation size_t MaxLevel; }; #endif /* FRAGMENTATIONSHORTRANGERESULTS_HPP_ */