Changeset 94453f1


Ignore:
Timestamp:
Oct 6, 2013, 8:45:08 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:
c76b8b
Parents:
4e6a60
git-author:
Frederik Heber <heber@…> (09/03/13 10:19:31)
git-committer:
Frederik Heber <heber@…> (10/06/13 08:45:08)
Message:

Added getCoordinator() to EmpiricalPotential interface.

  • implemented with all specific potentials.
Location:
src/Potentials
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/EmpiricalPotential.hpp

    r4e6a60 r94453f1  
    2020#include "FunctionApproximation/FunctionModel.hpp"
    2121#include "Potentials/SerializablePotential.hpp"
     22#include "Potentials/InternalCoordinates/Coordinator.hpp"
    2223
    2324/** An EmpiricalPotential is a function that is given a vector of objects as
     
    7374  virtual derivative_components_t derivative(const arguments_t &arguments) const=0;
    7475
     76  /** Returns the functor that converts argument_s into the
     77   * internal coordinate described by this potential function.
     78   *
     79   * \return coordinator functor
     80   */
     81  virtual Coordinator::ptr getCoordinator() const=0;
     82
    7583protected:
    7684  /** Default constructor for class EmpiricalPotential.
     
    8189  EmpiricalPotential()
    8290  {}
    83 
    84 
    8591};
    8692
  • src/Potentials/Specifics/ConstantPotential.cpp

    r4e6a60 r94453f1  
    5252#include "Potentials/helpers.hpp"
    5353#include "Potentials/ParticleTypeCheckers.hpp"
     54#include "Potentials/InternalCoordinates/OneBody_Constant.hpp"
    5455
    5556class Fragment;
     
    6263    ;
    6364const std::string ConstantPotential::potential_token("constant");
     65Coordinator::ptr ConstantPotential::coordinator(new OneBody_Constant());
    6466
    6567ConstantPotential::ConstantPotential() :
  • src/Potentials/Specifics/ConstantPotential.hpp

    r4e6a60 r94453f1  
    112112  results_t parameter_derivative(const arguments_t &arguments, const size_t index) const;
    113113
     114  /** Returns the functor that converts argument_s into the
     115   * internal coordinate described by this potential function.
     116   *
     117   * \return coordinator functor
     118   */
     119  Coordinator::ptr getCoordinator() const
     120  { return coordinator; }
     121
    114122  /** Return the token name of this specific potential.
    115123   *
     
    191199  //!> static token of this potential type
    192200  static const std::string potential_token;
     201
     202  //!> internal coordinator object for converting arguments_t
     203  static Coordinator::ptr coordinator;
    193204};
    194205
  • src/Potentials/Specifics/FourBodyPotential_Improper.cpp

    r4e6a60 r94453f1  
    3939#include <boost/assign/list_of.hpp> // for 'map_list_of()'
    4040
     41#include "Potentials/InternalCoordinates/FourBody_ImproperAngle.hpp"
     42
    4143// static definitions
    4244const FourBodyPotential_Improper::ParameterNames_t
     
    4749    ;
    4850const std::string FourBodyPotential_Improper::improper_token("improper");
    49 
     51Coordinator::ptr FourBodyPotential_Improper::coordinator(new FourBody_ImproperAngle());
    5052
    5153FourBodyPotential_Improper::FourBodyPotential_Improper() :
  • src/Potentials/Specifics/FourBodyPotential_Improper.hpp

    r4e6a60 r94453f1  
    4444  FourBodyPotential_Improper();
    4545
     46  /** Returns the functor that converts argument_s into the
     47   * internal coordinate described by this potential function.
     48   *
     49   * \return coordinator functor
     50   */
     51  Coordinator::ptr getCoordinator() const
     52  { return coordinator; }
     53
    4654public:
    4755  FourBodyPotential_Improper(const ParticleTypes_t &_ParticleTypes);
     
    8088  //!> static token of this potential type
    8189  static const std::string improper_token;
     90
     91  //!> internal coordinator object for converting arguments_t
     92  static Coordinator::ptr coordinator;
    8293};
    8394
  • src/Potentials/Specifics/FourBodyPotential_Torsion.cpp

    r4e6a60 r94453f1  
    4949#include "FunctionApproximation/TrainingData.hpp"
    5050#include "Potentials/helpers.hpp"
     51#include "Potentials/InternalCoordinates/FourBody_TorsionAngle.hpp"
    5152#include "Potentials/ParticleTypeCheckers.hpp"
    5253
     
    6162    ;
    6263const std::string FourBodyPotential_Torsion::potential_token("torsion");
     64Coordinator::ptr FourBodyPotential_Torsion::coordinator(new FourBody_TorsionAngle());
    6365
    6466FourBodyPotential_Torsion::FourBodyPotential_Torsion() :
  • src/Potentials/Specifics/FourBodyPotential_Torsion.hpp

    r4e6a60 r94453f1  
    114114  results_t parameter_derivative(const arguments_t &arguments, const size_t index) const;
    115115
     116  /** Returns the functor that converts argument_s into the
     117   * internal coordinate described by this potential function.
     118   *
     119   * \return coordinator functor
     120   */
     121  Coordinator::ptr getCoordinator() const
     122  { return coordinator; }
     123
    116124  /** Return the token name of this specific potential.
    117125   *
     
    207215  //!> static token of this potential type
    208216  static const std::string potential_token;
     217
     218  //!> internal coordinator object for converting arguments_t
     219  static Coordinator::ptr coordinator;
    209220};
    210221
  • src/Potentials/Specifics/ManyBodyPotential_Tersoff.cpp

    r4e6a60 r94453f1  
    5252#include "FunctionApproximation/TrainingData.hpp"
    5353#include "Potentials/helpers.hpp"
     54#include "Potentials/InternalCoordinates/OneBody_Constant.hpp"
    5455#include "Potentials/ParticleTypeCheckers.hpp"
    5556
     
    7778    ;
    7879const std::string ManyBodyPotential_Tersoff::potential_token("tersoff");
     80Coordinator::ptr ManyBodyPotential_Tersoff::coordinator(new OneBody_Constant());
    7981
    8082ManyBodyPotential_Tersoff::ManyBodyPotential_Tersoff() :
  • src/Potentials/Specifics/ManyBodyPotential_Tersoff.hpp

    r4e6a60 r94453f1  
    129129  results_t parameter_derivative(const arguments_t &arguments, const size_t index) const;
    130130
     131  /** Returns the functor that converts argument_s into the
     132   * internal coordinate described by this potential function.
     133   *
     134   * \return coordinator functor
     135   */
     136  Coordinator::ptr getCoordinator() const
     137  { return coordinator; }
     138
    131139  /** Return the token name of this specific potential.
    132140   *
     
    358366  //!> static token of this potential type
    359367  static const std::string potential_token;
     368
     369  //!> internal coordinator object for converting arguments_t
     370  static Coordinator::ptr coordinator;
    360371};
    361372
  • src/Potentials/Specifics/PairPotential_Harmonic.cpp

    r4e6a60 r94453f1  
    5050#include "FunctionApproximation/TrainingData.hpp"
    5151#include "Potentials/helpers.hpp"
     52#include "Potentials/InternalCoordinates/TwoBody_Length.hpp"
    5253#include "Potentials/ParticleTypeCheckers.hpp"
    5354
     
    6263    ;
    6364const std::string PairPotential_Harmonic::potential_token("harmonic_bond");
     65Coordinator::ptr PairPotential_Harmonic::coordinator(new TwoBody_Length());
    6466
    6567PairPotential_Harmonic::PairPotential_Harmonic() :
  • src/Potentials/Specifics/PairPotential_Harmonic.hpp

    r4e6a60 r94453f1  
    112112  results_t parameter_derivative(const arguments_t &arguments, const size_t index) const;
    113113
     114  /** Returns the functor that converts argument_s into the
     115   * internal coordinate described by this potential function.
     116   *
     117   * \return coordinator functor
     118   */
     119  Coordinator::ptr getCoordinator() const
     120  { return coordinator; }
     121
    114122  /** States whether lower and upper boundaries should be used to constraint
    115123   * the parameter search for this function model.
     
    192200  //!> static token of this potential type
    193201  static const std::string potential_token;
     202
     203  //!> internal coordinator object for converting arguments_t
     204  static Coordinator::ptr coordinator;
    194205};
    195206
  • src/Potentials/Specifics/PairPotential_LennardJones.cpp

    r4e6a60 r94453f1  
    5050#include "FunctionApproximation/TrainingData.hpp"
    5151#include "Potentials/helpers.hpp"
     52#include "Potentials/InternalCoordinates/TwoBody_Length.hpp"
    5253#include "Potentials/ParticleTypeCheckers.hpp"
    5354
     
    6263    ;
    6364const std::string PairPotential_LennardJones::potential_token("lennardjones");
     65Coordinator::ptr PairPotential_LennardJones::coordinator(new TwoBody_Length());
    6466
    6567void PairPotential_LennardJones::setDefaultParameters()
  • src/Potentials/Specifics/PairPotential_LennardJones.hpp

    r4e6a60 r94453f1  
    114114  results_t parameter_derivative(const arguments_t &arguments, const size_t index) const;
    115115
     116  /** Returns the functor that converts argument_s into the
     117   * internal coordinate described by this potential function.
     118   *
     119   * \return coordinator functor
     120   */
     121  Coordinator::ptr getCoordinator() const
     122  { return coordinator; }
     123
    116124  /** Return the token name of this specific potential.
    117125   *
     
    200208  //!> static token of this potential type
    201209  static const std::string potential_token;
     210
     211  //!> internal coordinator object for converting arguments_t
     212  static Coordinator::ptr coordinator;
    202213};
    203214
  • src/Potentials/Specifics/PairPotential_Morse.cpp

    r4e6a60 r94453f1  
    5151#include "FunctionApproximation/TrainingData.hpp"
    5252#include "Potentials/helpers.hpp"
     53#include "Potentials/InternalCoordinates/TwoBody_Length.hpp"
    5354#include "Potentials/ParticleTypeCheckers.hpp"
    5455
     
    6465    ;
    6566const std::string PairPotential_Morse::potential_token("morse");
     67Coordinator::ptr PairPotential_Morse::coordinator(new TwoBody_Length());
    6668
    6769PairPotential_Morse::PairPotential_Morse() :
  • src/Potentials/Specifics/PairPotential_Morse.hpp

    r4e6a60 r94453f1  
    113113  results_t parameter_derivative(const arguments_t &arguments, const size_t index) const;
    114114
     115  /** Returns the functor that converts argument_s into the
     116   * internal coordinate described by this potential function.
     117   *
     118   * \return coordinator functor
     119   */
     120  Coordinator::ptr getCoordinator() const
     121  { return coordinator; }
     122
    115123  /** Return the token name of this specific potential.
    116124   *
     
    195203  //!> static token of this potential type
    196204  static const std::string potential_token;
     205
     206  //!> internal coordinator object for converting arguments_t
     207  static Coordinator::ptr coordinator;
    197208};
    198209
  • src/Potentials/Specifics/ThreeBodyPotential_Angle.cpp

    r4e6a60 r94453f1  
    5050#include "FunctionApproximation/TrainingData.hpp"
    5151#include "Potentials/helpers.hpp"
     52#include "Potentials/InternalCoordinates/ThreeBody_Angle.hpp"
    5253#include "Potentials/ParticleTypeCheckers.hpp"
    5354
     
    6263    ;
    6364const std::string ThreeBodyPotential_Angle::potential_token("harmonic_angle");
     65Coordinator::ptr ThreeBodyPotential_Angle::coordinator(new ThreeBody_Angle());
    6466
    6567ThreeBodyPotential_Angle::ThreeBodyPotential_Angle() :
  • src/Potentials/Specifics/ThreeBodyPotential_Angle.hpp

    r4e6a60 r94453f1  
    112112  results_t parameter_derivative(const arguments_t &arguments, const size_t index) const;
    113113
     114  /** Returns the functor that converts argument_s into the
     115   * internal coordinate described by this potential function.
     116   *
     117   * \return coordinator functor
     118   */
     119  Coordinator::ptr getCoordinator() const
     120  { return coordinator; }
     121
    114122  /** Return the token name of this specific potential.
    115123   *
     
    202210  //!> static token of this potential type
    203211  static const std::string potential_token;
     212
     213  //!> internal coordinator object for converting arguments_t
     214  static Coordinator::ptr coordinator;
    204215};
    205216
Note: See TracChangeset for help on using the changeset viewer.