Changeset c8d13f5 for src/Fragmentation/Summation
- Timestamp:
- Oct 17, 2013, 7:24:25 AM (11 years ago)
- Branches:
- Action_Thermostats, Add_AtomRandomPerturbation, Add_FitFragmentPartialChargesAction, Add_RotateAroundBondAction, Add_SelectAtomByNameAction, Added_ParseSaveFragmentResults, AddingActions_SaveParseParticleParameters, Adding_Graph_to_ChangeBondActions, Adding_MD_integration_tests, Adding_ParticleName_to_Atom, Adding_StructOpt_integration_tests, AtomFragments, Automaking_mpqc_open, AutomationFragmentation_failures, Candidate_v1.5.4, Candidate_v1.6.0, Candidate_v1.6.1, ChangeBugEmailaddress, ChangingTestPorts, ChemicalSpaceEvaluator, CombiningParticlePotentialParsing, 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_BoundInBox_CenterInBox_MoleculeActions, Fix_ChargeSampling_PBC, Fix_ChronosMutex, Fix_FitPartialCharges, Fix_FitPotential_needs_atomicnumbers, Fix_ForceAnnealing, Fix_IndependentFragmentGrids, Fix_ParseParticles, Fix_ParseParticles_split_forward_backward_Actions, Fix_PopActions, Fix_QtFragmentList_sorted_selection, Fix_Restrictedkeyset_FragmentMolecule, Fix_StatusMsg, Fix_StepWorldTime_single_argument, Fix_Verbose_Codepatterns, Fix_fitting_potentials, Fixes, ForceAnnealing_goodresults, ForceAnnealing_oldresults, ForceAnnealing_tocheck, ForceAnnealing_with_BondGraph, ForceAnnealing_with_BondGraph_continued, ForceAnnealing_with_BondGraph_continued_betteresults, ForceAnnealing_with_BondGraph_contraction-expansion, FragmentAction_writes_AtomFragments, FragmentMolecule_checks_bonddegrees, GeometryObjects, Gui_Fixes, Gui_displays_atomic_force_velocity, ImplicitCharges, IndependentFragmentGrids, IndependentFragmentGrids_IndividualZeroInstances, IndependentFragmentGrids_IntegrationTest, IndependentFragmentGrids_Sole_NN_Calculation, JobMarket_RobustOnKillsSegFaults, JobMarket_StableWorkerPool, JobMarket_unresolvable_hostname_fix, MoreRobust_FragmentAutomation, ODR_violation_mpqc_open, PartialCharges_OrthogonalSummation, PdbParser_setsAtomName, PythonUI_with_named_parameters, QtGui_reactivate_TimeChanged_changes, Recreated_GuiChecks, Rewrite_FitPartialCharges, RotateToPrincipalAxisSystem_UndoRedo, SaturateAtoms_findBestMatching, SaturateAtoms_singleDegree, StoppableMakroAction, Subpackage_CodePatterns, Subpackage_JobMarket, Subpackage_LinearAlgebra, Subpackage_levmar, Subpackage_mpqc_open, Subpackage_vmg, Switchable_LogView, ThirdParty_MPQC_rebuilt_buildsystem, TrajectoryDependenant_MaxOrder, TremoloParser_IncreasedPrecision, TremoloParser_MultipleTimesteps, TremoloParser_setsAtomName, Ubuntu_1604_changes, stable
- Children:
- 16893f
- Parents:
- 47cee7
- git-author:
- Frederik Heber <heber@…> (09/28/13 09:35:15)
- git-committer:
- Frederik Heber <heber@…> (10/17/13 07:24:25)
- Location:
- src/Fragmentation/Summation
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/Summation/Containers/FragmentationResultContainer.cpp
r47cee7 rc8d13f5 96 96 } 97 97 98 void FragmentationResultContainer::addShortRangeSummedResults( 99 const FragmentationShortRangeResults::summedshortrange_t &_summedshortrange 100 ) 101 { 102 OBSERVE; 103 summedshortrange.insert(_summedshortrange.begin(), _summedshortrange.end()); 104 } 105 98 106 #ifdef HAVE_VMG 99 107 const FragmentationResultContainer::longrangedata_t& -
src/Fragmentation/Summation/Containers/FragmentationResultContainer.hpp
r47cee7 rc8d13f5 29 29 30 30 #include "Fragmentation/KeySetsContainer.hpp" 31 #include "Fragmentation/Summation/IndexSet.hpp" 32 #include "Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp" 31 33 #include "Fragmentation/Summation/Containers/MPQCData.hpp" 34 #include "Fragmentation/Summation/Containers/MPQCDataMap.hpp" 32 35 #ifdef HAVE_VMG 33 36 #include "Fragmentation/Summation/Containers/VMGData.hpp" … … 94 97 ); 95 98 99 /** Adds a a set of summed short range results. 100 * 101 * Adds all the containers to the ones present in this instance. 102 * 103 * \param _summedshortrange energy results per index set 104 */ 105 void addShortRangeSummedResults( 106 const FragmentationShortRangeResults::summedshortrange_t &_summedshortrange 107 ); 108 96 109 /** Adds given cycles to internal keyset list. 97 110 * … … 111 124 forcekeysets.clear(); 112 125 shortrangedata.clear(); 126 summedshortrange.clear(); 113 127 #ifdef HAVE_VMG 114 128 longrangedata.clear(); … … 121 135 const KeySetsContainer &getForceKeySets() const { return forcekeysets; } 122 136 const shortrangedata_t& getShortRangeResults() const { return shortrangedata; } 137 const FragmentationShortRangeResults::summedshortrange_t& getShortRangeSummedResults() const { return summedshortrange; } 123 138 #ifdef HAVE_VMG 124 139 const longrangedata_t& getLongRangeResults() const; … … 141 156 //! container of all cycle keysets 142 157 KeySetsContainer cycles; 158 //!> container for summed up results per index set 159 FragmentationShortRangeResults::summedshortrange_t summedshortrange; 143 160 144 161 #ifdef HAVE_VMG … … 158 175 if (version > 0) 159 176 ar & cycles; 177 if (version > 1) 178 ar & summedshortrange; 160 179 #ifdef HAVE_VMG 161 180 ar & longrangedata; … … 165 184 166 185 // version for serialized information associated to FragmentationResultContainer 167 BOOST_CLASS_VERSION(FragmentationResultContainer, 1)186 BOOST_CLASS_VERSION(FragmentationResultContainer, 2) 168 187 169 188 #endif /* FRAGMENTATIONRESULTCONTAINER_HPP_ */ -
src/Fragmentation/Summation/Containers/FragmentationShortRangeResults.cpp
r47cee7 rc8d13f5 39 39 #include "FragmentationShortRangeResults.hpp" 40 40 41 #include <boost/fusion/container/map.hpp> 41 42 #include <boost/mpl/for_each.hpp> 42 43 #include <boost/mpl/remove.hpp> … … 117 118 } 118 119 } 120 121 const FragmentationShortRangeResults::summedshortrange_t 122 FragmentationShortRangeResults::getSummedShortRangeResults() const 123 { 124 summedshortrange_t results; 125 typedef std::map<IndexSet::ptr, std::pair<MPQCDataEnergyMap_t,MPQCDataEnergyMap_t> > maptype_t; 126 for (typename maptype_t::const_iterator resultiter = Result_perIndexSet_Energy.begin(); 127 resultiter != Result_perIndexSet_Energy.end(); ++resultiter) { 128 MPQCData values; 129 values.energies.total = boost::fusion::at_key<MPQCDataFused::energy_total>(resultiter->second.first); 130 MPQCData contributions; 131 contributions.energies.total = boost::fusion::at_key<MPQCDataFused::energy_total>(resultiter->second.second); 132 results.insert( std::make_pair( resultiter->first, std::make_pair(values, contributions) ) ); 133 } 134 return results; 135 } -
src/Fragmentation/Summation/Containers/FragmentationShortRangeResults.hpp
r47cee7 rc8d13f5 79 79 } 80 80 81 typedef std::map<IndexSet::ptr, std::pair<MPQCData,MPQCData> > summedshortrange_t; 82 const summedshortrange_t getSummedShortRangeResults() const; 83 81 84 private: 82 85 void initLookups( -
src/Fragmentation/Summation/IndexSet.hpp
r47cee7 rc8d13f5 13 13 #include <config.h> 14 14 #endif 15 16 #include <boost/serialization/access.hpp> 17 #include <boost/serialization/base_object.hpp> 18 #include <boost/serialization/set.hpp> 19 #include <boost/serialization/shared_ptr.hpp> 15 20 16 21 #include <boost/shared_ptr.hpp> … … 47 52 48 53 private: 54 friend class boost::serialization::access; 55 // serialization 56 template <typename Archive> 57 void serialize(Archive& ar, const unsigned int version) 58 { 59 ar & boost::serialization::base_object< std::set<Index_t> >(*this); 60 } 49 61 }; 50 62 … … 71 83 std::ostream & operator<<(std::ostream &ost, const IndexSet &indexset); 72 84 85 BOOST_SERIALIZATION_SHARED_PTR(IndexSet) 86 73 87 #endif /* INDEXSET_HPP_ */ -
src/Fragmentation/Summation/writeIndexedTable.hpp
r47cee7 rc8d13f5 42 42 43 43 /// create header line for energy 44 resultstream << " level\tkeyset";44 resultstream << "index\tlevel\tkeyset"; 45 45 { 46 46 HeaderPrinter header("_value"); 47 47 boost::mpl::for_each<VectorType>(boost::ref(header)); 48 resultstream << header.get() << std::endl;48 resultstream << header.get(); 49 49 } 50 50 { 51 51 HeaderPrinter header("_contribution"); 52 52 boost::mpl::for_each<VectorType>(boost::ref(header)); 53 resultstream << header.get() << std::endl;53 resultstream << header.get(); 54 54 } 55 resultstream << std::endl; 55 56 56 57 /// print values per line … … 58 59 ASSERT( results.size() >= (MaxLevel-StartLevel), 59 60 "writeIndexedTable<M,V>() - results has insufficient size."); 61 size_t index = 0; 60 62 for (typename maptype_t::const_iterator resultiter = results.begin(); 61 resultiter != results.end(); ++resultiter ) {62 resultstream << resultiter->first->size() << "\t" << "{";63 resultiter != results.end(); ++resultiter, ++index) { 64 resultstream << index << "\t" << resultiter->first->size() << "\t" << "{"; 63 65 for (IndexSet::const_iterator keyiter = resultiter->first->begin(); 64 66 keyiter != resultiter->first->end(); ++keyiter)
Note:
See TracChangeset
for help on using the changeset viewer.