• 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ãoe87d80377d6fa1ecc6871824a5dcb3c35de9c374 (tree)
Hora2013-11-30 17:30:37
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Mensagem de Log

The coulomb interaction between cores of qm-atoms is refactored to use cache. #32469

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

Mudança Sumário

Diff

--- a/src/mndo/Mndo.cpp
+++ b/src/mndo/Mndo.cpp
@@ -317,11 +317,13 @@ double Mndo::GetAuxiliaryDiatomCoreRepulsionEnergy2ndDerivative(const Atom& atom
317317 double Mndo::GetDiatomCoreRepulsionEnergy(int indexAtomA, int indexAtomB) const{
318318 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
319319 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
320- double temp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA,
321- atomB,
322- this->molecule->GetDistanceAtoms(atomA, atomB));
323- double twoElecInt = this->GetNddoRepulsionIntegral(atomA, s, s, atomB, s, s);
324- return atomA.GetCoreCharge()*atomB.GetCoreCharge()*twoElecInt*temp;
320+ double tmp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA,
321+ atomB,
322+ this->molecule->GetDistanceAtoms(atomA, atomB));
323+ return atomA.GetCoreCharge()
324+ *atomB.GetCoreCharge()
325+ *this->twoElecsTwoAtomCores[indexAtomA][indexAtomB][s][s][s][s]
326+ *tmp;
325327 }
326328
327329 // First derivative of diatomic core repulsion energy.
@@ -333,13 +335,13 @@ double Mndo::GetDiatomCoreRepulsion1stDerivative(int indexAtomA,
333335 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
334336 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
335337 double distanceAB = this->molecule->GetDistanceAtoms(indexAtomA, indexAtomB);
336- double twoElecInt = this->GetNddoRepulsionIntegral(atomA, s, s, atomB, s, s);
338+ double twoElecInt = this->twoElecsTwoAtomCores[indexAtomA][indexAtomB][s][s][s][s];
337339 double twoElecInt1stDeriv = this->GetNddoRepulsionIntegral1stDerivative(
338340 atomA, s, s, atomB, s, s, axisA);
339- double temp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA, atomB, distanceAB);
340- double tempDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA, atomB, distanceAB, axisA);
341+ double tmp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA, atomB, distanceAB);
342+ double tmpDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA, atomB, distanceAB, axisA);
341343 value = atomA.GetCoreCharge()*atomB.GetCoreCharge()
342- *(twoElecInt1stDeriv*temp + twoElecInt*tempDeriv);
344+ *(twoElecInt1stDeriv*tmp + twoElecInt*tmpDeriv);
343345 return value;
344346 }
345347
@@ -353,8 +355,7 @@ double Mndo::GetDiatomCoreRepulsion2ndDerivative(int indexAtomA,
353355 const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
354356 const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
355357 double distanceAB = this->molecule->GetDistanceAtoms(indexAtomA, indexAtomB);
356- double twoElecInt = this->GetNddoRepulsionIntegral(atomA, s, s,
357- atomB, s, s);
358+ double twoElecInt = this->twoElecsTwoAtomCores[indexAtomA][indexAtomB][s][s][s][s];
358359 double twoElecInt1stDeriv1 = this->GetNddoRepulsionIntegral1stDerivative(atomA, s, s,
359360 atomB, s, s,
360361 axisA1);
@@ -366,28 +367,28 @@ double Mndo::GetDiatomCoreRepulsion2ndDerivative(int indexAtomA,
366367 axisA1,
367368 axisA2);
368369
369- double temp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA,
370- atomB,
371- distanceAB);
372- double temp1stDeriv1 = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA,
373- atomB,
374- distanceAB,
375- axisA1);
376- double temp1stDeriv2 = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA,
377- atomB,
378- distanceAB,
379- axisA2);
380- double temp2ndDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy2ndDerivative(atomA,
370+ double tmp = this->GetAuxiliaryDiatomCoreRepulsionEnergy(atomA,
371+ atomB,
372+ distanceAB);
373+ double tmp1stDeriv1 = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA,
374+ atomB,
375+ distanceAB,
376+ axisA1);
377+ double tmp1stDeriv2 = this->GetAuxiliaryDiatomCoreRepulsionEnergy1stDerivative(atomA,
381378 atomB,
382379 distanceAB,
383- axisA1,
384380 axisA2);
381+ double tmp2ndDeriv = this->GetAuxiliaryDiatomCoreRepulsionEnergy2ndDerivative(atomA,
382+ atomB,
383+ distanceAB,
384+ axisA1,
385+ axisA2);
385386
386387 value = atomA.GetCoreCharge()*atomB.GetCoreCharge();
387- value *= twoElecInt*temp2ndDeriv
388- +twoElecInt1stDeriv1*temp1stDeriv2
389- +twoElecInt1stDeriv2*temp1stDeriv1
390- +twoElecInt2ndDeriv*temp;
388+ value *= twoElecInt*tmp2ndDeriv
389+ +twoElecInt1stDeriv1*tmp1stDeriv2
390+ +twoElecInt1stDeriv2*tmp1stDeriv1
391+ +twoElecInt2ndDeriv*tmp;
391392 return value;
392393 }
393394