source: src/Potentials/Specifics/ManyBodyPotential_Tersoff.hpp@ 610c11

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
Last change on this file since 610c11 was 610c11, checked in by Frederik Heber <heber@…>, 12 years ago

Added Tersoff potential as first many-body potential.

  • Property mode set to 100644
File size: 5.1 KB
Line 
1/*
2 * ManyBodyPotential_Tersoff.hpp
3 *
4 * Created on: Sep 26, 2012
5 * Author: heber
6 */
7
8#ifndef MANYBODYPOTENTIAL_TERSOFF_HPP_
9#define MANYBODYPOTENTIAL_TERSOFF_HPP_
10
11// include config.h
12#ifdef HAVE_CONFIG_H
13#include <config.h>
14#endif
15
16#include "Potentials/EmpiricalPotential.hpp"
17
18#include <boost/function.hpp>
19#include <cmath>
20
21/** This class is the implementation of the Tersoff potential function.
22 *
23 * \note The arguments_t argument list is here in the following order:
24 * -# first \f$ r_{ij}$ \f$,
25 * -# then all \f$ r_{ik}$ \f$ that are within the cutoff, i.e. \f$ r_{ik}$ < R + D\f$
26 *
27 */
28class ManyBodyPotential_Tersoff : public EmpiricalPotential
29{
30private:
31 //!> cutoff_offset offset for cutoff parameter
32 const double cutoff_offset;
33 //!> cutoff_halfwidth half-width for cutoff parameter
34 const double cutoff_halfwidth;
35 //!> many body prefactor parameter for attractive part
36 const double manybodyparameter_A;
37 //!> many body prefactor parameter for attractive part
38 const double manybodyparameter_B;
39 //!> many body scale parameter for attractive part
40 const double manybodyparameter_lambda1;
41 //!> many body scale parameter for attractive part
42 const double manybodyparameter_lambda2;
43 //!> length scale for coordination influence
44 const double manybodyparameter_lambda3;
45 //!> many body parameter for attractive part
46 const double manybodyparameter_alpha;
47 //!> many body parameter for repulsive part
48 const double manybodyparameter_beta;
49 //!> many body type-dependent parameter giving the power
50 const double manybodyparameter_n;
51 //!> many-body type-dependent parameter in angular dependence
52 const double manybodyparameter_c;
53 //!> many-body type-dependent parameter in angular dependence
54 const double manybodyparameter_d;
55 //!> many-body type-dependent parameter in angular dependence
56 const double manybodyparameter_h;
57public:
58 /** Constructor for class ManyBodyPotential_Tersoff.
59 *
60 * @param _triplefunction function that returns a list of triples (i.e. the
61 * two remaining distances) to a given pair of points (contained as
62 * indices within the argument)
63 */
64 ManyBodyPotential_Tersoff(
65 const double _cutoff_offset,
66 const double _cutoff_halfwidth,
67 const double A,
68 const double B,
69 const double lambda1,
70 const double lambda2,
71 const double lambda3,
72 const double alpha,
73 const double beta,
74 const double n,
75 const double c,
76 const double d,
77 const double h,
78 boost::function< std::vector<arguments_t>(const argument_t &, const double)> &_triplefunction) :
79 cutoff_offset(_cutoff_offset),
80 cutoff_halfwidth(_cutoff_offset),
81 manybodyparameter_A(A),
82 manybodyparameter_B(B),
83 manybodyparameter_lambda1(lambda1),
84 manybodyparameter_lambda2(lambda2),
85 manybodyparameter_lambda3(lambda3),
86 manybodyparameter_alpha(alpha),
87 manybodyparameter_beta(beta),
88 manybodyparameter_n(n),
89 manybodyparameter_c(d),
90 manybodyparameter_d(d),
91 manybodyparameter_h(h),
92 triplefunction(_triplefunction)
93 {}
94 /** Destructor of class ManyBodyPotential_Tersoff.
95 *
96 */
97 virtual ~ManyBodyPotential_Tersoff() {}
98
99 /** Evaluates the Tersoff potential for the given arguments.
100 *
101 * @param arguments single distance
102 * @return value of the potential function
103 */
104 result_t operator()(const arguments_t &arguments) const;
105
106 /** Evaluates the derivative of the Tersoff potential with respect to the
107 * input variables.
108 *
109 * @param arguments single distance
110 * @return vector with components of the derivative
111 */
112 derivative_components_t derivative(const arguments_t &arguments) const;
113
114private:
115 /** This function represents the cutoff \f$ f_C \f$.
116 *
117 * @param distance variable of the function
118 * @return a value in [0,1].
119 */
120 result_t function_cutoff(
121 const double &distance
122 ) const;
123 /** This function has the exponential feature from the Morse potential.
124 *
125 * @param distance variable of the function
126 * @param prefactor prefactor parameter to exp function
127 * @param lambda scale parameter of exp function's argument
128 * @return
129 */
130 result_t function_smoother(
131 const double &distance,
132 const double &prefactor,
133 const double &lambda
134 ) const
135 {
136 return prefactor * exp(-lambda * distance);
137 }
138
139 /** This function represents \f$ (1 + \alpha^n \eta^n)^{-1/2n} \f$.
140 *
141 * @param alpha prefactor to eta function
142 * @param r_ij distance argument
143 * @param etafunction eta or zeta
144 * @return \f$ (1 + \alpha^n \eta^n)^{-1/2n} \f$
145 */
146 result_t function_prefactor(
147 const double &alpha,
148 boost::function<result_t()> etafunction
149 ) const;
150
151 result_t
152 function_eta(
153 const argument_t &r_ij
154 ) const;
155
156 result_t
157 function_zeta(
158 const argument_t &r_ij
159 ) const;
160
161 result_t
162 function_angle(
163 const double &r_ij,
164 const double &r_ik,
165 const double &r_jk
166 ) const;
167
168private:
169 //!> bound function that obtains the triples for the internal coordinationb summation.
170 const boost::function< std::vector< arguments_t >(const argument_t &, const double)> &triplefunction;
171};
172
173
174#endif /* MANYBODYPOTENTIAL_TERSOFF_HPP_ */
Note: See TracBrowser for help on using the repository browser.