• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revisióna3ebb27e494a66b650949cf4997d82f8da288419 (tree)
Tiempo2013-07-03 22:21:36
AutorKatsuhiko Nishimra <ktns.87@gmai...>
CommiterKatsuhiko Nishimra

Log Message

Don't take DIIS step if DIIS matrix is singular. #30595

Cambiar Resumen

Diferencia incremental

--- a/src/cndo/Cndo2.cpp
+++ b/src/cndo/Cndo2.cpp
@@ -905,9 +905,20 @@ void Cndo2::DoDIIS(double** orbitalElectronPopulation,
905905 hasAppliedDIIS = false;
906906 if(diisNumErrorVect <= step && diisEndError<diisError && diisError<diisStartError){
907907 hasAppliedDIIS = true;
908- MolDS_wrappers::Lapack::GetInstance()->Dsysv(diisErrorProducts,
909- diisErrorCoefficients,
910- diisNumErrorVect+1);
908+ try{
909+ MolDS_wrappers::Lapack::GetInstance()->Dsysv(diisErrorProducts,
910+ diisErrorCoefficients,
911+ diisNumErrorVect+1);
912+ }catch(MolDSException ex){
913+ if(ex.HasKey(LapackInfo) && ex.GetKeyValue<int>(LapackInfo) > 0){
914+ // DIIS matrix is now singular, so not taking DIIS step.
915+ hasAppliedDIIS = false;
916+ return;
917+ }
918+ else{
919+ throw ex;
920+ }
921+ }
911922 for(int j=0; j<totalNumberAOs; j++){
912923 for(int k=0; k<totalNumberAOs; k++){
913924 orbitalElectronPopulation[j][k] = 0.0;