Changeset 1b5a40 for src/Fragmentation
- Timestamp:
- Apr 15, 2013, 6:13:46 PM (12 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:
- a3fc46
- Parents:
- eb32b6
- git-author:
- Frederik Heber <heber@…> (03/09/13 13:08:18)
- git-committer:
- Frederik Heber <heber@…> (04/15/13 18:13:46)
- Location:
- src/Fragmentation/Summation
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified src/Fragmentation/Summation/IndexSetContainer.cpp ¶
reb32b6 r1b5a40 56 56 _AllIndices->insert((Index_t)*keyiter); 57 57 } 58 LOG( 1, "INFO: AllIndices is " << *_AllIndices << ".");58 LOG(2, "DEBUG: AllIndices is " << *_AllIndices << "."); 59 59 60 60 return _AllIndices; -
TabularUnified src/Fragmentation/Summation/OrthogonalSummation_impl.hpp ¶
reb32b6 r1b5a40 19 19 20 20 #include "Fragmentation/Summation/ZeroInstance.hpp" 21 #include "Fragmentation/Summation/printKeyNames.hpp" 21 22 22 23 /** Constructor of class OrthogonalSummation. … … 42 43 subsetmap.reset(new SubsetMap(container)); 43 44 } else { 44 LOG( 1, "INFO: Using given SubsetMap.");45 LOG(2, "DEBUG: Using given SubsetMap for " << printKeyNames::printName<T>() << "."); 45 46 } 46 47 /// instantiate all SubSetValue's by requesting the IndexSet from the Subsetmap … … 48 49 typename InputValues_t::iterator valueiter = values.begin(); 49 50 for (;valueiter != values.end(); ++indexiter, ++valueiter) { 50 LOG( 1, "INFO: Adding set " << **indexiter << " with value " << *valueiter << ".");51 LOG(2, "DEBUG: Adding set " << **indexiter << " with value " << *valueiter << "."); 51 52 setvalues.addValue( *indexiter, *valueiter ); 52 53 } … … 71 72 if (iter->first->size() <= level) 72 73 sum = (iter->second)->getContribution(); 73 LOG( 1, "DEBUG: Contribution from subset "+toString(*(iter->second->getIndexSet()))74 LOG(3, "DEBUG: Contribution from subset "+toString(*(iter->second->getIndexSet())) 74 75 +" is "+toString(sum)+"."); 75 76 for(++iter;(iter != setvalues.end()) && (iter->first->size() <= level); ++iter) { 76 77 const T tempvalue = (iter->second)->getContribution(); 77 78 sum += tempvalue; 78 LOG( 1, "DEBUG: Contribution from subset "+toString(*(iter->second->getIndexSet()))79 LOG(3, "DEBUG: Contribution from subset "+toString(*(iter->second->getIndexSet())) 79 80 +" is "+toString(tempvalue)+"."); 80 81 } -
TabularUnified src/Fragmentation/Summation/SetValue.hpp ¶
reb32b6 r1b5a40 111 111 */ 112 112 const T calcSum() { 113 LOG( 1, "INFO: Summing up contribution for " << *indices << ".");113 LOG(2, "DEBUG: Summing up contribution for " << *indices << "."); 114 114 // we initialize with value 115 115 T result = getValue(); … … 120 120 for (IndexSetContainer::Container_t::const_iterator iter = subsets.begin(); 121 121 iter != subsets.end(); ++iter) { 122 LOG( 2, "INFO: Current subset is " << **iter << ".");122 LOG(3, "DEBUG: Current subset is " << **iter << "."); 123 123 // NOTE: our subset is not contained in the number of subsets 124 124 typename SetValue<T>::ptr ptr = lookupValue(*iter); -
TabularUnified src/Fragmentation/Summation/SetValues/Histogram.cpp ¶
reb32b6 r1b5a40 226 226 ASSERT( loweriter->first < upperiter->first, 227 227 "Histogram::superposeOtherHistogram() - the bin range is invalid."); 228 LOG( 4, "DEBUG: bin range here is ["228 LOG(5, "DEBUG: bin range here is [" 229 229 << loweriter->first << "," << upperiter->first << ")."); 230 230 … … 240 240 if (offsets.back() != nextbin.first) 241 241 offsets.push_back(nextbin.first); 242 LOG( 3, "DEBUG: Offsets are " << offsets << ".");242 LOG(4, "DEBUG: Offsets are " << offsets << "."); 243 243 } 244 244 … … 258 258 std::stringstream output; 259 259 std::for_each( bins.begin(), bins.end(), PrintPair<Bin_t>(output)); 260 LOG( 2, "DEBUG: Bins are after summation " << output.str() << ".");260 LOG(3, "DEBUG: Bins are after summation " << output.str() << "."); 261 261 } 262 262 } … … 278 278 { 279 279 superposeOtherHistogram(other, +1.); 280 LOG( 2, "DEBUG: Bins after addition are " << printBins() << ".");280 LOG(3, "DEBUG: Bins after addition are " << printBins() << "."); 281 281 return *this; 282 282 } … … 285 285 { 286 286 superposeOtherHistogram(other, -1.); 287 LOG( 2, "DEBUG: Bins after subtraction are " << printBins() << ".");287 LOG(3, "DEBUG: Bins after subtraction are " << printBins() << "."); 288 288 return *this; 289 289 } -
TabularUnified src/Fragmentation/Summation/SubsetMap.cpp ¶
reb32b6 r1b5a40 79 79 // get the sets size and the size of the power sets 80 80 const size_t SetSize = ptr->size(); 81 LOG( 1, "INFO: Current set to gather all subsets for is " << *ptr << " with size " << SetSize << ".");81 LOG(2, "DEBUG: Current set to gather all subsets for is " << *ptr << " with size " << SetSize << "."); 82 82 const size_t NoPowerSubsets = getNoPowerSets(SetSize); 83 LOG( 1, "INFO: There are " << NoPowerSubsets << " sets to check for containment.");83 LOG(2, "DEBUG: There are " << NoPowerSubsets << " sets to check for containment."); 84 84 std::vector<IndexSet> returnsets; 85 85 // sets is the number of possible subsets to check: NotContained means still … … 102 102 "SubsetMap::gatherSubsets() - distance from begin to iterator is not correct."); 103 103 *tempset = getSubset(*ptr, index ); 104 LOG( 2, "INFO: Current subset is " << *tempset << " at " << index << ".");104 LOG(3, "DEBUG: Current subset is " << *tempset << " at " << index << "."); 105 105 // check whether IndexSet is contained and known 106 106 if (ptr->contains(*tempset)) { 107 107 // mark as contained 108 108 *iter = Contained; 109 LOG( 3, "DEBUG: Marking subset as Contained.");109 LOG(4, "DEBUG: Marking subset as Contained."); 110 110 if (Lookup.count(tempset)) { 111 LOG( 2, "DEBUG: Subset is present in Lookup, adding.");111 LOG(3, "DEBUG: Subset is present in Lookup, adding."); 112 112 returnsets.push_back(*tempset); 113 113 // if so, also add its contained sets and mark them out 114 114 const IndexSetContainer::Container_t &container = getSubsets(tempset)->getContainer(); 115 115 if (container.size()) { 116 LOG( 2, "DEBUG: Subset is also present in Lookup, adding all its subsets");116 LOG(3, "DEBUG: Subset is also present in Lookup, adding all its subsets"); 117 117 for(IndexSetContainer::Container_t::const_iterator containeriter = container.begin(); 118 118 containeriter != container.end(); 119 119 ++containeriter) { 120 120 const size_t subindex = getPowerSetIndex(ptr, **containeriter); 121 LOG( 4, "INFO: Current subset of subset is " << **containeriter << " at " << subindex << ".");121 LOG(5, "INFO: Current subset of subset is " << **containeriter << " at " << subindex << "."); 122 122 if (sets[subindex] != Contained) { 123 LOG( 5, "DEBUG: Setting power subset to Contained.");123 LOG(6, "DEBUG: Setting power subset to Contained."); 124 124 sets[subindex] = Contained; 125 125 returnsets.push_back(**containeriter); … … 130 130 } 131 131 } 132 LOG( 1, "INFO: Adding " << returnsets.size() << " sets to Lookup for set " << *ptr << ".");132 LOG(2, "DEBUG: Adding " << returnsets.size() << " sets to Lookup for set " << *ptr << "."); 133 133 Lookup.insert( std::make_pair(ptr, IndexSetContainer::ptr(new IndexSetContainer(returnsets))) ); 134 134 } -
TabularUnified src/Fragmentation/Summation/Summation_impl.hpp ¶
reb32b6 r1b5a40 17 17 #include "CodePatterns/IteratorAdaptors.hpp" 18 18 #include "CodePatterns/Log.hpp" 19 20 #include "Fragmentation/Summation/printKeyNames.hpp" 19 21 20 22 /** Constructor of class Summation. … … 40 42 subsetmap.reset(new SubsetMap(container)); 41 43 } else { 42 LOG( 1, "INFO: Using given SubsetMap.");44 LOG(2, "DEBUG: Using given SubsetMap for " << printKeyNames::printName<T>() << "."); 43 45 } 44 46 /// instantiate all SubSetValue's by requesting the IndexSet from the Subsetmap … … 46 48 typename InputValues_t::iterator valueiter = values.begin(); 47 49 for (;valueiter != values.end(); ++indexiter, ++valueiter) { 48 LOG( 1, "INFO: Adding set " << **indexiter << " with value " << *valueiter << ".");50 LOG(2, "DEBUG: Adding set " << **indexiter << " with value " << *valueiter << "."); 49 51 setvalues.addValue( *indexiter, *valueiter ); 50 52 } … … 69 71 if (iter->first->size() <= level) 70 72 sum = (iter->second)->getValue(); 71 LOG( 1, "DEBUG: Value from subset "+toString(*(iter->second->getIndexSet()))73 LOG(3, "DEBUG: Value from subset "+toString(*(iter->second->getIndexSet())) 72 74 +" is "+toString(sum)+"."); 73 75 for(++iter;(iter != setvalues.end()) && (iter->first->size() <= level); ++iter) { 74 76 const T tempvalue = (iter->second)->getValue(); 75 77 sum += tempvalue; 76 LOG( 1, "DEBUG: Value from subset "+toString(*(iter->second->getIndexSet()))78 LOG(3, "DEBUG: Value from subset "+toString(*(iter->second->getIndexSet())) 77 79 +" is "+toString(tempvalue)+"."); 78 80 }
Note:
See TracChangeset
for help on using the changeset viewer.