修订版 | 85db2a874448bfb65d05aa4ebb812304f7596a98 (tree) |
---|---|
时间 | 2011-01-13 11:33:21 |
作者 | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
Total energy in ZINDO/S is implemented.
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/MolDS/trunk@59 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -38,6 +38,7 @@ protected: | ||
38 | 38 | string errorMessageNotEnebleAtomType; |
39 | 39 | string errorMessageCoulombInt; |
40 | 40 | string errorMessageExchangeInt; |
41 | + string errorMessageMolecularIntegralElement; | |
41 | 42 | string messageSCFMetConvergence; |
42 | 43 | string messageStartSCF; |
43 | 44 | string messageDoneSCF; |
@@ -174,6 +175,8 @@ void Cndo2::SetMessages(){ | ||
174 | 175 | = "Error in cndo::Cndo2::ChecEnableAtomType: Non available atom is contained.\n"; |
175 | 176 | this->errorMessageAtomType = "\tatom type = "; |
176 | 177 | this->errorMessageOrbitalType = "\torbital type = "; |
178 | + this->errorMessageMolecularIntegralElement | |
179 | + = "Error in cndo::Cndo2::GetMolecularIntegralElement: Non available orbital is contained.\n"; | |
177 | 180 | this->messageSCFMetConvergence = "\n\n\n\t\tCNDO/2-SCF met convergence criterion(^^b\n\n\n"; |
178 | 181 | this->messageStartSCF = "********** START: CNDO/2-SCF **********\n"; |
179 | 182 | this->messageDoneSCF = "********** DONE: CNDO/2-SCF **********\n\n\n"; |
@@ -60,6 +60,8 @@ void Indo::SetMessages(){ | ||
60 | 60 | = "Error in indo::Indo::CheckEnableAtomType: Non available atom is contained.\n"; |
61 | 61 | this->errorMessageCoulombInt = "Error in base_indo::Indo::GetCoulombInt: Invalid orbitalType.\n"; |
62 | 62 | this->errorMessageExchangeInt = "Error in base_indo::Indo::GetExchangeInt: Invalid orbitalType.\n"; |
63 | + this->errorMessageMolecularIntegralElement | |
64 | + = "Error in indo::Indo::GetMolecularIntegralElement: Non available orbital is contained.\n"; | |
63 | 65 | this->messageSCFMetConvergence = "\n\n\n\t\tINDO-SCF met convergence criterion(^^b\n\n\n"; |
64 | 66 | this->messageStartSCF = "********** START: INDO-SCF **********\n"; |
65 | 67 | this->messageDoneSCF = "********** DONE: INDO-SCF **********\n\n\n"; |
@@ -1,7 +1,7 @@ | ||
1 | 1 | THEORY |
2 | 2 | //cndo/2 |
3 | - indo | |
4 | - //zindo/s | |
3 | + //indo | |
4 | + zindo/s | |
5 | 5 | //none |
6 | 6 | //principal_axes |
7 | 7 | //translate |
@@ -33,6 +33,8 @@ protected: | ||
33 | 33 | int mu, int nu, Molecule* molecule, double** gammaAB, double** overelap, |
34 | 34 | double** orbitalElectronPopulation, bool isGuess); |
35 | 35 | virtual void CalcDiatomicOverlapInDiatomicFrame(double** diatomicOverlap, Atom* atomA, Atom* atomB); |
36 | + virtual double GetMolecularIntegralElement(int moI, int moJ, int moK, int moL, | |
37 | + Molecule* molecule, double** fockMatrix, double** gammaAB); | |
36 | 38 | private: |
37 | 39 | double GetCoulombInt(OrbitalType orbital1, |
38 | 40 | OrbitalType orbital2, |
@@ -68,6 +70,8 @@ void ZindoS::SetMessages(){ | ||
68 | 70 | this->errorMessageCoulombInt = "Error in base_zindo::ZindoS::GetCoulombInt: Invalid orbitalType.\n"; |
69 | 71 | this->errorMessageExchangeInt = "Error in base_zindo::ZindoS::GetExchangeInt: Invalid orbitalType.\n"; |
70 | 72 | this->errorMessageNishimotoMataga = "Error in base_zindo::ZindoS::GetNishimotoMatagaTwoEleInt: Invalid orbitalType.\n"; |
73 | + this->errorMessageMolecularIntegralElement | |
74 | + = "Error in zindo::ZindoS::GetMolecularIntegralElement: Non available orbital is contained.\n"; | |
71 | 75 | this->messageSCFMetConvergence = "\n\n\n\t\tZINDO/S-SCF met convergence criterion(^^b\n\n\n"; |
72 | 76 | this->messageStartSCF = "********** START: ZINDO/S-SCF **********\n"; |
73 | 77 | this->messageDoneSCF = "********** DONE: ZINDO/S-SCF **********\n\n\n"; |
@@ -435,6 +439,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA, | ||
435 | 439 | orbitalA == pz ){ |
436 | 440 | gammaAA = atomA->GetZindoF0ss(); |
437 | 441 | } |
442 | + /* | |
438 | 443 | else if(orbitalA == dxy || |
439 | 444 | orbitalA == dyz || |
440 | 445 | orbitalA == dzz || |
@@ -442,6 +447,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA, | ||
442 | 447 | orbitalA == dxxyy ){ |
443 | 448 | gammaAA = atomA->GetZindoF0dd(); |
444 | 449 | } |
450 | + */ | |
445 | 451 | else{ |
446 | 452 | stringstream ss; |
447 | 453 | ss << this->errorMessageNishimotoMataga; |
@@ -457,6 +463,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA, | ||
457 | 463 | orbitalB == pz ){ |
458 | 464 | gammaBB = atomB->GetZindoF0ss(); |
459 | 465 | } |
466 | + /* | |
460 | 467 | else if(orbitalB == dxy || |
461 | 468 | orbitalB == dyz || |
462 | 469 | orbitalB == dzz || |
@@ -464,6 +471,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA, | ||
464 | 471 | orbitalB == dxxyy ){ |
465 | 472 | gammaBB = atomB->GetZindoF0dd(); |
466 | 473 | } |
474 | + */ | |
467 | 475 | else{ |
468 | 476 | stringstream ss; |
469 | 477 | ss << this->errorMessageNishimotoMataga; |
@@ -476,7 +484,6 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA, | ||
476 | 484 | |
477 | 485 | } |
478 | 486 | |
479 | - | |
480 | 487 | void ZindoS::CalcDiatomicOverlapInDiatomicFrame(double** diatomicOverlap, Atom* atomA, Atom* atomB){ |
481 | 488 | |
482 | 489 | MolDS_cndo::Cndo2::CalcDiatomicOverlapInDiatomicFrame(diatomicOverlap, atomA, atomB); |
@@ -497,6 +504,84 @@ void ZindoS::CalcDiatomicOverlapInDiatomicFrame(double** diatomicOverlap, Atom* | ||
497 | 504 | |
498 | 505 | } |
499 | 506 | |
507 | +double ZindoS::GetMolecularIntegralElement(int moI, int moJ, int moK, int moL, | |
508 | + Molecule* molecule, double** fockMatrix, double** gammaAB){ | |
509 | + double value = 0.0; | |
510 | + Atom* atomA = NULL; | |
511 | + Atom* atomB = NULL; | |
512 | + int firstAOIndexA; | |
513 | + int firstAOIndexB; | |
514 | + int numberAOsA; | |
515 | + int numberAOsB; | |
516 | + double gamma; | |
517 | + double exchange; | |
518 | + double coulomb; | |
519 | + OrbitalType orbitalMu; | |
520 | + OrbitalType orbitalNu; | |
521 | + | |
522 | + for(int A=0; A<molecule->GetAtomVect()->size(); A++){ | |
523 | + atomA = (*molecule->GetAtomVect())[A]; | |
524 | + firstAOIndexA = atomA->GetFirstAOIndex(); | |
525 | + numberAOsA = atomA->GetValence().size(); | |
526 | + | |
527 | + for(int mu=firstAOIndexA; mu<firstAOIndexA+numberAOsA; mu++){ | |
528 | + orbitalMu = atomA->GetValence()[mu-firstAOIndexA]; | |
529 | + | |
530 | + // CNDO term | |
531 | + for(int B=0; B<molecule->GetAtomVect()->size(); B++){ | |
532 | + atomB = (*molecule->GetAtomVect())[B]; | |
533 | + firstAOIndexB = atomB->GetFirstAOIndex(); | |
534 | + numberAOsB = atomB->GetValence().size(); | |
535 | + | |
536 | + for(int nu=firstAOIndexB; nu<firstAOIndexB+numberAOsB; nu++){ | |
537 | + orbitalNu = atomB->GetValence()[nu-firstAOIndexB]; | |
538 | + | |
539 | + if(A==B){ | |
540 | + gamma = atomA->GetZindoF0ss(); | |
541 | + } | |
542 | + else{ | |
543 | + gamma = this->GetNishimotoMatagaTwoEleInt(atomA, orbitalMu, atomB, orbitalNu); | |
544 | + } | |
545 | + | |
546 | + value += gamma*fockMatrix[moI][mu]*fockMatrix[moJ][mu]*fockMatrix[moK][nu]*fockMatrix[moL][nu]; | |
547 | + } | |
548 | + } | |
549 | + | |
550 | + // Aditional term for INDO or ZIND/S, see Eq. (10) in [RZ_1973] | |
551 | + for(int nu=firstAOIndexA; nu<firstAOIndexA+numberAOsA; nu++){ | |
552 | + orbitalNu = atomA->GetValence()[nu-firstAOIndexA]; | |
553 | + | |
554 | + if(mu!=nu){ | |
555 | + exchange = this->GetExchangeInt(orbitalMu, orbitalNu, atomA); | |
556 | + | |
557 | + value += exchange*fockMatrix[moI][mu]*fockMatrix[moJ][nu]*fockMatrix[moK][nu]*fockMatrix[moL][mu]; | |
558 | + } | |
559 | + | |
560 | + coulomb = this->GetCoulombInt(orbitalMu, orbitalNu, atomA); | |
561 | + | |
562 | + if( (orbitalMu == s || orbitalMu == px || orbitalMu == py || pz) && | |
563 | + (orbitalNu == s || orbitalNu == px || orbitalNu == py || pz) ){ | |
564 | + gamma = atomA->GetZindoF0ss(); | |
565 | + } | |
566 | + else{ | |
567 | + stringstream ss; | |
568 | + ss << this->errorMessageMolecularIntegralElement; | |
569 | + ss << this->errorMessageAtomType << AtomTypeStr(atomA->GetAtomType()) << "\n"; | |
570 | + ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbitalMu) << "\n"; | |
571 | + ss << this->errorMessageOrbitalType << OrbitalTypeStr(orbitalNu) << "\n"; | |
572 | + throw MolDSException(ss.str()); | |
573 | + } | |
574 | + | |
575 | + value += (coulomb-gamma)*fockMatrix[moI][mu]*fockMatrix[moJ][mu]*fockMatrix[moK][nu]*fockMatrix[moL][nu]; | |
576 | + | |
577 | + } | |
578 | + | |
579 | + } | |
580 | + } | |
581 | + | |
582 | + return value; | |
583 | +} | |
584 | + | |
500 | 585 | |
501 | 586 | |
502 | 587 |