• 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

Revisión2357dd34c881b4d9d1b1a86047009d94b90a41ac (tree)
Tiempo2012-06-03 23:11:34
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Implementation of Mndo::GetSemiEmpiricalMultipoleInteractionSecondDerivative. #28554

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

Cambiar Resumen

Diferencia incremental

--- a/src/am1/Am1.cpp
+++ b/src/am1/Am1.cpp
@@ -79,6 +79,8 @@ void Am1::SetMessages(){
7979 = "Error in am1:: Am1::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n";
8080 this->errorMessageGetSemiEmpiricalMultipoleInteractionFirstDeriBadMultipoles
8181 = "Error in am1:: Am1::GetSemiEmpiricalMultipoleInteractionFirstDerivative: Bad multipole combintaion is set\n";
82+ this->errorMessageGetSemiEmpiricalMultipoleInteractionSecondDeriBadMultipoles
83+ = "Error in am1:: Am1::GetSemiEmpiricalMultipoleInteractionSecondDerivative: Bad multipole combintaion is set\n";
8284 this->errorMessageGetNddoRepulsionIntegral
8385 = "Error in am1::Am1::GetNddoRepulsionIntegral: Bad orbital is set.\n";
8486 this->errorMessageGetNddoRepulsionIntegralFirstDerivative
--- a/src/am1/Am1D.cpp
+++ b/src/am1/Am1D.cpp
@@ -81,6 +81,8 @@ void Am1D::SetMessages(){
8181 = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n";
8282 this->errorMessageGetSemiEmpiricalMultipoleInteractionFirstDeriBadMultipoles
8383 = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteractionFirstDerivative: Bad multipole combintaion is set\n";
84+ this->errorMessageGetSemiEmpiricalMultipoleInteractionSecondDeriBadMultipoles
85+ = "Error in am1::Am1D::GetSemiEmpiricalMultipoleInteractionSecondDerivative: Bad multipole combintaion is set\n";
8486 this->errorMessageGetNddoRepulsionIntegral
8587 = "Error in am1::Am1D::GetNddoRepulsionIntegral: Bad orbital is set.\n";
8688 this->errorMessageGetNddoRepulsionIntegralFirstDerivative
--- a/src/mndo/Mndo.cpp
+++ b/src/mndo/Mndo.cpp
@@ -110,6 +110,8 @@ void Mndo::SetMessages(){
110110 = "Error in mndo:: Mndo::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n";
111111 this->errorMessageGetSemiEmpiricalMultipoleInteractionFirstDeriBadMultipoles
112112 = "Error in mndo:: Mndo::GetSemiEmpiricalMultipoleInteractionFirstDerivative: Bad multipole combintaion is set\n";
113+ this->errorMessageGetSemiEmpiricalMultipoleInteractionSecondDeriBadMultipoles
114+ = "Error in mndo:: Mndo::GetSemiEmpiricalMultipoleInteractionSecondDerivative: Bad multipole combintaion is set\n";
113115 this->errorMessageMultipoleA = "Multipole A is: ";
114116 this->errorMessageMultipoleB = "Multipole B is: ";
115117 this->errorMessageGetNddoRepulsionIntegral
@@ -4572,6 +4574,415 @@ double Mndo::GetSemiEmpiricalMultipoleInteractionFirstDerivative(
45724574 }
45734575 return value;
45744576 }
4577+// Second derivative of semiempirical multipole-multipole interactions.
4578+// This derivativ is related to the nuclear distance Rab.
4579+// See Apendix in [DT_1977]
4580+double Mndo::GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4581+ MultipoleType multipoleA,
4582+ MultipoleType multipoleB,
4583+ double rhoA,
4584+ double rhoB,
4585+ double DA,
4586+ double DB,
4587+ double Rab) const{
4588+ double value = 0.0;
4589+ double a = rhoA + rhoB;
4590+
4591+ // Eq. (52) in [DT_1977]
4592+ if(multipoleA == sQ && multipoleB == sQ){
4593+ double c1 = 1.0;
4594+ double f1 = pow(Rab,2.0);
4595+ double a1 = pow(a,2.0);
4596+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4597+ }
4598+ // Eq. (53) in [DT_1977]
4599+ else if(multipoleA == sQ && multipoleB == muz){
4600+ double c1 = 0.5;
4601+ double c2 = -0.5;
4602+ double f1 = pow(Rab+DB,2.0);
4603+ double f2 = pow(Rab-DB,2.0);
4604+ double a1 = pow(a,2.0);
4605+ double a2 = pow(a,2.0);
4606+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4607+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4608+ }
4609+ else if(multipoleA == muz && multipoleB == sQ){
4610+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4611+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4612+ value *= pow(-1.0,1.0);
4613+ }
4614+ // Eq. (54) in [DT_1977]
4615+ else if(multipoleA == sQ && multipoleB == Qxx){
4616+ double c1 = 0.5;
4617+ double c2 = -0.5;
4618+ double f1 = pow(Rab,2.0);
4619+ double f2 = pow(Rab,2.0);
4620+ double a1 = pow(2.0*DB,2.0) + pow(a,2.0);
4621+ double a2 = pow(a,2.0);
4622+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4623+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4624+ }
4625+ else if(multipoleA == Qxx && multipoleB == sQ){
4626+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4627+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4628+ value *= pow(-1.0,2.0);
4629+ }
4630+ else if(multipoleA == sQ && multipoleB == Qyy){
4631+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4632+ multipoleA, Qxx, rhoA, rhoB, DA, DB, Rab);
4633+ }
4634+ else if(multipoleA == Qyy && multipoleB == sQ){
4635+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4636+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4637+ value *= pow(-1.0,2.0);
4638+ }
4639+ // Eq. (55) in [DT_1977]
4640+ else if(multipoleA == sQ && multipoleB == Qzz){
4641+ double c1 = 0.25;
4642+ double c2 = -0.50;
4643+ double c3 = 0.25;
4644+ double f1 = pow(Rab+2.0*DB,2.0);
4645+ double f2 = pow(Rab,2.0);
4646+ double f3 = pow(Rab-2.0*DB,2.0);
4647+ double a1 = pow(a,2.0);
4648+ double a2 = pow(a,2.0);
4649+ double a3 = pow(a,2.0);
4650+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4651+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4652+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4653+ }
4654+ else if(multipoleA == Qzz && multipoleB == sQ){
4655+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4656+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4657+ value *= pow(-1.0,2.0);
4658+ }
4659+ // Eq. (56) in [DT_1977]
4660+ else if(multipoleA == mux && multipoleB == mux){
4661+ double c1 = 0.50;
4662+ double c2 = -0.50;
4663+ double f1 = pow(Rab,2.0);
4664+ double f2 = pow(Rab,2.0);
4665+ double a1 = pow(DA-DB,2.0) + pow(a,2.0);
4666+ double a2 = pow(DA+DB,2.0) + pow(a,2.0);
4667+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4668+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4669+ }
4670+ else if(multipoleA == muy && multipoleB == muy){
4671+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4672+ mux, mux, rhoA, rhoB, DA, DB, Rab);
4673+ }
4674+ // Eq. (57) in [DT_1977]
4675+ else if(multipoleA == muz && multipoleB == muz){
4676+ double c1 = 0.25;
4677+ double c2 = -0.25;
4678+ double c3 = -0.25;
4679+ double c4 = 0.25;
4680+ double f1 = pow(Rab+DA-DB,2.0);
4681+ double f2 = pow(Rab+DA+DB,2.0);
4682+ double f3 = pow(Rab-DA-DB,2.0);
4683+ double f4 = pow(Rab-DA+DB,2.0);
4684+ double a1 = pow(a,2.0);
4685+ double a2 = pow(a,2.0);
4686+ double a3 = pow(a,2.0);
4687+ double a4 = pow(a,2.0);
4688+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4689+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4690+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4691+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4692+ }
4693+ // Eq. (58) in [DT_1977]
4694+ else if(multipoleA == mux && multipoleB == Qxz){
4695+ double c1 = -0.25;
4696+ double c2 = 0.25;
4697+ double c3 = 0.25;
4698+ double c4 = -0.25;
4699+ double f1 = pow(Rab-DB,2.0);
4700+ double f2 = pow(Rab-DB,2.0);
4701+ double f3 = pow(Rab+DB,2.0);
4702+ double f4 = pow(Rab+DB,2.0);
4703+ double a1 = pow(DA-DB,2.0) + pow(a,2.0);
4704+ double a2 = pow(DA+DB,2.0) + pow(a,2.0);
4705+ double a3 = pow(DA-DB,2.0) + pow(a,2.0);
4706+ double a4 = pow(DA+DB,2.0) + pow(a,2.0);
4707+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4708+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4709+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4710+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4711+ }
4712+ else if(multipoleA == Qxz && multipoleB == mux){
4713+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4714+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4715+ value *= pow(-1.0,3.0);
4716+ }
4717+ else if(multipoleA == muy && multipoleB == Qyz){
4718+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4719+ mux, Qxz, rhoA, rhoB, DA, DB, Rab);
4720+ }
4721+ else if(multipoleA == Qyz && multipoleB == muy){
4722+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4723+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4724+ value *= pow(-1.0,3.0);
4725+ }
4726+ // Eq. (59) in [DT_1977]
4727+ else if(multipoleA == muz && multipoleB == Qxx){
4728+ double c1 = -0.25;
4729+ double c2 = 0.25;
4730+ double c3 = 0.25;
4731+ double c4 = -0.25;
4732+ double f1 = pow(Rab+DA,2.0);
4733+ double f2 = pow(Rab-DA,2.0);
4734+ double f3 = pow(Rab+DA,2.0);
4735+ double f4 = pow(Rab-DA,2.0);
4736+ double a1 = pow(2.0*DB,2.0) + pow(a,2.0);
4737+ double a2 = pow(2.0*DB,2.0) + pow(a,2.0);
4738+ double a3 = pow(a,2.0);
4739+ double a4 = pow(a,2.0);
4740+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4741+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4742+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4743+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4744+ }
4745+ else if(multipoleA == Qxx && multipoleB == muz){
4746+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4747+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4748+ value *= pow(-1.0,3.0);
4749+ }
4750+ else if(multipoleA == muz && multipoleB == Qyy){
4751+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4752+ muz, Qxx, rhoA, rhoB, DA, DB, Rab);
4753+ }
4754+ else if(multipoleA == Qyy && multipoleB == muz){
4755+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4756+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4757+ value *= pow(-1.0,3.0);
4758+ }
4759+ // Eq. (60) in [DT_1977]
4760+ else if(multipoleA == muz && multipoleB == Qzz){
4761+ double c1 = -0.125;
4762+ double c2 = 0.125;
4763+ double c3 = -0.125;
4764+ double c4 = 0.125;
4765+ double c5 = 0.25;
4766+ double c6 = -0.25;
4767+ double f1 = pow(Rab+DA-2.0*DB,2.0);
4768+ double f2 = pow(Rab-DA-2.0*DB,2.0);
4769+ double f3 = pow(Rab+DA+2.0*DB,2.0);
4770+ double f4 = pow(Rab-DA+2.0*DB,2.0);
4771+ double f5 = pow(Rab+DA,2.0);
4772+ double f6 = pow(Rab-DA,2.0);
4773+ double a1 = pow(a,2.0);
4774+ double a2 = pow(a,2.0);
4775+ double a3 = pow(a,2.0);
4776+ double a4 = pow(a,2.0);
4777+ double a5 = pow(a,2.0);
4778+ double a6 = pow(a,2.0);
4779+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4780+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4781+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4782+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4783+ value += c5*(3.0*f5*pow(f5+a5,-2.5) - pow(f5+a5,-1.5));
4784+ value += c6*(3.0*f6*pow(f6+a6,-2.5) - pow(f6+a6,-1.5));
4785+ }
4786+ else if(multipoleA == Qzz && multipoleB == muz){
4787+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4788+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4789+ value *= pow(-1.0,3.0);
4790+ }
4791+ // Eq. (61) in [DT_1977]
4792+ else if(multipoleA == Qxx && multipoleB == Qxx){
4793+ double c1 = 0.125;
4794+ double c2 = 0.125;
4795+ double c3 = -0.25;
4796+ double c4 = -0.25;
4797+ double c5 = 0.25;
4798+ double f1 = pow(Rab,2.0);
4799+ double f2 = pow(Rab,2.0);
4800+ double f3 = pow(Rab,2.0);
4801+ double f4 = pow(Rab,2.0);
4802+ double f5 = pow(Rab,2.0);
4803+ double a1 = 4.0*pow(DA-DB,2.0) + pow(a,2.0);
4804+ double a2 = 4.0*pow(DA+DB,2.0) + pow(a,2.0);
4805+ double a3 = pow(2.0*DA,2.0) + pow(a,2.0);
4806+ double a4 = pow(2.0*DB,2.0) + pow(a,2.0);
4807+ double a5 = pow(a,2.0);
4808+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4809+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4810+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4811+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4812+ value += c5*(3.0*f5*pow(f5+a5,-2.5) - pow(f5+a5,-1.5));
4813+ }
4814+ else if(multipoleA == Qyy && multipoleB == Qyy){
4815+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4816+ Qxx, Qxx, rhoA, rhoB, DA, DB, Rab);
4817+ }
4818+ // Eq. (62) in [DT_1977]
4819+ else if(multipoleA == Qxx && multipoleB == Qyy){
4820+ double c1 = 0.25;
4821+ double c2 = -0.25;
4822+ double c3 = -0.25;
4823+ double c4 = 0.25;
4824+ double f1 = pow(Rab,2.0);
4825+ double f2 = pow(Rab,2.0);
4826+ double f3 = pow(Rab,2.0);
4827+ double f4 = pow(Rab,2.0);
4828+ double a1 = pow(2.0*DA,2.0) + pow(2.0*DB,2.0) + pow(a,2.0);
4829+ double a2 = pow(2.0*DA,2.0) + pow(a,2.0);
4830+ double a3 = pow(2.0*DB,2.0) + pow(a,2.0);
4831+ double a4 = pow(a,2.0);
4832+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4833+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4834+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4835+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4836+ }
4837+ else if(multipoleA == Qyy && multipoleB == Qxx){
4838+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4839+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4840+ value *= pow(-1.0,4.0);
4841+ }
4842+ // Eq. (63) in [DT_1977]
4843+ else if(multipoleA == Qxx && multipoleB == Qzz){
4844+ double c1 = 0.125;
4845+ double c2 = 0.125;
4846+ double c3 = -0.125;
4847+ double c4 = -0.125;
4848+ double c5 = -0.25;
4849+ double c6 = 0.25;
4850+ double f1 = pow(Rab-2.0*DB,2.0);
4851+ double f2 = pow(Rab+2.0*DB,2.0);
4852+ double f3 = pow(Rab-2.0*DB,2.0);
4853+ double f4 = pow(Rab+2.0*DB,2.0);
4854+ double f5 = pow(Rab ,2.0);
4855+ double f6 = pow(Rab ,2.0);
4856+ double a1 = pow(2.0*DA,2.0) + pow(a,2.0);
4857+ double a2 = pow(2.0*DA,2.0) + pow(a,2.0);
4858+ double a3 = pow(a,2.0);
4859+ double a4 = pow(a,2.0);
4860+ double a5 = pow(2.0*DA,2.0) + pow(a,2.0);
4861+ double a6 = pow(a,2.0);
4862+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4863+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4864+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4865+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4866+ value += c5*(3.0*f5*pow(f5+a5,-2.5) - pow(f5+a5,-1.5));
4867+ value += c6*(3.0*f6*pow(f6+a6,-2.5) - pow(f6+a6,-1.5));
4868+ }
4869+ else if(multipoleA == Qzz && multipoleB == Qxx){
4870+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4871+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4872+ value *= pow(-1.0,4.0);
4873+ }
4874+ else if(multipoleA == Qyy && multipoleB == Qzz){
4875+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4876+ Qxx, multipoleB, rhoA, rhoB, DA, DB, Rab);
4877+ }
4878+ else if(multipoleA == Qzz && multipoleB == Qyy){
4879+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4880+ multipoleB, multipoleA, rhoB, rhoA, DB, DA, Rab);
4881+ value *= pow(-1.0,4.0);
4882+ }
4883+ // Eq. (64) in [DT_1977]
4884+ else if(multipoleA == Qzz && multipoleB == Qzz){
4885+ double c1 = 0.0625;
4886+ double c2 = 0.0625;
4887+ double c3 = 0.0625;
4888+ double c4 = 0.0625;
4889+ double c5 = -0.125;
4890+ double c6 = -0.125;
4891+ double c7 = -0.125;
4892+ double c8 = -0.125;
4893+ double c9 = 0.25;
4894+ double f1 = pow(Rab+2.0*DA-2.0*DB,2.0);
4895+ double f2 = pow(Rab+2.0*DA+2.0*DB,2.0);
4896+ double f3 = pow(Rab-2.0*DA-2.0*DB,2.0);
4897+ double f4 = pow(Rab-2.0*DA+2.0*DB,2.0);
4898+ double f5 = pow(Rab+2.0*DA ,2.0);
4899+ double f6 = pow(Rab-2.0*DA ,2.0);
4900+ double f7 = pow(Rab+2.0*DB ,2.0);
4901+ double f8 = pow(Rab-2.0*DB ,2.0);
4902+ double f9 = pow(Rab ,2.0);
4903+ double a1 = pow(a,2.0);
4904+ double a2 = pow(a,2.0);
4905+ double a3 = pow(a,2.0);
4906+ double a4 = pow(a,2.0);
4907+ double a5 = pow(a,2.0);
4908+ double a6 = pow(a,2.0);
4909+ double a7 = pow(a,2.0);
4910+ double a8 = pow(a,2.0);
4911+ double a9 = pow(a,2.0);
4912+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4913+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4914+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4915+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4916+ value += c5*(3.0*f5*pow(f5+a5,-2.5) - pow(f5+a5,-1.5));
4917+ value += c6*(3.0*f6*pow(f6+a6,-2.5) - pow(f6+a6,-1.5));
4918+ value += c7*(3.0*f7*pow(f7+a7,-2.5) - pow(f7+a7,-1.5));
4919+ value += c8*(3.0*f8*pow(f8+a8,-2.5) - pow(f8+a8,-1.5));
4920+ value += c9*(3.0*f9*pow(f9+a9,-2.5) - pow(f9+a9,-1.5));
4921+ }
4922+ // Eq. (65) in [DT_1977]
4923+ else if(multipoleA == Qxz && multipoleB == Qxz){
4924+ double c1 = 0.125;
4925+ double c2 = -0.125;
4926+ double c3 = -0.125;
4927+ double c4 = 0.125;
4928+ double c5 = -0.125;
4929+ double c6 = 0.125;
4930+ double c7 = 0.125;
4931+ double c8 = -0.125;
4932+ double f1 = pow(Rab+DA-DB,2.0);
4933+ double f2 = pow(Rab+DA-DB,2.0);
4934+ double f3 = pow(Rab+DA+DB,2.0);
4935+ double f4 = pow(Rab+DA+DB,2.0);
4936+ double f5 = pow(Rab-DA-DB,2.0);
4937+ double f6 = pow(Rab-DA-DB,2.0);
4938+ double f7 = pow(Rab-DA+DB,2.0);
4939+ double f8 = pow(Rab-DA+DB,2.0);
4940+ double a1 = pow(DA-DB,2.0) + pow(a,2.0);
4941+ double a2 = pow(DA+DB,2.0) + pow(a,2.0);
4942+ double a3 = pow(DA-DB,2.0) + pow(a,2.0);
4943+ double a4 = pow(DA+DB,2.0) + pow(a,2.0);
4944+ double a5 = pow(DA-DB,2.0) + pow(a,2.0);
4945+ double a6 = pow(DA+DB,2.0) + pow(a,2.0);
4946+ double a7 = pow(DA-DB,2.0) + pow(a,2.0);
4947+ double a8 = pow(DA+DB,2.0) + pow(a,2.0);
4948+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4949+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4950+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4951+ value += c4*(3.0*f4*pow(f4+a4,-2.5) - pow(f4+a4,-1.5));
4952+ value += c5*(3.0*f5*pow(f5+a5,-2.5) - pow(f5+a5,-1.5));
4953+ value += c6*(3.0*f6*pow(f6+a6,-2.5) - pow(f6+a6,-1.5));
4954+ value += c7*(3.0*f7*pow(f7+a7,-2.5) - pow(f7+a7,-1.5));
4955+ value += c8*(3.0*f8*pow(f8+a8,-2.5) - pow(f8+a8,-1.5));
4956+ }
4957+ else if(multipoleA == Qyz && multipoleB == Qyz){
4958+ value = this->GetSemiEmpiricalMultipoleInteractionSecondDerivative(
4959+ Qxz, Qxz, rhoA, rhoB, DA, DB, Rab);
4960+ }
4961+ // Eq. (66) in [DT_1977]
4962+ else if(multipoleA == Qxy && multipoleB == Qxy){
4963+ double c1 = 0.25;
4964+ double c2 = 0.25;
4965+ double c3 = -0.50;
4966+ double f1 = pow(Rab,2.0);
4967+ double f2 = pow(Rab,2.0);
4968+ double f3 = pow(Rab,2.0);
4969+ double a1 = 2.0*pow(DA-DB,2.0) + pow(a,2.0);
4970+ double a2 = 2.0*pow(DA+DB,2.0) + pow(a,2.0);
4971+ double a3 = 2.0*pow(DA,2.0) + 2.0*pow(DB,2.0) + pow(a,2.0);
4972+ value = c1*(3.0*f1*pow(f1+a1,-2.5) - pow(f1+a1,-1.5));
4973+ value += c2*(3.0*f2*pow(f2+a2,-2.5) - pow(f2+a2,-1.5));
4974+ value += c3*(3.0*f3*pow(f3+a3,-2.5) - pow(f3+a3,-1.5));
4975+ }
4976+ else{
4977+ stringstream ss;
4978+ ss << this->errorMessageGetSemiEmpiricalMultipoleInteractionSecondDeriBadMultipoles;
4979+ ss << this->errorMessageMultipoleA << MultipoleTypeStr(multipoleA) << endl;
4980+ ss << this->errorMessageMultipoleB << MultipoleTypeStr(multipoleB) << endl;
4981+ throw MolDSException(ss.str());
4982+ }
4983+ return value;
4984+}
4985+
45754986 }
45764987
45774988
--- a/src/mndo/Mndo.h
+++ b/src/mndo/Mndo.h
@@ -32,6 +32,7 @@ public:
3232 protected:
3333 std::string errorMessageGetSemiEmpiricalMultipoleInteractionBadMultipoles;
3434 std::string errorMessageGetSemiEmpiricalMultipoleInteractionFirstDeriBadMultipoles;
35+ std::string errorMessageGetSemiEmpiricalMultipoleInteractionSecondDeriBadMultipoles;
3536 std::string errorMessageGetNddoRepulsionIntegral;
3637 std::string errorMessageGetNddoRepulsionIntegralFirstDerivative;
3738 std::string errorMessageCalcTwoElecTwoCoreDiatomicNullMatrix;
@@ -237,6 +238,14 @@ private:
237238 double DA,
238239 double DB,
239240 double Rab) const;
241+ double GetSemiEmpiricalMultipoleInteractionSecondDerivative(
242+ MolDS_base::MultipoleType multipoleA,
243+ MolDS_base::MultipoleType multipoleB,
244+ double rhoA,
245+ double rhoB,
246+ double DA,
247+ double DB,
248+ double Rab) const;
240249 void FreeCalcForceTempMatrices(double**** overlapDer,
241250 double****** twoElecTwoCoreFirstDeriv) const;
242251 void CalcForceSCFElecCoreAttractionPart(double* force,
--- a/src/pm3/Pm3.cpp
+++ b/src/pm3/Pm3.cpp
@@ -81,6 +81,8 @@ void Pm3::SetMessages(){
8181 = "Error in pm3:: Pm3::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n";
8282 this->errorMessageGetSemiEmpiricalMultipoleInteractionFirstDeriBadMultipoles
8383 = "Error in pm3:: Pm3::GetSemiEmpiricalMultipoleInteractionFirstDerivative: Bad multipole combintaion is set\n";
84+ this->errorMessageGetSemiEmpiricalMultipoleInteractionSecondDeriBadMultipoles
85+ = "Error in pm3:: Pm3::GetSemiEmpiricalMultipoleInteractionSecondDerivative: Bad multipole combintaion is set\n";
8486 this->errorMessageGetNddoRepulsionIntegral
8587 = "Error in pm3::Pm3::GetNddoRepulsionIntegral: Bad orbital is set.\n";
8688 this->errorMessageGetNddoRepulsionIntegralFirstDerivative
--- a/src/pm3/Pm3D.cpp
+++ b/src/pm3/Pm3D.cpp
@@ -82,6 +82,8 @@ void Pm3D::SetMessages(){
8282 = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n";
8383 this->errorMessageGetSemiEmpiricalMultipoleInteractionFirstDeriBadMultipoles
8484 = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteractionFirstDerivative: Bad multipole combintaion is set\n";
85+ this->errorMessageGetSemiEmpiricalMultipoleInteractionSecondDeriBadMultipoles
86+ = "Error in pm3::Pm3D::GetSemiEmpiricalMultipoleInteractionSecondDerivative: Bad multipole combintaion is set\n";
8587 this->errorMessageGetNddoRepulsionIntegral
8688 = "Error in pm3::Pm3D::GetNddoRepulsionIntegral: Bad orbital is set.\n";
8789 this->errorMessageGetNddoRepulsionIntegralFirstDerivative
--- a/src/pm3/Pm3Pddg.cpp
+++ b/src/pm3/Pm3Pddg.cpp
@@ -82,6 +82,8 @@ void Pm3Pddg::SetMessages(){
8282 = "Error in pm3:: Pm3Pddg::GetSemiEmpiricalMultipoleInteraction: Bad multipole combintaion is set\n";
8383 this->errorMessageGetSemiEmpiricalMultipoleInteractionFirstDeriBadMultipoles
8484 = "Error in pm3:: Pm3Pddg::GetSemiEmpiricalMultipoleInteractionFirstDerivative: Bad multipole combintaion is set\n";
85+ this->errorMessageGetSemiEmpiricalMultipoleInteractionSecondDeriBadMultipoles
86+ = "Error in pm3:: Pm3Pddg::GetSemiEmpiricalMultipoleInteractionSecondDerivative: Bad multipole combintaion is set\n";
8587 this->errorMessageGetNddoRepulsionIntegral
8688 = "Error in pm3::Pm3Pddg::GetNddoRepulsionIntegral: Bad orbital is set.\n";
8789 this->errorMessageGetNddoRepulsionIntegralFirstDerivative