リビジョン | b3cb13030cd4177920ca9a30ddc185a61de1b866 (tree) |
---|---|
日時 | 2011-09-29 17:45:16 |
作者 | Mikiya Fujii <mikiya.fujii@gmai...> |
コミッター | Mikiya Fujii |
Cndo2::DoesSCF() is overloaded with Cndo2::DoesSCF(bool requiresGuess).
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/MolDS/trunk@153 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -29,6 +29,7 @@ public: | ||
29 | 29 | ~Cndo2(); |
30 | 30 | void SetMolecule(Molecule* molecule); |
31 | 31 | void DoesSCF(); |
32 | + void DoesSCF(bool requiresGuess); | |
32 | 33 | protected: |
33 | 34 | string errorMessageAtomA; |
34 | 35 | string errorMessageAtomB; |
@@ -336,7 +337,7 @@ void Cndo2::CheckEnableAtomType(Molecule* molecule){ | ||
336 | 337 | * before this function is called. |
337 | 338 | * |
338 | 339 | *****/ |
339 | -void Cndo2::DoesSCF(){ | |
340 | +void Cndo2::DoesSCF(bool requiresGuess){ | |
340 | 341 | |
341 | 342 | cout << this->messageStartSCF; |
342 | 343 |
@@ -379,7 +380,7 @@ void Cndo2::DoesSCF(){ | ||
379 | 380 | bool isGuess=true; |
380 | 381 | for(int i=0; i<maxIterationsSCF; i++){ |
381 | 382 | |
382 | - i==0 ? isGuess = true : isGuess = false; | |
383 | + (i==0 && requiresGuess) ? isGuess = true : isGuess = false; | |
383 | 384 | this->CalcFockMatrix(this->fockMatrix, |
384 | 385 | this->molecule, |
385 | 386 | this->overlap, |
@@ -469,6 +470,11 @@ void Cndo2::DoesSCF(){ | ||
469 | 470 | |
470 | 471 | } |
471 | 472 | |
473 | +void Cndo2::DoesSCF(){ | |
474 | + bool requiresGuess = true; | |
475 | + this->DoesSCF(requiresGuess); | |
476 | +} | |
477 | + | |
472 | 478 | void Cndo2::FreeSCFTemporaryMatrices(double*** oldOrbitalElectronPopulation, |
473 | 479 | double**** diisStoredDensityMatrix, |
474 | 480 | double**** diisStoredErrorVect, |