• 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

修订版c5ef493f4cc9b9ada4f1537c1ba51e75428db726 (tree)
时间2010-12-09 12:38:53
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Core and Exchnge integral for INDO and ZINDO are moved from Atom class to INDO and ZINDOS class, respectively.

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

更改概述

差异

--- a/src/MolDS.cpp
+++ b/src/MolDS.cpp
@@ -23,6 +23,7 @@
2323 #include"base/Parameters.h"
2424 #include"cndo/Cndo2.h"
2525 #include"indo/Indo.h"
26+#include"zindo/ZindoS.h"
2627 #include"mkl_wrapper/LapackWrapper.h"
2728
2829
@@ -72,6 +73,10 @@ int main(){
7273
7374 // ZINDO/S
7475 else if(Parameters::GetInstance()->GetCurrentTheory() == ZINDOS){
76+ MolDS_zindo::ZindoS* zindoS = new MolDS_zindo::ZindoS();
77+ //zindoS->SetMolecule(molecule);
78+ //zindoS->DoesSCF();
79+ delete zindoS;
7580 }
7681
7782 /*** test lapack ***
--- a/src/base/atoms/Atom.h
+++ b/src/base/atoms/Atom.h
@@ -17,8 +17,6 @@ private:
1717 void SetMessages();
1818 string errorMessageImuAmu;
1919 string errorMessageOrbitalExponent;
20- string errorMessageIndoCoulombInt;
21- string errorMessageIndoExchangeInt;
2220 string errorMessageShellType;
2321 string errorMessageEffectivPrincipalQuantumNumber;
2422 string errorMessageZindoCoreIntegral;
@@ -83,9 +81,9 @@ public:
8381 int GetNumberValenceElectrons();
8482 double GetImuAmu(OrbitalType orbitalType); // return 0.5*(I_mu + A_mu)
8583 double GetOrbitalExponent(ShellType shellType, OrbitalType orbitalType); // (1.73) in J. A. Pople book.
86- double GetIndoCoulombInt(OrbitalType orbital1, OrbitalType orbital2, double gamma); // (3.87) - (3.91) in J. A. Pople book.
87- double GetIndoExchangeInt(OrbitalType orbital1, OrbitalType orbital2, double gamma); // (3.87) - (3.91) in J. A. Pople book.
8884 virtual double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory) = 0; // P82 - 83 in J. A. Pople book for INDO or Eq. (13) in [BZ_1979] for ZINDO/S
85+ double GetIndoF2();
86+ double GetIndoG1();
8987 };
9088
9189 Atom::Atom(){
@@ -111,8 +109,6 @@ Atom::~Atom(){
111109 void Atom::SetMessages(){
112110 this->errorMessageImuAmu = "Error in base_atoms::Atom::GetImuAmu: Invalid orbitalType.\n";
113111 this->errorMessageOrbitalExponent = "Error in base_atoms::Atom::GetOrbitalExponent: Invalid shelltype or orbitalType.\n";
114- this->errorMessageIndoCoulombInt = "Error in base_atoms::Atom::GetIndoCoulombInt: Invalid orbitalType.\n";
115- this->errorMessageIndoExchangeInt = "Error in base_atoms::Atom::GetIndoExchangeInt: Invalid orbitalType.\n";
116112 this->errorMessageIndoCoreIntegral = "Error in base_atoms::Atom::GetCoreIntegral: Invalid orbitalType for INDO.\n";
117113 this->errorMessageZindoSCoreIntegral = "Error in base_atoms::Atom::GetCoreIntegral: Invalid orbitalType for ZINDO/S.\n";
118114 this->errorMessageAtomType = "\tatom type = ";
@@ -239,69 +235,6 @@ double Atom::GetOrbitalExponent(ShellType shellType, OrbitalType orbitalType){
239235 }
240236
241237
242-// (3.87) - (3.91) in J. A. Pople book.
243-// Indo Coulomb Interaction
244-double Atom::GetIndoCoulombInt(OrbitalType orbital1, OrbitalType orbital2, double gamma){
245-
246- double value=0.0;
247- if( orbital1 == s && orbital2 == s){
248- value = gamma;
249- }
250- else if( orbital1 == s && ( orbital2 == px || orbital2 == py || orbital2 == pz )){
251- value = gamma;
252- }
253- else if( (orbital1 == px || orbital1 == py || orbital1 == pz ) && orbital2 == s){
254- value = gamma;
255- }
256- else if( (orbital1 == orbital2) && ( orbital1 == px || orbital1 == py || orbital1 == pz )){
257- value = gamma + 4.0*this->indoF2/25.0;
258- }
259- else if( (orbital1 != orbital2)
260- && ( orbital1 == px || orbital1 == py || orbital1 == pz )
261- && ( orbital2 == px || orbital2 == py || orbital2 == pz ) ){
262- value = gamma - 2.0*this->indoF2/25.0;
263- }
264- else{
265- cout << this->errorMessageIndoCoulombInt;
266- cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << "\n";
267- cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital1) << "\n";
268- cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital2) << "\n";
269- exit(EXIT_FAILURE);
270- }
271-
272- return value;
273-}
274-
275-// (3.87) - (3.91) in J. A. Pople book.
276-// Indo Exchange interaction
277-double Atom::GetIndoExchangeInt(OrbitalType orbital1, OrbitalType orbital2, double gamma){
278- double value=0.0;
279-
280- if( orbital1 == orbital2){
281- value = this->GetIndoCoulombInt(orbital1, orbital2, gamma);
282- }
283- else if( (orbital1 == s) && (orbital2 == px || orbital2 == py || orbital2 == pz ) ){
284- value = this->indoG1/3.0;
285- }
286- else if( (orbital1 == px || orbital1 == py || orbital1 == pz) && orbital2 == s ){
287- value = this->indoG1/3.0;
288- }
289- else if( (orbital1 != orbital2)
290- && ( orbital1 == px || orbital1 == py || orbital1 == pz )
291- && ( orbital2 == px || orbital2 == py || orbital2 == pz ) ){
292- value = 3.0*this->indoF2/25.0;
293- }
294- else{
295- cout << this->errorMessageIndoExchangeInt;
296- cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << "\n";
297- cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital1) << "\n";
298- cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital2) << "\n";
299- exit(EXIT_FAILURE);
300- }
301-
302- return value;
303-}
304-
305238 // Part of Eq. (13) in [BZ_1979]
306239 double Atom::GetJss(){
307240 return this->zindoF0ss;
@@ -367,6 +300,13 @@ double Atom::GetZindoCoreIntegral(OrbitalType orbital, int l, int m, int n){
367300 return value;
368301 }
369302
303+double Atom::GetIndoF2(){
304+ return this->indoF2;
305+}
306+
307+double Atom::GetIndoG1(){
308+ return this->indoG1;
309+}
370310
371311
372312
--- a/src/cndo/Cndo2.h
+++ b/src/cndo/Cndo2.h
@@ -24,7 +24,6 @@ namespace MolDS_cndo{
2424 */
2525 class Cndo2{
2626 private:
27- string errorMessageAtomType;
2827 string messageEnergiesMOs;
2928 string messageEnergiesMOsTitle;
3029 string messageMullikenAtoms;
@@ -73,10 +72,14 @@ private:
7372 void CheckNumberValenceElectrons(Molecule* molecule);
7473
7574 protected:
75+ string errorMessageAtomType;
76+ string errorMessageOrbitalType;
7677 string errorMessageSCFNotConverged;
7778 string errorMessageMoleculeNotSet;
7879 string errorMessageOddTotalValenceElectrions;
7980 string errorMessageNotEnebleAtomType;
81+ string errorMessageCoulombInt;
82+ string errorMessageExchangeInt;
8083 string messageSCFMetConvergence;
8184 string messageStartSCF;
8285 string messageDoneSCF;
@@ -156,8 +159,8 @@ void Cndo2::SetMessages(){
156159 = "Error in cndo::Cndo2::SetMolecule: Total number of valence electrons is odd. totalNumberValenceElectrons=";
157160 this->errorMessageNotEnebleAtomType
158161 = "Error in cndo::Cndo2::ChecEnableAtomType: Not enable atom is contained.\n";
159- this->errorMessageAtomType
160- = "\tatom type = ";
162+ this->errorMessageAtomType = "\tatom type = ";
163+ this->errorMessageOrbitalType = "\torbital type = ";
161164 this->messageSCFMetConvergence = "\n\n\n\t\tCNDO/2-SCF met convergence criterion(^^b\n\n\n";
162165 this->messageStartSCF = "********** START: CNDO/2-SCF **********\n";
163166 this->messageDoneSCF = "********** DONE: CNDO/2-SCF **********\n\n\n";
--- a/src/indo/Indo.h
+++ b/src/indo/Indo.h
@@ -18,20 +18,24 @@ namespace MolDS_indo{
1818 * Refferences for Indo are [PB_1970] and [PS_1966].
1919 */
2020 class Indo : public MolDS_cndo::Cndo2{
21-public:
22- Indo();
23- ~Indo();
21+private:
22+ double GetCoulombInt(OrbitalType orbital1, OrbitalType orbital2, double gamma, Atom* atom); // Indo Coulomb Interaction, (3.87) - (3.91) in J. A. Pople book.
23+ double GetExchangeInt(OrbitalType orbital1, OrbitalType orbital2, double gamma, Atom* atom); // Indo Exchange Interaction, (3.87) - (3.91) in J. A. Pople book.
2424 protected:
25- void SetMessages();
26- double GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA,
27- int mu, Molecule* molecule, double** gammaAB,
28- double** orbitalElectronPopulation, double* atomicElectronPopulation,
29- bool isGuess);
30- double GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, int atomBIndex,
25+ virtual void SetMessages();
26+ virtual double GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA,
27+ int mu, Molecule* molecule, double** gammaAB,
28+ double** orbitalElectronPopulation, double* atomicElectronPopulation,
29+ bool isGuess);
30+ virtual double GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, int atomBIndex,
3131 int firstAOIndexA, int firstAOIndexB,
3232 int mu, int nu, Molecule* molecule, double** gammaAB, double** overelap,
3333 double** orbitalElectronPopulation, bool isGuess);
34- void SetEnableAtomTypes();
34+ virtual void SetEnableAtomTypes();
35+
36+public:
37+ Indo();
38+ ~Indo();
3539 };
3640
3741 Indo::Indo() : MolDS_cndo::Cndo2(){
@@ -54,6 +58,8 @@ void Indo::SetMessages(){
5458 = "Error in indo::Indo::SetMolecule: Total number of valence electrons is odd. totalNumberValenceElectrons=";
5559 this->errorMessageNotEnebleAtomType
5660 = "Error in indo::Indo::ChecEnableAtomType: Not enable atom is contained.\n";
61+ this->errorMessageCoulombInt = "Error in base_indo::Indo::GetCoulombInt: Invalid orbitalType.\n";
62+ this->errorMessageExchangeInt = "Error in base_indo::Indo::GetExchangeInt: Invalid orbitalType.\n";
5763 this->messageSCFMetConvergence = "\n\n\n\t\tINDO-SCF met convergence criterion(^^b\n\n\n";
5864 this->messageStartSCF = "********** START: INDO-SCF **********\n";
5965 this->messageDoneSCF = "********** DONE: INDO-SCF **********\n\n\n";
@@ -88,8 +94,8 @@ double Indo::GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA,
8894 OrbitalType orbitalMu = atomA->GetValence()[mu-firstAOIndexA];
8995 for(int v=0; v<atomA->GetValence().size(); v++){
9096 OrbitalType orbitalLam = atomA->GetValence()[v];
91- coulomb = atomA->GetIndoCoulombInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex]);
92- exchange = atomA->GetIndoExchangeInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex]);
97+ coulomb = this->GetCoulombInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex], atomA);
98+ exchange = this->GetExchangeInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex], atomA);
9399 lammda = firstAOIndexA + v;
94100 temp += orbitalElectronPopulation[lammda][lammda]*(coulomb - 0.5*exchange);
95101 }
@@ -129,8 +135,8 @@ double Indo::GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, int
129135 if(atomAIndex == atomBIndex){
130136 OrbitalType orbitalMu = atomA->GetValence()[mu-firstAOIndexA];
131137 OrbitalType orbitalNu = atomA->GetValence()[nu-firstAOIndexA];
132- coulomb = atomA->GetIndoCoulombInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex]);
133- exchange = atomA->GetIndoExchangeInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex]);
138+ coulomb = this->GetCoulombInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex], atomA);
139+ exchange = this->GetExchangeInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex], atomA);
134140 value = (1.5*exchange - 0.5*coulomb)*orbitalElectronPopulation[mu][nu];
135141 }
136142 else{
@@ -142,6 +148,71 @@ double Indo::GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, int
142148 return value;
143149 }
144150
151+// (3.87) - (3.91) in J. A. Pople book.
152+// Indo Coulomb Interaction
153+double Indo::GetCoulombInt(OrbitalType orbital1, OrbitalType orbital2, double gamma, Atom* atom){
154+
155+ double value=0.0;
156+ if( orbital1 == s && orbital2 == s){
157+ value = gamma;
158+ }
159+ else if( orbital1 == s && ( orbital2 == px || orbital2 == py || orbital2 == pz )){
160+ value = gamma;
161+ }
162+ else if( (orbital1 == px || orbital1 == py || orbital1 == pz ) && orbital2 == s){
163+ value = gamma;
164+ }
165+ else if( (orbital1 == orbital2) && ( orbital1 == px || orbital1 == py || orbital1 == pz )){
166+ value = gamma + 4.0*atom->GetIndoF2()/25.0;
167+ }
168+ else if( (orbital1 != orbital2)
169+ && ( orbital1 == px || orbital1 == py || orbital1 == pz )
170+ && ( orbital2 == px || orbital2 == py || orbital2 == pz ) ){
171+ value = gamma - 2.0*atom->GetIndoF2()/25.0;
172+ }
173+ else{
174+ cout << this->errorMessageCoulombInt;
175+ cout << this->errorMessageAtomType << AtomTypeStr(atom->GetAtomType()) << "\n";
176+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital1) << "\n";
177+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital2) << "\n";
178+ exit(EXIT_FAILURE);
179+ }
180+
181+ return value;
182+
183+}
184+
185+// (3.87) - (3.91) in J. A. Pople book.
186+// Indo Exchange Interaction
187+double Indo::GetExchangeInt(OrbitalType orbital1, OrbitalType orbital2, double gamma, Atom* atom){
188+
189+ double value=0.0;
190+
191+ if( orbital1 == orbital2){
192+ value = this->GetCoulombInt(orbital1, orbital2, gamma, atom);
193+ }
194+ else if( (orbital1 == s) && (orbital2 == px || orbital2 == py || orbital2 == pz ) ){
195+ value = atom->GetIndoG1()/3.0;
196+ }
197+ else if( (orbital1 == px || orbital1 == py || orbital1 == pz) && orbital2 == s ){
198+ value = atom->GetIndoG1()/3.0;
199+ }
200+ else if( (orbital1 != orbital2)
201+ && ( orbital1 == px || orbital1 == py || orbital1 == pz )
202+ && ( orbital2 == px || orbital2 == py || orbital2 == pz ) ){
203+ value = 3.0*atom->GetIndoF2()/25.0;
204+ }
205+ else{
206+ cout << this->errorMessageExchangeInt;
207+ cout << this->errorMessageAtomType << AtomTypeStr(atom->GetAtomType()) << "\n";
208+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital1) << "\n";
209+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital2) << "\n";
210+ exit(EXIT_FAILURE);
211+ }
212+
213+ return value;
214+
215+}
145216
146217
147218 }
--- a/src/input.in
+++ b/src/input.in
@@ -45,29 +45,29 @@ THEORY_END
4545 //GEOMETRY_END
4646
4747 // benzene
48-//GEOMETRY
49-// C -0.505391 0.552561 0.000000
50-// C 0.889769 0.552561 0.000000
51-// C 1.587307 1.760312 0.000000
52-// C 0.889653 2.968821 -0.001199
53-// C -0.505172 2.968743 -0.001678
54-// C -1.202773 1.760537 -0.000682
55-// H -1.055150 -0.399756 0.000450
56-// H 1.439277 -0.399952 0.001315
57-// H 2.686987 1.760392 0.000634
58-// H 1.439853 3.920964 -0.001258
59-// H -1.055294 3.921024 -0.002631
60-// H -2.302377 1.760720 -0.000862
61-//GEOMETRY_END
62-
63-// acetylene
6448 GEOMETRY
65- C 0.24933 0.0 0.0
66- C 1.45053 0.0 0.0
67- H -0.82067 0.0 0.0
68- H 2.52053 0.0 0.0
49+ C -0.505391 0.552561 0.000000
50+ C 0.889769 0.552561 0.000000
51+ C 1.587307 1.760312 0.000000
52+ C 0.889653 2.968821 -0.001199
53+ C -0.505172 2.968743 -0.001678
54+ C -1.202773 1.760537 -0.000682
55+ H -1.055150 -0.399756 0.000450
56+ H 1.439277 -0.399952 0.001315
57+ H 2.686987 1.760392 0.000634
58+ H 1.439853 3.920964 -0.001258
59+ H -1.055294 3.921024 -0.002631
60+ H -2.302377 1.760720 -0.000862
6961 GEOMETRY_END
7062
63+// acetylene
64+//GEOMETRY
65+// C 0.24933 0.0 0.0
66+// C 1.45053 0.0 0.0
67+// H -0.82067 0.0 0.0
68+// H 2.52053 0.0 0.0
69+//GEOMETRY_END
70+
7171 // acetylene2
7272 //GEOMETRY
7373 // C 0.0, 0.0 0.24933
--- a/src/zindo/ZindoS.h
+++ b/src/zindo/ZindoS.h
@@ -1,5 +1,5 @@
1-#ifndef INCLUDED_INDO
2-#define INCLUDED_INDO
1+#ifndef INCLUDED_ZINDOS
2+#define INCLUDED_ZINDOS
33
44 #include<stdio.h>
55 #include<stdlib.h>
@@ -15,24 +15,27 @@ using namespace MolDS_base_atoms;
1515 namespace MolDS_zindo{
1616
1717 /***
18- * Refferences for Indo are [PB_1970] and [PS_1966].
18+ * Refferences for
1919 */
2020 class ZindoS : public MolDS_cndo::Cndo2{
21+private:
22+ double GetCoulombInt(OrbitalType orbital1, OrbitalType orbital2, double gamma, Atom* atom); // Apendix in [BZ_1979]
23+ double GetExchangeInt(OrbitalType orbital1, OrbitalType orbital2, double gamma, Atom* atom); // Apendix in [BZ_1979]
24+protected:
25+ virtual void CalcGammaAB(double** gammaAB, Molecule* molecule);
26+ virtual void SetMessages();
27+ virtual double GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA,
28+ int mu, Molecule* molecule, double** gammaAB,
29+ double** orbitalElectronPopulation, double* atomicElectronPopulation,
30+ bool isGuess);
31+ virtual double GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, int atomBIndex,
32+ int firstAOIndexA, int firstAOIndexB,
33+ int mu, int nu, Molecule* molecule, double** gammaAB, double** overelap,
34+ double** orbitalElectronPopulation, bool isGuess);
35+ virtual void SetEnableAtomTypes();
2136 public:
2237 ZindoS();
2338 ~ZindoS();
24-protected:
25- void CalcGammaAB(double** gammaAB, Molecule* molecule);
26- void SetMessages();
27- double GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA,
28- int mu, Molecule* molecule, double** gammaAB,
29- double** orbitalElectronPopulation, double* atomicElectronPopulation,
30- bool isGuess);
31- double GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, int atomBIndex,
32- int firstAOIndexA, int firstAOIndexB,
33- int mu, int nu, Molecule* molecule, double** gammaAB, double** overelap,
34- double** orbitalElectronPopulation, bool isGuess);
35- void SetEnableAtomTypes();
3639 };
3740
3841 ZindoS::ZindoS() : MolDS_cndo::Cndo2(){
@@ -55,6 +58,8 @@ void ZindoS::SetMessages(){
5558 = "Error in zindo::ZindoS::SetMolecule: Total number of valence electrons is odd. totalNumberValenceElectrons=";
5659 this->errorMessageNotEnebleAtomType
5760 = "Error in zindo::ZindoS::CheckEnableAtomType: Not enable atom is contained.\n";
61+ this->errorMessageCoulombInt = "Error in base_zindo::ZindoS::GetCoulombInt: Invalid orbitalType.\n";
62+ this->errorMessageExchangeInt = "Error in base_zindo::ZindoS::GetExchangeInt: Invalid orbitalType.\n";
5863 this->messageSCFMetConvergence = "\n\n\n\t\tZINDO/S-SCF met convergence criterion(^^b\n\n\n";
5964 this->messageStartSCF = "********** START: ZINDO/S-SCF **********\n";
6065 this->messageDoneSCF = "********** DONE: ZINDO/S-SCF **********\n\n\n";
@@ -74,10 +79,9 @@ double ZindoS::GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA
7479 double** orbitalElectronPopulation, double* atomicElectronPopulation,
7580 bool isGuess){
7681 double value;
77- value = atomA->GetIndoCoreIntegral(atomA->GetValence()[mu-firstAOIndexA],
82+ value = atomA->GetCoreIntegral(atomA->GetValence()[mu-firstAOIndexA],
7883 gammaAB[atomAIndex][atomAIndex],
79- isGuess);
80-
84+ isGuess, this->theory);
8185 if(!isGuess){
8286 double temp = 0.0;
8387 double coulomb = 0.0;
@@ -86,8 +90,8 @@ double ZindoS::GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA
8690 OrbitalType orbitalMu = atomA->GetValence()[mu-firstAOIndexA];
8791 for(int v=0; v<atomA->GetValence().size(); v++){
8892 OrbitalType orbitalLam = atomA->GetValence()[v];
89- coulomb = atomA->GetIndoCoulombInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex]);
90- exchange = atomA->GetIndoExchangeInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex]);
93+ coulomb = this->GetCoulombInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex], atomA);
94+ exchange = this->GetExchangeInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex], atomA);
9195 lammda = firstAOIndexA + v;
9296 temp += orbitalElectronPopulation[lammda][lammda]*(coulomb - 0.5*exchange);
9397 }
@@ -127,8 +131,8 @@ double ZindoS::GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, i
127131 if(atomAIndex == atomBIndex){
128132 OrbitalType orbitalMu = atomA->GetValence()[mu-firstAOIndexA];
129133 OrbitalType orbitalNu = atomA->GetValence()[nu-firstAOIndexA];
130- coulomb = atomA->GetIndoCoulombInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex]);
131- exchange = atomA->GetIndoExchangeInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex]);
134+ coulomb = this->GetCoulombInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex], atomA);
135+ exchange = this->GetExchangeInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex], atomA);
132136 value = (1.5*exchange - 0.5*coulomb)*orbitalElectronPopulation[mu][nu];
133137 }
134138 else{
@@ -144,6 +148,76 @@ void ZindoS::CalcGammaAB(double** gammaAB, Molecule* molecule){
144148 // Do nothing;
145149 }
146150
151+// Apendix in [BZ_1972]
152+// ZINDO Coulomb Interaction
153+double ZindoS::GetCoulombInt(OrbitalType orbital1, OrbitalType orbital2, double gamma, Atom* atom){
154+
155+ double value=0.0;
156+
157+ // ToDo: Coulomb interaction
158+ /*
159+ if( orbital1 == s && orbital2 == s){
160+ value = gamma;
161+ }
162+ else if( orbital1 == s && ( orbital2 == px || orbital2 == py || orbital2 == pz )){
163+ value = gamma;
164+ }
165+ else if( (orbital1 == px || orbital1 == py || orbital1 == pz ) && orbital2 == s){
166+ value = gamma;
167+ }
168+ else if( (orbital1 == orbital2) && ( orbital1 == px || orbital1 == py || orbital1 == pz )){
169+ value = gamma + 4.0*atom->GetIndoF2()/25.0;
170+ }
171+ else if( (orbital1 != orbital2)
172+ && ( orbital1 == px || orbital1 == py || orbital1 == pz )
173+ && ( orbital2 == px || orbital2 == py || orbital2 == pz ) ){
174+ value = gamma - 2.0*atom->GetIndoF2()/25.0;
175+ }
176+ else{
177+ cout << this->errorMessageCoulombInt;
178+ cout << this->errorMessageAtomType << AtomTypeStr(atom->GetAtomType()) << "\n";
179+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital1) << "\n";
180+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital2) << "\n";
181+ exit(EXIT_FAILURE);
182+ }
183+ */
184+ return value;
185+
186+}
187+
188+// Apendix in [BZ_1972]
189+// ZINDO Exchange Interaction
190+double ZindoS::GetExchangeInt(OrbitalType orbital1, OrbitalType orbital2, double gamma, Atom* atom){
191+
192+ double value=0.0;
193+
194+ // ToDo: Exchange interaction
195+ /*
196+ if( orbital1 == orbital2){
197+ value = this->GetCoulombInt(orbital1, orbital2, gamma, atom);
198+ }
199+ else if( (orbital1 == s) && (orbital2 == px || orbital2 == py || orbital2 == pz ) ){
200+ value = atom->GetIndoG1()/3.0;
201+ }
202+ else if( (orbital1 == px || orbital1 == py || orbital1 == pz) && orbital2 == s ){
203+ value = atom->GetIndoG1()/3.0;
204+ }
205+ else if( (orbital1 != orbital2)
206+ && ( orbital1 == px || orbital1 == py || orbital1 == pz )
207+ && ( orbital2 == px || orbital2 == py || orbital2 == pz ) ){
208+ value = 3.0*atom->GetIndoF2()/25.0;
209+ }
210+ else{
211+ cout << this->errorMessageExchangeInt;
212+ cout << this->errorMessageAtomType << AtomTypeStr(atom->GetAtomType()) << "\n";
213+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital1) << "\n";
214+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital2) << "\n";
215+ exit(EXIT_FAILURE);
216+ }
217+ */
218+
219+ return value;
220+}
147221
148222 }
149223 #endif