Revisión | bde032db0299f0a8e5fa50623051c58456472c19 (tree) |
---|---|
Tiempo | 2012-07-03 01:13:07 |
Autor | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
Cndo2::GetDiatomVdWCorrectionEnergyFirstDerivative is refactored. #28554
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@859 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -335,6 +335,15 @@ double Cndo2::GetVdwDampingValue(double vdWDistance, double distance) const{ | ||
335 | 335 | double dampingFactor = Parameters::GetInstance()->GetVdWDampingFactorSCF(); |
336 | 336 | return 1.0/(1.0+exp(-1.0*dampingFactor*(distance/vdWDistance - 1.0))); |
337 | 337 | } |
338 | + | |
339 | +// See damping function in (2) in [G_2004] ((11) in [G_2006]) | |
340 | +double Cndo2::GetVdwDampingValueFirstDerivative(double vdWDistance, double distance) const{ | |
341 | + double dampingFactor = Parameters::GetInstance()->GetVdWDampingFactorSCF(); | |
342 | + return (dampingFactor/vdWDistance) | |
343 | + *exp(-1.0*dampingFactor*(distance/vdWDistance - 1.0)) | |
344 | + *pow(1.0+exp(-1.0*dampingFactor*(distance/vdWDistance - 1.0)),-2.0); | |
345 | +} | |
346 | + | |
338 | 347 | // See (2) in [G_2004] ((11) in [G_2006]) |
339 | 348 | double Cndo2::GetDiatomVdWCorrectionEnergy(int indexAtomA, int indexAtomB) const{ |
340 | 349 | const Atom& atomA = *this->molecule->GetAtom(indexAtomA); |
@@ -359,10 +368,8 @@ double Cndo2::GetDiatomVdWCorrectionFirstDerivative(int indexAtomA, int indexAto | ||
359 | 368 | double vdWCoefficients = 2.0*atomA.GetVdWCoefficient()*atomB.GetVdWCoefficient() |
360 | 369 | /(atomA.GetVdWCoefficient()+atomB.GetVdWCoefficient()); |
361 | 370 | double dampingFactor = Parameters::GetInstance()->GetVdWDampingFactorSCF(); |
362 | - double damping = 1.0/(1.0+exp(-1.0*dampingFactor*(distance/vdWDistance - 1.0))); | |
363 | - double dampingFirstDerivative = (dampingFactor/vdWDistance) | |
364 | - *exp(-1.0*dampingFactor*(distance/vdWDistance - 1.0)) | |
365 | - *pow(1.0+exp(-1.0*dampingFactor*(distance/vdWDistance - 1.0)),-2.0); | |
371 | + double damping = this->GetVdwDampingValue(vdWDistance, distance); | |
372 | + double dampingFirstDerivative = this->GetVdwDampingValueFirstDerivative(vdWDistance, distance); | |
366 | 373 | double value=0.0; |
367 | 374 | value += 6.0*pow(distance,-7.0)*damping - pow(distance,-6.0)*dampingFirstDerivative; |
368 | 375 | value *= vdWCoefficients; |
@@ -260,6 +260,7 @@ private: | ||
260 | 260 | void CalcCoreRepulsionEnergy(); |
261 | 261 | void CalcVdWCorrectionEnergy(); |
262 | 262 | double GetVdwDampingValue(double vdWDistance, double distance) const; |
263 | + double GetVdwDampingValueFirstDerivative(double vdWDistance, double distance) const; | |
263 | 264 | void CalcElectronicDipoleMomentGroundState(double*** electronicTransitionDipoleMoments, |
264 | 265 | double const* const* const* cartesianMatrix, |
265 | 266 | const MolDS_base::Molecule& molecule, |