Changeset f9183b


Ignore:
Timestamp:
Aug 28, 2010, 12:57:56 AM (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:
e8926e
Parents:
231b5e
git-author:
Frederik Heber <heber@…> (08/27/10 09:44:17)
git-committer:
Frederik Heber <heber@…> (08/28/10 00:57:56)
Message:

BUGFIX: graph info per bond is now output nicely.

Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/atom_graphnode.cpp

    r231b5e rf9183b  
    1919
    2020#include "Helpers/MemDebug.hpp"
     21
     22#include <iostream>
    2123
    2224#include "atom_graphnode.hpp"
     
    4143void GraphNode::OutputGraphInfo() const
    4244{
    43   DoLog(2) && (Log() << Verbose(2) << "Atom " << getName() << " is " << ((SeparationVertex) ? "a" : "not a") << " separation vertex, components are ");
    44   OutputComponentNumber();
     45  DoLog(2) && (Log() << Verbose(2) << "Atom " << getName() << " is " << ((SeparationVertex) ? "a" : "not a") << " separation vertex, components are " << *this);
    4546  DoLog(3) && (Log() << Verbose(3) << " with Lowpoint " << LowpointNr << " and Graph Nr. " << GraphNr << "." << endl);
    4647};
     
    5051 * \param *out output stream for debugging
    5152 */
    52 void GraphNode::OutputComponentNumber() const
     53void GraphNode::OutputComponentNumber(ostream *out) const
    5354{
    54   if (ComponentNr != NULL) {
    55     for (int i=0; ComponentNr[i] != -1; i++)
    56       DoLog(2) && (Log() << Verbose(2) << ComponentNr[i] << " ");
    57   }
     55  *out << *this;
    5856};
    5957
     58ostream &operator<<(ostream &out, const GraphNode &a)
     59{
     60  if (a.ComponentNr != NULL) {
     61    for (int i=0; a.ComponentNr[i] != -1; i++)
     62      out << a.ComponentNr[i];
     63  }
     64  return out;
     65}
  • src/atom_graphnode.hpp

    r231b5e rf9183b  
    1919#endif
    2020
    21 #include <fstream>
     21#include <iosfwd>
    2222
    2323#include "atom_graphnodeinfo.hpp"
     
    3535
    3636  void OutputGraphInfo() const;
    37   void OutputComponentNumber() const;
     37  void OutputComponentNumber(ostream *out) const;
    3838
    3939private:
     
    4141};
    4242
     43ostream &operator<<(ostream &out, const GraphNode &a);
     44
    4345#endif /* ATOM_GRAPHNODE_HPP_ */
  • src/molecule_graph.cpp

    r231b5e rf9183b  
    653653      if ((*BondRunner)->leftatom == *AtomRunner) {
    654654        Binder = *BondRunner;
    655         DoLog(2) && (Log() << Verbose(2) << ((Binder->Type == TreeEdge) ? "TreeEdge " : "BackEdge ") << *Binder << ": <");
    656         DoLog(0) && (Log() << Verbose(0) << ((Binder->leftatom->SeparationVertex) ? "SP," : "") << "L" << Binder->leftatom->LowpointNr << " G" << Binder->leftatom->GraphNr << " Comp.");
    657         Binder->leftatom->OutputComponentNumber();
    658         DoLog(0) && (Log() << Verbose(0) << " ===  ");
    659         DoLog(0) && (Log() << Verbose(0) << ((Binder->rightatom->SeparationVertex) ? "SP," : "") << "L" << Binder->rightatom->LowpointNr << " G" << Binder->rightatom->GraphNr << " Comp.");
    660         Binder->rightatom->OutputComponentNumber();
    661         DoLog(0) && (Log() << Verbose(0) << ">." << endl);
     655        if (DoLog(2)) {
     656          ostream &out = (Log() << Verbose(2));
     657          out << ((Binder->Type == TreeEdge) ? "TreeEdge " : "BackEdge ") << *Binder << ": <";
     658          out << ((Binder->leftatom->SeparationVertex) ? "SP," : "") << "L" << Binder->leftatom->LowpointNr << " G" << Binder->leftatom->GraphNr << " Comp.";
     659          Binder->leftatom->OutputComponentNumber(&out);
     660          out << " ===  ";
     661          out << ((Binder->rightatom->SeparationVertex) ? "SP," : "") << "L" << Binder->rightatom->LowpointNr << " G" << Binder->rightatom->GraphNr << " Comp.";
     662          Binder->rightatom->OutputComponentNumber(&out);
     663          out << ">." << endl;
     664        }
    662665        if (Binder->Cyclic) // cyclic ??
    663666          DoLog(3) && (Log() << Verbose(3) << "Lowpoint at each side are equal: CYCLIC!" << endl);
Note: See TracChangeset for help on using the changeset viewer.