From 43bf8f631954c403fb7a1997e0981243508604e1 Mon Sep 17 00:00:00 2001 From: jrm874 <43007996+jrm874@users.noreply.github.com> Date: Fri, 10 Oct 2025 16:19:04 -0400 Subject: [PATCH] Choose between with and without Cartesian prod. --- SHCI/SHCI.cpp | 68 +++++++++++++++++++++++++++++++++++++++----------- SHCI/input.cpp | 3 +++ SHCI/input.h | 2 ++ 3 files changed, 58 insertions(+), 15 deletions(-) diff --git a/SHCI/SHCI.cpp b/SHCI/SHCI.cpp index a54654a..07ad1b4 100644 --- a/SHCI/SHCI.cpp +++ b/SHCI/SHCI.cpp @@ -360,26 +360,64 @@ int main(int argc, char* argv[]) { } } + // Condition checking only if nonsymmetric determinants + if (nAlphaDets != nBetaDets && schd.alpha_beta_cartesian_product == false){ + cout << "Number of alpha dets not equal to beta dets ("< >& occupied, schd.sampleNewDets = false; schd.precondition = false; schd.cdfciTol = 1e-12; + schd.alpha_beta_cartesian_product = false; schd.Bvalue = 0; schd.Bdirection.resize(0); @@ -176,6 +177,8 @@ void readInput(string input, std::vector >& occupied, schd.ncore = atoi(tok[1].c_str()); else if (boost::iequals(ArgName, "noio")) schd.io = false; + else if (boost::iequals(ArgName, "alpha_beta_cartesian_product")) + schd.alpha_beta_cartesian_product = true; else if (boost::iequals(ArgName, "dolcc")) schd.doLCC = true; else if (boost::iequals(ArgName, "io")) diff --git a/SHCI/input.h b/SHCI/input.h index 9a00cd6..0b22f93 100644 --- a/SHCI/input.h +++ b/SHCI/input.h @@ -108,11 +108,13 @@ struct schedule { & cdfci_on \ & cdfciIter \ & z_threshold \ + & alpha_beta_cartesian_product \ & max_determinants; } // clang-format on public: + bool alpha_beta_cartesian_product; double davidsonTol; double davidsonTolLoose; rdmType RdmType;