Revisión | 7f03bc5774c3dbaa45c2889a1dfb9ec47023ae99 (tree) |
---|---|
Tiempo | 2013-01-02 04:04:14 |
Autor | Katsuhiko Nishimra <ktns.87@gmai...> |
Commiter | Katsuhiko Nishimra |
tmp
git-svn-id: https://svn.sourceforge.jp/svnroot/molds/branches/automake@1233 1136aad2-a195-0410-b898-f5ea1d11b9d8
@@ -545,6 +545,27 @@ void Cndo2::DoSCF(bool requiresGuess){ | ||
545 | 545 | this->twoElecTwoCore, |
546 | 546 | isGuess); |
547 | 547 | |
548 | + // Level Shift | |
549 | + if(!isGuess){ | |
550 | + const int totalAONumber = this->molecule->GetTotalNumberAOs(); | |
551 | + stringstream ompErrors; | |
552 | +#pragma omp parallel for schedule(auto) | |
553 | + for(int i = 0; i < totalAONumber; i++){ | |
554 | + try{ | |
555 | + for(int j = 0; j < totalAONumber; j++){ | |
556 | + this->fockMatrix[i][j] -= 0.1 * oldOrbitalElectronPopulation[i][j] / 2.0; | |
557 | + } | |
558 | + } | |
559 | + catch(MolDSException ex){ | |
560 | +#pragma omp critical | |
561 | + ompErrors << ex.what() << endl; | |
562 | + } | |
563 | + } | |
564 | + if(!ompErrors.str().empty()){ | |
565 | + throw MolDSException(ompErrors.str()); | |
566 | + } | |
567 | + } | |
568 | + | |
548 | 569 | // diagonalization of the Fock matrix |
549 | 570 | bool calcEigenVectors = true; |
550 | 571 | MolDS_wrappers::Lapack::GetInstance()->Dsyevd(this->fockMatrix, |