• 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

修订版5338bc7dd42e09db72354077aab594199a21f584 (tree)
时间2011-02-05 14:39:53
作者Mikiya Fujii <mikiya.fujii@gmai...>
CommiterMikiya Fujii

Log Message

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

更改概述

差异

--- a/src/cndo/Cndo2.h
+++ b/src/cndo/Cndo2.h
@@ -108,7 +108,6 @@ private:
108108 Molecule* molecule);
109109 void DoesDIIS(double** orbitalElectronPopulation,
110110 double** oldOrbitalElectronPopulation,
111- double* atomicElectronPopulation,
112111 double*** diisStoredDensityMatrix,
113112 double*** diisStoredErrorVect,
114113 double** diisErrorProducts,
@@ -356,16 +355,17 @@ void Cndo2::DoesSCF(){
356355 this->molecule,
357356 this->fockMatrix);
358357
359- // calc. electron population in each atom.
360- this->CalcAtomicElectronPopulation(this->atomicElectronPopulation,
361- this->orbitalElectronPopulation,
362- this->molecule);
363358
364359 // check convergence or update oldpopulation
365360 if(this->SatisfyConvergenceCriterion(oldOrbitalElectronPopulation,
366361 this->orbitalElectronPopulation,
367362 this->molecule->GetTotalNumberAOs(), &rmsDensity, i)){
368363
364+ // calc. electron population in each atom.
365+ this->CalcAtomicElectronPopulation(this->atomicElectronPopulation,
366+ this->orbitalElectronPopulation,
367+ this->molecule);
368+
369369 cout << this->messageSCFMetConvergence;
370370 this->OutputResults(this->fockMatrix, this->energiesMO, this->atomicElectronPopulation, this->molecule);
371371 break;
@@ -378,7 +378,6 @@ void Cndo2::DoesSCF(){
378378 // diis
379379 this->DoesDIIS(this->orbitalElectronPopulation,
380380 oldOrbitalElectronPopulation,
381- this->atomicElectronPopulation,
382381 diisStoredDensityMatrix,
383382 diisStoredErrorVect,
384383 diisErrorProducts,
@@ -386,6 +385,11 @@ void Cndo2::DoesSCF(){
386385 diisNumErrorVect,
387386 this->molecule,
388387 i);
388+
389+ // calc. electron population in each atom.
390+ this->CalcAtomicElectronPopulation(this->atomicElectronPopulation,
391+ this->orbitalElectronPopulation,
392+ this->molecule);
389393
390394 this->UpdateOldOrbitalElectronPopulation(oldOrbitalElectronPopulation,
391395 this->orbitalElectronPopulation,
@@ -463,7 +467,6 @@ void Cndo2::FreeSCFTemporaryMatrices(double*** oldOrbitalElectronPopulation,
463467 */
464468 void Cndo2::DoesDIIS(double** orbitalElectronPopulation,
465469 double** oldOrbitalElectronPopulation,
466- double* atomicElectronPopulation,
467470 double*** diisStoredDensityMatrix,
468471 double*** diisStoredErrorVect,
469472 double** diisErrorProducts,
@@ -538,8 +541,6 @@ void Cndo2::DoesDIIS(double** orbitalElectronPopulation,
538541 }
539542 }
540543
541- // calc. electron population in each atom.
542- this->CalcAtomicElectronPopulation(atomicElectronPopulation, orbitalElectronPopulation, molecule);
543544 }
544545 }
545546 }