• 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ón758a81446a96594988841be62f3f70da7c431737 (tree)
Tiempo2013-05-21 05:13:11
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Refactoring of CalcForce in Mndo & ZindoS. #31221

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

Cambiar Resumen

Diferencia incremental

--- a/src/zindo/ZindoS.cpp
+++ b/src/zindo/ZindoS.cpp
@@ -3817,6 +3817,30 @@ double ZindoS::GetAuxiliaryKNRKRElement(int moI, int moJ, int moK, int moL) cons
38173817 return value;
38183818 }
38193819
3820+void ZindoS::CalcDiatomicTwoElecTwoCore1stDerivatives(double*** matrix,
3821+ int indexAtomA,
3822+ int indexAtomB) const{
3823+ const Atom& atomA = *molecule->GetAtom(indexAtomA);
3824+ const int firstAOIndexA = atomA.GetFirstAOIndex();
3825+ const int lastAOIndexA = atomA.GetLastAOIndex();
3826+ const Atom& atomB = *molecule->GetAtom(indexAtomB);
3827+ const int firstAOIndexB = atomB.GetFirstAOIndex();
3828+ const int lastAOIndexB = atomB.GetLastAOIndex();
3829+ const double rAB = this->molecule->GetDistanceAtoms(atomA, atomB);
3830+ for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){
3831+ const OrbitalType orbitalMu = atomA.GetValence(mu-firstAOIndexA);
3832+ for(int nu=firstAOIndexB; nu<=lastAOIndexB; nu++){
3833+ const OrbitalType orbitalNu = atomB.GetValence(nu-firstAOIndexB);
3834+ for(int i=0; i<CartesianType_end; i++){
3835+ matrix[mu-firstAOIndexA][nu-firstAOIndexB][i]
3836+ = this->GetNishimotoMatagaTwoEleInt1stDerivative(
3837+ atomA, orbitalMu, atomB, orbitalNu, rAB, static_cast<CartesianType>(i));
3838+ }
3839+ }
3840+ }
3841+}
3842+
3843+
38203844 // elecStates is indeces of the electroinc eigen states.
38213845 // The index = 0 means electronic ground state.
38223846 void ZindoS::CalcForce(const vector<int>& elecStates){
@@ -3861,17 +3885,7 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
38613885 this->CalcDiatomicOverlapAOs1stDerivatives(diatomicOverlapAOs1stDerivs, atomA, atomB);
38623886
38633887 // calc. first derivative of two elec two core interaction by Nishimoto-Mataga
3864- for(int mu=firstAOIndexA; mu<=lastAOIndexA; mu++){
3865- OrbitalType orbitalMu = atomA.GetValence(mu-firstAOIndexA);
3866- for(int nu=firstAOIndexB; nu<=lastAOIndexB; nu++){
3867- OrbitalType orbitalNu = atomB.GetValence(nu-firstAOIndexB);
3868- for(int i=0; i<CartesianType_end; i++){
3869- diatomicTwoElecTwoCore1stDerivs[mu-firstAOIndexA][nu-firstAOIndexB][i]
3870- = this->GetNishimotoMatagaTwoEleInt1stDerivative(
3871- atomA, orbitalMu, atomB, orbitalNu, rAB, static_cast<CartesianType>(i));
3872- }
3873- }
3874- }
3888+ this->CalcDiatomicTwoElecTwoCore1stDerivatives(diatomicTwoElecTwoCore1stDerivs, a, b);
38753889
38763890 double coreRepulsion [CartesianType_end] = {0.0,0.0,0.0};
38773891 double forceElecCoreAttPart[CartesianType_end] = {0.0,0.0,0.0};
@@ -3912,13 +3926,17 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
39123926 {
39133927 for(int n=0; n<elecStates.size(); n++){
39143928 for(int i=0; i<CartesianType_end; i++){
3915- this->matrixForce[n][a][i] -= coreRepulsion[i];
3916- this->matrixForce[n][a][i] += forceElecCoreAttPart[i];
3917- this->matrixForce[n][a][i] -= forceOverlapAOsPart[i];
3918- this->matrixForce[n][a][i] -= forceTwoElecPart[i];
3929+ this->matrixForce[n][a][i] += -coreRepulsion[i]
3930+ +forceElecCoreAttPart[i]
3931+ -forceOverlapAOsPart[i]
3932+ -forceTwoElecPart[i];
39193933 }
39203934 }
39213935 }
3936+ // excited state force
3937+ for(int n=0; n<elecStates.size(); n++){
3938+ if(elecStates[n]<=0){continue;}
3939+ }
39223940 } // end of for(int b)
39233941 } // end of for(int a)
39243942 } // end of try
@@ -4021,6 +4039,5 @@ void ZindoS::CalcForce(const vector<int>& elecStates){
40214039 }
40224040 */
40234041 }
4024-
40254042 }
40264043
--- a/src/zindo/ZindoS.h
+++ b/src/zindo/ZindoS.h
@@ -234,6 +234,9 @@ private:
234234 void OutputCISTransitionDipole() const;
235235 void OutputCISMulliken() const;
236236 void OutputCISUnpairedPop() const;
237+ void CalcDiatomicTwoElecTwoCore1stDerivatives(double*** matrix,
238+ int indexAtomA,
239+ int indexAtomB) const;
237240 void CalcFreeExcitonEnergies(double** freeExcitonEnergiesCIS,
238241 const MolDS_base::Molecule& molecule,
239242 double const* energiesMO,