Changeset 4e6a60 for src


Ignore:
Timestamp:
Oct 5, 2013, 9:33:18 AM (11 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:
94453f1
Parents:
291eca
git-author:
Frederik Heber <heber@…> (09/03/13 09:55:47)
git-committer:
Frederik Heber <heber@…> (10/05/13 09:33:18)
Message:

Added CoordinatorFactory that returns the correct Coordinator for a given graph.

  • extended HomologyGraph interface by getter for nodes and edges.
  • CoordinatorFactory::create() decides by number of nodes and connected_edges which coordinator to return.
Location:
src
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • src/Fragmentation/Homology/HomologyGraph.hpp

    r291eca r4e6a60  
    158158  void printEdges(std::ostream& ost) const;
    159159
     160  /** Getter for the nodes contained in this graph.
     161   *
     162   * \return const ref to vector of FragmentNode
     163   */
     164  const nodes_t &getNodes() const
     165  { return nodes; }
     166
     167  /** Getter for the edges contained in this graph.
     168   *
     169   * \return const ref to vector of FragmentEdge
     170   */
     171  const edges_t &getEdges() const
     172  { return edges; }
     173
    160174private:
    161175  //!> information on the nodes of the graph
  • src/Potentials/InternalCoordinates/Coordinator.hpp

    r291eca r4e6a60  
    1616#include "FunctionApproximation/FunctionModel.hpp"
    1717
     18#include <boost/shared_ptr.hpp>
     19
    1820/** This class is the interface for all functors converting
    1921 * a list of distances (arguments_t) into internal coordinates.
     
    2224struct Coordinator
    2325{
     26  typedef boost::shared_ptr<Coordinator> ptr;
     27
    2428  virtual double operator()(const FunctionModel::arguments_t &arguments) const=0;
    2529};
  • src/Potentials/InternalCoordinates/CoordinatorFactory.cpp

    r291eca r4e6a60  
    3838#include "CoordinatorFactory.hpp"
    3939#include "Fragmentation/Homology/HomologyGraph.hpp"
    40 //#include "Fragmentation/Homology/FragmentEdge.hpp"
    4140#include "Fragmentation/Homology/FragmentNode.hpp"
     41
     42#include "CodePatterns/Assert.hpp"
    4243
    4344#include "TwoBody_Length.hpp"
     
    7576        nodeiter != nodes.end();
    7677        ++nodeiter) {
    77       if (nodeiter->connected_edges == 3)
     78      if (nodeiter->first.getConnectedEdges() == 3)
    7879        tripleEdge = true;
    7980    }
     
    8687  default:
    8788    ASSERT( 0, "CoordinatorFactory::create() - I don't have a coordinator for "+
    88         toString(fragment)+".");
     89        toString(graph)+".");
    8990    break;
    9091  }
  • src/Potentials/Makefile.am

    r291eca r4e6a60  
    1313  Potentials/PotentialSerializer.cpp \
    1414  Potentials/SerializablePotential.cpp \
     15  Potentials/InternalCoordinates/CoordinatorFactory.cpp \
    1516  Potentials/InternalCoordinates/FourBody_ImproperAngle.cpp \
    1617  Potentials/InternalCoordinates/FourBody_TorsionAngle.cpp \
     
    3435  Potentials/helpers.hpp \
    3536  Potentials/InternalCoordinates/Coordinator.hpp \
     37  Potentials/InternalCoordinates/CoordinatorFactory.hpp \
    3638  Potentials/InternalCoordinates/FourBody_ImproperAngle.hpp \
    3739  Potentials/InternalCoordinates/FourBody_TorsionAngle.hpp \
Note: See TracChangeset for help on using the changeset viewer.