Revision | 5d7e889988c7cade162b71befb236cf1858b8598 (tree) |
---|---|
Zeit | 2010-12-08 22:32:05 |
Autor | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
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
@@ -23,6 +23,7 @@ private: | ||
23 | 23 | void SetDefaultValues(); |
24 | 24 | double eV2AU; |
25 | 25 | double angstrom2AU; |
26 | + double kayser2AU; | |
26 | 27 | double bondingAdjustParameterK; //see (3.79) in J. A. Pople book |
27 | 28 | TheoryType currentTheory; |
28 | 29 |
@@ -36,6 +37,7 @@ public: | ||
36 | 37 | void SetMaxIterationsSCF(int maxIterationsSCF); |
37 | 38 | double GetEV2AU(); |
38 | 39 | double GetAngstrom2AU(); |
40 | + double GetKayser2AU(); | |
39 | 41 | double GetBondingAdjustParameterK(); |
40 | 42 | TheoryType GetCurrentTheory(); |
41 | 43 | void SetCurrentTheory(TheoryType theory); |
@@ -67,9 +69,9 @@ void Parameters::DeleteInstance(){ | ||
67 | 69 | void Parameters::SetDefaultValues(){ |
68 | 70 | this->eV2AU = 0.03674903; |
69 | 71 | this->angstrom2AU = 1.0/0.5291772; |
72 | + this->kayser2AU = 4.556336*pow(10.0,-6.0); | |
70 | 73 | this->thresholdSCF = pow(10.0, -8.0); |
71 | 74 | this->maxIterationsSCF = 100; |
72 | - this->bondingAdjustParameterK = 0.75; | |
73 | 75 | this->currentTheory = CNDO2; |
74 | 76 | } |
75 | 77 |
@@ -97,6 +99,10 @@ double Parameters::GetAngstrom2AU(){ | ||
97 | 99 | return this->angstrom2AU; |
98 | 100 | } |
99 | 101 | |
102 | +double Parameters::GetKayser2AU(){ | |
103 | + return this->kayser2AU; | |
104 | +} | |
105 | + | |
100 | 106 | double Parameters::GetBondingAdjustParameterK(){ |
101 | 107 | return this->bondingAdjustParameterK; |
102 | 108 | } |
@@ -21,28 +21,52 @@ private: | ||
21 | 21 | string errorMessageIndoExchangeInt; |
22 | 22 | string errorMessageShellType; |
23 | 23 | 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] | |
24 | 31 | protected: |
25 | 32 | string errorMessageIndoCoreIntegral; |
33 | + string errorMessageZindoSCoreIntegral; | |
26 | 34 | string errorMessageAtomType; |
27 | 35 | string errorMessageOrbitalType; |
28 | 36 | double* xyz; |
29 | 37 | AtomType atomType; |
30 | 38 | 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; | |
40 | 39 | ShellType valenceShellType; |
41 | 40 | int firstAOIndex; |
42 | - int GetEffectivePrincipalQuantumNumber(ShellType shellType); | |
43 | 41 | 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 | + | |
46 | 70 | public: |
47 | 71 | Atom(); |
48 | 72 | Atom(double x, double y, double z); |
@@ -61,7 +85,7 @@ public: | ||
61 | 85 | double GetOrbitalExponent(ShellType shellType, OrbitalType orbitalType); // (1.73) in J. A. Pople book. |
62 | 86 | double GetIndoCoulombInt(OrbitalType orbital1, OrbitalType orbital2, double gamma); // (3.87) - (3.91) in J. A. Pople book. |
63 | 87 | 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 | |
65 | 89 | }; |
66 | 90 | |
67 | 91 | Atom::Atom(){ |
@@ -89,12 +113,14 @@ void Atom::SetMessages(){ | ||
89 | 113 | this->errorMessageOrbitalExponent = "Error in base_atoms::Atom::GetOrbitalExponent: Invalid shelltype or orbitalType.\n"; |
90 | 114 | this->errorMessageIndoCoulombInt = "Error in base_atoms::Atom::GetIndoCoulombInt: Invalid orbitalType.\n"; |
91 | 115 | 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"; | |
93 | 118 | this->errorMessageAtomType = "\tatom type = "; |
94 | 119 | this->errorMessageOrbitalType = "\torbital type = "; |
95 | 120 | this->errorMessageShellType = "\tshell type = "; |
96 | 121 | this->errorMessageEffectivPrincipalQuantumNumber = |
97 | 122 | "Error in base::Atom::GetEffectivePrincipalQuantumNumber: invalid shelltype.\n"; |
123 | + this->errorMessageZindoCoreIntegral = "Error in base_stoms::Atom::GetZindoCoreINtegral: Invalid orbitalType.\n"; | |
98 | 124 | } |
99 | 125 | |
100 | 126 | AtomType Atom::GetAtomType(){ |
@@ -276,6 +302,74 @@ double Atom::GetIndoExchangeInt(OrbitalType orbital1, OrbitalType orbital2, doub | ||
276 | 302 | return value; |
277 | 303 | } |
278 | 304 | |
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 | + | |
279 | 373 | } |
280 | 374 | #endif |
281 | 375 |
@@ -11,7 +11,7 @@ class Catom : public Atom { | ||
11 | 11 | private: |
12 | 12 | public: |
13 | 13 | 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); | |
15 | 15 | }; |
16 | 16 | |
17 | 17 | 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){ | ||
33 | 33 | this->numberValenceElectrons = 4; |
34 | 34 | this->indoG1 = 0.267708; |
35 | 35 | 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(); | |
36 | 50 | } |
37 | 51 | |
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){ | |
40 | 53 | 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 | + } | |
45 | 61 | } |
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); | |
53 | 75 | } |
54 | 76 | } |
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 | + } | |
60 | 90 | } |
91 | + | |
61 | 92 | return value; |
62 | 93 | } |
63 | 94 |
@@ -12,7 +12,7 @@ class Hatom : public Atom { | ||
12 | 12 | private: |
13 | 13 | public: |
14 | 14 | 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); | |
16 | 16 | }; |
17 | 17 | |
18 | 18 | 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){ | ||
31 | 31 | this->numberValenceElectrons = 1; |
32 | 32 | this->indoG1 = 0.0; |
33 | 33 | 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(); | |
34 | 48 | } |
35 | 49 | |
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){ | |
38 | 51 | 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); | |
43 | 65 | } |
44 | 66 | } |
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 | + | |
50 | 78 | } |
79 | + | |
51 | 80 | return value; |
52 | 81 | } |
53 | 82 |
@@ -12,7 +12,7 @@ class Liatom : public Atom { | ||
12 | 12 | private: |
13 | 13 | public: |
14 | 14 | 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); | |
16 | 16 | }; |
17 | 17 | |
18 | 18 | 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){ | ||
34 | 34 | this->numberValenceElectrons = 1; |
35 | 35 | this->indoG1 = 0.092012; |
36 | 36 | 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(); | |
37 | 51 | } |
38 | 52 | |
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){ | |
41 | 54 | |
42 | 55 | 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 | + } | |
47 | 63 | } |
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); | |
53 | 75 | } |
54 | 76 | } |
55 | - else{ | |
56 | - cout << this->errorMessageIndoCoreIntegral; | |
77 | + else if(theory == ZINDOS){ | |
78 | + cout << this->errorMessageZindoSCoreIntegral; | |
57 | 79 | cout << this->errorMessageAtomType << AtomTypeStr(this->atomType) << endl; |
58 | 80 | cout << this->errorMessageOrbitalType << OrbitalTypeStr(orbital) << endl; |
59 | 81 | exit(EXIT_FAILURE); |
60 | 82 | } |
83 | + | |
61 | 84 | return value; |
62 | 85 | } |
63 | 86 |
@@ -11,7 +11,7 @@ class Satom : public Atom { | ||
11 | 11 | private: |
12 | 12 | public: |
13 | 13 | 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); | |
15 | 15 | }; |
16 | 16 | |
17 | 17 | 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){ | ||
39 | 39 | this->effectiveNuclearChargeMsp = 5.45; |
40 | 40 | this->effectiveNuclearChargeMd = 5.45; |
41 | 41 | 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(); | |
44 | 58 | } |
45 | 59 | |
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){ | |
48 | 61 | 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 | + | |
53 | 84 | return value; |
54 | 85 | } |
55 | 86 |
@@ -513,10 +513,12 @@ double Cndo2::GetFockOffDiagElement(Atom* atomA, Atom* atomB, int atomAIndex, in | ||
513 | 513 | int mu, int nu, Molecule* molecule, double** gammaAB, double** overlap, |
514 | 514 | double** orbitalElectronPopulation, bool isGuess){ |
515 | 515 | 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 | |
517 | 518 | if(atomA->GetValenceShellType() >= m || atomB->GetValenceShellType() >= m){ |
518 | 519 | K = 0.75; |
519 | 520 | } |
521 | + | |
520 | 522 | double bondParameter = 0.5*K*(atomA->GetBondingParameter() + atomB->GetBondingParameter()); |
521 | 523 | value = bondParameter*overlap[mu][nu]; |
522 | 524 | if(!isGuess){ |
@@ -76,9 +76,9 @@ double Indo::GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA, | ||
76 | 76 | double** orbitalElectronPopulation, double* atomicElectronPopulation, |
77 | 77 | bool isGuess){ |
78 | 78 | double value; |
79 | - value = atomA->GetIndoCoreIntegral(atomA->GetValence()[mu-firstAOIndexA], | |
79 | + value = atomA->GetCoreIntegral(atomA->GetValence()[mu-firstAOIndexA], | |
80 | 80 | gammaAB[atomAIndex][atomAIndex], |
81 | - isGuess); | |
81 | + isGuess, this->theory); | |
82 | 82 | |
83 | 83 | if(!isGuess){ |
84 | 84 | double temp = 0.0; |
@@ -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 | + |