Ignore:
Timestamp:
Aug 9, 2013, 2:20:35 PM (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:
51e0e3
Parents:
f0025d
git-author:
Frederik Heber <heber@…> (06/25/13 10:54:50)
git-committer:
Frederik Heber <heber@…> (08/09/13 14:20:35)
Message:

Added getSpecificFilter() and getSpecificArgumentCount() to FunctionModel.

  • implemented getSpecificArgumentCount() in all specific potentials.
  • added NoOp_filterfunction to Helpers.
  • enhanced Documentation on FunctionModel on new Extractor,Filter,Count system.
  • rewrote CompoundPotential::getSpecificExtractor() using Helpers::returnEmptyArguments() such that first model does not have to be treated special anymore.
Location:
src/Potentials/Specifics
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • src/Potentials/Specifics/ConstantPotential.cpp

    rf0025d r0f5d38  
    177177}
    178178
     179FunctionModel::filter_t ConstantPotential::getSpecificFilter() const
     180{
     181  FunctionModel::filter_t returnfunction =
     182      boost::bind(&Helpers::NoOp_Filterfunction,
     183          _1);
     184  return returnfunction;
     185}
     186
    179187void
    180188ConstantPotential::setParametersToRandomInitialValues(
  • src/Potentials/Specifics/ConstantPotential.hpp

    rf0025d r0f5d38  
    163163  FunctionModel::extractor_t getSpecificExtractor() const;
    164164
     165  /** Returns a bound function to be used with TrainingData, extracting distances
     166   * from a Fragment.
     167   *
     168   * \return bound function extracting distances from a fragment
     169   */
     170  FunctionModel::filter_t getSpecificFilter() const;
     171
     172  /** Returns the number of arguments the underlying function requires.
     173   *
     174   * \return number of arguments of the function
     175   */
     176  size_t getSpecificArgumentCount() const
     177  { return 0; }
     178
    165179  enum parameter_enum_t {
    166180    energy_offset=0,
  • src/Potentials/Specifics/ManyBodyPotential_Tersoff.cpp

    rf0025d r0f5d38  
    698698}
    699699
     700FunctionModel::filter_t ManyBodyPotential_Tersoff::getSpecificFilter() const
     701{
     702  FunctionModel::filter_t returnfunction =
     703      boost::bind(&Helpers::NoOp_Filterfunction,
     704          _1);
     705  return returnfunction;
     706}
     707
    700708void
    701709ManyBodyPotential_Tersoff::setParametersToRandomInitialValues(
  • src/Potentials/Specifics/ManyBodyPotential_Tersoff.hpp

    rf0025d r0f5d38  
    188188  FunctionModel::extractor_t getSpecificExtractor() const;
    189189
     190  /** Returns a bound function to be used with TrainingData, extracting distances
     191   * from a Fragment.
     192   *
     193   * \return bound function extracting distances from a fragment
     194   */
     195  FunctionModel::filter_t getSpecificFilter() const;
     196
     197  /** Returns the number of arguments the underlying function requires.
     198   *
     199   * \return number of arguments of the function
     200   */
     201  size_t getSpecificArgumentCount() const
     202  { return 1; }
     203
    190204  /** Sets the magic triple function that we use for getting angle distances.
    191205   *
  • src/Potentials/Specifics/PairPotential_Angle.cpp

    rf0025d r0f5d38  
    221221}
    222222
     223FunctionModel::filter_t PairPotential_Angle::getSpecificFilter() const
     224{
     225  FunctionModel::filter_t returnfunction =
     226      boost::bind(&Extractors::reorderArgumentsByParticleTypes,
     227          _1,
     228          getParticleTypes()
     229      );
     230  return returnfunction;
     231}
     232
    223233void
    224234PairPotential_Angle::setParametersToRandomInitialValues(
  • src/Potentials/Specifics/PairPotential_Angle.hpp

    rf0025d r0f5d38  
    166166  FunctionModel::extractor_t getSpecificExtractor() const;
    167167
     168  /** Returns a bound function to be used with TrainingData, extracting distances
     169   * from a Fragment.
     170   *
     171   * \return bound function extracting distances from a fragment
     172   */
     173  FunctionModel::filter_t getSpecificFilter() const;
     174
     175  /** Returns the number of arguments the underlying function requires.
     176   *
     177   * \return number of arguments of the function
     178   */
     179  size_t getSpecificArgumentCount() const
     180  { return 3; }
     181
    168182  enum parameter_enum_t {
    169183    spring_constant=0,
  • src/Potentials/Specifics/PairPotential_Harmonic.cpp

    rf0025d r0f5d38  
    198198}
    199199
     200FunctionModel::filter_t PairPotential_Harmonic::getSpecificFilter() const
     201{
     202  FunctionModel::filter_t returnfunction =
     203      boost::bind(&Helpers::NoOp_Filterfunction,
     204          _1);
     205  return returnfunction;
     206}
     207
    200208void
    201209PairPotential_Harmonic::setParametersToRandomInitialValues(
  • src/Potentials/Specifics/PairPotential_Harmonic.hpp

    rf0025d r0f5d38  
    148148  FunctionModel::extractor_t getSpecificExtractor() const;
    149149
     150  /** Returns a bound function to be used with TrainingData, extracting distances
     151   * from a Fragment.
     152   *
     153   * \return bound function extracting distances from a fragment
     154   */
     155  FunctionModel::filter_t getSpecificFilter() const;
     156
     157  /** Returns the number of arguments the underlying function requires.
     158   *
     159   * \return number of arguments of the function
     160   */
     161  size_t getSpecificArgumentCount() const
     162  { return 1; }
     163
    150164  /** Return the token name of this specific potential.
    151165   *
  • src/Potentials/Specifics/PairPotential_Morse.cpp

    rf0025d r0f5d38  
    227227}
    228228
     229FunctionModel::filter_t PairPotential_Morse::getSpecificFilter() const
     230{
     231  FunctionModel::filter_t returnfunction =
     232      boost::bind(&Helpers::NoOp_Filterfunction,
     233          _1);
     234  return returnfunction;
     235}
     236
    229237void
    230238PairPotential_Morse::setParametersToRandomInitialValues(
  • src/Potentials/Specifics/PairPotential_Morse.hpp

    rf0025d r0f5d38  
    165165  FunctionModel::extractor_t getSpecificExtractor() const;
    166166
     167  /** Returns a bound function to be used with TrainingData, extracting distances
     168   * from a Fragment.
     169   *
     170   * \return bound function extracting distances from a fragment
     171   */
     172  FunctionModel::filter_t getSpecificFilter() const;
     173
     174  /** Returns the number of arguments the underlying function requires.
     175   *
     176   * \return number of arguments of the function
     177   */
     178  size_t getSpecificArgumentCount() const
     179  { return 1; }
     180
    167181  enum parameter_enum_t {
    168182    spring_constant=0,
Note: See TracChangeset for help on using the changeset viewer.