• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Keine Tags

Frequently used words (click to add to your profile)

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

Commit MetaInfo

Revision5d7e889988c7cade162b71befb236cf1858b8598 (tree)
Zeit2010-12-08 22:32:05
AutorMikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Logic of core integrals for ZINDO is added.

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

Ändern Zusammenfassung

Diff

--- a/src/base/Parameters.h
+++ b/src/base/Parameters.h
@@ -23,6 +23,7 @@ private:
2323 void SetDefaultValues();
2424 double eV2AU;
2525 double angstrom2AU;
26+ double kayser2AU;
2627 double bondingAdjustParameterK; //see (3.79) in J. A. Pople book
2728 TheoryType currentTheory;
2829
@@ -36,6 +37,7 @@ public:
3637 void SetMaxIterationsSCF(int maxIterationsSCF);
3738 double GetEV2AU();
3839 double GetAngstrom2AU();
40+ double GetKayser2AU();
3941 double GetBondingAdjustParameterK();
4042 TheoryType GetCurrentTheory();
4143 void SetCurrentTheory(TheoryType theory);
@@ -67,9 +69,9 @@ void Parameters::DeleteInstance(){
6769 void Parameters::SetDefaultValues(){
6870 this->eV2AU = 0.03674903;
6971 this->angstrom2AU = 1.0/0.5291772;
72+ this->kayser2AU = 4.556336*pow(10.0,-6.0);
7073 this->thresholdSCF = pow(10.0, -8.0);
7174 this->maxIterationsSCF = 100;
72- this->bondingAdjustParameterK = 0.75;
7375 this->currentTheory = CNDO2;
7476 }
7577
@@ -97,6 +99,10 @@ double Parameters::GetAngstrom2AU(){
9799 return this->angstrom2AU;
98100 }
99101
102+double Parameters::GetKayser2AU(){
103+ return this->kayser2AU;
104+}
105+
100106 double Parameters::GetBondingAdjustParameterK(){
101107 return this->bondingAdjustParameterK;
102108 }
--- a/src/base/atoms/Atom.h
+++ b/src/base/atoms/Atom.h
@@ -21,28 +21,52 @@ private:
2121 string errorMessageIndoExchangeInt;
2222 string errorMessageShellType;
2323 string errorMessageEffectivPrincipalQuantumNumber;
24+ string errorMessageZindoCoreIntegral;
25+ double GetJss(); // Part of Eq. (13) in [BZ_1979]
26+ double GetJsp(); // Part of Eq. (13) in [BZ_1979]
27+ double GetJsd(); // Part of Eq. (13) in [BZ_1979]
28+ double GetJpp(); // Part of Eq. (13) in [BZ_1979]
29+ double GetJpd(); // Part of Eq. (13) in [BZ_1979]
30+ double GetJdd(); // Part of Eq. (13) in [BZ_1979]
2431 protected:
2532 string errorMessageIndoCoreIntegral;
33+ string errorMessageZindoSCoreIntegral;
2634 string errorMessageAtomType;
2735 string errorMessageOrbitalType;
2836 double* xyz;
2937 AtomType atomType;
3038 vector<OrbitalType> valence;
31- double imuAmuS;
32- double imuAmuP;
33- double imuAmuD;
34- double bondingParameter; // see Table 3.2 and 3.4 in J. A. Pople book
35- double coreCharge; // = Z_A
36- double effectiveNuclearChargeK;
37- double effectiveNuclearChargeL;
38- double effectiveNuclearChargeMsp;
39- double effectiveNuclearChargeMd;
4039 ShellType valenceShellType;
4140 int firstAOIndex;
42- int GetEffectivePrincipalQuantumNumber(ShellType shellType);
4341 int numberValenceElectrons;
44- double indoF2; // see (3.89) in J. A. Pople book
45- double indoG1; // see (3.88) in J. A. Pople book
42+ double imuAmuS; // Table 3.4 or 3.5 in J. A. Pople book
43+ double imuAmuP; // Table 3.4 or 3.5 in J. A. Pople book
44+ double imuAmuD; // Table 3.4 or 3.5 in J. A. Pople book
45+ double bondingParameter; // Table 3.2 and 3.4 in J. A. Pople book
46+ double coreCharge; // = Z_A in J. A. Pople book.
47+ double effectiveNuclearChargeK; // Table 1.5 in J. A. Pople book
48+ double effectiveNuclearChargeL; // Table 1.5 in J. A. Pople book
49+ double effectiveNuclearChargeMsp; // Table 1.5 in J. A. Pople book
50+ double effectiveNuclearChargeMd; // Table 1.5 in J. A. Pople book
51+ int GetEffectivePrincipalQuantumNumber(ShellType shellType); // Table 1.4 in J. A. Pople book
52+ double indoF2; // (3.89) in J. A. Pople book
53+ double indoG1; // (3.88) in J. A. Pople book
54+ double zindoF0ss; // Table 1 in ref. [RZ_1976], Table 1 in [AEZ_1986], or Table 1 in [GD_1972]
55+ double zindoF0sd; // Table 1 in [AEZ_1986]
56+ double zindoF0dd; // Table 1 in [AEZ_1986]
57+ double zindoG1sp; // Table 3 in ref. [BZ_1979]
58+ double zindoF2pp; // Table 3 in ref. [BZ_1979]
59+ double zindoG2sd; // Table 3 in ref. [BZ_1979]
60+ double zindoG1pd; // Table 3 in ref. [BZ_1979]
61+ double zindoF2pd; // Table 3 in ref. [BZ_1979]
62+ double zindoG3pd; // Table 3 in ref. [BZ_1979]
63+ double zindoF2dd; // Table 3 in ref. [BZ_1979]
64+ double zindoF4dd; // Table 3 in ref. [BZ_1979]
65+ double IonPotS; // Ionization potential, Table 4 in [BZ_1979]
66+ double IonPotP; // Ionization potential, Table 4 in [BZ_1979]
67+ double IonPotD; // Ionization potential, Table 4 in [BZ_1979]
68+ double GetZindoCoreIntegral(OrbitalType orbital, int l, int m, int n); // Eq. (13) in [BZ_1979]
69+
4670 public:
4771 Atom();
4872 Atom(double x, double y, double z);
@@ -61,7 +85,7 @@ public:
6185 double GetOrbitalExponent(ShellType shellType, OrbitalType orbitalType); // (1.73) in J. A. Pople book.
6286 double GetIndoCoulombInt(OrbitalType orbital1, OrbitalType orbital2, double gamma); // (3.87) - (3.91) in J. A. Pople book.
6387 double GetIndoExchangeInt(OrbitalType orbital1, OrbitalType orbital2, double gamma); // (3.87) - (3.91) in J. A. Pople book.
64- virtual double GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess) = 0; // P82 - 83 in J. A. Pople book.
88+ 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
6589 };
6690
6791 Atom::Atom(){
@@ -89,12 +113,14 @@ void Atom::SetMessages(){
89113 this->errorMessageOrbitalExponent = "Error in base_atoms::Atom::GetOrbitalExponent: Invalid shelltype or orbitalType.\n";
90114 this->errorMessageIndoCoulombInt = "Error in base_atoms::Atom::GetIndoCoulombInt: Invalid orbitalType.\n";
91115 this->errorMessageIndoExchangeInt = "Error in base_atoms::Atom::GetIndoExchangeInt: Invalid orbitalType.\n";
92- this->errorMessageIndoCoreIntegral = "Error in base_atoms::Atom::GetIndoCoreIntegral: Invalid orbitalType.\n";
116+ this->errorMessageIndoCoreIntegral = "Error in base_atoms::Atom::GetCoreIntegral: Invalid orbitalType for INDO.\n";
117+ this->errorMessageZindoSCoreIntegral = "Error in base_atoms::Atom::GetCoreIntegral: Invalid orbitalType for ZINDO/S.\n";
93118 this->errorMessageAtomType = "\tatom type = ";
94119 this->errorMessageOrbitalType = "\torbital type = ";
95120 this->errorMessageShellType = "\tshell type = ";
96121 this->errorMessageEffectivPrincipalQuantumNumber =
97122 "Error in base::Atom::GetEffectivePrincipalQuantumNumber: invalid shelltype.\n";
123+ this->errorMessageZindoCoreIntegral = "Error in base_stoms::Atom::GetZindoCoreINtegral: Invalid orbitalType.\n";
98124 }
99125
100126 AtomType Atom::GetAtomType(){
@@ -276,6 +302,74 @@ double Atom::GetIndoExchangeInt(OrbitalType orbital1, OrbitalType orbital2, doub
276302 return value;
277303 }
278304
305+// Part of Eq. (13) in [BZ_1979]
306+double Atom::GetJss(){
307+ return this->zindoF0ss;
308+}
309+
310+// Part of Eq. (13) in [BZ_1979]
311+double Atom::GetJsp(){
312+ // F0ss = F0sp
313+ return this->zindoF0ss - this->zindoG1sp/6.0;
314+}
315+
316+// Part of Eq. (13) in [BZ_1979]
317+double Atom::GetJsd(){
318+ return this->zindoF0sd - this->zindoG2sd/10.0;
319+}
320+
321+// Part of Eq. (13) in [BZ_1979]
322+double Atom::GetJpp(){
323+ // F0pp = F0ss
324+ return this->zindoF0ss - 2.0*this->zindoF2pp/25.0;
325+}
326+
327+// Part of Eq. (13) in [BZ_1979]
328+double Atom::GetJpd(){
329+ // F0pd = F0sd
330+ return this->zindoF0sd - this->zindoG1pd/15.0 - 3.0*this->zindoG3pd/70.0;
331+}
332+
333+// Part of Eq. (13) in [BZ_1979]
334+double Atom::GetJdd(){
335+ return this->zindoF0dd - 2.0*(this->zindoF2dd - this->zindoF4dd)/63.0;
336+}
337+
338+// Eq. (13) in [BZ_1979]
339+double Atom::GetZindoCoreIntegral(OrbitalType orbital, int l, int m, int n){
340+ double value=0.0;
341+
342+ if(orbital == s){
343+ value = -1.0*this->IonPotS
344+ - this->GetJss()*(double)(l-1)
345+ - this->GetJsp()*(double)m
346+ - this->GetJsd()*(double)n;
347+ }
348+ else if(orbital == px || orbital == py || orbital == pz){
349+ value = -1.0*this->IonPotP
350+ - this->GetJpp()*(double)(m-1)
351+ - this->GetJsp()*(double)l
352+ - this->GetJpd()*(double)n;
353+ }
354+ else if(orbital == dxy || orbital == dyz || orbital == dzz || orbital == dzx || orbital == dxxyy ){
355+ value = -1.0*this->IonPotD
356+ - this->GetJdd()*(double)(n-1)
357+ - this->GetJsd()*(double)l
358+ - this->GetJpd()*(double)m;
359+ }
360+ else{
361+ cout << this->errorMessageZindoCoreIntegral;
362+ cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
363+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
364+ exit(EXIT_FAILURE);
365+ }
366+
367+ return value;
368+}
369+
370+
371+
372+
279373 }
280374 #endif
281375
--- a/src/base/atoms/Catom.h
+++ b/src/base/atoms/Catom.h
@@ -11,7 +11,7 @@ class Catom : public Atom {
1111 private:
1212 public:
1313 Catom(double x, double y, double z);
14- double GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess); // P82 - 83 in J. A. Pople book.
14+ double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1515 };
1616
1717 Catom::Catom(double x, double y, double z) : Atom(x, y, z){
@@ -33,31 +33,62 @@ Catom::Catom(double x, double y, double z) : Atom(x, y, z){
3333 this->numberValenceElectrons = 4;
3434 this->indoG1 = 0.267708;
3535 this->indoF2 = 0.17372;
36+ this->zindoF0ss = 11.11 * Parameters::GetInstance()->GetEV2AU();
37+ this->zindoF0sd = 0.0;
38+ this->zindoF0dd = 0.0;
39+ this->zindoG1sp = 55635*Parameters::GetInstance()->GetKayser2AU();
40+ this->zindoF2pp = 36375*Parameters::GetInstance()->GetKayser2AU();
41+ this->zindoG2sd = 0.0;
42+ this->zindoG1pd = 0.0;
43+ this->zindoF2pd = 0.0;
44+ this->zindoG3pd = 0.0;
45+ this->zindoF2dd = 0.0;
46+ this->zindoF4dd = 0.0;
47+ this->IonPotS = -19.84 * Parameters::GetInstance()->GetEV2AU();
48+ this->IonPotP = -10.93 * Parameters::GetInstance()->GetEV2AU();
49+ this->IonPotD = 0.0 * Parameters::GetInstance()->GetEV2AU();
3650 }
3751
38-// P82 - 83 in J. A. Pople book.
39-double Catom::GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess){
52+double Catom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
4053 double value = 0.0;
41- if(orbital == s){
42- value = -1.0*this->imuAmuS;
43- if(!isGuess){
44- value -= (this->coreCharge-0.5)*gamma - (this->coreCharge - 1.5)*this->indoG1/6.0;
54+
55+ if(theory == INDO){
56+ if(orbital == s){
57+ value = -1.0*this->imuAmuS;
58+ if(!isGuess){
59+ value -= (this->coreCharge-0.5)*gamma - (this->coreCharge - 1.5)*this->indoG1/6.0;
60+ }
4561 }
46- }
47- else if(orbital == px || orbital == py || orbital == pz){
48- value = -1.0*this->imuAmuP;
49- if(!isGuess){
50- value -= (this->coreCharge-0.5)*gamma
51- - this->indoG1/3.0
52- - (this->coreCharge - 2.5)*this->indoF2*2.0/25.0;
62+ else if(orbital == px || orbital == py || orbital == pz){
63+ value = -1.0*this->imuAmuP;
64+ if(!isGuess){
65+ value -= (this->coreCharge-0.5)*gamma
66+ - this->indoG1/3.0
67+ - (this->coreCharge - 2.5)*this->indoF2*2.0/25.0;
68+ }
69+ }
70+ else{
71+ cout << this->errorMessageIndoCoreIntegral;
72+ cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
73+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
74+ exit(EXIT_FAILURE);
5375 }
5476 }
55- else{
56- cout << this->errorMessageIndoCoreIntegral;
57- cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
58- cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
59- exit(EXIT_FAILURE);
77+ else if(theory == ZINDOS){
78+ if(orbital == s){
79+ value = this->GetZindoCoreIntegral(orbital, 2, 2, 0);
80+ }
81+ else if(orbital == px || orbital == py || orbital == pz){
82+ value = this->GetZindoCoreIntegral(orbital, 2, 2, 0);
83+ }
84+ else{
85+ cout << this->errorMessageZindoSCoreIntegral;
86+ cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
87+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
88+ exit(EXIT_FAILURE);
89+ }
6090 }
91+
6192 return value;
6293 }
6394
--- a/src/base/atoms/Hatom.h
+++ b/src/base/atoms/Hatom.h
@@ -12,7 +12,7 @@ class Hatom : public Atom {
1212 private:
1313 public:
1414 Hatom(double x, double y, double z);
15- double GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess); // P82 - 83 in J. A. Pople book.
15+ double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1616 };
1717
1818 Hatom::Hatom(double x, double y, double z) : Atom(x, y, z){
@@ -31,23 +31,52 @@ Hatom::Hatom(double x, double y, double z) : Atom(x, y, z){
3131 this->numberValenceElectrons = 1;
3232 this->indoG1 = 0.0;
3333 this->indoF2 = 0.0;
34+ this->zindoF0ss = 12.85 * Parameters::GetInstance()->GetEV2AU();
35+ this->zindoF0sd = 0.0;
36+ this->zindoF0dd = 0.0;
37+ this->zindoG1sp = 0.0;
38+ this->zindoF2pp = 0.0;
39+ this->zindoG2sd = 0.0;
40+ this->zindoG1pd = 0.0;
41+ this->zindoF2pd = 0.0;
42+ this->zindoG3pd = 0.0;
43+ this->zindoF2dd = 0.0;
44+ this->zindoF4dd = 0.0;
45+ this->IonPotS = -13.06 * Parameters::GetInstance()->GetEV2AU();
46+ this->IonPotP = 0.0 * Parameters::GetInstance()->GetEV2AU();
47+ this->IonPotD = 0.0 * Parameters::GetInstance()->GetEV2AU();
3448 }
3549
36-// P82 - 83 in J. A. Pople book.
37-double Hatom::GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess){
50+double Hatom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
3851 double value = 0.0;
39- if(orbital == s){
40- value = -1.0*this->imuAmuS;
41- if(!isGuess){
42- value -= 0.5*gamma;
52+
53+ if(theory == INDO){
54+ if(orbital == s){
55+ value = -1.0*this->imuAmuS;
56+ if(!isGuess){
57+ value -= 0.5*gamma;
58+ }
59+ }
60+ else{
61+ cout << this->errorMessageIndoCoreIntegral;
62+ cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
63+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
64+ exit(EXIT_FAILURE);
4365 }
4466 }
45- else{
46- cout << this->errorMessageIndoCoreIntegral;
47- cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
48- cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
49- exit(EXIT_FAILURE);
67+ else if(theory == ZINDOS){
68+ if(orbital == s){
69+ value = this->GetZindoCoreIntegral(orbital, 1, 0, 0);
70+ }
71+ else{
72+ cout << this->errorMessageZindoSCoreIntegral;
73+ cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
74+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
75+ exit(EXIT_FAILURE);
76+ }
77+
5078 }
79+
5180 return value;
5281 }
5382
--- a/src/base/atoms/Liatom.h
+++ b/src/base/atoms/Liatom.h
@@ -12,7 +12,7 @@ class Liatom : public Atom {
1212 private:
1313 public:
1414 Liatom(double x, double y, double z);
15- double GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess); // P82 - 83 in J. A. Pople book.
15+ double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1616 };
1717
1818 Liatom::Liatom(double x, double y, double z) : Atom(x, y, z){
@@ -34,30 +34,53 @@ Liatom::Liatom(double x, double y, double z) : Atom(x, y, z){
3434 this->numberValenceElectrons = 1;
3535 this->indoG1 = 0.092012;
3636 this->indoF2 = 0.049865;
37+ this->zindoF0ss = 0.0;
38+ this->zindoF0sd = 0.0;
39+ this->zindoF0dd = 0.0;
40+ this->zindoG1sp = 20194*Parameters::GetInstance()->GetKayser2AU();
41+ this->zindoF2pp = 10944*Parameters::GetInstance()->GetKayser2AU();
42+ this->zindoG2sd = 0.0;
43+ this->zindoG1pd = 0.0;
44+ this->zindoF2pd = 0.0;
45+ this->zindoG3pd = 0.0;
46+ this->zindoF2dd = 0.0;
47+ this->zindoF4dd = 0.0;
48+ this->IonPotS = -5.39 * Parameters::GetInstance()->GetEV2AU();
49+ this->IonPotP = -3.54 * Parameters::GetInstance()->GetEV2AU();
50+ this->IonPotD = 0.0 * Parameters::GetInstance()->GetEV2AU();
3751 }
3852
39-// P82 - 83 in J. A. Pople book.
40-double Liatom::GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess){
53+double Liatom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
4154
4255 double value = 0.0;
43- if(orbital == s){
44- value = -1.0*this->imuAmuS;
45- if(!isGuess){
46- value -= 0.5*gamma;
56+
57+ if(theory == INDO){
58+ if(orbital == s){
59+ value = -1.0*this->imuAmuS;
60+ if(!isGuess){
61+ value -= 0.5*gamma;
62+ }
4763 }
48- }
49- else if(orbital == px || orbital == py || orbital == pz){
50- value = -1.0*this->imuAmuP;
51- if(!isGuess){
52- value -= 0.5*gamma - this->indoG1/12.0;
64+ else if(orbital == px || orbital == py || orbital == pz){
65+ value = -1.0*this->imuAmuP;
66+ if(!isGuess){
67+ value -= 0.5*gamma - this->indoG1/12.0;
68+ }
69+ }
70+ else{
71+ cout << this->errorMessageIndoCoreIntegral;
72+ cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
73+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
74+ exit(EXIT_FAILURE);
5375 }
5476 }
55- else{
56- cout << this->errorMessageIndoCoreIntegral;
77+ else if(theory == ZINDOS){
78+ cout << this->errorMessageZindoSCoreIntegral;
5779 cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
5880 cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
5981 exit(EXIT_FAILURE);
6082 }
83+
6184 return value;
6285 }
6386
--- a/src/base/atoms/Satom.h
+++ b/src/base/atoms/Satom.h
@@ -11,7 +11,7 @@ class Satom : public Atom {
1111 private:
1212 public:
1313 Satom(double x, double y, double z);
14- double GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess); // P82 - 83 in J. A. Pople book.
14+ double GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory);
1515 };
1616
1717 Satom::Satom(double x, double y, double z) : Atom(x, y, z){
@@ -39,17 +39,48 @@ Satom::Satom(double x, double y, double z) : Atom(x, y, z){
3939 this->effectiveNuclearChargeMsp = 5.45;
4040 this->effectiveNuclearChargeMd = 5.45;
4141 this->numberValenceElectrons = 6;
42- //this->indoG1 = 0.267708;
43- //this->indoF2 = 0.17372;
42+ this->indoG1 = 0.267708;
43+ this->indoF2 = 0.17372;
44+ this->zindoF0ss = 8.96 * Parameters::GetInstance()->GetEV2AU();
45+ this->zindoF0sd = 0.0;
46+ this->zindoF0dd = 0.0;
47+ this->zindoG1sp = 24807*Parameters::GetInstance()->GetKayser2AU();
48+ this->zindoF2pp = 36600*Parameters::GetInstance()->GetKayser2AU();
49+ this->zindoG2sd = 25972*Parameters::GetInstance()->GetKayser2AU();
50+ this->zindoG1pd = 34486*Parameters::GetInstance()->GetKayser2AU();
51+ this->zindoF2pd = 29173*Parameters::GetInstance()->GetKayser2AU();
52+ this->zindoG3pd = 20587*Parameters::GetInstance()->GetKayser2AU();
53+ this->zindoF2dd = 28411*Parameters::GetInstance()->GetKayser2AU();
54+ this->zindoF4dd = 18529*Parameters::GetInstance()->GetKayser2AU();
55+ this->IonPotS = -21.11 * Parameters::GetInstance()->GetEV2AU();
56+ this->IonPotP = -12.39 * Parameters::GetInstance()->GetEV2AU();
57+ this->IonPotD = -4.11 * Parameters::GetInstance()->GetEV2AU();
4458 }
4559
46-// P82 - 83 in J. A. Pople book.
47-double Satom::GetIndoCoreIntegral(OrbitalType orbital, double gamma, bool isGuess){
60+double Satom::GetCoreIntegral(OrbitalType orbital, double gamma, bool isGuess, TheoryType theory){
4861 double value = 0.0;
49- cout << this->errorMessageIndoCoreIntegral;
50- cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
51- cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
52- exit(EXIT_FAILURE);
62+
63+ if(theory == INDO){
64+ cout << this->errorMessageIndoCoreIntegral;
65+ cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
66+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
67+ exit(EXIT_FAILURE);
68+ }
69+ else if(theory == ZINDOS){
70+ if(orbital == s){
71+ value = this->GetZindoCoreIntegral(orbital, 2, 4, 0);
72+ }
73+ else if(orbital == px || orbital == py || orbital == pz){
74+ value = this->GetZindoCoreIntegral(orbital, 2, 4, 0);
75+ }
76+ else{
77+ cout << this->errorMessageZindoSCoreIntegral;
78+ cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl;
79+ cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl;
80+ exit(EXIT_FAILURE);
81+ }
82+ }
83+
5384 return value;
5485 }
5586
--- a/src/cndo/Cndo2.h
+++ b/src/cndo/Cndo2.h
@@ -513,10 +513,12 @@ double Cndo2::GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, in
513513 int mu, int nu, Molecule* molecule, double** gammaAB, double** overlap,
514514 double** orbitalElectronPopulation, bool isGuess){
515515 double value;
516- double K = 1.0;
516+
517+ double K = 1.0; // = 1.0 or 0.75, see Eq. (3.79) in J. A. Pople book
517518 if(atomA->GetValenceShellType() >= m || atomB->GetValenceShellType() >= m){
518519 K = 0.75;
519520 }
521+
520522 double bondParameter = 0.5*K*(atomA->GetBondingParameter() + atomB->GetBondingParameter());
521523 value = bondParameter*overlap[mu][nu];
522524 if(!isGuess){
--- a/src/indo/Indo.h
+++ b/src/indo/Indo.h
@@ -76,9 +76,9 @@ double Indo::GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA,
7676 double** orbitalElectronPopulation, double* atomicElectronPopulation,
7777 bool isGuess){
7878 double value;
79- value = atomA->GetIndoCoreIntegral(atomA->GetValence()[mu-firstAOIndexA],
79+ value = atomA->GetCoreIntegral(atomA->GetValence()[mu-firstAOIndexA],
8080 gammaAB[atomAIndex][atomAIndex],
81- isGuess);
81+ isGuess, this->theory);
8282
8383 if(!isGuess){
8484 double temp = 0.0;
--- /dev/null
+++ b/src/zindo/ZindoS.h
@@ -0,0 +1,152 @@
1+#ifndef INCLUDED_INDO
2+#define INCLUDED_INDO
3+
4+#include<stdio.h>
5+#include<stdlib.h>
6+#include<math.h>
7+#include<iostream>
8+#include<vector>
9+#include"../cndo/Cndo2.h"
10+
11+using namespace std;
12+using namespace MolDS_base;
13+using namespace MolDS_base_atoms;
14+
15+namespace MolDS_zindo{
16+
17+/***
18+ * Refferences for Indo are [PB_1970] and [PS_1966].
19+ */
20+class ZindoS : public MolDS_cndo::Cndo2{
21+public:
22+ ZindoS();
23+ ~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();
36+};
37+
38+ZindoS::ZindoS() : MolDS_cndo::Cndo2(){
39+ this->theory = ZINDOS;
40+ this->SetMessages();
41+ this->SetEnableAtomTypes();
42+ //cout << "ZindoS created\n";
43+}
44+
45+ZindoS::~ZindoS(){
46+ //cout << "ZindoS deleted\n";
47+}
48+
49+void ZindoS::SetMessages(){
50+ this->errorMessageSCFNotConverged
51+ = "Error in zindo::ZindoS::DoesSCF: SCF did not met convergence criterion. maxIterationsSCF=";
52+ this->errorMessageMoleculeNotSet
53+ = "Error in zindo::ZindoS::DoesSCF: A molecule is not set.\n";
54+ this->errorMessageOddTotalValenceElectrions
55+ = "Error in zindo::ZindoS::SetMolecule: Total number of valence electrons is odd. totalNumberValenceElectrons=";
56+ this->errorMessageNotEnebleAtomType
57+ = "Error in zindo::ZindoS::CheckEnableAtomType: Not enable atom is contained.\n";
58+ this->messageSCFMetConvergence = "\n\n\n\t\tZINDO/S-SCF met convergence criterion(^^b\n\n\n";
59+ this->messageStartSCF = "********** START: ZINDO/S-SCF **********\n";
60+ this->messageDoneSCF = "********** DONE: ZINDO/S-SCF **********\n\n\n";
61+}
62+
63+void ZindoS::SetEnableAtomTypes(){
64+ this->enableAtomTypes.clear();
65+ this->enableAtomTypes.push_back(H);
66+ this->enableAtomTypes.push_back(C);
67+ this->enableAtomTypes.push_back(N);
68+ this->enableAtomTypes.push_back(O);
69+ this->enableAtomTypes.push_back(S);
70+}
71+
72+double ZindoS::GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA, int mu,
73+ Molecule* molecule, double** gammaAB,
74+ double** orbitalElectronPopulation, double* atomicElectronPopulation,
75+ bool isGuess){
76+ double value;
77+ value = atomA->GetIndoCoreIntegral(atomA->GetValence()[mu-firstAOIndexA],
78+ gammaAB[atomAIndex][atomAIndex],
79+ isGuess);
80+
81+ if(!isGuess){
82+ double temp = 0.0;
83+ double coulomb = 0.0;
84+ double exchange = 0.0;
85+ int lammda = 0;
86+ OrbitalType orbitalMu = atomA->GetValence()[mu-firstAOIndexA];
87+ for(int v=0; v<atomA->GetValence().size(); v++){
88+ OrbitalType orbitalLam = atomA->GetValence()[v];
89+ coulomb = atomA->GetIndoCoulombInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex]);
90+ exchange = atomA->GetIndoExchangeInt(orbitalMu, orbitalLam, gammaAB[atomAIndex][atomAIndex]);
91+ lammda = firstAOIndexA + v;
92+ temp += orbitalElectronPopulation[lammda][lammda]*(coulomb - 0.5*exchange);
93+ }
94+ value += temp;
95+
96+ temp = 0.0;
97+ for(int BB=0; BB<molecule->GetAtomVect()->size(); BB++){
98+ if(BB != atomAIndex){
99+ Atom* atomBB = (*molecule->GetAtomVect())[BB];
100+ temp += ( atomicElectronPopulation[BB] - atomBB->GetCoreCharge() )
101+ *gammaAB[atomAIndex][BB];
102+ }
103+ }
104+ value += temp;
105+ }
106+
107+ return value;
108+}
109+
110+double ZindoS::GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, int atomBIndex,
111+ int firstAOIndexA, int firstAOIndexB,
112+ int mu, int nu, Molecule* molecule, double** gammaAB, double** overlap,
113+ double** orbitalElectronPopulation, bool isGuess){
114+ double value;
115+ double K = 1.0;
116+ if(m <= atomA->GetValenceShellType() || m <= atomB->GetValenceShellType()){
117+ K = 0.75;
118+ }
119+ double bondParameter = 0.5*K*(atomA->GetBondingParameter() + atomB->GetBondingParameter());
120+
121+ if(isGuess){
122+ value = bondParameter*overlap[mu][nu];
123+ }
124+ else{
125+ double coulomb = 0.0;
126+ double exchange = 0.0;
127+ if(atomAIndex == atomBIndex){
128+ OrbitalType orbitalMu = atomA->GetValence()[mu-firstAOIndexA];
129+ OrbitalType orbitalNu = atomA->GetValence()[nu-firstAOIndexA];
130+ coulomb = atomA->GetIndoCoulombInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex]);
131+ exchange = atomA->GetIndoExchangeInt(orbitalMu, orbitalNu, gammaAB[atomAIndex][atomAIndex]);
132+ value = (1.5*exchange - 0.5*coulomb)*orbitalElectronPopulation[mu][nu];
133+ }
134+ else{
135+ value = bondParameter*overlap[mu][nu];
136+ value -= 0.5*orbitalElectronPopulation[mu][nu]*gammaAB[atomAIndex][atomBIndex];
137+ }
138+ }
139+
140+ return value;
141+}
142+
143+void ZindoS::CalcGammaAB(double** gammaAB, Molecule* molecule){
144+ // Do nothing;
145+}
146+
147+
148+}
149+#endif
150+
151+
152+