• 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

修订版85db2a874448bfb65d05aa4ebb812304f7596a98 (tree)
时间2011-01-13 11:33:21
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

Total energy in ZINDO/S is implemented.

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

更改概述

差异

--- a/src/cndo/Cndo2.h
+++ b/src/cndo/Cndo2.h
@@ -38,6 +38,7 @@ protected:
3838 string errorMessageNotEnebleAtomType;
3939 string errorMessageCoulombInt;
4040 string errorMessageExchangeInt;
41+ string errorMessageMolecularIntegralElement;
4142 string messageSCFMetConvergence;
4243 string messageStartSCF;
4344 string messageDoneSCF;
@@ -174,6 +175,8 @@ void Cndo2::SetMessages(){
174175 = "Error in cndo::Cndo2::ChecEnableAtomType: Non available atom is contained.\n";
175176 this->errorMessageAtomType = "\tatom type = ";
176177 this->errorMessageOrbitalType = "\torbital type = ";
178+ this->errorMessageMolecularIntegralElement
179+ = "Error in cndo::Cndo2::GetMolecularIntegralElement: Non available orbital is contained.\n";
177180 this->messageSCFMetConvergence = "\n\n\n\t\tCNDO/2-SCF met convergence criterion(^^b\n\n\n";
178181 this->messageStartSCF = "********** START: CNDO/2-SCF **********\n";
179182 this->messageDoneSCF = "********** DONE: CNDO/2-SCF **********\n\n\n";
--- a/src/indo/Indo.h
+++ b/src/indo/Indo.h
@@ -60,6 +60,8 @@ void Indo::SetMessages(){
6060 = "Error in indo::Indo::CheckEnableAtomType: Non available atom is contained.\n";
6161 this->errorMessageCoulombInt = "Error in base_indo::Indo::GetCoulombInt: Invalid orbitalType.\n";
6262 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";
6365 this->messageSCFMetConvergence = "\n\n\n\t\tINDO-SCF met convergence criterion(^^b\n\n\n";
6466 this->messageStartSCF = "********** START: INDO-SCF **********\n";
6567 this->messageDoneSCF = "********** DONE: INDO-SCF **********\n\n\n";
--- a/src/input.in
+++ b/src/input.in
@@ -1,7 +1,7 @@
11 THEORY
22 //cndo/2
3- indo
4- //zindo/s
3+ //indo
4+ zindo/s
55 //none
66 //principal_axes
77 //translate
--- a/src/zindo/ZindoS.h
+++ b/src/zindo/ZindoS.h
@@ -33,6 +33,8 @@ protected:
3333 int mu, int nu, Molecule* molecule, double** gammaAB, double** overelap,
3434 double** orbitalElectronPopulation, bool isGuess);
3535 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);
3638 private:
3739 double GetCoulombInt(OrbitalType orbital1,
3840 OrbitalType orbital2,
@@ -68,6 +70,8 @@ void ZindoS::SetMessages(){
6870 this->errorMessageCoulombInt = "Error in base_zindo::ZindoS::GetCoulombInt: Invalid orbitalType.\n";
6971 this->errorMessageExchangeInt = "Error in base_zindo::ZindoS::GetExchangeInt: Invalid orbitalType.\n";
7072 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";
7175 this->messageSCFMetConvergence = "\n\n\n\t\tZINDO/S-SCF met convergence criterion(^^b\n\n\n";
7276 this->messageStartSCF = "********** START: ZINDO/S-SCF **********\n";
7377 this->messageDoneSCF = "********** DONE: ZINDO/S-SCF **********\n\n\n";
@@ -435,6 +439,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA,
435439 orbitalA == pz ){
436440 gammaAA = atomA->GetZindoF0ss();
437441 }
442+ /*
438443 else if(orbitalA == dxy ||
439444 orbitalA == dyz ||
440445 orbitalA == dzz ||
@@ -442,6 +447,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA,
442447 orbitalA == dxxyy ){
443448 gammaAA = atomA->GetZindoF0dd();
444449 }
450+ */
445451 else{
446452 stringstream ss;
447453 ss << this->errorMessageNishimotoMataga;
@@ -457,6 +463,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA,
457463 orbitalB == pz ){
458464 gammaBB = atomB->GetZindoF0ss();
459465 }
466+ /*
460467 else if(orbitalB == dxy ||
461468 orbitalB == dyz ||
462469 orbitalB == dzz ||
@@ -464,6 +471,7 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA,
464471 orbitalB == dxxyy ){
465472 gammaBB = atomB->GetZindoF0dd();
466473 }
474+ */
467475 else{
468476 stringstream ss;
469477 ss << this->errorMessageNishimotoMataga;
@@ -476,7 +484,6 @@ double ZindoS::GetNishimotoMatagaTwoEleInt(Atom* atomA, OrbitalType orbitalA,
476484
477485 }
478486
479-
480487 void ZindoS::CalcDiatomicOverlapInDiatomicFrame(double** diatomicOverlap, Atom* atomA, Atom* atomB){
481488
482489 MolDS_cndo::Cndo2::CalcDiatomicOverlapInDiatomicFrame(diatomicOverlap, atomA, atomB);
@@ -497,6 +504,84 @@ void ZindoS::CalcDiatomicOverlapInDiatomicFrame(double** diatomicOverlap, Atom*
497504
498505 }
499506
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+
500585
501586
502587