From d2bd1ebc131bafc4153643685c0d6e99ecba1e39 Mon Sep 17 00:00:00 2001 From: Ankit Mahajan Date: Tue, 19 Apr 2022 11:44:31 -0600 Subject: [PATCH] faster when using core orbitals in multislater --- DQMC/Multislater.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/DQMC/Multislater.cpp b/DQMC/Multislater.cpp index 105a9549..15d4a652 100644 --- a/DQMC/Multislater.cpp +++ b/DQMC/Multislater.cpp @@ -634,10 +634,10 @@ std::array, 2> Multislater::hamAndOverlap(std::array, 2> l2G2Tot; l2G2Tot[0] = complex(0., 0.); l2G2Tot[1] = complex(0., 0.); @@ -652,7 +652,7 @@ std::array, 2> Multislater::hamAndOverlap(std::array, 2> Multislater::hamAndOverlap(Eigen::MatrixXcd& // 2e intermediates MatrixXcd int1, int2; - int1 = 0. * greeno.block(0, 0, nelec[0], nact + ncore); - int2 = 0. * greeno.block(0, 0, nelec[0], nact + ncore); + int1 = 0. * greeno.block(0, 0, nelec[0], nact); + int2 = 0. * greeno.block(0, 0, nelec[0], nact); complex l2G2Tot(0., 0.); for (int n = 0; n < nchol; n++) { @@ -997,7 +997,7 @@ std::array, 2> Multislater::hamAndOverlap(Eigen::MatrixXcd& lG = exc.trace(); l2G2 = lG * lG - exc.cwiseProduct(exc.transpose()).sum(); l2G2Tot += l2G2; - int2.noalias() = (greeno * ham.chol[n].block(0, 0, norbs, nact + ncore)) * greenp.block(0, ncore, nact + ncore, nact + ncore); + int2.noalias() = (greeno * ham.chol[n].block(0, 0, norbs, nact + ncore)) * greenp.block(0, ncore, nact + ncore, nact); int1.noalias() += lG * int2; int1.noalias() -= (greeno * ham.chol[n].block(0, 0, norbs, nelec[0])) * int2;