Révision | fc17c758f1b336fcf4b24b6a9e180e18f9e36d17 (tree) |
---|---|
l'heure | 2013-05-29 02:03:02 |
Auteur | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
Some methods in Am1 are inlined. #30621
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@1357 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -123,18 +123,6 @@ void Am1::SetEnableAtomTypes(){ | ||
123 | 123 | this->enableAtomTypes.push_back(S); |
124 | 124 | } |
125 | 125 | |
126 | -double Am1::GetAdditionalDiatomCoreRepulsionTerm(double k, double l, double m, double distance) const{ | |
127 | - return k*exp(-l*pow(distance-m,2.0)); | |
128 | -} | |
129 | - | |
130 | -double Am1::GetAdditionalDiatomCoreRepulsionTerm1stDerivative(double k, double l, double m, double distance) const{ | |
131 | - return -2.0*l*(distance-m)*k*exp(-l*pow(distance-m,2.0)); | |
132 | -} | |
133 | - | |
134 | -double Am1::GetAdditionalDiatomCoreRepulsionTerm2ndDerivative(double k, double l, double m, double distance) const{ | |
135 | - return (-2.0*l + pow(2.0*l*(distance-m),2.0))*k*exp(-l*pow(distance-m,2.0)); | |
136 | -} | |
137 | - | |
138 | 126 | double Am1::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const{ |
139 | 127 | // MNDO term |
140 | 128 | double mndoTerm = Mndo::GetDiatomCoreRepulsionEnergy(indexAtomA, indexAtomB); |
@@ -41,9 +41,15 @@ protected: | ||
41 | 41 | MolDS_base::CartesianType axisA1, |
42 | 42 | MolDS_base::CartesianType axisA2) const; |
43 | 43 | private: |
44 | - double GetAdditionalDiatomCoreRepulsionTerm(double k, double l, double m, double distance) const; | |
45 | - double GetAdditionalDiatomCoreRepulsionTerm1stDerivative(double k, double l, double m, double distance) const; | |
46 | - double GetAdditionalDiatomCoreRepulsionTerm2ndDerivative(double k, double l, double m, double distance) const; | |
44 | + inline double GetAdditionalDiatomCoreRepulsionTerm (double k, double l, double m, double distance) const{ | |
45 | + return k*exp(-l*pow(distance-m,2.0)); | |
46 | + } | |
47 | + inline double GetAdditionalDiatomCoreRepulsionTerm1stDerivative(double k, double l, double m, double distance) const{ | |
48 | + return -2.0*l*(distance-m)*k*exp(-l*pow(distance-m,2.0)); | |
49 | + } | |
50 | + inline double GetAdditionalDiatomCoreRepulsionTerm2ndDerivative(double k, double l, double m, double distance) const{ | |
51 | + return (-2.0*l + pow(2.0*l*(distance-m),2.0))*k*exp(-l*pow(distance-m,2.0)); | |
52 | + } | |
47 | 53 | }; |
48 | 54 | |
49 | 55 | } |