• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

修订版592284608ac794c52cea232f74f41bbfa41ae1cf (tree)
时间2013-05-22 07:32:17
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

ZindoS::CalcForce for excited states is paritally implemented although not completed yet. #31221

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

更改概述

差异

--- a/src/zindo/ZindoS.cpp
+++ b/src/zindo/ZindoS.cpp
@@ -3937,6 +3937,31 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
39373937 // excited state force
39383938 for(int n=0; n<elecStates.size(); n++){
39393939 if(elecStates[n]<=0){continue;}
3940+ // static part
3941+ double forceExcitedStaticPart[CartesianType_end] = {0.0,0.0,0.0};
3942+ this->CalcForceExcitedStaticPart(forceExcitedStaticPart,
3943+ n,
3944+ a,
3945+ b,
3946+ diatomicTwoElecTwoCore1stDerivs);
3947+ // sum up contributions from static part (excited state)
3948+#pragma omp critical
3949+ {
3950+ for(int i=0; i<CartesianType_end; i++){
3951+ this->matrixForce[n][b][i] += forceExcitedStaticPart[i];
3952+ this->matrixForce[n][a][i] -= forceExcitedStaticPart[i];
3953+ }
3954+ }
3955+
3956+ // response part
3957+ // electron core attraction part (excited state)
3958+ double forceExcitedElecCoreAttPart[CartesianType_end]={0.0,0.0,0.0};
3959+ this->CalcForceExcitedElecCoreAttractionPart(
3960+ forceExcitedElecCoreAttPart,
3961+ n,
3962+ a,
3963+ b,
3964+ diatomicTwoElecTwoCore1stDerivs);
39403965 }
39413966 } // end of for(int b)
39423967 } // end of for(int a)
@@ -3960,7 +3985,8 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
39603985 }
39613986
39623987 /*
3963- // Calculate force. First derivative of overlapAOs integral is
3988+ // Calculate force (on the ground state only).
3989+ // First derivative of overlapAOs integral is
39643990 // calculated with GTO expansion technique.
39653991 stringstream ompErrors;
39663992 #pragma omp parallel for schedule(auto)
@@ -4040,5 +4066,52 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
40404066 }
40414067 */
40424068 }
4069+
4070+void ZindoS::CalcForceExcitedStaticPart(double* force,
4071+ int elecStateIndex,
4072+ int indexAtomA,
4073+ int indexAtomB,
4074+ double const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
4075+ const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
4076+ const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
4077+ int firstAOIndexA = atomA.GetFirstAOIndex();
4078+ int firstAOIndexB = atomB.GetFirstAOIndex();
4079+ int lastAOIndexA = atomA.GetLastAOIndex();
4080+ int lastAOIndexB = atomB.GetLastAOIndex();
4081+ for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){
4082+ for(int lambda=firstAOIndexB; lambda<=lastAOIndexB; lambda++){
4083+ for(int i=0; i<CartesianType_end; i++){
4084+ double temp= 2.0*this->etaMatrixForce[elecStateIndex][mu][mu]
4085+ *this->etaMatrixForce[elecStateIndex][lambda][lambda]
4086+ -1.0*this->etaMatrixForce[elecStateIndex][mu][lambda]
4087+ *this->etaMatrixForce[elecStateIndex][mu][lambda];
4088+ force[i] += temp
4089+ *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA]
4090+ [lambda-firstAOIndexB]
4091+ [i];
4092+ }
4093+ }
4094+ }
4095+}
4096+
4097+void ZindoS::CalcForceExcitedElecCoreAttractionPart(double* force,
4098+ int elecStateIndex,
4099+ int indexAtomA,
4100+ int indexAtomB,
4101+ double const* const* const* diatomicTwoElecTwoCore1stDerivs) const{
4102+ const Atom& atomA = *this->molecule->GetAtom(indexAtomA);
4103+ const Atom& atomB = *this->molecule->GetAtom(indexAtomB);
4104+ int firstAOIndexA = atomA.GetFirstAOIndex();
4105+ int lastAOIndexA = atomA.GetLastAOIndex();
4106+ for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){
4107+ for(int i=0; i<CartesianType_end; i++){
4108+ force[i] += this->zMatrixForce[elecStateIndex][mu][mu]
4109+ *atomB.GetCoreCharge()
4110+ *diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA][s][i];
4111+ }
4112+ }
4113+}
4114+
4115+
40434116 }
40444117
--- a/src/zindo/ZindoS.h
+++ b/src/zindo/ZindoS.h
@@ -237,6 +237,16 @@ private:
237237 void CalcDiatomicTwoElecTwoCore1stDerivatives(double*** matrix,
238238 int indexAtomA,
239239 int indexAtomB) const;
240+ void CalcForceExcitedStaticPart(double* force,
241+ int elecStateIndex,
242+ int indexAtomA,
243+ int indexAtomB,
244+ double const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
245+ void CalcForceExcitedElecCoreAttractionPart(double* force,
246+ int elecStateIndex,
247+ int indexAtomA,
248+ int indexAtomB,
249+ double const* const* const* diatomicTwoElecTwoCore1stDerivs) const;
240250 void CalcFreeExcitonEnergies(double** freeExcitonEnergiesCIS,
241251 const MolDS_base::Molecule& molecule,
242252 double const* energiesMO,