Skip to content

Commit

Permalink
Move initial diagonalization after Fock matrix construction
Browse files Browse the repository at this point in the history
  • Loading branch information
stigrj committed Aug 24, 2023
1 parent 615c947 commit e264696
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,16 +420,16 @@ bool driver::scf::guess_energy(const json &json_guess, Molecule &mol, FockBuilde
auto &Phi = mol.getOrbitals();
auto &nucs = mol.getNuclei();
auto &F_mat = mol.getFockMatrix();
Phi.distribute();

F_mat = ComplexMatrix::Zero(Phi.size(), Phi.size());
if (localize) orbital::localize(prec, Phi, F_mat);
else orbital::diagonalize(prec, Phi, F_mat);

F.setup(prec);
F_mat = F(Phi, Phi);
mol.getSCFEnergy() = F.trace(Phi, nucs);
F.clear();

if (not localize) orbital::diagonalize(prec, Phi, F_mat);
if (plevel == 1) mrcpp::print::footer(1, t_scf, 2);

Timer t_eps;
Expand Down

0 comments on commit e264696

Please sign in to comment.