Skip to content

Commit

Permalink
fix a bug which causes the accumulation of coreenergies in dmrgscf
Browse files Browse the repository at this point in the history
  • Loading branch information
Jun Yang committed Mar 27, 2015
1 parent 1a9c4b8 commit 80843f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions input.C
Original file line number Diff line number Diff line change
Expand Up @@ -1457,7 +1457,7 @@ void SpinAdapted::Input::readorbitalsfile(string& orbitalfile, OneElectronArray&
i = atoi(tok[1].c_str())-offset;j = atoi(tok[2].c_str())-offset;k = atoi(tok[3].c_str())-offset;l = atoi(tok[4].c_str())-offset;

if (i==-1 && j==-1 && k==-1 && l==-1) {
coreEnergy += value;
coreEnergy = value;
if (AOrbOffset == 0 && BOrbOffset == 0) //AA
{AOrbOffset = 1; BOrbOffset = 1;} //got to BB}
else if (AOrbOffset == 1 && BOrbOffset == 1) //BB
Expand Down Expand Up @@ -1710,7 +1710,7 @@ void SpinAdapted::Input::readorbitalsfile(string& orbitalfile, OneElectronArray&
value = atof(tok[0].c_str());
i = atoi(tok[1].c_str())-offset;j = atoi(tok[2].c_str())-offset;k = atoi(tok[3].c_str())-offset;l = atoi(tok[4].c_str())-offset;
if (i==-1 && j==-1 && k==-1 && l==-1) {
coreEnergy += value;
coreEnergy = value;
section += 1;
} else if (RHF) {
if (section == 0) { // ccdd
Expand Down

0 comments on commit 80843f5

Please sign in to comment.