Ignore:
Timestamp:
Nov 3, 2011, 7:44:01 PM (14 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:
41a467
Parents:
50e4e5
git-author:
Frederik Heber <heber@…> (10/27/11 11:53:58)
git-committer:
Frederik Heber <heber@…> (11/03/11 19:44:01)
Message:

HUGE: Removed all calls to Log(), eLog(), replaced by LOG() and ELOG().

  • Replaced DoLog(.) && (Log() << Verbose(.) << ... << std::endl) by Log(., ...).
  • Replaced Log() << Verbose(.) << .. << by Log(., ...)
  • on multiline used stringstream to generate and message which was finally used in LOG(., output.str())
  • there should be no more occurence of Log(). LOG() and ELOG() must be used instead.
  • Eventually, this will allow for storing all errors and re-printing them on program exit which would be very helpful to ascertain error-free runs for the user.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/molecule_geometry.cpp

    r50e4e5 r47d041  
    8989void molecule::CenterEdge(Vector *max)
    9090{
     91//  Info info(__func__);
    9192  Vector *min = new Vector;
    9293
    93 //  Log() << Verbose(3) << "Begin of CenterEdge." << endl;
    9494  molecule::const_iterator iter = begin();  // start at first in list
    9595  if (iter != end()) { //list not empty?
     
    105105      }
    106106    }
    107 //    Log() << Verbose(4) << "Maximum is ";
    108 //    max->Output(out);
    109 //    Log() << Verbose(0) << ", Minimum is ";
    110 //    min->Output(out);
    111 //    Log() << Verbose(0) << endl;
     107    LOG(1, "INFO: Maximum is " << *max << ", Minimum is " << *min << ".");
    112108    min->Scale(-1.);
    113109    (*max) += (*min);
     
    115111  }
    116112  delete(min);
    117 //  Log() << Verbose(3) << "End of CenterEdge." << endl;
    118113};
    119114
     
    192187    a->Scale(1./Num); // divide through total mass
    193188  }
    194 //  Log() << Verbose(1) << "Resulting center of gravity: ";
    195 //  a->Output(out);
    196 //  Log() << Verbose(0) << endl;
     189  LOG(1, "INFO: Resulting center of gravity: " << *a << ".");
    197190  return a;
    198191};
     
    253246  }
    254247  // print InertiaTensor
    255   DoLog(0) && (Log() << Verbose(0) << "The inertia tensor of molecule "
    256       << getName() <<  " is:"
    257       << InertiaTensor << endl);
     248  LOG(1, "INFO: The inertia tensor of molecule " << getName() <<  " is:" << InertiaTensor);
    258249
    259250  delete CenterOfGravity;
     
    275266
    276267  for(int i=0;i<NDIM;i++)
    277     DoLog(0) && (Log() << Verbose(0) << "eigenvalue = " << Eigenvalues[i] << ", eigenvector = " << InertiaTensor.column(i) << endl);
    278 
    279   DoLog(0) && (Log() << Verbose(0) << "Transforming to PAS ... ");
     268    LOG(0, "eigenvalue = " << Eigenvalues[i] << ", eigenvector = " << InertiaTensor.column(i));
     269
     270  LOG(0, "STATUS: Transforming to PAS ... ");
    280271
    281272  // obtain first column, eigenvector to biggest eigenvalue
     
    290281  const double alpha = BiggestEigenvector.Angle(Axis);
    291282
    292   DoLog(0) && (Log() << Verbose(0) << "Rotation angle is " << alpha << endl);
     283  LOG(1, "INFO: Rotation angle is " << alpha);
    293284
    294285  // and rotate
     
    298289    *(*iter) += *CenterOfGravity;
    299290  }
    300   DoLog(0) && (Log() << Verbose(0) << "done." << endl);
     291  LOG(0, "STATUS: done.");
    301292
    302293  delete CenterOfGravity;
     
    393384              if (fabs(tmp) > MinMaxBondDistance.last) {  // check against Min is not useful for components
    394385                flag = false;
    395                 DoLog(0) && (Log() << Verbose(0) << "Hit: atom " << (*iter)->getName() << " in bond " << *(*Runner) << " has to be shifted due to " << tmp << "." << endl);
     386                LOG(0, "Hit: atom " << (*iter)->getName() << " in bond " << *(*Runner) << " has to be shifted due to " << tmp << ".");
    396387                if (tmp > 0)
    397388                  Translationvector[j] -= 1.;
     
    404395        Testvector *= matrix;
    405396        Center += Testvector;
    406         Log() << Verbose(1) << "vector is: " << Testvector << endl;
     397        LOG(1, "vector is: " << Testvector);
    407398        if (saturation == DoSaturate) {
    408399          // now also change all hydrogens
     
    415406              Testvector *= matrix;
    416407              Center += Testvector;
    417               Log() << Verbose(1) << "Hydrogen vector is: " << Testvector << endl;
     408              LOG(1, "Hydrogen vector is: " << Testvector);
    418409            }
    419410          }
     
    439430
    440431  // rotate on z-x plane
    441   DoLog(0) && (Log() << Verbose(0) << "Begin of Aligning all atoms." << endl);
     432  LOG(0, "Begin of Aligning all atoms.");
    442433  alpha = atan(-n->at(0)/n->at(2));
    443   DoLog(1) && (Log() << Verbose(1) << "Z-X-angle: " << alpha << " ... ");
     434  LOG(1, "INFO: Z-X-angle: " << alpha << " ... ");
    444435  for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
    445436    tmp = (*iter)->at(0);
     
    457448  n->at(0) =  cos(alpha) * tmp +  sin(alpha) * n->at(2);
    458449  n->at(2) = -sin(alpha) * tmp +  cos(alpha) * n->at(2);
    459   DoLog(1) && (Log() << Verbose(1) << "alignment vector after first rotation: " << n << endl);
     450  LOG(1, "alignment vector after first rotation: " << n);
    460451
    461452  // rotate on z-y plane
    462453  alpha = atan(-n->at(1)/n->at(2));
    463   DoLog(1) && (Log() << Verbose(1) << "Z-Y-angle: " << alpha << " ... ");
     454  LOG(1, "INFO: Z-Y-angle: " << alpha << " ... ");
    464455  for (molecule::const_iterator iter = begin(); iter != end(); ++iter) {
    465456    tmp = (*iter)->at(1);
     
    479470
    480471
    481   DoLog(1) && (Log() << Verbose(1) << "alignment vector after second rotation: " << n << endl);
    482   DoLog(0) && (Log() << Verbose(0) << "End of Aligning all atoms." << endl);
     472  LOG(1, "alignment vector after second rotation: " << n);
     473  LOG(0, "End of Aligning all atoms.");
    483474};
    484475
Note: See TracChangeset for help on using the changeset viewer.