source: src/Potentials/Specifics/FourBodyPotential_Improper.hpp@ 64cafb2

Action_Thermostats Add_AtomRandomPerturbation Add_FitFragmentPartialChargesAction Add_RotateAroundBondAction Add_SelectAtomByNameAction Adding_Graph_to_ChangeBondActions Adding_MD_integration_tests Adding_StructOpt_integration_tests Automaking_mpqc_open AutomationFragmentation_failures Candidate_v1.5.4 Candidate_v1.6.0 Candidate_v1.6.1 ChangeBugEmailaddress ChangingTestPorts ChemicalSpaceEvaluator 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_ChargeSampling_PBC Fix_ChronosMutex Fix_FitPartialCharges Fix_FitPotential_needs_atomicnumbers Fix_ForceAnnealing Fix_IndependentFragmentGrids Fix_ParseParticles Fix_ParseParticles_split_forward_backward_Actions Fix_StatusMsg Fix_StepWorldTime_single_argument Fix_Verbose_Codepatterns Fixes ForceAnnealing_goodresults ForceAnnealing_oldresults ForceAnnealing_tocheck ForceAnnealing_with_BondGraph ForceAnnealing_with_BondGraph_continued ForceAnnealing_with_BondGraph_continued_betteresults ForceAnnealing_with_BondGraph_contraction-expansion GeometryObjects Gui_displays_atomic_force_velocity IndependentFragmentGrids IndependentFragmentGrids_IndividualZeroInstances IndependentFragmentGrids_IntegrationTest IndependentFragmentGrids_Sole_NN_Calculation JobMarket_RobustOnKillsSegFaults JobMarket_StableWorkerPool JobMarket_unresolvable_hostname_fix ODR_violation_mpqc_open PartialCharges_OrthogonalSummation PythonUI_with_named_parameters QtGui_reactivate_TimeChanged_changes Recreated_GuiChecks RotateToPrincipalAxisSystem_UndoRedo SaturateAtoms_findBestMatching SaturateAtoms_singleDegree StoppableMakroAction Subpackage_CodePatterns Subpackage_JobMarket Subpackage_LinearAlgebra Subpackage_levmar Subpackage_mpqc_open Subpackage_vmg ThirdParty_MPQC_rebuilt_buildsystem TrajectoryDependenant_MaxOrder TremoloParser_IncreasedPrecision TremoloParser_MultipleTimesteps Ubuntu_1604_changes stable
Last change on this file since 64cafb2 was 94453f1, checked in by Frederik Heber <heber@…>, 11 years ago

Added getCoordinator() to EmpiricalPotential interface.

  • implemented with all specific potentials.
  • Property mode set to 100644
File size: 2.5 KB
Line 
1/*
2 * FourBodyPotential_Improper.hpp
3 *
4 * Created on: Jul 10, 2013
5 * Author: heber
6 */
7
8#ifndef FOURBODYPOTENTIAL_IMPROPER_HPP_
9#define FOURBODYPOTENTIAL_IMPROPER_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include "FourBodyPotential_Torsion.hpp"
17
18class FourBodyPotential_ImproperTest;
19class PotentialFactory;
20
21/** The improper potential is identical to the torsion potential with exception
22 * of the way the angle is calculated.
23 *
24 * Hence, we only need to override function_theta().
25 *
26 */
27class FourBodyPotential_Improper : public FourBodyPotential_Torsion
28{
29 //!> grant unit test access to internal parts
30 friend class FourBodyPotential_ImproperTest;
31 //!> grant PotentialFactory access to default cstor
32 friend class PotentialFactory;
33 // some repeated typedefs to avoid ambiguities
34 typedef FunctionModel::result_t result_t;
35 typedef FunctionModel::results_t results_t;
36private:
37 /** Private default constructor.
38 *
39 * This prevents creation of potential without set ParticleTypes_t.
40 *
41 * \note PotentialFactory may use this default cstor
42 *
43 */
44 FourBodyPotential_Improper();
45
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
54public:
55 FourBodyPotential_Improper(const ParticleTypes_t &_ParticleTypes);
56 FourBodyPotential_Improper(
57 const ParticleTypes_t &_ParticleTypes,
58 const double _spring_constant,
59 const double _equilibrium_distance);
60 virtual ~FourBodyPotential_Improper() {}
61
62private:
63 /** Function to obtain angle between planes from distances.
64 *
65 */
66 result_t function_theta(
67 const double &r_ij,
68 const double &r_ik,
69 const double &r_il,
70 const double &r_jk,
71 const double &r_jl,
72 const double &r_kl
73 ) const;
74
75 /** Return the token name of this specific potential.
76 *
77 * We need to override the function in order to use a different static variable.
78 *
79 * \return token name of the potential
80 */
81 const std::string& getToken() const
82 { return improper_token; }
83
84private:
85 //!> static definitions of the parameter name for this potential
86 static const ParameterNames_t ParameterNames;
87
88 //!> static token of this potential type
89 static const std::string improper_token;
90
91 //!> internal coordinator object for converting arguments_t
92 static Coordinator::ptr coordinator;
93};
94
95#endif /* FOURBODYPOTENTIAL_IMPROPER_HPP_ */
Note: See TracBrowser for help on using the repository browser.