修订版 | d26cc3bdc66543d1066f850a7d74de562360fdd8 (tree) |
---|---|
时间 | 2010-12-08 17:16:30 |
作者 | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
Modification for zindo is carried out.
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/MolDS/trunk@14 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -20,11 +20,14 @@ Satom::Satom(double x, double y, double z) : Atom(x, y, z){ | ||
20 | 20 | this->valence.push_back(py); |
21 | 21 | this->valence.push_back(pz); |
22 | 22 | this->valence.push_back(px); |
23 | - this->valence.push_back(dxy); | |
24 | - this->valence.push_back(dyz); | |
25 | - this->valence.push_back(dzz); | |
26 | - this->valence.push_back(dzx); | |
27 | - this->valence.push_back(dxxyy); | |
23 | + if(Parameters::GetInstance()->GetCurrentTheory() == CNDO2 || | |
24 | + Parameters::GetInstance()->GetCurrentTheory() == INDO){ | |
25 | + this->valence.push_back(dxy); | |
26 | + this->valence.push_back(dyz); | |
27 | + this->valence.push_back(dzz); | |
28 | + this->valence.push_back(dzx); | |
29 | + this->valence.push_back(dxxyy); | |
30 | + } | |
28 | 31 | this->bondingParameter = -18.150*Parameters::GetInstance()->GetEV2AU(); |
29 | 32 | this->coreCharge = 6.0; |
30 | 33 | this->imuAmuS = 17.650*Parameters::GetInstance()->GetEV2AU(); |
@@ -55,7 +55,6 @@ private: | ||
55 | 55 | Molecule* molecule, double** fockMatrix); |
56 | 56 | void CalcAtomicElectronPopulation(double* atomicElectronPopulation, |
57 | 57 | double** orbitalElectronPopulation, Molecule* molecule); |
58 | - void CalcGammaAB(double** gammaAB, Molecule* molecule); | |
59 | 58 | void CalcOverlap(double** overlap, Molecule* molecule); |
60 | 59 | void CalcRotatingMatrix(double** rotatingMatrix, Atom* atomA, Atom* atomB); |
61 | 60 | void CalcDiatomicOverlapInDiatomicFrame(double** diatomicOverlap, Atom* atomA, Atom* atomB); |
@@ -82,6 +81,7 @@ protected: | ||
82 | 81 | string messageStartSCF; |
83 | 82 | string messageDoneSCF; |
84 | 83 | vector<AtomType> enableAtomTypes; |
84 | + virtual void CalcGammaAB(double** gammaAB, Molecule* molecule); | |
85 | 85 | virtual void SetMessages(); |
86 | 86 | virtual void SetEnableAtomTypes(); |
87 | 87 | virtual double GetFockDiagElement(Atom* atomA, int atomAIndex, int firstAOIndexA, |
@@ -92,6 +92,7 @@ protected: | ||
92 | 92 | int firstAOIndexA, int firstAOIndexB, |
93 | 93 | int mu, int nu, Molecule* molecule, double** gammaAB, double** overlap, |
94 | 94 | double** orbitalElectronPopulation, bool isGuess); |
95 | + TheoryType theory; | |
95 | 96 | public: |
96 | 97 | Cndo2(); |
97 | 98 | ~Cndo2(); |
@@ -100,6 +101,7 @@ public: | ||
100 | 101 | }; |
101 | 102 | |
102 | 103 | Cndo2::Cndo2(){ |
104 | + this->theory = CNDO2; | |
103 | 105 | this->SetMessages(); |
104 | 106 | this->SetEnableAtomTypes(); |
105 | 107 | //cout << "Cndo created\n"; |
@@ -197,8 +199,10 @@ void Cndo2::SetMolecule(Molecule* molecule){ | ||
197 | 199 | |
198 | 200 | // set molecule and malloc |
199 | 201 | this->molecule = molecule; |
200 | - this->gammaAB = MallocerFreer::GetInstance()->MallocDoubleMatrix2d | |
201 | - (this->molecule->GetAtomVect()->size(), this->molecule->GetAtomVect()->size()); | |
202 | + if(this->theory == CNDO2 || this->theory == INDO){ | |
203 | + this->gammaAB = MallocerFreer::GetInstance()->MallocDoubleMatrix2d | |
204 | + (this->molecule->GetAtomVect()->size(), this->molecule->GetAtomVect()->size()); | |
205 | + } | |
202 | 206 | this->overlap = MallocerFreer::GetInstance()->MallocDoubleMatrix2d |
203 | 207 | (this->molecule->GetTotalNumberAOs(), this->molecule->GetTotalNumberAOs()); |
204 | 208 | this->orbitalElectronPopulation = MallocerFreer::GetInstance()->MallocDoubleMatrix2d |
@@ -35,6 +35,7 @@ protected: | ||
35 | 35 | }; |
36 | 36 | |
37 | 37 | Indo::Indo() : MolDS_cndo::Cndo2(){ |
38 | + this->theory = INDO; | |
38 | 39 | this->SetMessages(); |
39 | 40 | this->SetEnableAtomTypes(); |
40 | 41 | //cout << "Indo created\n"; |