• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisãobde032db0299f0a8e5fa50623051c58456472c19 (tree)
Hora2012-07-03 01:13:07
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Mensagem de Log

Cndo2::GetDiatomVdWCorrectionEnergyFirstDerivative is refactored. #28554

git-svn-id: https://svn.sourceforge.jp/svnroot/molds/trunk@859 1136aad2-a195-0410-b898-f5ea1d11b9d8

Mudança Sumário

Diff

--- a/src/cndo/Cndo2.cpp
+++ b/src/cndo/Cndo2.cpp
@@ -335,6 +335,15 @@ double Cndo2::GetVdwDampingValue(double vdWDistance, double distance) const{
335335 double dampingFactor = Parameters::GetInstance()->GetVdWDampingFactorSCF();
336336 return 1.0/(1.0+exp(-1.0*dampingFactor*(distance/vdWDistance - 1.0)));
337337 }
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+
338347 // See (2) in [G_2004] ((11) in [G_2006])
339348 double Cndo2::GetDiatomVdWCorrectionEnergy(int indexAtomA, int indexAtomB) const{
340349 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
@@ -359,10 +368,8 @@ double Cndo2::GetDiatomVdWCorrectionFirstDerivative(int indexAtomA, int indexAto
359368 double vdWCoefficients = 2.0*atomA.GetVdWCoefficient()*atomB.GetVdWCoefficient()
360369 /(atomA.GetVdWCoefficient()+atomB.GetVdWCoefficient());
361370 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);
366373 double value=0.0;
367374 value += 6.0*pow(distance,-7.0)*damping - pow(distance,-6.0)*dampingFirstDerivative;
368375 value *= vdWCoefficients;
--- a/src/cndo/Cndo2.h
+++ b/src/cndo/Cndo2.h
@@ -260,6 +260,7 @@ private:
260260 void CalcCoreRepulsionEnergy();
261261 void CalcVdWCorrectionEnergy();
262262 double GetVdwDampingValue(double vdWDistance, double distance) const;
263+ double GetVdwDampingValueFirstDerivative(double vdWDistance, double distance) const;
263264 void CalcElectronicDipoleMomentGroundState(double*** electronicTransitionDipoleMoments,
264265 double const* const* const* cartesianMatrix,
265266 const MolDS_base::Molecule& molecule,