From a4aeb963eb2b6d57a28fe1affda42364be597046 Mon Sep 17 00:00:00 2001 From: Ankit Mahajan Date: Wed, 6 Apr 2022 00:28:14 -0600 Subject: [PATCH] core orbitals can now be used in phaseless calculations --- DQMC/Multislater.cpp | 2 +- utils/input.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DQMC/Multislater.cpp b/DQMC/Multislater.cpp index 7056898b..105a9549 100644 --- a/DQMC/Multislater.cpp +++ b/DQMC/Multislater.cpp @@ -293,7 +293,7 @@ void Multislater::forceBias(std::array& psi, Hamiltonian& h greenMulti[0] = greenMulti[0].transpose().eval(); greenMulti[1] = greenMulti[1].transpose().eval(); for (int i = 0; i < ham.chol.size(); i++) - fb(i) = (greenMulti[0].block(0, 0, norbs, nact)).cwiseProduct(ham.chol[i].block(0, 0, norbs, nact)).sum() + (greenMulti[1].block(0, 0, norbs, nact)).cwiseProduct(ham.chol[i].block(0, 0, norbs, nact)).sum(); + fb(i) = (greenMulti[0].block(0, 0, norbs, ncore + nact)).cwiseProduct(ham.chol[i].block(0, 0, norbs, ncore + nact)).sum() + (greenMulti[1].block(0, 0, norbs, ncore + nact)).cwiseProduct(ham.chol[i].block(0, 0, norbs, ncore + nact)).sum(); //for (int i = 0; i < ham.chol.size(); i++) // fb(i) = (greenMulti[0].block(0, 0, nact, norbs)).cwiseProduct(ham.chol[i].block(0, 0, nact, norbs)).sum() + (greenMulti[1].block(0, 0, nact, norbs)).cwiseProduct(ham.chol[i].block(0, 0, nact, norbs)).sum(); //fb(i) = (greenMulti[0]).cwiseProduct(ham.chol[i]).sum() + (greenMulti[1]).cwiseProduct(ham.chol[i]).sum(); diff --git a/utils/input.cpp b/utils/input.cpp index 62b40b0c..2b9cc399 100644 --- a/utils/input.cpp +++ b/utils/input.cpp @@ -654,6 +654,8 @@ void readDeterminants(std::string input, std::array, 2>& ref, s for (int i = 0; i < ncore; i++) { refDet.setoccA(i, true); refDet.setoccB(i, true); + ref[0].push_back(i); + ref[1].push_back(i); } VectorXi sizes = VectorXi::Zero(10); int numDets = 0; @@ -770,6 +772,8 @@ void readDeterminantsBinary(std::string input, std::array, 2>& for (int i = 0; i < ncore; i++) { refDet.setoccA(i, true); refDet.setoccB(i, true); + ref[0].push_back(i); + ref[1].push_back(i); } VectorXi sizes = VectorXi::Zero(10); int numDets = 0;