From c61c1d4889efb0438f0e924cfd499acd0698973f Mon Sep 17 00:00:00 2001 From: William F Godoy Date: Fri, 18 Aug 2023 13:21:14 -0400 Subject: [PATCH] Revert test_RotatedSPOs.cpp --- .../tests/test_RotatedSPOs.cpp | 68 ------------------- 1 file changed, 68 deletions(-) diff --git a/src/QMCWaveFunctions/tests/test_RotatedSPOs.cpp b/src/QMCWaveFunctions/tests/test_RotatedSPOs.cpp index 57b0cf8faf3..af6f5b9cf0d 100644 --- a/src/QMCWaveFunctions/tests/test_RotatedSPOs.cpp +++ b/src/QMCWaveFunctions/tests/test_RotatedSPOs.cpp @@ -20,8 +20,6 @@ #include "QMCWaveFunctions/WaveFunctionComponent.h" #include "BsplineFactory/EinsplineSetBuilder.h" #include "QMCWaveFunctions/RotatedSPOs.h" -#include "QMCWaveFunctions/RotatedSPOsT.h" -#include "QMCWaveFunctions/SPOSetT.h" #include "checkMatrix.hpp" #include "FakeSPO.h" #include @@ -647,22 +645,8 @@ TEST_CASE("RotatedSPOs construct delta matrix", "[wavefunction]") namespace testing { opt_variables_type& getMyVars(SPOSet& rot) { return rot.myVars; } -opt_variables_type& getMyVars(SPOSetT& rot) { return rot.myVars; } -opt_variables_type& getMyVars(SPOSetT& rot) { return rot.myVars; } -opt_variables_type& getMyVars(SPOSetT>& rot) { return rot.myVars; } -opt_variables_type& getMyVars(SPOSetT>& rot) { return rot.myVars; } opt_variables_type& getMyVarsFull(RotatedSPOs& rot) { return rot.myVarsFull; } -opt_variables_type& getMyVarsFull(RotatedSPOsT& rot) { return rot.myVarsFull; } -opt_variables_type& getMyVarsFull(RotatedSPOsT& rot) { return rot.myVarsFull; } std::vector>& getHistoryParams(RotatedSPOs& rot) { return rot.history_params_; } -std::vector>& getHistoryParams(RotatedSPOsT& rot) -{ - return rot.history_params_; -} -std::vector>& getHistoryParams(RotatedSPOsT& rot) -{ - return rot.history_params_; -} } // namespace testing // Test using global rotation @@ -717,58 +701,6 @@ TEST_CASE("RotatedSPOs read and write parameters", "[wavefunction]") CHECK(full_var[5] == Approx(0.0)); } -// Test using global rotation -TEMPLATE_TEST_CASE("RotatedSPOs read and write parameters", "[wavefunction][template]", double, float) -{ - auto fake_spo = std::make_unique>(); - fake_spo->setOrbitalSetSize(4); - RotatedSPOsT rot("fake_rot", std::move(fake_spo)); - int nel = 2; - rot.buildOptVariables(nel); - - optimize::VariableSet vs; - rot.checkInVariablesExclusive(vs); - vs[0] = 0.1; - vs[1] = 0.15; - vs[2] = 0.2; - vs[3] = 0.25; - rot.resetParametersExclusive(vs); - - { - hdf_archive hout; - vs.writeToHDF("rot_vp.h5", hout); - - rot.writeVariationalParameters(hout); - } - - auto fake_spo2 = std::make_unique>(); - fake_spo2->setOrbitalSetSize(4); - - RotatedSPOsT rot2("fake_rot", std::move(fake_spo2)); - rot2.buildOptVariables(nel); - - optimize::VariableSet vs2; - rot2.checkInVariablesExclusive(vs2); - - hdf_archive hin; - vs2.readFromHDF("rot_vp.h5", hin); - rot2.readVariationalParameters(hin); - - opt_variables_type& var = testing::getMyVars(rot2); - CHECK(var[0] == Approx(vs[0])); - CHECK(var[1] == Approx(vs[1])); - CHECK(var[2] == Approx(vs[2])); - CHECK(var[3] == Approx(vs[3])); - - opt_variables_type& full_var = testing::getMyVarsFull(rot2); - CHECK(full_var[0] == Approx(vs[0])); - CHECK(full_var[1] == Approx(vs[1])); - CHECK(full_var[2] == Approx(vs[2])); - CHECK(full_var[3] == Approx(vs[3])); - CHECK(full_var[4] == Approx(0.0)); - CHECK(full_var[5] == Approx(0.0)); -} - // Test using history list. TEST_CASE("RotatedSPOs read and write parameters history", "[wavefunction]") {