Révision | 5338bc7dd42e09db72354077aab594199a21f584 (tree) |
---|---|
l'heure | 2011-02-05 14:39:53 |
Auteur | Mikiya Fujii <mikiya.fujii@gmai...> |
Commiter | Mikiya Fujii |
Cndo2::DoesSCF is refactored to update atomic charge correctlly.
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/MolDS/trunk@83 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -108,7 +108,6 @@ private: | ||
108 | 108 | Molecule* molecule); |
109 | 109 | void DoesDIIS(double** orbitalElectronPopulation, |
110 | 110 | double** oldOrbitalElectronPopulation, |
111 | - double* atomicElectronPopulation, | |
112 | 111 | double*** diisStoredDensityMatrix, |
113 | 112 | double*** diisStoredErrorVect, |
114 | 113 | double** diisErrorProducts, |
@@ -356,16 +355,17 @@ void Cndo2::DoesSCF(){ | ||
356 | 355 | this->molecule, |
357 | 356 | this->fockMatrix); |
358 | 357 | |
359 | - // calc. electron population in each atom. | |
360 | - this->CalcAtomicElectronPopulation(this->atomicElectronPopulation, | |
361 | - this->orbitalElectronPopulation, | |
362 | - this->molecule); | |
363 | 358 | |
364 | 359 | // check convergence or update oldpopulation |
365 | 360 | if(this->SatisfyConvergenceCriterion(oldOrbitalElectronPopulation, |
366 | 361 | this->orbitalElectronPopulation, |
367 | 362 | this->molecule->GetTotalNumberAOs(), &rmsDensity, i)){ |
368 | 363 | |
364 | + // calc. electron population in each atom. | |
365 | + this->CalcAtomicElectronPopulation(this->atomicElectronPopulation, | |
366 | + this->orbitalElectronPopulation, | |
367 | + this->molecule); | |
368 | + | |
369 | 369 | cout << this->messageSCFMetConvergence; |
370 | 370 | this->OutputResults(this->fockMatrix, this->energiesMO, this->atomicElectronPopulation, this->molecule); |
371 | 371 | break; |
@@ -378,7 +378,6 @@ void Cndo2::DoesSCF(){ | ||
378 | 378 | // diis |
379 | 379 | this->DoesDIIS(this->orbitalElectronPopulation, |
380 | 380 | oldOrbitalElectronPopulation, |
381 | - this->atomicElectronPopulation, | |
382 | 381 | diisStoredDensityMatrix, |
383 | 382 | diisStoredErrorVect, |
384 | 383 | diisErrorProducts, |
@@ -386,6 +385,11 @@ void Cndo2::DoesSCF(){ | ||
386 | 385 | diisNumErrorVect, |
387 | 386 | this->molecule, |
388 | 387 | i); |
388 | + | |
389 | + // calc. electron population in each atom. | |
390 | + this->CalcAtomicElectronPopulation(this->atomicElectronPopulation, | |
391 | + this->orbitalElectronPopulation, | |
392 | + this->molecule); | |
389 | 393 | |
390 | 394 | this->UpdateOldOrbitalElectronPopulation(oldOrbitalElectronPopulation, |
391 | 395 | this->orbitalElectronPopulation, |
@@ -463,7 +467,6 @@ void Cndo2::FreeSCFTemporaryMatrices(double*** oldOrbitalElectronPopulation, | ||
463 | 467 | */ |
464 | 468 | void Cndo2::DoesDIIS(double** orbitalElectronPopulation, |
465 | 469 | double** oldOrbitalElectronPopulation, |
466 | - double* atomicElectronPopulation, | |
467 | 470 | double*** diisStoredDensityMatrix, |
468 | 471 | double*** diisStoredErrorVect, |
469 | 472 | double** diisErrorProducts, |
@@ -538,8 +541,6 @@ void Cndo2::DoesDIIS(double** orbitalElectronPopulation, | ||
538 | 541 | } |
539 | 542 | } |
540 | 543 | |
541 | - // calc. electron population in each atom. | |
542 | - this->CalcAtomicElectronPopulation(atomicElectronPopulation, orbitalElectronPopulation, molecule); | |
543 | 544 | } |
544 | 545 | } |
545 | 546 | } |