Changeset 8ac66b4 for src/Fragmentation
- Timestamp:
- Apr 8, 2013, 11:56:18 AM (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:
- 569e42
- Parents:
- 830b3e
- git-author:
- Frederik Heber <heber@…> (03/04/13 09:06:17)
- git-committer:
- Frederik Heber <heber@…> (04/08/13 11:56:18)
- Location:
- src/Fragmentation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Fragmentation/BondsPerShortestPath.cpp
r830b3e r8ac66b4 99 99 void BondsPerShortestPath::ResetSPList() 100 100 { 101 LOG( 0, "Free'ing all found lists and resetting index lists");101 LOG(1, "INFO: Free'ing all found lists and resetting index lists"); 102 102 for(int i=Order;i--;) { 103 103 std::stringstream output; … … 141 141 int SP = -1; 142 142 143 LOG(0, " Starting BFS analysis ...");143 LOG(0, "INFO: Starting BFS analysis ..."); 144 144 for (SP = 0; SP < (Order-1); SP++) { 145 145 { … … 162 162 Predecessor = (*CurrentEdge)->leftatom; // ... and leftatom is predecessor 163 163 AtomKeyNr = Walker->getNr(); 164 LOG( 0, "Current Walker is: " << *Walker << " with nr " << Walker->getNr() << " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level.");164 LOG(1, "INFO: Current Walker is: " << *Walker << " with nr " << Walker->getNr() << " and SP of " << SP << ", with " << RemainingWalkers << " remaining walkers on this level."); 165 165 // check for new sp level 166 166 // go through all its bonds 167 LOG(1, "Going through all bonds of Walker.");167 // LOG(2, "Going through all bonds of Walker."); 168 168 const BondList& ListOfBonds = Walker->getListOfBonds(); 169 169 for (BondList::const_iterator Runner = ListOfBonds.begin(); … … 181 181 BondsPerSPList[SP+1].push_back(Binder); 182 182 BondsPerSPCount[SP+1]++; 183 LOG(3, " Added its bond to SP list, having now " << BondsPerSPCount[SP+1] << " item(s).");183 LOG(3, "DEBUG: Added its bond to SP list, having now " << BondsPerSPCount[SP+1] << " item(s)."); 184 184 } else { 185 185 if (OtherWalker != Predecessor) 186 LOG(3, " Not passing on, as index of " << *OtherWalker << " " << OtherWalker->GetTrueFather()->getNr() << " is smaller than that of Root " << RootKeyNr << ".");186 LOG(3, "DEBUG: Not passing on, as index of " << *OtherWalker << " " << OtherWalker->GetTrueFather()->getNr() << " is smaller than that of Root " << RootKeyNr << "."); 187 187 else 188 LOG(3, " This is my predecessor " << *Predecessor << ".");188 LOG(3, "DEBUG: This is my predecessor " << *Predecessor << "."); 189 189 } 190 } else LOG(2, " Is not in the restricted keyset or skipping hydrogen " << *OtherWalker << ".");190 } else LOG(2, "DEBUG: Is not in the restricted keyset or skipping hydrogen " << *OtherWalker << "."); 191 191 } 192 192 } … … 198 198 void BondsPerShortestPath::OutputSPList() 199 199 { 200 LOG( 0, "Printing all found lists.");200 LOG(2, "DEBUG: Printing all found lists."); 201 201 for(int i=1;i<Order;i++) { // skip the root edge in the printing 202 LOG(1, "Current SP level is " << i << "."); 202 LOG(2, "\tCurrent SP level is " << i << "."); 203 std::stringstream output; 203 204 for (BondsPerShortestPath::BondsPerSP::const_iterator Binder = BondsPerSPList[i].begin(); 204 205 Binder != BondsPerSPList[i].end(); 205 206 ++Binder) { 206 LOG(2, **Binder); 207 } 207 output << "\t" << *Binder; 208 } 209 output << std::endl; 210 LOG(2, output.str()); 208 211 } 209 212 }; -
src/Fragmentation/Fragmentation.cpp
r830b3e r8ac66b4 111 111 switch (treatment) { 112 112 case ExcludeHydrogen: 113 LOG( 0, "I will treat hydrogen special.");113 LOG(1, "INFO: I will treat hydrogen special."); 114 114 break; 115 115 case IncludeHydrogen: 116 LOG( 0, "Hydrogen is treated just like the rest of the lot.");116 LOG(1, "INFO: Hydrogen is treated just like the rest of the lot."); 117 117 break; 118 118 default: … … 163 163 FragmentBOSSANOVA(mol, FragmentList, RootStack); 164 164 } 165 LOG( 2, "CheckOrder is " << CheckOrder << ".");165 LOG(3, "DEBUG: CheckOrder is " << CheckOrder << "."); 166 166 167 167 // ==================================== End of FRAGMENTATION ============================================ … … 191 191 StoreOrderAtSiteFile(prefix); 192 192 193 LOG(0, "End of bond fragmentation.");194 193 return ((int)(!FragmentationToDo)+1); // 1 - continue, 2 - stop (no fragmentation occured) 195 194 }; … … 276 275 277 276 // output resulting number 278 LOG(1, " Number of resulting KeySets is: " << NumMoleculesOfOrder[RootNr] << ".");277 LOG(1, "INFO: Number of resulting KeySets is: " << NumMoleculesOfOrder[RootNr] << "."); 279 278 if (NumMoleculesOfOrder[RootNr] != 0) { 280 279 NumMolecules = 0; … … 289 288 } 290 289 LOG(0, "=============================================================================================================="); 291 LOG( 1, "Total number of resulting molecules is: " << TotalNumMolecules << ".");290 LOG(0, "\tTotal number of resulting fragments is: " << TotalNumMolecules << "."); 292 291 LOG(0, "=============================================================================================================="); 293 292 … … 325 324 } 326 325 FragmentCount = (treatment == ExcludeHydrogen ? mol->getNoNonHydrogen() : mol->getAtomCount()) *(1 << (c*order)); 327 LOG(1, " Upper limit for this subgraph is " << FragmentCount << " for "326 LOG(1, "INFO: Upper limit for this subgraph is " << FragmentCount << " for " 328 327 << mol->getNoNonHydrogen() << " non-H atoms with maximum bond degree of " << c << "."); 329 328 return FragmentCount; … … 382 381 if (!status) { 383 382 if (Order == 0) 384 LOG(1, " Single stepping done.");383 LOG(1, "INFO: Single stepping done."); 385 384 else 386 LOG(1, " Order at every site is already equal or above desired order " << Order << ".");385 LOG(1, "INFO: Order at every site is already equal or above desired order " << Order << "."); 387 386 } 388 387 } … … 405 404 line = path + ORDERATSITEFILE; 406 405 file.open(line.c_str()); 407 LOG(1, "Writing OrderAtSite " << ORDERATSITEFILE << " ... "); 406 std::stringstream output; 407 output << "INFO: Writing OrderAtSite " << ORDERATSITEFILE << " ... "; 408 408 if (file.good()) { 409 409 for_each(mol->begin(),mol->end(),bind2nd(mem_fun(&atom::OutputOrder), &file)); 410 410 file.close(); 411 LOG(1, "done.");411 output << "done."; 412 412 return true; 413 413 } else { 414 LOG(1, "failed to open file " << line << ".");414 output << "failed to open file " << line << "."; 415 415 return false; 416 416 } 417 LOG(1, output.str()); 417 418 }; 418 419 … … 427 428 bool Fragmentation::ParseOrderAtSiteFromFile(const std::vector<atomId_t> &atomids, const std::string &path) 428 429 { 429 Info FunctionInfo(__func__);430 // Info FunctionInfo(__func__); 430 431 typedef unsigned char order_t; 431 432 typedef std::map<atomId_t, order_t> OrderArray_t; … … 461 462 //SetAtomValueToIndexedArray( MaxArray, &atom::getNr(), &atom::MaxOrder ); 462 463 463 LOG(1, "\t ... done.");464 464 status = true; 465 465 } else { 466 LOG(1, "\t ... failed to openfile " << line << ".");466 ELOG(1, "Failed to open OrdersAtSite file " << line << "."); 467 467 status = false; 468 468 } … … 496 496 bool Fragmentation::AssignKeySetsToFragment(const Graph &KeySetList, ListOfLocalAtoms_t &ListOfLocalAtoms, Graph &FragmentList, bool FreeList) 497 497 { 498 Info FunctionInfo(__func__);498 // Info FunctionInfo(__func__); 499 499 bool status = true; 500 500 size_t KeySetCounter = 0; … … 502 502 // fill ListOfLocalAtoms if NULL was given 503 503 if (!mol->FillListOfLocalAtoms(ListOfLocalAtoms, mol->getAtomCount())) { 504 LOG(1, "Filling of ListOfLocalAtoms failed.");504 ELOG(1, "Filling of ListOfLocalAtoms failed."); 505 505 return false; 506 506 } … … 520 520 } 521 521 } else 522 LOG(1, "KeySetList is NULL or empty.");522 ELOG(2, "KeySetList is NULL or empty."); 523 523 524 524 if (FreeList) { … … 536 536 void Fragmentation::TranslateIndicesToGlobalIDs(Graph &FragmentList, int &TotalNumberOfKeySets, Graph &TotalGraph) 537 537 { 538 Info FunctionInfo(__func__);538 // Info FunctionInfo(__func__); 539 539 for (Graph::iterator runner = FragmentList.begin(); runner != FragmentList.end(); runner++) { 540 540 KeySet TempSet; -
src/Fragmentation/PowerSetGenerator.cpp
r830b3e r8ac66b4 212 212 // creating fragments with the found edge sets (may be done in reverse order, faster) 213 213 int SP = BondsPerSPList.CountNumbersInBondsList(); 214 LOG(0, " Total number of edges is " << SP << ".");214 LOG(0, "INFO: Total number of edges is " << SP << "."); 215 215 { 216 216 // start with root (push on fragment stack)
Note:
See TracChangeset
for help on using the changeset viewer.