Changeset 8ac66b4 for src/Fragmentation


Ignore:
Timestamp:
Apr 8, 2013, 11:56:18 AM (12 years ago)
Author:
Frederik Heber <heber@…>
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)
Message:

VERBOSE: Lots of changes to verbosity of fragmentation process.

Location:
src/Fragmentation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/BondsPerShortestPath.cpp

    r830b3e r8ac66b4  
    9999void BondsPerShortestPath::ResetSPList()
    100100{
    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");
    102102  for(int i=Order;i--;) {
    103103    std::stringstream output;
     
    141141  int SP = -1;
    142142
    143   LOG(0, "Starting BFS analysis ...");
     143  LOG(0, "INFO: Starting BFS analysis ...");
    144144  for (SP = 0; SP < (Order-1); SP++) {
    145145    {
     
    162162      Predecessor = (*CurrentEdge)->leftatom;    // ... and leftatom is predecessor
    163163      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.");
    165165      // check for new sp level
    166166      // go through all its bonds
    167       LOG(1, "Going through all bonds of Walker.");
     167//      LOG(2, "Going through all bonds of Walker.");
    168168      const BondList& ListOfBonds = Walker->getListOfBonds();
    169169      for (BondList::const_iterator Runner = ListOfBonds.begin();
     
    181181            BondsPerSPList[SP+1].push_back(Binder);
    182182            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).");
    184184          } else {
    185185            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 << ".");
    187187            else
    188               LOG(3, "This is my predecessor " << *Predecessor << ".");
     188              LOG(3, "DEBUG: This is my predecessor " << *Predecessor << ".");
    189189          }
    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 << ".");
    191191      }
    192192    }
     
    198198void BondsPerShortestPath::OutputSPList()
    199199{
    200   LOG(0, "Printing all found lists.");
     200  LOG(2, "DEBUG: Printing all found lists.");
    201201  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;
    203204    for (BondsPerShortestPath::BondsPerSP::const_iterator Binder = BondsPerSPList[i].begin();
    204205        Binder != BondsPerSPList[i].end();
    205206        ++Binder) {
    206       LOG(2, **Binder);
    207     }
     207      output << "\t" << *Binder;
     208    }
     209    output << std::endl;
     210    LOG(2, output.str());
    208211  }
    209212};
  • src/Fragmentation/Fragmentation.cpp

    r830b3e r8ac66b4  
    111111  switch (treatment) {
    112112    case ExcludeHydrogen:
    113       LOG(0, "I will treat hydrogen special.");
     113      LOG(1, "INFO: I will treat hydrogen special.");
    114114      break;
    115115    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.");
    117117      break;
    118118    default:
     
    163163    FragmentBOSSANOVA(mol, FragmentList, RootStack);
    164164  }
    165   LOG(2, "CheckOrder is " << CheckOrder << ".");
     165  LOG(3, "DEBUG: CheckOrder is " << CheckOrder << ".");
    166166
    167167  // ==================================== End of FRAGMENTATION ============================================
     
    191191  StoreOrderAtSiteFile(prefix);
    192192
    193   LOG(0, "End of bond fragmentation.");
    194193  return ((int)(!FragmentationToDo)+1);    // 1 - continue, 2 - stop (no fragmentation occured)
    195194};
     
    276275
    277276      // output resulting number
    278       LOG(1, "Number of resulting KeySets is: " << NumMoleculesOfOrder[RootNr] << ".");
     277      LOG(1, "INFO: Number of resulting KeySets is: " << NumMoleculesOfOrder[RootNr] << ".");
    279278      if (NumMoleculesOfOrder[RootNr] != 0) {
    280279        NumMolecules = 0;
     
    289288  }
    290289  LOG(0, "==============================================================================================================");
    291   LOG(1, "Total number of resulting molecules is: " << TotalNumMolecules << ".");
     290  LOG(0, "\tTotal number of resulting fragments is: " << TotalNumMolecules << ".");
    292291  LOG(0, "==============================================================================================================");
    293292
     
    325324  }
    326325  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 "
    328327      << mol->getNoNonHydrogen() << " non-H atoms with maximum bond degree of " << c << ".");
    329328  return FragmentCount;
     
    382381    if (!status) {
    383382      if (Order == 0)
    384         LOG(1, "Single stepping done.");
     383        LOG(1, "INFO: Single stepping done.");
    385384      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 << ".");
    387386    }
    388387  }
     
    405404  line = path + ORDERATSITEFILE;
    406405  file.open(line.c_str());
    407   LOG(1, "Writing OrderAtSite " << ORDERATSITEFILE << " ... ");
     406  std::stringstream output;
     407  output << "INFO: Writing OrderAtSite " << ORDERATSITEFILE << " ... ";
    408408  if (file.good()) {
    409409    for_each(mol->begin(),mol->end(),bind2nd(mem_fun(&atom::OutputOrder), &file));
    410410    file.close();
    411     LOG(1, "done.");
     411    output << "done.";
    412412    return true;
    413413  } else {
    414     LOG(1, "failed to open file " << line << ".");
     414    output << "failed to open file " << line << ".";
    415415    return false;
    416416  }
     417  LOG(1, output.str());
    417418};
    418419
     
    427428bool Fragmentation::ParseOrderAtSiteFromFile(const std::vector<atomId_t> &atomids, const std::string &path)
    428429{
    429   Info FunctionInfo(__func__);
     430//  Info FunctionInfo(__func__);
    430431  typedef unsigned char order_t;
    431432  typedef std::map<atomId_t, order_t> OrderArray_t;
     
    461462    //SetAtomValueToIndexedArray( MaxArray, &atom::getNr(), &atom::MaxOrder );
    462463
    463     LOG(1, "\t ... done.");
    464464    status = true;
    465465  } else {
    466     LOG(1, "\t ... failed to open file " << line << ".");
     466    ELOG(1, "Failed to open OrdersAtSite file " << line << ".");
    467467    status = false;
    468468  }
     
    496496bool Fragmentation::AssignKeySetsToFragment(const Graph &KeySetList, ListOfLocalAtoms_t &ListOfLocalAtoms, Graph &FragmentList, bool FreeList)
    497497{
    498   Info FunctionInfo(__func__);
     498//  Info FunctionInfo(__func__);
    499499  bool status = true;
    500500  size_t KeySetCounter = 0;
     
    502502  // fill ListOfLocalAtoms if NULL was given
    503503  if (!mol->FillListOfLocalAtoms(ListOfLocalAtoms, mol->getAtomCount())) {
    504     LOG(1, "Filling of ListOfLocalAtoms failed.");
     504    ELOG(1, "Filling of ListOfLocalAtoms failed.");
    505505    return false;
    506506  }
     
    520520    }
    521521  } else
    522     LOG(1, "KeySetList is NULL or empty.");
     522    ELOG(2, "KeySetList is NULL or empty.");
    523523
    524524  if (FreeList) {
     
    536536void Fragmentation::TranslateIndicesToGlobalIDs(Graph &FragmentList, int &TotalNumberOfKeySets, Graph &TotalGraph)
    537537{
    538   Info FunctionInfo(__func__);
     538//  Info FunctionInfo(__func__);
    539539  for (Graph::iterator runner = FragmentList.begin(); runner != FragmentList.end(); runner++) {
    540540    KeySet TempSet;
  • src/Fragmentation/PowerSetGenerator.cpp

    r830b3e r8ac66b4  
    212212  // creating fragments with the found edge sets  (may be done in reverse order, faster)
    213213  int SP = BondsPerSPList.CountNumbersInBondsList();
    214   LOG(0, "Total number of edges is " << SP << ".");
     214  LOG(0, "INFO: Total number of edges is " << SP << ".");
    215215  {
    216216    // start with root (push on fragment stack)
Note: See TracChangeset for help on using the changeset viewer.