diff --git a/src/Configuration.h b/src/Configuration.h index 0244546422..e9c722bca5 100644 --- a/src/Configuration.h +++ b/src/Configuration.h @@ -74,18 +74,21 @@ struct QMCTraits /** Particle traits to use UniformGridLayout for the ParticleLayout. */ -struct PtclOnLatticeTraits +template +struct PtclOnLatticeTraitsT { - using ParticleLayout = CrystalLattice; + using ParticleLayout = CrystalLattice; using QTFull = QMCTraits::QTFull; using Index_t = int; using Scalar_t = QTFull::RealType; using Complex_t = QTFull::ComplexType; - using SingleParticleIndex = ParticleLayout::SingleParticleIndex; - using SingleParticlePos = ParticleLayout::SingleParticlePos; - using Tensor_t = ParticleLayout::Tensor_t; + using SingleParticleIndex = typename ParticleLayout::SingleParticleIndex; + using SingleParticlePos = typename ParticleLayout::SingleParticlePos; + using SingleParticlePosFull = typename CrystalLattice::SingleParticlePos; + + using Tensor_t = typename ParticleLayout::Tensor_t; using ParticleIndex = ParticleAttrib; using ParticleScalar = ParticleAttrib; @@ -97,6 +100,10 @@ struct PtclOnLatticeTraits using SingleParticleValue = QTFull::ValueType; }; +using PtclOnLatticeTraits = PtclOnLatticeTraitsT; + +template +using ParticleLayoutT = typename PtclOnLatticeTraitsT::ParticleLayout; // For unit tests // Check if we are compiling with Catch defined. Could use other symbols if needed. diff --git a/src/Containers/OhmmsPETE/Tensor.h b/src/Containers/OhmmsPETE/Tensor.h index 914169a0a4..5280ca79e7 100644 --- a/src/Containers/OhmmsPETE/Tensor.h +++ b/src/Containers/OhmmsPETE/Tensor.h @@ -231,6 +231,7 @@ class Tensor //TJW: add these 12/16/97 to help with NegReflectAndZeroFace BC: // These are the same as operator[] but with () instead: + // \todo remove this redundant and non idiomatic operator inline Type_t& operator()(unsigned int i) { return X[i]; } inline Type_t operator()(unsigned int i) const { return X[i]; } diff --git a/src/Estimators/EstimatorManagerNew.cpp b/src/Estimators/EstimatorManagerNew.cpp index 59b3355339..80448fa8fa 100644 --- a/src/Estimators/EstimatorManagerNew.cpp +++ b/src/Estimators/EstimatorManagerNew.cpp @@ -101,13 +101,13 @@ void EstimatorManagerNew::constructEstimators(EstimatorManagerInput&& emi, const PSPool& pset_pool) { for (auto& est_input : emi.get_estimator_inputs()) - if (!(createEstimator(est_input, pset.getLattice(), pset.getSpeciesSet()) || + if (!(createEstimator(est_input, pset.getFullPrecLattice(), pset.getSpeciesSet()) || createEstimator(est_input, pset.getTotalNum(), pset.getTwist(), - pset.getLattice()) || + pset.getFullPrecLattice()) || createEstimator(est_input, twf) || - createEstimator(est_input, pset.getLattice(), pset.getSpeciesSet(), + createEstimator(est_input, pset.getFullPrecLattice(), pset.getSpeciesSet(), twf.getSPOMap(), pset) || - createEstimator(est_input, pset.getLattice()) || + createEstimator(est_input, pset.getFullPrecLattice()) || createEstimator(est_input, my_comm_->rank()) || createEstimator(est_input, pset_pool))) throw UniformCommunicateError(std::string(error_tag_) + diff --git a/src/Estimators/MagnetizationDensity.h b/src/Estimators/MagnetizationDensity.h index c170d4ccb8..0058ea1045 100644 --- a/src/Estimators/MagnetizationDensity.h +++ b/src/Estimators/MagnetizationDensity.h @@ -47,7 +47,7 @@ class MagnetizationDensity : public OperatorEstBase using Real = RealAlias; using FullPrecReal = RealAlias; using Grad = TinyVector; - using Lattice = PtclOnLatticeTraits::ParticleLayout; + using Lattice = CrystalLattice; using Position = QMCTraits::PosType; using Integrator = MagnetizationDensityInput::Integrator; static constexpr int DIM = QMCTraits::DIM; diff --git a/src/Estimators/MagnetizationDensityInput.h b/src/Estimators/MagnetizationDensityInput.h index de69118cfc..49c81ea18a 100644 --- a/src/Estimators/MagnetizationDensityInput.h +++ b/src/Estimators/MagnetizationDensityInput.h @@ -36,8 +36,7 @@ class MagnetizationDensityInput {"integrator-montecarlo", Integrator::MONTECARLO}}; // clang-format on using Real = QMCTraits::FullPrecRealType; - using POLT = PtclOnLatticeTraits; - using Lattice = POLT::ParticleLayout; + using Lattice = CrystalLattice; using PosType = TinyVector; using Consumer = MagnetizationDensity; static constexpr int DIM = QMCTraits::DIM; diff --git a/src/Estimators/MomentumDistribution.cpp b/src/Estimators/MomentumDistribution.cpp index c9221af86f..ec7879c6a5 100644 --- a/src/Estimators/MomentumDistribution.cpp +++ b/src/Estimators/MomentumDistribution.cpp @@ -22,7 +22,7 @@ namespace qmcplusplus MomentumDistribution::MomentumDistribution(MomentumDistributionInput&& mdi, size_t np, const PosType& twist_in, - const LatticeType& lattice, + const FullPrecLattice& lattice, DataLocality dl) : OperatorEstBase(dl), input_(std::move(mdi)), diff --git a/src/Estimators/MomentumDistribution.h b/src/Estimators/MomentumDistribution.h index f11a485464..cc0e04dcb0 100644 --- a/src/Estimators/MomentumDistribution.h +++ b/src/Estimators/MomentumDistribution.h @@ -34,6 +34,7 @@ class MomentumDistribution : public OperatorEstBase { public: using LatticeType = PtclOnLatticeTraits::ParticleLayout; + using FullPrecLattice = CrystalLattice; using RealType = QMCTraits::RealType; using ComplexType = QMCTraits::ComplexType; using ValueType = QMCTraits::ValueType; @@ -45,7 +46,7 @@ class MomentumDistribution : public OperatorEstBase ///twist angle const PosType twist; ///lattice vector - const LatticeType Lattice; + const FullPrecLattice Lattice; ///normalization factor for n(k) const RealType norm_nofK; ///list of k-points in Cartesian Coordinates @@ -76,7 +77,7 @@ class MomentumDistribution : public OperatorEstBase MomentumDistribution(MomentumDistributionInput&& mdi, size_t np, const PosType& twist, - const LatticeType& lattice, + const FullPrecLattice& lattice, DataLocality dl = DataLocality::crowd); /** Constructor used when spawing crowd clones diff --git a/src/Estimators/OneBodyDensityMatrices.h b/src/Estimators/OneBodyDensityMatrices.h index a761866eac..90f7604440 100644 --- a/src/Estimators/OneBodyDensityMatrices.h +++ b/src/Estimators/OneBodyDensityMatrices.h @@ -50,7 +50,7 @@ class OneBodyDensityMatrices : public OperatorEstBase using Real = RealAlias; using FullPrecReal = RealAlias; using Grad = TinyVector; - using Lattice = PtclOnLatticeTraits::ParticleLayout; + using Lattice = CrystalLattice; using Position = QMCTraits::PosType; using Evaluator = OneBodyDensityMatricesInput::Evaluator; diff --git a/src/Estimators/SpinDensityInput.h b/src/Estimators/SpinDensityInput.h index 1b0a0cfd4f..8f3750510d 100644 --- a/src/Estimators/SpinDensityInput.h +++ b/src/Estimators/SpinDensityInput.h @@ -33,8 +33,7 @@ class SpinDensityInput { public: using Real = QMCTraits::RealType; - using POLT = PtclOnLatticeTraits; - using Lattice = POLT::ParticleLayout; + using Lattice = CrystalLattice; using PosType = QMCTraits::PosType; using Consumer = SpinDensityNew; static constexpr int DIM = QMCTraits::DIM; diff --git a/src/Estimators/SpinDensityNew.h b/src/Estimators/SpinDensityNew.h index 645e468588..7bbd77124f 100644 --- a/src/Estimators/SpinDensityNew.h +++ b/src/Estimators/SpinDensityNew.h @@ -36,7 +36,7 @@ class SpinDensityNew : public OperatorEstBase { public: using POLT = PtclOnLatticeTraits; - using Lattice = POLT::ParticleLayout; + using Lattice = CrystalLattice; using QMCT = QMCTraits; using FullPrecRealType = QMCT::FullPrecRealType; diff --git a/src/Estimators/tests/EstimatorTesting.h b/src/Estimators/tests/EstimatorTesting.h index 282fd7479b..f49e99e491 100644 --- a/src/Estimators/tests/EstimatorTesting.h +++ b/src/Estimators/tests/EstimatorTesting.h @@ -22,8 +22,7 @@ class SpeciesSet; namespace testing { -using POLT = PtclOnLatticeTraits; -using Lattice = POLT::ParticleLayout; +using Lattice = CrystalLattice; enum class SpeciesCases { diff --git a/src/Estimators/tests/test_MagnetizationDensity.cpp b/src/Estimators/tests/test_MagnetizationDensity.cpp index 68d97e8597..32b58822c3 100644 --- a/src/Estimators/tests/test_MagnetizationDensity.cpp +++ b/src/Estimators/tests/test_MagnetizationDensity.cpp @@ -183,7 +183,7 @@ TEST_CASE("MagnetizationDensity::gridAssignment", "[estimators]") {6.03341616, 0, 1.77067004}, //bin 6 {2.78496304, 0, 5.31201011}}; //bin 7 - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R(0, 0) = 5.10509515; lattice.R(0, 1) = -3.23993545; lattice.R(0, 2) = 0.00000000; @@ -295,7 +295,7 @@ TEST_CASE("MagnetizationDensity::IntegrationTest", "[estimators]") using namespace testing; // O2 test example from pwscf non-collinear calculation. - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R(0, 0) = 5.10509515; lattice.R(0, 1) = -3.23993545; lattice.R(0, 2) = 0.00000000; diff --git a/src/Estimators/tests/test_MagnetizationDensityInput.cpp b/src/Estimators/tests/test_MagnetizationDensityInput.cpp index fc51ed3d10..da28bbf217 100644 --- a/src/Estimators/tests/test_MagnetizationDensityInput.cpp +++ b/src/Estimators/tests/test_MagnetizationDensityInput.cpp @@ -28,7 +28,7 @@ namespace qmcplusplus TEST_CASE("MagnetizationDensityInput::from_xml", "[estimators]") { using POLT = PtclOnLatticeTraits; - using Lattice = POLT::ParticleLayout; + using Lattice = CrystalLattice; using PosType = QMCTraits::PosType; using namespace testing::magdensity; diff --git a/src/Estimators/tests/test_MomentumDistribution.cpp b/src/Estimators/tests/test_MomentumDistribution.cpp index 2703a3318f..569697aecd 100644 --- a/src/Estimators/tests/test_MomentumDistribution.cpp +++ b/src/Estimators/tests/test_MomentumDistribution.cpp @@ -87,7 +87,7 @@ TEST_CASE("MomentumDistribution::MomentumDistribution", "[estimators]") DataLocality dl = DataLocality::crowd; // Build from input - MomentumDistribution md(std::move(mdi), pset.getTotalNum(), pset.getTwist(), pset.getLattice(), dl); + MomentumDistribution md(std::move(mdi), pset.getTotalNum(), pset.getTwist(), pset.getFullPrecLattice(), dl); CHECK(md.twist[0] == Approx(0.0)); CHECK(md.twist[1] == Approx(0.0)); @@ -141,7 +141,7 @@ TEST_CASE("MomentumDistribution::accumulate", "[estimators]") {3.657151589, 4.883870516, 4.201243939}, {2.97317591, 4.245644974, 4.284564732}}; // Build from input - MomentumDistribution md(std::move(mdi), pset.getTotalNum(), pset.getTwist(), pset.getLattice(), dl); + MomentumDistribution md(std::move(mdi), pset.getTotalNum(), pset.getTwist(), pset.getFullPrecLattice(), dl); // Test accumulate @@ -245,7 +245,7 @@ TEST_CASE("MomentumDistribution::spawnCrowdClone", "[estimators]") DataLocality dl = DataLocality::crowd; // Build from input - MomentumDistribution md(std::move(mdi), pset.getTotalNum(), pset.getTwist(), pset.getLattice(), dl); + MomentumDistribution md(std::move(mdi), pset.getTotalNum(), pset.getTwist(), pset.getFullPrecLattice(), dl); auto clone = md.spawnCrowdClone(); REQUIRE(clone != nullptr); @@ -256,7 +256,7 @@ TEST_CASE("MomentumDistribution::spawnCrowdClone", "[estimators]") // for MomentumDistribution. Then checks relevant to that should be added. MomentumDistributionInput fail_mdi(node); dl = DataLocality::rank; - MomentumDistribution fail_md(std::move(fail_mdi), pset.getTotalNum(), pset.getTwist(), pset.getLattice(), dl); + MomentumDistribution fail_md(std::move(fail_mdi), pset.getTotalNum(), pset.getTwist(), pset.getFullPrecLattice(), dl); CHECK_THROWS_AS(clone = fail_md.spawnCrowdClone(), std::runtime_error); } diff --git a/src/Estimators/tests/test_OneBodyDensityMatrices.cpp b/src/Estimators/tests/test_OneBodyDensityMatrices.cpp index 352ae3d98c..dbff864fac 100644 --- a/src/Estimators/tests/test_OneBodyDensityMatrices.cpp +++ b/src/Estimators/tests/test_OneBodyDensityMatrices.cpp @@ -294,7 +294,7 @@ TEST_CASE("OneBodyDensityMatrices::generateSamples", "[estimators]") xmlNodePtr node = doc.getRoot(); OneBodyDensityMatricesInput obdmi(node); - OneBodyDensityMatrices obDenMat(std::move(obdmi), pset_target.getLattice(), species_set, spo_map, pset_target); + OneBodyDensityMatrices obDenMat(std::move(obdmi), pset_target.getFullPrecLattice(), species_set, spo_map, pset_target); testing::OneBodyDensityMatricesTests obdmt; //Get control over which rng is used. @@ -332,7 +332,7 @@ TEST_CASE("OneBodyDensityMatrices::generateSamplesForSpinor", "[estimators]") xmlNodePtr node = doc.getRoot(); OneBodyDensityMatricesInput obdmi(node); - OneBodyDensityMatrices obDenMat(std::move(obdmi), pset_target.getLattice(), species_set, spo_map, pset_target); + OneBodyDensityMatrices obDenMat(std::move(obdmi), pset_target.getFullPrecLattice(), species_set, spo_map, pset_target); testing::OneBodyDensityMatricesTests obdmt; //Get control over which rng is used. @@ -368,7 +368,7 @@ TEST_CASE("OneBodyDensityMatrices::spawnCrowdClone()", "[estimators]") xmlNodePtr node = doc.getRoot(); OneBodyDensityMatricesInput obdmi(node); - OneBodyDensityMatrices original(std::move(obdmi), pset_target.getLattice(), species_set, spomap, pset_target); + OneBodyDensityMatrices original(std::move(obdmi), pset_target.getFullPrecLattice(), species_set, spomap, pset_target); auto clone = original.spawnCrowdClone(); REQUIRE(clone != nullptr); REQUIRE(clone.get() != &original); @@ -396,7 +396,7 @@ TEST_CASE("OneBodyDensityMatrices::accumulate", "[estimators]") auto& pset_target = *(particle_pool.getParticleSet("e")); auto& pset_source = *(particle_pool.getParticleSet("ion")); auto& species_set = pset_target.getSpeciesSet(); - OneBodyDensityMatrices obdm(std::move(obdmi), pset_target.getLattice(), species_set, spomap, pset_target); + OneBodyDensityMatrices obdm(std::move(obdmi), pset_target.getFullPrecLattice(), species_set, spomap, pset_target); std::vector walkers; int nwalkers = 3; @@ -493,7 +493,7 @@ TEST_CASE("OneBodyDensityMatrices::evaluateMatrix", "[estimators]") auto& spomap = wavefunction_pool.getWaveFunction("wavefunction")->getSPOMap(); auto& pset_target = *(particle_pool.getParticleSet("e")); auto& species_set = pset_target.getSpeciesSet(); - OneBodyDensityMatrices obdm(std::move(obdmi), pset_target.getLattice(), species_set, spomap, pset_target); + OneBodyDensityMatrices obdm(std::move(obdmi), pset_target.getFullPrecLattice(), species_set, spomap, pset_target); auto& trial_wavefunction = *(wavefunction_pool.getPrimary()); // Because we can't control or consistent know the global random state we must initialize particle positions to known values. @@ -545,7 +545,7 @@ TEST_CASE("OneBodyDensityMatrices::registerAndWrite", "[estimators]") auto& spomap = wavefunction_pool.getWaveFunction("wavefunction")->getSPOMap(); auto& pset_target = *(particle_pool.getParticleSet("e")); auto& species_set = pset_target.getSpeciesSet(); - OneBodyDensityMatrices obdm(std::move(obdmi), pset_target.getLattice(), species_set, spomap, pset_target); + OneBodyDensityMatrices obdm(std::move(obdmi), pset_target.getFullPrecLattice(), species_set, spomap, pset_target); testing::OneBodyDensityMatricesTests obdmt; obdmt.testRegisterAndWrite(obdm); diff --git a/src/Estimators/tests/test_SpinDensityInput.cpp b/src/Estimators/tests/test_SpinDensityInput.cpp index 1ecd46c4d2..02a2841655 100644 --- a/src/Estimators/tests/test_SpinDensityInput.cpp +++ b/src/Estimators/tests/test_SpinDensityInput.cpp @@ -25,8 +25,7 @@ namespace qmcplusplus { TEST_CASE("SpinDensityInput::readXML", "[estimators]") { - using POLT = PtclOnLatticeTraits; - using Lattice = POLT::ParticleLayout; + using Lattice = CrystalLattice; using input = testing::ValidSpinDensityInput; for (auto input_xml : input::xml) { diff --git a/src/Estimators/tests/test_SpinDensityNew.cpp b/src/Estimators/tests/test_SpinDensityNew.cpp index 6d019b6846..ba100d90f8 100644 --- a/src/Estimators/tests/test_SpinDensityNew.cpp +++ b/src/Estimators/tests/test_SpinDensityNew.cpp @@ -139,7 +139,7 @@ TEST_CASE("SpinDensityNew::SpinDensityNew(SPInput, SpeciesSet)", "[estimators]") species_set(iattribute, ispecies) = 2; SpinDensityInput sdi_copy = sdi; SpinDensityNew(std::move(sdi), species_set); - CrystalLattice lattice; + CrystalLattice lattice; } TEST_CASE("SpinDensityNew::SpinDensityNew(SPInput, Lattice, SpeciesSet)", "[estimators]") diff --git a/src/Particle/CMakeLists.txt b/src/Particle/CMakeLists.txt index 1b980713ae..822e769c46 100644 --- a/src/Particle/CMakeLists.txt +++ b/src/Particle/CMakeLists.txt @@ -29,6 +29,7 @@ set(PARTICLE createDistanceTableAA.cpp createDistanceTableAB.cpp HDFWalkerInputManager.cpp + Lattice/CrystalLattice.cpp LongRange/KContainer.cpp LongRange/StructFact.cpp LongRange/LPQHIBasis.cpp diff --git a/src/Particle/HDFWalkerInput_0_4.cpp b/src/Particle/HDFWalkerInput_0_4.cpp index bb8af6dd6f..5f04cd10ce 100644 --- a/src/Particle/HDFWalkerInput_0_4.cpp +++ b/src/Particle/HDFWalkerInput_0_4.cpp @@ -127,63 +127,72 @@ bool HDFWalkerInput_0_4::read_hdf5(const std::filesystem::path& h5name) { size_t nw_in = 0; - hdf_archive hin(myComm, false); //everone reads this - bool success = hin.open(h5name, H5F_ACC_RDONLY); - //check if hdf and xml versions can work together - HDFVersion aversion; - - hin.read(aversion, hdf::version); - if (!(aversion < i_info.version)) - { - int found_group = hin.is_group(hdf::main_state); - hin.push(hdf::main_state); - hin.read(nw_in, hdf::num_walkers); - } - else - { - app_error() << " Mismatched version. xml = " << i_info.version << " hdf = " << aversion << std::endl; - } - - if (nw_in == 0) + // This prevents a strange race condition I've see where the previous sections + // for sure already closed hdf5 file isn't available. + try { - app_error() << " No walkers in " << h5name << std::endl; - return false; - } + hdf_archive hin(myComm, false); //everone reads this + myComm->barrier(); + bool success = hin.open(h5name, H5F_ACC_RDONLY); + //check if hdf and xml versions can work together + HDFVersion aversion; + hin.read(aversion, hdf::version); + if (!(aversion < i_info.version)) + { + int found_group = hin.is_group(hdf::main_state); + hin.push(hdf::main_state); + hin.read(nw_in, hdf::num_walkers); + } + else + { + app_error() << " Mismatched version. xml = " << i_info.version << " hdf = " << aversion << std::endl; + } - using Buffer_t = std::vector; - std::array dims{nw_in, num_ptcls_, OHMMS_DIM}; - Buffer_t posin(dims[0] * dims[1] * dims[2]); - hin.readSlabReshaped(posin, dims, hdf::walkers); - std::vector weights_in(nw_in); - const bool has_weights = hin.readEntry(weights_in, hdf::walker_weights); + if (nw_in == 0) + { + app_error() << " No walkers in " << h5name << std::endl; + return false; + } - std::vector woffsets; - hin.read(woffsets, "walker_partition"); + using Buffer_t = std::vector; + std::array dims{nw_in, num_ptcls_, OHMMS_DIM}; + Buffer_t posin(dims[0] * dims[1] * dims[2]); + hin.readSlabReshaped(posin, dims, hdf::walkers); + std::vector weights_in(nw_in); + const bool has_weights = hin.readEntry(weights_in, hdf::walker_weights); - int np1 = myComm->size() + 1; - if (woffsets.size() != np1) - { - woffsets.resize(myComm->size() + 1, 0); - FairDivideLow(nw_in, myComm->size(), woffsets); - } + std::vector woffsets; + hin.read(woffsets, "walker_partition"); - app_log() << " HDFWalkerInput_0_4::put getting " << dims[0] << " walkers " << posin.size() << std::endl; - nw_in = woffsets[myComm->rank() + 1] - woffsets[myComm->rank()]; - { - const int nitems = num_ptcls_ * OHMMS_DIM; - const int curWalker = wc_list_.getActiveWalkers(); - wc_list_.createWalkers(nw_in, num_ptcls_); + int np1 = myComm->size() + 1; + if (woffsets.size() != np1) + { + woffsets.resize(myComm->size() + 1, 0); + FairDivideLow(nw_in, myComm->size(), woffsets); + } - auto it = posin.begin() + woffsets[myComm->rank()] * nitems; - for (int i = 0; i < nw_in; ++i, it += nitems) - copy(it, it + nitems, get_first_address(wc_list_[i + curWalker]->R)); - if (has_weights) + app_log() << " HDFWalkerInput_0_4::put getting " << dims[0] << " walkers " << posin.size() << std::endl; + nw_in = woffsets[myComm->rank() + 1] - woffsets[myComm->rank()]; { - const auto woffset = woffsets[myComm->rank()]; - for (int i = 0; i < nw_in; ++i) - wc_list_[i + curWalker]->Weight = weights_in[i + woffset]; + const int nitems = num_ptcls_ * OHMMS_DIM; + const int curWalker = wc_list_.getActiveWalkers(); + wc_list_.createWalkers(nw_in, num_ptcls_); + + auto it = posin.begin() + woffsets[myComm->rank()] * nitems; + for (int i = 0; i < nw_in; ++i, it += nitems) + copy(it, it + nitems, get_first_address(wc_list_[i + curWalker]->R)); + if (has_weights) + { + const auto woffset = woffsets[myComm->rank()]; + for (int i = 0; i < nw_in; ++i) + wc_list_[i + curWalker]->Weight = weights_in[i + woffset]; + } } } + catch (...) + { + throw std::runtime_error("Failed to open: " + h5name.string() + "to read walkers!"); + } return true; } diff --git a/src/Particle/Lattice/CrystalLattice.cpp b/src/Particle/Lattice/CrystalLattice.cpp index 98105739c9..d9394555d9 100644 --- a/src/Particle/Lattice/CrystalLattice.cpp +++ b/src/Particle/Lattice/CrystalLattice.cpp @@ -28,9 +28,7 @@ namespace qmcplusplus template CrystalLattice::CrystalLattice() { - explicitly_defined = false; - BoxBConds = 0; - VacuumScale = 1.0; + // Whats the rational for putting garbage in here? R.diagonal(1e10); G = R; M = R; @@ -38,6 +36,25 @@ CrystalLattice::CrystalLattice() reset(); } +template +template +CrystalLattice::CrystalLattice(const Tensor& lat) +{ + explicitly_defined = true; + R = lat; + reset(); +} + +template +bool CrystalLattice::outOfBound(const TinyVector& u) const +{ + for (int i = 0; i < D; ++i) + if (std::abs(u[i]) > 0.5) + return true; + return false; +} + + template template void CrystalLattice::set(const Tensor& lat) @@ -182,4 +199,17 @@ inline bool operator!=(const CrystalLattice& lhs, const CrystalLattice; +template CrystalLattice::CrystalLattice(const Tensor& tensor); +template CrystalLattice::CrystalLattice(const Tensor& tensor); +template void CrystalLattice::set(const Tensor& tensor); +template void CrystalLattice::set(const Tensor& tensor); + +template struct CrystalLattice; +template CrystalLattice::CrystalLattice(const Tensor& tensor); +template CrystalLattice::CrystalLattice(const Tensor& tensor); +template void CrystalLattice::set(const Tensor& tensor); +template void CrystalLattice::set(const Tensor& tensor); + + } // namespace qmcplusplus diff --git a/src/Particle/Lattice/CrystalLattice.h b/src/Particle/Lattice/CrystalLattice.h index 93b81e296b..87af7cf41d 100644 --- a/src/Particle/Lattice/CrystalLattice.h +++ b/src/Particle/Lattice/CrystalLattice.h @@ -28,6 +28,12 @@ #include "OhmmsPETE/Tensor.h" #include "LRBreakupParameters.h" +/** forward declare xmlNodePtr xmlNodePtr + * these are c types so I follow libmxml2's scheme to forward declare + */ +typedef struct _xmlNode xmlNode; +typedef xmlNode *xmlNodePtr; + namespace qmcplusplus { /** enumeration to classify a CrystalLattice @@ -54,6 +60,8 @@ enum template struct CrystalLattice : public LRBreakupParameters { +public: + using Real = T; /// alias to the base class using Base = LRBreakupParameters; @@ -63,7 +71,7 @@ struct CrystalLattice : public LRBreakupParameters DIM = D }; //@{ - ///the type of scalar + ///the type of scalar, actually can only be real based on Configuration.h using Scalar_t = T; ///the type of a D-dimensional position vector using SingleParticlePos = TinyVector; @@ -73,14 +81,50 @@ struct CrystalLattice : public LRBreakupParameters using Tensor_t = Tensor; //@} + ///default constructor, assign a huge supercell + CrystalLattice(); + + template + CrystalLattice(const Tensor& tensor); + + /** modern factory function + * friend has to be any possible + */ + friend CrystalLattice makeFullPrecParticleLayout(xmlNodePtr cur); + + const auto& getBoxBConds() const { return BoxBConds; } + const auto& getG() const { return G; } + const auto& getGv() const { return Gv; } + int getSuperCellEnum() const { return SuperCellEnum; } + const auto& getR() const { return R; }; + const auto& getOneOverLength() const { return OneOverLength; } + const auto& getLength() const { return Length; } + const auto& getRv() const { return Rv; } + const auto& getVacuumScale() const { return VacuumScale; } + bool getExplicitlyDefined() const { return explicitly_defined; } + // \todo remove this and factor resetLRBox into lattice? + auto& getR() { return R; }; + auto getVolume() const { return Volume; } + auto getCenter() const { return Center; } + // These are all a result of calling LatticeAnalyzer and not valid until reset is called after any number of changes + // to the lattice. + auto getCellRadiusSq() const { return CellRadiusSq; } + auto getWignerSeitzRadius() const { return WignerSeitzRadius; } + auto getWignerSeitzRadius_G() const { return WignerSeitzRadius_G; } + auto getSimulationCellRadius() const { return SimulationCellRadius; } + bool getDiagonalOnly() const { return DiagonalOnly; } + + void setBoxBConds(TinyVector bbc) { BoxBConds = bbc; } + void setVacuumScale(Real vscale) { VacuumScale = vscale; } + ///true, if off-diagonal elements are zero so that other classes can take advantage of this bool DiagonalOnly; ///supercell enumeration int SuperCellEnum; ///The boundary condition in each direction. - TinyVector BoxBConds; + TinyVector BoxBConds{false,false,false}; ///The scale factor for adding vacuum. - T VacuumScale; + T VacuumScale = 1.0; //@{ /**@brief Physical properties of a supercell*/ /// Volume of a supercell @@ -125,10 +169,7 @@ struct CrystalLattice : public LRBreakupParameters //angles between the two lattice vectors SingleParticlePos ABC; ///true, the lattice is defined by the input instead of an artificial default - bool explicitly_defined; - - ///default constructor, assign a huge supercell - CrystalLattice(); + bool explicitly_defined = false; /**@param i the index of the directional vector, \f$i\in [0,D)\f$ *@return The lattice vector of the ith direction @@ -183,13 +224,7 @@ struct CrystalLattice : public LRBreakupParameters } /// return true if any direction of reduced coordinates u goes larger than 0.5 - inline bool outOfBound(const TinyVector& u) const - { - for (int i = 0; i < D; ++i) - if (std::abs(u[i]) > 0.5) - return true; - return false; - } + bool outOfBound(const TinyVector& u) const; inline void applyMinimumImage(TinyVector& c) const { @@ -243,6 +278,7 @@ struct CrystalLattice : public LRBreakupParameters explicitly_defined = rhs.explicitly_defined; BoxBConds = rhs.BoxBConds; + SuperCellEnum = rhs.getSuperCellEnum(); VacuumScale = rhs.VacuumScale; R = rhs.R; reset(); @@ -280,10 +316,27 @@ struct CrystalLattice : public LRBreakupParameters //! Print out CrystalLattice Data void print(std::ostream&, int level = 2) const; + + // Allow assignment operator between say T=double and T=float + template + friend struct CrystalLattice; + + friend class LatticeParser; }; +extern template struct CrystalLattice; +extern template CrystalLattice::CrystalLattice(const Tensor& tensor); +extern template CrystalLattice::CrystalLattice(const Tensor& tensor); +extern template void CrystalLattice::set(const Tensor& tensor); +extern template void CrystalLattice::set(const Tensor& tensor); + +extern template struct CrystalLattice; +extern template CrystalLattice::CrystalLattice(const Tensor& tensor); +extern template CrystalLattice::CrystalLattice(const Tensor& tensor); +extern template void CrystalLattice::set(const Tensor& tensor); +extern template void CrystalLattice::set(const Tensor& tensor); + } // namespace qmcplusplus //including the definitions of the member functions -#include "CrystalLattice.cpp" #endif diff --git a/src/Particle/Lattice/LatticeAnalyzer.h b/src/Particle/Lattice/LatticeAnalyzer.h index 3198a34b5d..897a74812c 100644 --- a/src/Particle/Lattice/LatticeAnalyzer.h +++ b/src/Particle/Lattice/LatticeAnalyzer.h @@ -16,6 +16,8 @@ #ifndef QMCPLUSPLUS_LATTICE_ANALYZER_H #define QMCPLUSPLUS_LATTICE_ANALYZER_H #include "OhmmsPETE/TinyVector.h" +#include "CrystalLattice.h" + namespace qmcplusplus { /** enumeration for DTD_BConds specialization @@ -38,7 +40,10 @@ enum }; -///generic class to analyze a Lattice +/** generic class to analyze a Lattice + * NOTE: There is no constructor but operator() should be considered one in most + * cases as the "class" is invalid until it is called since mySC is not intialized. + */ template struct LatticeAnalyzer {}; diff --git a/src/Particle/Lattice/ParticleBConds.h b/src/Particle/Lattice/ParticleBConds.h index 335b201996..a4f6a2d96a 100644 --- a/src/Particle/Lattice/ParticleBConds.h +++ b/src/Particle/Lattice/ParticleBConds.h @@ -69,7 +69,8 @@ template struct DTD_BConds { /** constructor: doing nothing */ - inline DTD_BConds(const CrystalLattice& lat) {} + template + inline DTD_BConds(const CrystalLattice& lat) {} /** apply BC on displ and return |displ|^2 * @param displ a displacement vector in the Cartesian coordinate diff --git a/src/Particle/Lattice/ParticleBConds3D.h b/src/Particle/Lattice/ParticleBConds3D.h index 5bc42b85b5..b718a58e5a 100644 --- a/src/Particle/Lattice/ParticleBConds3D.h +++ b/src/Particle/Lattice/ParticleBConds3D.h @@ -17,6 +17,7 @@ #include #include "Lattice/CrystalLattice.h" +#include "LatticeAnalyzer.h" namespace qmcplusplus { @@ -27,7 +28,8 @@ struct DTD_BConds { T Linv0, L0, Linv1, L1, Linv2, L2, r2max, dummy; - inline DTD_BConds(const CrystalLattice& lat) + template + inline DTD_BConds(const CrystalLattice& lat) : Linv0(lat.OneOverLength[0]), L0(lat.Length[0]), Linv1(lat.OneOverLength[1]), @@ -163,7 +165,8 @@ struct DTD_BConds TinyVector, 3> rb; std::vector> corners; - DTD_BConds(const CrystalLattice& lat) + template + DTD_BConds(const CrystalLattice& lat) { rb[0] = lat.a(0); rb[1] = lat.a(1); diff --git a/src/Particle/Lattice/tests/CMakeLists.txt b/src/Particle/Lattice/tests/CMakeLists.txt index 655f7d5520..6a5e9586f1 100644 --- a/src/Particle/Lattice/tests/CMakeLists.txt +++ b/src/Particle/Lattice/tests/CMakeLists.txt @@ -15,6 +15,10 @@ set(UTEST_NAME deterministic-unit_test_${SRC_DIR}) add_executable(${UTEST_EXE} test_ParticleBConds.cpp test_CrystalLattice.cpp test_LRBreakupParameters.cpp) target_include_directories(${UTEST_EXE} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/../..") -target_link_libraries(${UTEST_EXE} catch_main qmcutil platform_runtime) +target_link_libraries(${UTEST_EXE} catch_main qmcutil platform_runtime qmcparticle) + +if(USE_OBJECT_TARGET) + target_link_libraries(${UTEST_EXE} qmcparticle_omptarget) +endif() add_unit_test(${UTEST_NAME} 1 1 $) diff --git a/src/Particle/Lattice/tests/test_CrystalLattice.cpp b/src/Particle/Lattice/tests/test_CrystalLattice.cpp index a448adc578..fff6b981bc 100644 --- a/src/Particle/Lattice/tests/test_CrystalLattice.cpp +++ b/src/Particle/Lattice/tests/test_CrystalLattice.cpp @@ -27,7 +27,7 @@ using vec_t = TinyVector; */ TEST_CASE("Crystal_lattice_periodic_bulk", "[lattice]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = false; // Open BC Lattice.R.diagonal(0.4); Lattice.reset(); diff --git a/src/Particle/Lattice/tests/test_ParticleBConds.cpp b/src/Particle/Lattice/tests/test_ParticleBConds.cpp index 666d85d3e1..f247cdc380 100644 --- a/src/Particle/Lattice/tests/test_ParticleBConds.cpp +++ b/src/Particle/Lattice/tests/test_ParticleBConds.cpp @@ -29,7 +29,7 @@ using vec_t = TinyVector; TEST_CASE("open_bconds", "[lattice]") { - CrystalLattice Lattice; + CrystalLattice Lattice; DTD_BConds bcond(Lattice); vec_t v(3.0, 4.0, 5.0); @@ -59,7 +59,7 @@ TEST_CASE("open_bconds", "[lattice]") */ TEST_CASE("periodic_bulk_bconds", "[lattice]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = false; // Open BC Lattice.R.diagonal(0.4); Lattice.reset(); @@ -80,7 +80,7 @@ TEST_CASE("periodic_bulk_bconds", "[lattice]") TEST_CASE("uniform 3D Lattice layout", "[lattice]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; // periodic Lattice.R.diagonal(1.0); diff --git a/src/Particle/LongRange/EwaldHandler2D.cpp b/src/Particle/LongRange/EwaldHandler2D.cpp index 667b1f33af..f630f3a166 100644 --- a/src/Particle/LongRange/EwaldHandler2D.cpp +++ b/src/Particle/LongRange/EwaldHandler2D.cpp @@ -34,16 +34,18 @@ void EwaldHandler2D::fillFk(const KContainer& KList) const mRealType kalpha = 1.0 / (2.0*alpha); mRealType kmag, uk; - Fk.resize(KList.kpts_cart.size()); - MaxKshell = KList.kshell.size() - 1; + Fk.resize(KList.getKptsCartWorking().size()); + const auto& kshell = KList.getKShell(); + MaxKshell = kshell.size() - 1; Fk_symm.resize(MaxKshell); + const auto& ksq = KList.getKSQWorking(); for (int ks = 0, ki = 0; ks < Fk_symm.size(); ks++) { - kmag = std::sqrt(KList.ksq[ki]); + kmag = std::sqrt(ksq[ki]); uk = knorm * erfc(kalpha*kmag)/kmag; Fk_symm[ks] = uk; - while (ki < KList.kshell[ks + 1] && ki < Fk.size()) + while (ki < kshell[ks + 1] && ki < Fk.size()) Fk[ki++] = uk; } } diff --git a/src/Particle/LongRange/EwaldHandler3D.cpp b/src/Particle/LongRange/EwaldHandler3D.cpp index d5282321d0..e4f767a578 100644 --- a/src/Particle/LongRange/EwaldHandler3D.cpp +++ b/src/Particle/LongRange/EwaldHandler3D.cpp @@ -53,9 +53,10 @@ EwaldHandler3D::EwaldHandler3D(const EwaldHandler3D& aLR, ParticleSet& ref) void EwaldHandler3D::fillFk(const KContainer& KList) { - Fk.resize(KList.kpts_cart.size()); - Fkg.resize(KList.kpts_cart.size()); - const std::vector& kshell(KList.kshell); + const auto& kpts_cart = KList.getKptsCartWorking(); + Fk.resize(kpts_cart.size()); + Fkg.resize(kpts_cart.size()); + const std::vector& kshell(KList.getKShell()); MaxKshell = kshell.size() - 1; @@ -63,12 +64,13 @@ void EwaldHandler3D::fillFk(const KContainer& KList) kMag.resize(MaxKshell); mRealType kgauss = 1.0 / (4 * Sigma * Sigma); mRealType knorm = 4 * M_PI / Volume; + const auto ksq = KList.getKSQWorking(); for (int ks = 0, ki = 0; ks < Fk_symm.size(); ks++) { - mRealType t2e = KList.ksq[ki] * kgauss; - mRealType uk = knorm * std::exp(-t2e) / KList.ksq[ki]; + mRealType t2e = ksq[ki] * kgauss; + mRealType uk = knorm * std::exp(-t2e) / ksq[ki]; Fk_symm[ks] = uk; - while (ki < KList.kshell[ks + 1] && ki < Fk.size()) + while (ki < kshell[ks + 1] && ki < Fk.size()) Fk[ki++] = uk; } diff --git a/src/Particle/LongRange/EwaldHandler3D.h b/src/Particle/LongRange/EwaldHandler3D.h index 4c49e6fa4b..2b8fce566e 100644 --- a/src/Particle/LongRange/EwaldHandler3D.h +++ b/src/Particle/LongRange/EwaldHandler3D.h @@ -103,24 +103,26 @@ class EwaldHandler3D : public LRHandlerBase void fillYkgstrain(const KContainer& KList) { - Fkgstrain.resize(KList.kpts_cart.size()); - const std::vector& kshell(KList.kshell); + Fkgstrain.resize(KList.getKptsCartWorking().size()); + const std::vector& kshell(KList.getKShell()); MaxKshell = kshell.size() - 1; + const auto& ksq = KList.getKSQWorking(); for (int ks = 0, ki = 0; ks < MaxKshell; ks++) { - mRealType uk = evalYkgstrain(std::sqrt(KList.ksq[ki])); - while (ki < KList.kshell[ks + 1] && ki < Fkgstrain.size()) + mRealType uk = evalYkgstrain(std::sqrt(ksq[ki])); + while (ki < kshell[ks + 1] && ki < Fkgstrain.size()) Fkgstrain[ki++] = uk; } } void filldFk_dk(const KContainer& KList) { - dFk_dstrain.resize(KList.kpts_cart.size()); - + const auto& kpts_cart = KList.getKptsCartWorking(); + dFk_dstrain.resize(kpts_cart.size()); + const auto& ksq = KList.getKSQWorking(); for (int ki = 0; ki < dFk_dstrain.size(); ki++) { - dFk_dstrain[ki] = evaluateLR_dstrain(KList.kpts_cart[ki], std::sqrt(KList.ksq[ki])); + dFk_dstrain[ki] = evaluateLR_dstrain(kpts_cart[ki], std::sqrt(ksq[ki])); } } diff --git a/src/Particle/LongRange/EwaldHandlerQuasi2D.cpp b/src/Particle/LongRange/EwaldHandlerQuasi2D.cpp index 599c5a853a..0d234d5b2e 100644 --- a/src/Particle/LongRange/EwaldHandlerQuasi2D.cpp +++ b/src/Particle/LongRange/EwaldHandlerQuasi2D.cpp @@ -35,19 +35,19 @@ void EwaldHandlerQuasi2D::fillFk(const KContainer& KList) { const mRealType knorm = M_PI / area; mRealType kmag, uk; - - Fk.resize(KList.kpts_cart.size()); - MaxKshell = KList.kshell.size() - 1; + const auto& kpts_cart = KList.getKptsCartWorking(); + Fk.resize(kpts_cart.size()); + MaxKshell = KList.getKShell().size() - 1; Fk_symm.resize(MaxKshell); kmags.resize(MaxKshell); for (int ks = 0, ki = 0; ks < Fk_symm.size(); ks++) { - kmag = std::sqrt(KList.ksq[ki]); + kmag = std::sqrt(KList.getKSQWorking()[ki]); kmags[ks] = kmag; // store k magnitutes uk = knorm/kmag; Fk_symm[ks] = uk; - while (ki < KList.kshell[ks + 1] && ki < Fk.size()) + while (ki < KList.getKShell()[ks + 1] && ki < Fk.size()) Fk[ki++] = uk; } } diff --git a/src/Particle/LongRange/KContainer.cpp b/src/Particle/LongRange/KContainer.cpp index 72d4c8bd17..ddc6a578f8 100644 --- a/src/Particle/LongRange/KContainer.cpp +++ b/src/Particle/LongRange/KContainer.cpp @@ -21,11 +21,39 @@ namespace qmcplusplus { -void KContainer::updateKLists(const ParticleLayout& lattice, - RealType kc, - unsigned ndim, - const PosType& twist, - bool useSphere) + +template +const std::vector::AppPosition>& KContainerT::getKptsCartWorking() const +{ + if constexpr (std::is_same_v) + return kpts_cart_; + else + return kpts_cart_working_; +} + +template +const std::vector& KContainerT::getKSQWorking() const +{ + if constexpr (std::is_same::value) + return ksq_; + else + return ksq_working_; +} + +template +int KContainerT::getMinusK(int k) const +{ + assert(k < minusk.size()); + return minusk[k]; +} + +template +template +void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist, + bool useSphere) { kcutoff = kc; if (kcutoff <= 0.0) @@ -37,11 +65,13 @@ void KContainer::updateKLists(const ParticleLayout& lattice, app_log() << " KContainer initialised with cutoff " << kcutoff << std::endl; app_log() << " # of K-shell = " << kshell.size() << std::endl; - app_log() << " # of K points = " << kpts.size() << std::endl; + app_log() << " # of K points = " << kpts_.size() << std::endl; app_log() << std::endl; } -void KContainer::findApproxMMax(const ParticleLayout& lattice, unsigned ndim) +template +template +void KContainerT::findApproxMMax(const CrystalLattice& lattice, unsigned ndim) { //Estimate the size of the parallelpiped that encompasses a sphere of kcutoff. //mmax is stored as integer translations of the reciprocal cell vectors. @@ -102,19 +132,23 @@ void KContainer::findApproxMMax(const ParticleLayout& lattice, unsigned ndim) mmax[1] = 0; } -void KContainer::BuildKLists(const ParticleLayout& lattice, const PosType& twist, bool useSphere) +template +template +void KContainerT::BuildKLists(const CrystalLattice& lattice, + const Position& twist, + bool useSphere) { TinyVector TempActualMax; TinyVector kvec; - TinyVector kvec_cart; - RealType modk2; + TinyVector kvec_cart; + FullPrecReal modk2; std::vector> kpts_tmp; - std::vector kpts_cart_tmp; - std::vector ksq_tmp; + std::vector kpts_cart_tmp; + std::vector ksq_tmp; // reserve the space for memory efficiency if (useSphere) { - const RealType kcut2 = kcutoff * kcutoff; + const FullPrecReal kcut2 = kcutoff * kcutoff; //Loop over guesses for valid k-points. for (int i = -mmax[0]; i <= mmax[0]; i++) { @@ -208,10 +242,10 @@ void KContainer::BuildKLists(const ParticleLayout& lattice, const PosType& twist } } std::map*>::iterator it(kpts_sorted.begin()); - kpts.resize(numk); - kpts_cart.resize(numk); + kpts_.resize(numk); + kpts_cart_.resize(numk); kpts_cart_soa_.resize(numk); - ksq.resize(numk); + ksq_.resize(numk); kshell.resize(kpts_sorted.size() + 1, 0); int ok = 0, ish = 0; while (it != kpts_sorted.end()) @@ -220,10 +254,10 @@ void KContainer::BuildKLists(const ParticleLayout& lattice, const PosType& twist while (vit != (*it).second->end()) { int ik = (*vit); - kpts[ok] = kpts_tmp[ik]; - kpts_cart[ok] = kpts_cart_tmp[ik]; + kpts_[ok] = kpts_tmp[ik]; + kpts_cart_[ok] = kpts_cart_tmp[ik]; kpts_cart_soa_(ok) = kpts_cart_tmp[ik]; - ksq[ok] = ksq_tmp[ik]; + ksq_[ok] = ksq_tmp[ik]; ++vit; ++ok; } @@ -232,6 +266,11 @@ void KContainer::BuildKLists(const ParticleLayout& lattice, const PosType& twist ++ish; } kpts_cart_soa_.updateTo(); + if constexpr (!std::is_same::value) + { + std::copy(kpts_cart_.begin(), kpts_cart_.end(), std::back_inserter(kpts_cart_working_)); + std::copy(ksq_.begin(), ksq_.end(), std::back_inserter(ksq_working_)); + } it = kpts_sorted.begin(); std::map*>::iterator e_it(kpts_sorted.end()); while (it != e_it) @@ -262,13 +301,63 @@ void KContainer::BuildKLists(const ParticleLayout& lattice, const PosType& twist std::map hashToIndex; for (int ki = 0; ki < numk; ki++) { - hashToIndex[getHashOfVec(kpts[ki], numk)] = ki; + hashToIndex[getHashOfVec(kpts_[ki], numk)] = ki; } // Use the map to find the index of -k from the index of k for (int ki = 0; ki < numk; ki++) { - minusk[ki] = hashToIndex[getHashOfVec(-1 * kpts[ki], numk)]; + minusk[ki] = hashToIndex[getHashOfVec(-1 * kpts_[ki], numk)]; } } +#ifdef MIXED_PRECISION +template class KContainerT; +template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +template void KContainerT::findApproxMMax(const CrystalLattice& lattice, unsigned ndim); +template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); + + +template class KContainerT; +template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); +template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); +#else +template class KContainerT; +template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); +template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); + +#endif } // namespace qmcplusplus diff --git a/src/Particle/LongRange/KContainer.h b/src/Particle/LongRange/KContainer.h index eee91affc7..21d4577b96 100644 --- a/src/Particle/LongRange/KContainer.h +++ b/src/Particle/LongRange/KContainer.h @@ -26,16 +26,52 @@ namespace qmcplusplus * It generates a set of k-points that are unit-translations of the reciprocal-space * cell. K-points are generated within a spherical cutoff set by the supercell */ -class KContainer : public QMCTraits +template +class KContainerT { +public: + using Real = REAL; + using FullPrecReal = QMCTraits::FullPrecRealType; + using PositionFull = QMCTraits::QTFull::PosType; + static constexpr int DIM = OHMMS_DIM; + using AppPosition = typename QMCTraits::PosType; + using Position = typename QMCTypes::PosType; + private: /// The cutoff up to which k-vectors are generated. - RealType kcutoff; + FullPrecReal kcutoff; public: //Typedef for the lattice-type - using ParticleLayout = PtclOnLatticeTraits::ParticleLayout; + using ParticleLayout = CrystalLattice; + + const auto& get_kpts_cart_soa() const { return kpts_cart_soa_; } + + const std::vector>& getKpts() const { return kpts_; } + const std::vector& getKptsCartWorking() const; + + const std::vector& getKShell() const { return kshell; }; + + const std::vector& getKSQWorking() const; + + int getMinusK(int k) const; + + int getNumK() const { return numk; } + + /** update k-vectors + * @param sc supercell + * @param kc cutoff radius in the K + * @param twist shifts the center of the grid of k-vectors + * @param useSphere if true, use the |K| + */ + template + void updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +private: ///number of k-points int numk; @@ -47,13 +83,16 @@ class KContainer : public QMCTraits /** K-vector in reduced coordinates */ - std::vector> kpts; + std::vector> kpts_; /** K-vector in Cartesian coordinates */ - std::vector kpts_cart; + std::vector kpts_cart_; + std::vector kpts_cart_working_; /** squre of kpts in Cartesian coordniates */ - std::vector ksq; + std::vector ksq_; + std::vector ksq_working_; + /** Given a k index, return index to -k */ std::vector minusk; @@ -67,33 +106,73 @@ class KContainer : public QMCTraits */ //std::map*> kpts_sorted; - /** update k-vectors - * @param sc supercell - * @param kc cutoff radius in the K - * @param twist shifts the center of the grid of k-vectors - * @param useSphere if true, use the |K| - */ - void updateKLists(const ParticleLayout& lattice, - RealType kc, - unsigned ndim, - const PosType& twist = PosType(), - bool useSphere = true); - - const auto& get_kpts_cart_soa() const { return kpts_cart_soa_; } - private: /** compute approximate parallelpiped that surrounds kc * @param lattice supercell */ - void findApproxMMax(const ParticleLayout& lattice, unsigned ndim); + template + void findApproxMMax(const CrystalLattice& lattice, unsigned ndim); /** construct the container for k-vectors */ - void BuildKLists(const ParticleLayout& lattice, const PosType& twist, bool useSphere); + template + void BuildKLists(const CrystalLattice& lattice, const Position& twist, bool useSphere); /** K-vector in Cartesian coordinates in SoA layout */ - VectorSoaContainer> kpts_cart_soa_; + VectorSoaContainer> kpts_cart_soa_; }; +using KContainer = KContainerT; + +#ifdef MIXED_PRECISION +extern template class KContainerT; +extern template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +extern template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +extern template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); +extern template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); + +extern template class KContainerT; +extern template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +extern template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +extern template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); +extern template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); +#else +extern template class KContainerT; +extern template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +extern template void KContainerT::updateKLists(const CrystalLattice& lattice, + FullPrecReal kc, + unsigned ndim, + const Position& twist = Position(), + bool useSphere = true); +extern template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); +extern template void KContainerT::findApproxMMax(const CrystalLattice& lattice, + unsigned ndim); +#endif + } // namespace qmcplusplus #endif diff --git a/src/Particle/LongRange/LRBreakup.h b/src/Particle/LongRange/LRBreakup.h index 38233d0b18..23824305b0 100644 --- a/src/Particle/LongRange/LRBreakup.h +++ b/src/Particle/LongRange/LRBreakup.h @@ -334,23 +334,24 @@ int LRBreakup::SetupKVecs(mRealType kc, mRealType kcont, mRealType { //Add low |k| ( < kcont) k-points with exact degeneracy KContainer kexact; - kexact.updateKLists(Basis.get_Lattice(), kcont, Basis.get_Lattice().ndim); + const auto& basis_lattice = Basis.get_Lattice(); + kexact.updateKLists>::Real>(basis_lattice, kcont, basis_lattice.ndim); bool findK = true; mRealType kc2 = kc * kc; //use at least one shell size_t ks = 0; - kc2 = std::max(kc2, static_cast(kexact.ksq[kexact.kshell[ks]])); + kc2 = std::max(kc2, static_cast(kexact.getKSQWorking()[kexact.getKShell()[ks]])); while (findK) { - if (kexact.ksq[kexact.kshell[ks]] > kc2) + if (kexact.getKSQWorking()[kexact.getKShell()[ks]] > kc2) findK = false; else ks++; } size_t maxkshell = ks; - size_t numk = kexact.numk - kexact.kshell[ks]; - for (; ks < kexact.kshell.size() - 1; ks++) - AddKToList(std::sqrt(kexact.ksq[kexact.kshell[ks]]), kexact.kshell[ks + 1] - kexact.kshell[ks]); + size_t numk = kexact.getNumK() - kexact.getKShell()[ks]; + for (; ks < kexact.getKShell().size() - 1; ks++) + AddKToList(std::sqrt(kexact.getKSQWorking()[kexact.getKShell()[ks]]), kexact.getKShell()[ks + 1] - kexact.getKShell()[ks]); ////Add these vectors to the internal list //int numk=0; //mRealType modk2; diff --git a/src/Particle/LongRange/LRHandlerBase.h b/src/Particle/LongRange/LRHandlerBase.h index 40fb15456c..a5518dc650 100644 --- a/src/Particle/LongRange/LRHandlerBase.h +++ b/src/Particle/LongRange/LRHandlerBase.h @@ -136,7 +136,7 @@ struct LRHandlerBase const Matrix& e2ikrA_i = A.getSK().eikr_i; const pRealType* rhokB_r = B.getSK().rhok_r[specB]; const pRealType* rhokB_i = B.getSK().rhok_i[specB]; - const std::vector& kpts = A.getSimulationCell().getKLists().kpts_cart; + const std::vector& kpts = A.getSimulationCell().getKLists().getKptsCartWorking(); for (int ki = 0; ki < Fk.size(); ki++) { PosType k = kpts[ki]; @@ -224,23 +224,23 @@ struct DummyLRHandler : public LRHandlerBase mRealType norm = 4.0 * M_PI / ref.getLattice().Volume; mRealType kcsq = LR_kc * LR_kc; auto& KList(ref.getSimulationCell().getKLists()); - int maxshell = KList.kshell.size() - 1; - const auto& kk(KList.ksq); + int maxshell = KList.getKShell().size() - 1; + const auto& kk(KList.getKSQWorking()); int ksh = 0, ik = 0; while (ksh < maxshell) { if (kk[ik] > kcsq) break; //exit - ik = KList.kshell[++ksh]; + ik = KList.getKShell()[++ksh]; } MaxKshell = ksh; Fk_symm.resize(MaxKshell); - Fk.resize(KList.kpts_cart.size()); + Fk.resize(KList.getKptsCartWorking().size()); for (ksh = 0, ik = 0; ksh < MaxKshell; ksh++, ik++) { - mRealType v = norm * myFunc(kk[KList.kshell[ksh]]); //rpa=u0/kk[ik]; + mRealType v = norm * myFunc(kk[KList.getKShell()[ksh]]); //rpa=u0/kk[ik]; Fk_symm[ksh] = v; - for (; ik < KList.kshell[ksh + 1]; ik++) + for (; ik < KList.getKShell()[ksh + 1]; ik++) Fk[ik] = v; } } diff --git a/src/Particle/LongRange/LRHandlerSRCoulomb.h b/src/Particle/LongRange/LRHandlerSRCoulomb.h index e854c73c64..0123db1869 100644 --- a/src/Particle/LongRange/LRHandlerSRCoulomb.h +++ b/src/Particle/LongRange/LRHandlerSRCoulomb.h @@ -27,6 +27,7 @@ #include "Numerics/OneDimLinearSpline.h" #include +#include #include namespace qmcplusplus @@ -399,40 +400,43 @@ class LRHandlerSRCoulomb : public LRHandlerBase void fillYk(KContainer& KList) { - Fk.resize(KList.kpts_cart.size()); - const std::vector& kshell(KList.kshell); + Fk.resize(KList.getKptsCartWorking().size()); + const std::vector& kshell(KList.getKShell()); if (MaxKshell >= kshell.size()) MaxKshell = kshell.size() - 1; Fk_symm.resize(MaxKshell); + const auto& ksq = KList.getKSQWorking(); for (int ks = 0, ki = 0; ks < Fk_symm.size(); ks++) { - mRealType uk = evalYk(std::sqrt(KList.ksq[ki])); + mRealType uk = evalYk(std::sqrt(ksq[ki])); Fk_symm[ks] = uk; - while (ki < KList.kshell[ks + 1] && ki < Fk.size()) + while (ki < kshell[ks + 1] && ki < Fk.size()) Fk[ki++] = uk; } - //for(int ki=0; ki& kshell(KList.kshell); + Fk.resize(kpts_cart.size()); + const std::vector& kshell(KList.getKShell()); if (MaxKshell >= kshell.size()) MaxKshell = kshell.size() - 1; + const auto& ksq = KList.getKSQWorking(); for (int ks = 0, ki = 0; ks < MaxKshell; ks++) { - mRealType uk = evalYkg(std::sqrt(KList.ksq[ki])); + mRealType uk = evalYkg(std::sqrt(ksq[ki])); - while (ki < KList.kshell[ks + 1] && ki < Fkg.size()) + while (ki < kshell[ks + 1] && ki < Fkg.size()) Fkg[ki++] = uk; } //Have to set this, because evaluate and evaluateGrad for LR piece uses @@ -444,24 +448,25 @@ class LRHandlerSRCoulomb : public LRHandlerBase void fillYkgstrain(KContainer& KList) { APP_ABORT("Stresses not supported yet\n"); - Fkgstrain.resize(KList.kpts_cart.size()); - const std::vector& kshell(KList.kshell); + Fkgstrain.resize(KList.getKptsCartWorking().size()); + const std::vector& kshell(KList.getKShell()); if (MaxKshell >= kshell.size()) MaxKshell = kshell.size() - 1; + const auto& ksq = KList.getKSQWorking(); for (int ks = 0, ki = 0; ks < MaxKshell; ks++) { - mRealType uk = evalYkgstrain(std::sqrt(KList.ksq[ki])); - while (ki < KList.kshell[ks + 1] && ki < Fkgstrain.size()) + mRealType uk = evalYkgstrain(std::sqrt(ksq[ki])); + while (ki < kshell[ks + 1] && ki < Fkgstrain.size()) Fkgstrain[ki++] = uk; } } void filldFk_dk(KContainer& KList) { - APP_ABORT("Stresses not supported yet\n"); - dFk_dstrain.resize(KList.kpts_cart.size()); + throw std::runtime_error("Stresses not supported yet\n"); + // dFk_dstrain.resize(KList.getKptsCartWorking().size()); - for (int ki = 0; ki < dFk_dstrain.size(); ki++) - dFk_dstrain[ki] = evaluateLR_dstrain(KList.kpts_cart[ki], std::sqrt(KList.ksq[ki])); + // for (int ki = 0; ki < dFk_dstrain.size(); ki++) + // dFk_dstrain[ki] = evaluateLR_dstrain(KList.getKptsCartWorking()[ki], std::sqrt(KList.getKSQWorking()[ki])); } }; } // namespace qmcplusplus diff --git a/src/Particle/LongRange/LRHandlerTemp.h b/src/Particle/LongRange/LRHandlerTemp.h index ec8c1dd9bd..a584620b04 100644 --- a/src/Particle/LongRange/LRHandlerTemp.h +++ b/src/Particle/LongRange/LRHandlerTemp.h @@ -267,16 +267,16 @@ class LRHandlerTemp : public LRHandlerBase void fillFk(const KContainer& KList) { - Fk.resize(KList.kpts_cart.size()); - const std::vector& kshell(KList.kshell); + Fk.resize(KList.getKptsCartWorking().size()); + const std::vector& kshell(KList.getKShell()); if (MaxKshell >= kshell.size()) MaxKshell = kshell.size() - 1; Fk_symm.resize(MaxKshell); for (int ks = 0, ki = 0; ks < Fk_symm.size(); ks++) { - mRealType uk = evalFk(std::sqrt(KList.ksq[ki])); + mRealType uk = evalFk(std::sqrt(KList.getKSQWorking()[ki])); Fk_symm[ks] = uk; - while (ki < KList.kshell[ks + 1] && ki < Fk.size()) + while (ki < kshell[ks + 1] && ki < Fk.size()) Fk[ki++] = uk; } //for(int ki=0; ki& kshell(KList.kshell); + Fk.resize(KList.getKptsCartWorking().size()); + const std::vector& kshell(KList.getKShell()); if (MaxKshell >= kshell.size()) MaxKshell = kshell.size() - 1; Fk_symm.resize(MaxKshell); // std::cout<<"Filling FK :"<& kshell(KList.kshell); + Fk.resize(KList.getKptsCartWorking().size()); + const std::vector& kshell(KList.getKShell()); if (MaxKshell >= kshell.size()) MaxKshell = kshell.size() - 1; Fk_symm.resize(MaxKshell); // std::cout<<"Filling FK :"<& sk_list const size_t nw = p_list.size(); const size_t num_species = p_leader.groups(); const auto& kpts_cart = sk_leader.k_lists_.get_kpts_cart_soa(); - const size_t nk = sk_leader.k_lists_.numk; + const size_t nk = sk_leader.k_lists_.getNumK(); const size_t nk_padded = kpts_cart.capacity(); auto& coordinates_leader = static_cast(p_leader.getCoordinates()); @@ -139,11 +139,11 @@ void StructFact::computeRhok(const ParticleSet& P) { const size_t num_ptcls = P.getTotalNum(); const size_t num_species = P.groups(); - const size_t nk = k_lists_.numk; + const size_t nk = k_lists_.getNumK(); resize(nk, num_species, num_ptcls); - rhok_r = 0.0; rhok_i = 0.0; + const auto& kpts_cart = k_lists_.getKptsCartWorking(); if (StorePerParticle) { // save per particle and species value @@ -157,7 +157,7 @@ void StructFact::computeRhok(const ParticleSet& P) #pragma omp simd for (int ki = 0; ki < nk; ki++) { - qmcplusplus::sincos(dot(k_lists_.kpts_cart[ki], pos), &eikr_i_ptr[ki], &eikr_r_ptr[ki]); + qmcplusplus::sincos(dot(kpts_cart[ki], pos), &eikr_i_ptr[ki], &eikr_r_ptr[ki]); rhok_r_ptr[ki] += eikr_r_ptr[ki]; rhok_i_ptr[ki] += eikr_i_ptr[ki]; } @@ -176,7 +176,7 @@ void StructFact::computeRhok(const ParticleSet& P) for (int ki = 0; ki < nk; ki++) { RealType s, c; - qmcplusplus::sincos(dot(k_lists_.kpts_cart[ki], pos), &s, &c); + qmcplusplus::sincos(dot(kpts_cart[ki], pos), &s, &c); rhok_r_ptr[ki] += c; rhok_i_ptr[ki] += s; } @@ -191,7 +191,7 @@ void StructFact::computeRhok(const ParticleSet& P) const size_t offset = ib * kblock_size; const size_t this_block_size = std::min(kblock_size, nk - offset); for (int ki = 0; ki < this_block_size; ki++) - phiV[ki] = dot(k_lists_.kpts_cart[ki + offset], pos); + phiV[ki] = dot(kpts_cart[ki + offset], pos); eval_e2iphi(this_block_size, phiV, eikr_r_temp, eikr_i_temp); for (int ki = 0; ki < this_block_size; ki++) { diff --git a/src/Particle/LongRange/StructFact.h b/src/Particle/LongRange/StructFact.h index cfa29e9255..b9bcc2c5a4 100644 --- a/src/Particle/LongRange/StructFact.h +++ b/src/Particle/LongRange/StructFact.h @@ -21,11 +21,11 @@ #include #include #include +#include "KContainer.h" namespace qmcplusplus { class ParticleSet; -class KContainer; struct SKMultiWalkerMem; /** @ingroup longrange diff --git a/src/Particle/LongRange/tests/test_StructFact.cpp b/src/Particle/LongRange/tests/test_StructFact.cpp index 48163ad077..b5d81b7242 100644 --- a/src/Particle/LongRange/tests/test_StructFact.cpp +++ b/src/Particle/LongRange/tests/test_StructFact.cpp @@ -23,7 +23,7 @@ namespace qmcplusplus */ TEST_CASE("StructFact", "[lrhandler]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; Lattice.LR_dim_cutoff = 30.; Lattice.R.diagonal(5.0); @@ -48,21 +48,21 @@ TEST_CASE("StructFact", "[lrhandler]") ref.R[2] = {0.3, 4.0, 1.4}; ref.R[3] = {3.2, 4.7, 0.7}; - REQUIRE(simulation_cell.getKLists().numk == 263786); + REQUIRE(simulation_cell.getKLists().getNumK() == 263786); StructFact sk(ref.getLRBox(), simulation_cell.getKLists()); sk.updateAllPart(ref); CHECK(sk.rhok_r.rows() == ref.groups()); CHECK(sk.rhok_i.rows() == ref.groups()); - CHECK(sk.rhok_r.cols() == simulation_cell.getKLists().numk); - CHECK(sk.rhok_i.cols() == simulation_cell.getKLists().numk); + CHECK(sk.rhok_r.cols() == simulation_cell.getKLists().getNumK()); + CHECK(sk.rhok_i.cols() == simulation_cell.getKLists().getNumK()); std::vector> rhok_sum_ref{-125.80618630936, 68.199075127271}; for (int i = 0; i < ref.groups(); i++) { std::complex rhok_sum, rhok_even_sum; - for (int ik = 0; ik < simulation_cell.getKLists().numk; ik++) + for (int ik = 0; ik < simulation_cell.getKLists().getNumK(); ik++) rhok_sum += std::complex(sk.rhok_r[i][ik], sk.rhok_i[i][ik]); //std::cout << std::setprecision(14) << rhok_sum << std::endl; diff --git a/src/Particle/LongRange/tests/test_ewald3d.cpp b/src/Particle/LongRange/tests/test_ewald3d.cpp index b98ce5e090..54774297ba 100644 --- a/src/Particle/LongRange/tests/test_ewald3d.cpp +++ b/src/Particle/LongRange/tests/test_ewald3d.cpp @@ -24,7 +24,7 @@ using mRealType = EwaldHandler3D::mRealType; */ TEST_CASE("ewald3d", "[lrhandler]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; Lattice.LR_dim_cutoff = 30.; Lattice.R.diagonal(5.0); @@ -46,8 +46,7 @@ TEST_CASE("ewald3d", "[lrhandler]") CHECK(handler.Sigma == Approx(std::sqrt(Lattice.LR_kc / (2.0 * Lattice.LR_rc)))); std::cout << "handler.MaxKshell is " << handler.MaxKshell << std::endl; - CHECK( (std::is_same::value ? - handler.MaxKshell == 78 : handler.MaxKshell >= 117 && handler.MaxKshell <= 128 )); + CHECK(handler.MaxKshell == 78); CHECK(handler.LR_rc == Approx(2.5)); CHECK(handler.LR_kc == Approx(12)); @@ -73,7 +72,7 @@ TEST_CASE("ewald3d", "[lrhandler]") */ TEST_CASE("ewald3d df", "[lrhandler]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; Lattice.LR_dim_cutoff = 30.; Lattice.R.diagonal(5.0); @@ -95,8 +94,7 @@ TEST_CASE("ewald3d df", "[lrhandler]") CHECK(handler.Sigma == Approx(std::sqrt(Lattice.LR_kc / (2.0 * Lattice.LR_rc)))); std::cout << "handler.MaxKshell is " << handler.MaxKshell << std::endl; - CHECK( (std::is_same::value ? - handler.MaxKshell == 78 : handler.MaxKshell >= 117 && handler.MaxKshell <= 128 )); + CHECK(handler.MaxKshell == 78); CHECK(handler.LR_rc == Approx(2.5)); CHECK(handler.LR_kc == Approx(12)); diff --git a/src/Particle/LongRange/tests/test_kcontainer.cpp b/src/Particle/LongRange/tests/test_kcontainer.cpp index b4e7f80597..8057fe022d 100644 --- a/src/Particle/LongRange/tests/test_kcontainer.cpp +++ b/src/Particle/LongRange/tests/test_kcontainer.cpp @@ -2,9 +2,10 @@ // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // -// Copyright (c) 2022 QMCPACK developers. +// Copyright (c) 2025 QMCPACK developers. // // File developed by: Yubo "Paul" Yang, yubo.paul.yang@gmail.com, CCQ @ Flatiron +// Peter W. Doak, doakpw@ornl.gov, Oak Ridge National Lab // // File created by: Yubo "Paul" Yang, yubo.paul.yang@gmail.com, CCQ @ Flatiron ////////////////////////////////////////////////////////////////////////////////////// @@ -12,6 +13,10 @@ #include "Particle/LongRange/KContainer.h" #include "OhmmsPETE/TinyVector.h" +#include "Particle/Lattice/CrystalLattice.h" +#include "Particle/tests/MinimalParticlePool.h" +#include "Utilities/for_testing/checkVector.hpp" +#include "Utilities/for_testing/NativeInitializerPrint.hpp" namespace qmcplusplus { @@ -27,7 +32,7 @@ TEST_CASE("kcontainer at gamma in 3D", "[longrange]") const std::vector kcs = {blat, std::sqrt(2) * blat, std::sqrt(3) * blat}; const std::vector nks = {6, 18, 26}; - CrystalLattice lattice; + CrystalLattice lattice; lattice.R.diagonal(1.0); lattice.set(lattice.R); // compute Rv and Gv from R @@ -35,10 +40,10 @@ TEST_CASE("kcontainer at gamma in 3D", "[longrange]") for (int ik = 0; ik < kcs.size(); ik++) { const double kc = kcs[ik] + 1e-6; - klists.updateKLists(lattice, kc, ndim); - CHECK(klists.kpts.size() == nks[ik]); + klists.updateKLists>::Scalar_t>(lattice, kc, ndim); + CHECK(klists.getKpts().size() == nks[ik]); } - const int mxk = klists.kpts.size(); + const int mxk = klists.getKpts().size(); int gvecs[26][3] = {{-1, 0, 0}, {0, -1, 0}, {0, 0, -1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {-1, -1, 0}, {-1, 0, -1}, {-1, 0, 1}, {-1, 1, 0}, {0, -1, -1}, {0, -1, 1}, {0, 1, -1}, {0, 1, 1}, {1, -1, 0}, {1, 0, -1}, {1, 0, 1}, {1, 1, 0}, {-1, -1, -1}, {-1, -1, 1}, {-1, 1, -1}, @@ -48,8 +53,8 @@ TEST_CASE("kcontainer at gamma in 3D", "[longrange]") { for (int ldim = 0; ldim < ndim; ldim++) { - CHECK(klists.kpts[ik][ldim] == gvecs[ik][ldim]); - CHECK(klists.kpts[ik][ldim] * blat == Approx(klists.kpts_cart[ik][ldim])); + CHECK(klists.getKpts()[ik][ldim] == gvecs[ik][ldim]); + CHECK(klists.getKpts()[ik][ldim] * blat == Approx(klists.getKptsCartWorking()[ik][ldim])); } } } @@ -63,7 +68,7 @@ TEST_CASE("kcontainer at twist in 3D", "[longrange]") // twist one shell of kvectors const double kc = blat + 1e-6; - CrystalLattice lattice; + CrystalLattice lattice; lattice.R.diagonal(1.0); lattice.set(lattice.R); // compute Rv and Gv from R @@ -71,17 +76,17 @@ TEST_CASE("kcontainer at twist in 3D", "[longrange]") PosType twist; twist[0] = 0.1; - klists.updateKLists(lattice, kc, ndim, twist); - CHECK(klists.kpts.size() == 1); - CHECK(klists.kpts_cart[0][0] == Approx(blat * (twist[0] - 1))); + klists.updateKLists>::Scalar_t>(lattice, kc, ndim, twist); + CHECK(klists.getKpts().size() == 1); + CHECK(klists.getKptsCartWorking()[0][0] == Approx(blat * (twist[0] - 1))); twist = {-0.5, 0, 0.5}; - klists.updateKLists(lattice, kc, ndim, twist); + klists.updateKLists>::Scalar_t>(lattice, kc, ndim, twist); int gvecs[3][3] = {{0, 0, -1}, {1, 0, -1}, {1, 0, 0}}; - CHECK(klists.kpts.size() == 3); - for (int ik = 0; ik < klists.kpts.size(); ik++) + CHECK(klists.getKpts().size() == 3); + for (int ik = 0; ik < klists.getKpts().size(); ik++) for (int ldim = 0; ldim < ndim; ldim++) - CHECK(klists.kpts_cart[ik][ldim] == Approx(blat * (twist[ldim] + gvecs[ik][ldim]))); + CHECK(klists.getKptsCartWorking()[ik][ldim] == Approx(blat * (twist[ldim] + gvecs[ik][ldim]))); } TEST_CASE("kcontainer at gamma in 2D", "[longrange]") @@ -94,7 +99,7 @@ TEST_CASE("kcontainer at gamma in 2D", "[longrange]") const std::vector kcs = {blat, std::sqrt(2) * blat, 2 * blat}; const std::vector nks = {4, 8, 12}; - CrystalLattice lattice; + CrystalLattice lattice; lattice.R.diagonal(1.0); lattice.set(lattice.R); // compute Rv and Gv from R @@ -102,10 +107,10 @@ TEST_CASE("kcontainer at gamma in 2D", "[longrange]") for (int ik = 0; ik < kcs.size(); ik++) { const double kc = kcs[ik] + 1e-6; - klists.updateKLists(lattice, kc, ndim); - CHECK(klists.kpts.size() == nks[ik]); + klists.updateKLists>::Scalar_t>(lattice, kc, ndim); + CHECK(klists.getKpts().size() == nks[ik]); } - const int mxk = klists.kpts.size(); + const int mxk = klists.getKpts().size(); int gvecs[12][3] = { {-1, 0, 0}, {0, -1, 0}, {0, 1, 0}, {1, 0, 0}, {-1, -1, 0}, {-1, 1, 0}, {1, -1, 0}, {1, 1, 0}, {-2, 0, 0}, {0, -2, 0}, {0, 2, 0}, {2, 0, 0}, @@ -115,8 +120,8 @@ TEST_CASE("kcontainer at gamma in 2D", "[longrange]") { for (int ldim = 0; ldim < ndim; ldim++) { - CHECK(klists.kpts[ik][ldim] == gvecs[ik][ldim]); - CHECK(klists.kpts[ik][ldim] * blat == Approx(klists.kpts_cart[ik][ldim])); + CHECK(klists.getKpts()[ik][ldim] == gvecs[ik][ldim]); + CHECK(klists.getKpts()[ik][ldim] * blat == Approx(klists.getKptsCartWorking()[ik][ldim])); } } } @@ -130,7 +135,7 @@ TEST_CASE("kcontainer at twist in 2D", "[longrange]") // twist one shell of kvectors const double kc = blat + 1e-6; - CrystalLattice lattice; + CrystalLattice lattice; lattice.R.diagonal(1.0); lattice.set(lattice.R); // compute Rv and Gv from R @@ -138,29 +143,139 @@ TEST_CASE("kcontainer at twist in 2D", "[longrange]") PosType twist; twist[0] = 0.1; - klists.updateKLists(lattice, kc, ndim, twist); - CHECK(klists.kpts.size() == 1); - CHECK(klists.kpts_cart[0][0] == Approx(blat * (twist[0] - 1))); + klists.updateKLists>::Scalar_t>(lattice, kc, ndim, twist); + CHECK(klists.getKpts().size() == 1); + CHECK(klists.getKptsCartWorking()[0][0] == Approx(blat * (twist[0] - 1))); twist[1] = 0.1; - klists.updateKLists(lattice, kc, ndim, twist); - CHECK(klists.kpts.size() == 2); - CHECK(klists.kpts_cart[0][0] == Approx(blat * (twist[0] - 1))); - CHECK(klists.kpts_cart[0][1] == Approx(blat * twist[1])); - CHECK(klists.kpts_cart[1][0] == Approx(blat * (twist[0]))); - CHECK(klists.kpts_cart[1][1] == Approx(blat * (twist[1] - 1))); + klists.updateKLists>::Scalar_t>(lattice, kc, ndim, twist); + CHECK(klists.getKpts().size() == 2); + CHECK(klists.getKptsCartWorking()[0][0] == Approx(blat * (twist[0] - 1))); + CHECK(klists.getKptsCartWorking()[0][1] == Approx(blat * twist[1])); + CHECK(klists.getKptsCartWorking()[1][0] == Approx(blat * (twist[0]))); + CHECK(klists.getKptsCartWorking()[1][1] == Approx(blat * (twist[1] - 1))); twist = {-0.5, 0.5, 0}; - klists.updateKLists(lattice, kc, ndim, twist); - CHECK(klists.kpts.size() == 3); + klists.updateKLists>::Scalar_t>(lattice, kc, ndim, twist); + CHECK(klists.getKpts().size() == 3); //for (int ik=0;ik<3;ik++) - // app_log() << klists.kpts_cart[ik] << std::endl; - CHECK(klists.kpts_cart[0][0] == Approx(blat * (twist[0] - 0))); - CHECK(klists.kpts_cart[0][1] == Approx(blat * (twist[1] - 1))); - CHECK(klists.kpts_cart[1][0] == Approx(blat * (twist[0] + 1))); - CHECK(klists.kpts_cart[1][1] == Approx(blat * (twist[1] - 1))); - CHECK(klists.kpts_cart[2][0] == Approx(blat * (twist[0] + 1))); - CHECK(klists.kpts_cart[2][1] == Approx(blat * twist[1])); + // app_log() << klists.getKptsCartWorking()[ik] << std::endl; + CHECK(klists.getKptsCartWorking()[0][0] == Approx(blat * (twist[0] - 0))); + CHECK(klists.getKptsCartWorking()[0][1] == Approx(blat * (twist[1] - 1))); + CHECK(klists.getKptsCartWorking()[1][0] == Approx(blat * (twist[0] + 1))); + CHECK(klists.getKptsCartWorking()[1][1] == Approx(blat * (twist[1] - 1))); + CHECK(klists.getKptsCartWorking()[2][0] == Approx(blat * (twist[0] + 1))); + CHECK(klists.getKptsCartWorking()[2][1] == Approx(blat * twist[1])); } +TEST_CASE("kcontainer for diamond", "[longrange]") +{ + // Communicate* comm = OHMMS::Controller; + // ParticleSetPool particle_pool{MinimalParticlePool::make_diamondC_1x1x1(comm)}; + // ParticleSet pset_ions{*(particle_pool.getParticleSet("ion"))}; + + int ndim = 3; + + // auto kcs = pset_ions.getSimulationCell().getKLists().numk; + // std::cout << "kcs:" << kcs << '\n'; + + using Real = QMCTraits::RealType; + using FullPrecReal = QMCTraits::FullPrecRealType; + + CrystalLattice lattice; + lattice.BoxBConds = {true, true, true}; + Tensor lattice_mat{3.37316115, 3.37316115, 0.00000000, 0.00000000, 3.37316115, + 3.37316115, 3.37316115, 0.00000000, 3.37316115}; + lattice.set(lattice_mat); + lattice.LR_dim_cutoff = 15; + SimulationCell cell(lattice); + + const KContainerT& klists = cell.getKLists(); + std::remove_cv_t> kpoint_lists = { + {-1, -1, -1}, {-1, 0, 0}, {0, -1, 0}, {0, 0, -1}, {0, 0, 1}, {0, 1, 0}, {1, 0, 0}, {1, 1, 1}, + {-1, -1, 0}, {-1, 0, -1}, {0, -1, -1}, {0, 1, 1}, {1, 0, 1}, {1, 1, 0}, {-2, -1, -1}, {-1, -2, -1}, + {-1, -1, -2}, {-1, 0, 1}, {-1, 1, 0}, {0, -1, 1}, {0, 1, -1}, {1, -1, 0}, {1, 0, -1}, {1, 1, 2}, + {1, 2, 1}, {2, 1, 1}, {-2, -2, -1}, {-2, -1, -2}, {-2, -1, 0}, {-2, 0, -1}, {-1, -2, -2}, {-1, -2, 0}, + {-1, -1, 1}, {-1, 0, -2}, {-1, 1, -1}, {-1, 1, 1}, {0, -2, -1}, {0, -1, -2}, {0, 1, 2}, {0, 2, 1}, + {1, -1, -1}, {1, -1, 1}, {1, 0, 2}, {1, 1, -1}, {1, 2, 0}, {1, 2, 2}, {2, 0, 1}, {2, 1, 0}, + {2, 1, 2}, {2, 2, 1}, {-2, -2, -2}, {-2, 0, 0}, {0, -2, 0}, {0, 0, -2}, {0, 0, 2}, {0, 2, 0}, + {2, 0, 0}, {2, 2, 2}, {-2, -2, 0}, {-2, 0, -2}, {0, -2, -2}, {0, 2, 2}, {2, 0, 2}, {2, 2, 0}, + {-3, -2, -2}, {-3, -1, -1}, {-2, -3, -2}, {-2, -2, -3}, {-2, 0, 1}, {-2, 1, 0}, {-1, -3, -1}, {-1, -1, -3}, + {-1, 0, 2}, {-1, 2, 0}, {0, -2, 1}, {0, -1, 2}, {0, 1, -2}, {0, 2, -1}, {1, -2, 0}, {1, 0, -2}, + {1, 1, 3}, {1, 3, 1}, {2, -1, 0}, {2, 0, -1}, {2, 2, 3}, {2, 3, 2}, {3, 1, 1}, {3, 2, 2}, + {-3, -2, -1}, {-3, -1, -2}, {-2, -3, -1}, {-2, -1, -3}, {-2, -1, 1}, {-2, 1, -1}, {-1, -3, -2}, {-1, -2, -3}, + {-1, -2, 1}, {-1, 1, -2}, {-1, 1, 2}, {-1, 2, 1}, {1, -2, -1}, {1, -1, -2}, {1, -1, 2}, {1, 2, -1}, + {1, 2, 3}, {1, 3, 2}, {2, -1, 1}, {2, 1, -1}, {2, 1, 3}, {2, 3, 1}, {3, 1, 2}, {3, 2, 1}, + {-3, -3, -2}, {-3, -2, -3}, {-3, -1, 0}, {-3, 0, -1}, {-2, -3, -3}, {-2, 1, 1}, {-1, -3, 0}, {-1, -1, 2}, + {-1, 0, -3}, {-1, 2, -1}, {0, -3, -1}, {0, -1, -3}, {0, 1, 3}, {0, 3, 1}, {1, -2, 1}, {1, 0, 3}, + {1, 1, -2}, {1, 3, 0}, {2, -1, -1}, {2, 3, 3}, {3, 0, 1}, {3, 1, 0}, {3, 2, 3}, {3, 3, 2}, + {-3, -3, -3}, {-3, -3, -1}, {-3, -2, 0}, {-3, -1, -3}, {-3, 0, -2}, {-3, 0, 0}, {-2, -3, 0}, {-2, -2, 1}, + {-2, 0, -3}, {-2, 1, -2}, {-1, -3, -3}, {-1, 2, 2}, {0, -3, -2}, {0, -3, 0}, {0, -2, -3}, {0, 0, -3}, + {0, 0, 3}, {0, 2, 3}, {0, 3, 0}, {0, 3, 2}, {1, -2, -2}, {1, 3, 3}, {2, -1, 2}, {2, 0, 3}, + {2, 2, -1}, {2, 3, 0}, {3, 0, 0}, {3, 0, 2}, {3, 1, 3}, {3, 2, 0}, {3, 3, 1}, {3, 3, 3}, + {-4, -2, -2}, {-2, -4, -2}, {-2, -2, -4}, {-2, 0, 2}, {-2, 2, 0}, {0, -2, 2}, {0, 2, -2}, {2, -2, 0}, + {2, 0, -2}, {2, 2, 4}, {2, 4, 2}, {4, 2, 2}, {-4, -3, -2}, {-4, -2, -3}, {-4, -2, -1}, {-4, -1, -2}, + {-3, -4, -2}, {-3, -2, -4}, {-3, -1, 1}, {-3, 1, -1}, {-2, -4, -3}, {-2, -4, -1}, {-2, -3, -4}, {-2, -1, -4}, + {-2, -1, 2}, {-2, 1, 2}, {-2, 2, -1}, {-2, 2, 1}, {-1, -4, -2}, {-1, -3, 1}, {-1, -2, -4}, {-1, -2, 2}, + {-1, 1, -3}, {-1, 1, 3}, {-1, 2, -2}, {-1, 3, 1}, {1, -3, -1}, {1, -2, 2}, {1, -1, -3}, {1, -1, 3}, + {1, 2, -2}, {1, 2, 4}, {1, 3, -1}, {1, 4, 2}, {2, -2, -1}, {2, -2, 1}, {2, -1, -2}, {2, 1, -2}, + {2, 1, 4}, {2, 3, 4}, {2, 4, 1}, {2, 4, 3}, {3, -1, 1}, {3, 1, -1}, {3, 2, 4}, {3, 4, 2}, + {4, 1, 2}, {4, 2, 1}, {4, 2, 3}, {4, 3, 2}, {-4, -3, -3}, {-4, -1, -1}, {-3, -4, -3}, {-3, -3, -4}, + {-3, -3, 0}, {-3, 0, -3}, {-3, 0, 1}, {-3, 1, 0}, {-1, -4, -1}, {-1, -1, -4}, {-1, 0, 3}, {-1, 3, 0}, + {0, -3, -3}, {0, -3, 1}, {0, -1, 3}, {0, 1, -3}, {0, 3, -1}, {0, 3, 3}, {1, -3, 0}, {1, 0, -3}, + {1, 1, 4}, {1, 4, 1}, {3, -1, 0}, {3, 0, -1}, {3, 0, 3}, {3, 3, 0}, {3, 3, 4}, {3, 4, 3}, + {4, 1, 1}, {4, 3, 3}, {-4, -3, -1}, {-4, -1, -3}, {-3, -4, -1}, {-3, -2, 1}, {-3, -1, -4}, {-3, 1, -2}, + {-2, -3, 1}, {-2, 1, -3}, {-1, -4, -3}, {-1, -3, -4}, {-1, 2, 3}, {-1, 3, 2}, {1, -3, -2}, {1, -2, -3}, + {1, 3, 4}, {1, 4, 3}, {2, -1, 3}, {2, 3, -1}, {3, -1, 2}, {3, 1, 4}, {3, 2, -1}, {3, 4, 1}, + {4, 1, 3}, {4, 3, 1}, {-4, -4, -3}, {-4, -3, -4}, {-4, -1, 0}, {-4, 0, -1}, {-3, -4, -4}, {-3, 1, 1}, + {-1, -4, 0}, {-1, -1, 3}, {-1, 0, -4}, {-1, 3, -1}, {0, -4, -1}, {0, -1, -4}, {0, 1, 4}, {0, 4, 1}, + {1, -3, 1}, {1, 0, 4}, {1, 1, -3}, {1, 4, 0}, {3, -1, -1}, {3, 4, 4}, {4, 0, 1}, {4, 1, 0}, + {4, 3, 4}, {4, 4, 3}, {-4, -4, -2}, {-4, -2, -4}, {-4, -2, 0}, {-4, 0, -2}, {-2, -4, -4}, {-2, -4, 0}, + {-2, -2, 2}, {-2, 0, -4}, {-2, 2, -2}, {-2, 2, 2}, {0, -4, -2}, {0, -2, -4}, {0, 2, 4}, {0, 4, 2}, + {2, -2, -2}, {2, -2, 2}, {2, 0, 4}, {2, 2, -2}, {2, 4, 0}, {2, 4, 4}, {4, 0, 2}, {4, 2, 0}, + {4, 2, 4}, {4, 4, 2}, {-4, -4, -4}, {-4, 0, 0}, {0, -4, 0}, {0, 0, -4}, {0, 0, 4}, {0, 4, 0}, + {4, 0, 0}, {4, 4, 4}, {-5, -3, -3}, {-5, -2, -2}, {-4, -4, -1}, {-4, -3, 0}, {-4, -1, -4}, {-4, 0, -3}, + {-3, -5, -3}, {-3, -4, 0}, {-3, -3, -5}, {-3, -3, 1}, {-3, 0, -4}, {-3, 0, 2}, {-3, 1, -3}, {-3, 2, 0}, + {-2, -5, -2}, {-2, -2, -5}, {-2, 0, 3}, {-2, 3, 0}, {-1, -4, -4}, {-1, 3, 3}, {0, -4, -3}, {0, -3, -4}, + {0, -3, 2}, {0, -2, 3}, {0, 2, -3}, {0, 3, -2}, {0, 3, 4}, {0, 4, 3}, {1, -3, -3}, {1, 4, 4}, + {2, -3, 0}, {2, 0, -3}, {2, 2, 5}, {2, 5, 2}, {3, -2, 0}, {3, -1, 3}, {3, 0, -2}, {3, 0, 4}, + {3, 3, -1}, {3, 3, 5}, {3, 4, 0}, {3, 5, 3}, {4, 0, 3}, {4, 1, 4}, {4, 3, 0}, {4, 4, 1}, + {5, 2, 2}, {5, 3, 3}, {-5, -3, -2}, {-5, -2, -3}, {-3, -5, -2}, {-3, -2, -5}, {-3, -1, 2}, {-3, 2, -1}, + {-2, -5, -3}, {-2, -3, -5}, {-2, 1, 3}, {-2, 3, 1}, {-1, -3, 2}, {-1, 2, -3}, {1, -2, 3}, {1, 3, -2}, + {2, -3, -1}, {2, -1, -3}, {2, 3, 5}, {2, 5, 3}, {3, -2, 1}, {3, 1, -2}, {3, 2, 5}, {3, 5, 2}, + {5, 2, 3}, {5, 3, 2}, {-5, -4, -3}, {-5, -3, -4}, {-5, -2, -1}, {-5, -1, -2}, {-4, -5, -3}, {-4, -3, -5}, + {-4, -1, 1}, {-4, 1, -1}, {-3, -5, -4}, {-3, -4, -5}, {-3, 1, 2}, {-3, 2, 1}, {-2, -5, -1}, {-2, -1, -5}, + {-2, -1, 3}, {-2, 3, -1}, {-1, -5, -2}, {-1, -4, 1}, {-1, -2, -5}, {-1, -2, 3}, {-1, 1, -4}, {-1, 1, 4}, + {-1, 3, -2}, {-1, 4, 1}, {1, -4, -1}, {1, -3, 2}, {1, -1, -4}, {1, -1, 4}, {1, 2, -3}, {1, 2, 5}, + {1, 4, -1}, {1, 5, 2}, {2, -3, 1}, {2, 1, -3}, {2, 1, 5}, {2, 5, 1}, {3, -2, -1}, {3, -1, -2}, + {3, 4, 5}, {3, 5, 4}, {4, -1, 1}, {4, 1, -1}, {4, 3, 5}, {4, 5, 3}, {5, 1, 2}, {5, 2, 1}, + {5, 3, 4}, {5, 4, 3}, {-5, -4, -4}, {-5, -4, -2}, {-5, -3, -1}, {-5, -2, -4}, {-5, -1, -3}, {-5, -1, -1}, + {-4, -5, -4}, {-4, -5, -2}, {-4, -4, -5}, {-4, -2, -5}, {-4, -2, 1}, {-4, 0, 1}, {-4, 1, -2}, {-4, 1, 0}, + {-3, -5, -1}, {-3, -2, 2}, {-3, -1, -5}, {-3, 2, -2}, {-2, -5, -4}, {-2, -4, -5}, {-2, -4, 1}, {-2, -3, 2}, + {-2, 1, -4}, {-2, 2, -3}, {-2, 2, 3}, {-2, 3, 2}, {-1, -5, -3}, {-1, -5, -1}, {-1, -3, -5}, {-1, -1, -5}, + {-1, 0, 4}, {-1, 2, 4}, {-1, 4, 0}, {-1, 4, 2}, {0, -4, 1}, {0, -1, 4}, {0, 1, -4}, {0, 4, -1}, + {1, -4, -2}, {1, -4, 0}, {1, -2, -4}, {1, 0, -4}, {1, 1, 5}, {1, 3, 5}, {1, 5, 1}, {1, 5, 3}, + {2, -3, -2}, {2, -2, -3}, {2, -2, 3}, {2, -1, 4}, {2, 3, -2}, {2, 4, -1}, {2, 4, 5}, {2, 5, 4}, + {3, -2, 2}, {3, 1, 5}, {3, 2, -2}, {3, 5, 1}, {4, -1, 0}, {4, -1, 2}, {4, 0, -1}, {4, 2, -1}, + {4, 2, 5}, {4, 4, 5}, {4, 5, 2}, {4, 5, 4}, {5, 1, 1}, {5, 1, 3}, {5, 2, 4}, {5, 3, 1}, + {5, 4, 2}, {5, 4, 4}, {-4, -4, 0}, {-4, 0, -4}, {0, -4, -4}, {0, 4, 4}, {4, 0, 4}, {4, 4, 0}, + {-5, -5, -3}, {-5, -3, -5}, {-5, -2, 0}, {-5, 0, -2}, {-3, -5, -5}, {-3, 2, 2}, {-2, -5, 0}, {-2, -2, 3}, + {-2, 0, -5}, {-2, 3, -2}, {0, -5, -2}, {0, -2, -5}, {0, 2, 5}, {0, 5, 2}, {2, -3, 2}, {2, 0, 5}, + {2, 2, -3}, {2, 5, 0}, {3, -2, -2}, {3, 5, 5}, {5, 0, 2}, {5, 2, 0}, {5, 3, 5}, {5, 5, 3}, + {-5, -5, -4}, {-5, -4, -5}, {-5, -4, -1}, {-5, -1, -4}, {-5, -1, 0}, {-5, 0, -1}, {-4, -5, -5}, {-4, -5, -1}, + {-4, -3, 1}, {-4, -1, -5}, {-4, 1, -3}, {-4, 1, 1}, {-3, -4, 1}, {-3, 1, -4}, {-1, -5, -4}, {-1, -5, 0}, + {-1, -4, -5}, {-1, -1, 4}, {-1, 0, -5}, {-1, 3, 4}, {-1, 4, -1}, {-1, 4, 3}, {0, -5, -1}, {0, -1, -5}, + {0, 1, 5}, {0, 5, 1}, {1, -4, -3}, {1, -4, 1}, {1, -3, -4}, {1, 0, 5}, {1, 1, -4}, {1, 4, 5}, + {1, 5, 0}, {1, 5, 4}, {3, -1, 4}, {3, 4, -1}, {4, -1, -1}, {4, -1, 3}, {4, 1, 5}, {4, 3, -1}, + {4, 5, 1}, {4, 5, 5}, {5, 0, 1}, {5, 1, 0}, {5, 1, 4}, {5, 4, 1}, {5, 4, 5}, {5, 5, 4}, + }; + double tolerance = 0.1; + { + INFO("Checking kpoint_lists"); + auto check = checkVector(klists.getKpts(), kpoint_lists, true); + CHECKED_ELSE(check.result) { FAIL(check.result_message); } + } +} + + } // namespace qmcplusplus diff --git a/src/Particle/LongRange/tests/test_lrhandler.cpp b/src/Particle/LongRange/tests/test_lrhandler.cpp index f3634028c8..b4154352ec 100644 --- a/src/Particle/LongRange/tests/test_lrhandler.cpp +++ b/src/Particle/LongRange/tests/test_lrhandler.cpp @@ -29,7 +29,7 @@ struct CoulombF2 */ TEST_CASE("dummy", "[lrhandler]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; Lattice.LR_dim_cutoff = 30.; Lattice.R.diagonal(5.0); @@ -48,8 +48,7 @@ TEST_CASE("dummy", "[lrhandler]") handler.initBreakup(ref); std::cout << "handler.MaxKshell is " << handler.MaxKshell << std::endl; - CHECK( (std::is_same::value ? - handler.MaxKshell == 78 : handler.MaxKshell >= 117 && handler.MaxKshell <= 128 )); + CHECK( handler.MaxKshell == 78); CHECK(handler.LR_kc == Approx(12)); CHECK(handler.LR_rc == Approx(0)); @@ -61,8 +60,8 @@ TEST_CASE("dummy", "[lrhandler]") // the full Coulomb potential should be retained in kspace for (int ish = 0; ish < handler.MaxKshell; ish++) { - int ik = ref.getSimulationCell().getKLists().kshell[ish]; - double k2 = ref.getSimulationCell().getKLists().ksq[ik]; + int ik = ref.getSimulationCell().getKLists().getKShell()[ish]; + double k2 = ref.getSimulationCell().getKLists().getKSQWorking()[ik]; double fk_expect = fk(k2); CHECK(handler.Fk_symm[ish] == Approx(norm * fk_expect)); } diff --git a/src/Particle/LongRange/tests/test_srcoul.cpp b/src/Particle/LongRange/tests/test_srcoul.cpp index 7242544c35..7113848094 100644 --- a/src/Particle/LongRange/tests/test_srcoul.cpp +++ b/src/Particle/LongRange/tests/test_srcoul.cpp @@ -35,7 +35,8 @@ struct EslerCoulomb3D_ForSRCOUL */ TEST_CASE("srcoul", "[lrhandler]") { - CrystalLattice Lattice; + + CrystalLattice Lattice; Lattice.BoxBConds = true; Lattice.LR_dim_cutoff = 30.; Lattice.R.diagonal(5.0); @@ -54,8 +55,7 @@ TEST_CASE("srcoul", "[lrhandler]") handler.initBreakup(ref); std::cout << "handler.MaxKshell is " << handler.MaxKshell << std::endl; - CHECK( (std::is_same::value ? - handler.MaxKshell == 78 : handler.MaxKshell >= 117 && handler.MaxKshell <= 128 )); + CHECK( handler.MaxKshell == 78); CHECK(Approx(handler.LR_rc) == 2.5); CHECK(Approx(handler.LR_kc) == 12); @@ -80,7 +80,7 @@ TEST_CASE("srcoul", "[lrhandler]") */ TEST_CASE("srcoul df", "[lrhandler]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; Lattice.LR_dim_cutoff = 30.; Lattice.R.diagonal(5.0); @@ -99,8 +99,7 @@ TEST_CASE("srcoul df", "[lrhandler]") handler.initBreakup(ref); std::cout << "handler.MaxKshell is " << handler.MaxKshell << std::endl; - CHECK( (std::is_same::value ? - handler.MaxKshell == 78 : handler.MaxKshell >= 117 && handler.MaxKshell <= 128 )); + CHECK( handler.MaxKshell == 78); CHECK(Approx(handler.LR_rc) == 2.5); CHECK(Approx(handler.LR_kc) == 12); diff --git a/src/Particle/LongRange/tests/test_temp.cpp b/src/Particle/LongRange/tests/test_temp.cpp index 039a0fbaf6..173eb9c1a9 100644 --- a/src/Particle/LongRange/tests/test_temp.cpp +++ b/src/Particle/LongRange/tests/test_temp.cpp @@ -36,7 +36,7 @@ struct EslerCoulomb3D */ TEST_CASE("temp3d", "[lrhandler]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; Lattice.LR_dim_cutoff = 30.; Lattice.R.diagonal(5.0); @@ -55,8 +55,7 @@ TEST_CASE("temp3d", "[lrhandler]") handler.initBreakup(ref); std::cout << "handler.MaxKshell is " << handler.MaxKshell << std::endl; - CHECK( (std::is_same::value ? - handler.MaxKshell == 78 : handler.MaxKshell >= 117 && handler.MaxKshell <= 128 )); + CHECK( handler.MaxKshell == 78); CHECK(Approx(handler.LR_rc) == 2.5); CHECK(Approx(handler.LR_kc) == 12); diff --git a/src/Particle/ParticleIO/LatticeIO.cpp b/src/Particle/ParticleIO/LatticeIO.cpp index e7eb099df5..29c29c6f33 100644 --- a/src/Particle/ParticleIO/LatticeIO.cpp +++ b/src/Particle/ParticleIO/LatticeIO.cpp @@ -29,8 +29,10 @@ namespace qmcplusplus { + bool LatticeParser::put(xmlNodePtr cur) { + using ParticleLayout = ParticleLayoutT; const int DIM = ParticleLayout::SingleParticlePos::Size; double a0 = 1.0; double rs = -1.0; @@ -72,22 +74,23 @@ bool LatticeParser::put(xmlNodePtr cur) putContent(lattice_in, cur); lattice_defined = true; - //putContent(ref_.R,cur); + //putContent(full_prec_lattice.R,cur); } else if (aname == "bconds") { putContent(bconds, cur); bconds_defined = true; + TinyVector bbc; for (int idir = 0; idir < DIM; idir++) { char b = bconds[idir][0]; if (b == 'n' || b == 'N') { - ref_.BoxBConds[idir] = false; + bbc[idir] = false; } else if (b == 'p' || b == 'P') { - ref_.BoxBConds[idir] = true; + bbc[idir] = true; boxsum++; } else @@ -99,7 +102,7 @@ bool LatticeParser::put(xmlNodePtr cur) } // Protect BCs which are not implemented. - if (idir > 0 && !ref_.BoxBConds[idir - 1] && ref_.BoxBConds[idir]) + if (idir > 0 && !bbc[idir - 1] && bbc[idir]) { std::ostringstream err_msg; err_msg @@ -107,18 +110,22 @@ bool LatticeParser::put(xmlNodePtr cur) throw UniformCommunicateError(err_msg.str()); } } + full_prec_ref_.setBoxBConds(bbc); } else if (aname == "vacuum") { - putContent(ref_.VacuumScale, cur); + putContent(full_prec_ref_.VacuumScale, cur); + } else if (aname == "LR_dim_cutoff") { - putContent(ref_.LR_dim_cutoff, cur); + putContent(full_prec_ref_.LR_dim_cutoff, cur); + } else if (aname == "ewald_grid") { - putContent(ref_.num_ewald_grid_points, cur); + putContent(full_prec_ref_.num_ewald_grid_points, cur); + } else if (aname == "LR_handler") { @@ -135,7 +142,8 @@ bool LatticeParser::put(xmlNodePtr cur) else if (handler_type == "ewald_strict2d") { LRCoulombSingleton::this_lr_type = LRCoulombSingleton::STRICT2D; - ref_.ndim = 2; + full_prec_ref_.ndim = 2; + } else if (handler_type == "ewald_quasi2d") LRCoulombSingleton::this_lr_type = LRCoulombSingleton::QUASI2D; @@ -144,7 +152,8 @@ bool LatticeParser::put(xmlNodePtr cur) } else if (aname == "LR_tol") { - putContent(ref_.LR_tol, cur); + putContent(full_prec_ref_.LR_tol, cur); + } else if (aname == "rs") { @@ -170,7 +179,8 @@ bool LatticeParser::put(xmlNodePtr cur) if (!bconds_defined) { app_log() << " Lattice is specified but boundary conditions are not. Assuming PBC." << std::endl; - ref_.BoxBConds = true; + full_prec_ref_.BoxBConds = true; + } } else if (boxsum == 0) @@ -181,7 +191,7 @@ bool LatticeParser::put(xmlNodePtr cur) //special heg processing if (rs > 0.0) { - HEGGrid heg(ref_); + HEGGrid heg(full_prec_ref_); if (pol == 0) { if (nsh > 0) @@ -196,7 +206,7 @@ bool LatticeParser::put(xmlNodePtr cur) else nsh = heg.getShellIndex(nptcl); } - ParticleLayout::Scalar_t acubic = heg.getCellLength(nptcl, rs); + typename ParticleLayout::Scalar_t acubic = heg.getCellLength(nptcl, rs); app_log() << " " << OHMMS_DIM << "D HEG system" << "\n rs = " << rs; if (pol == 0) @@ -218,35 +228,257 @@ bool LatticeParser::put(xmlNodePtr cur) if (lattice_defined) { lattice_in *= a0; - ref_.set(lattice_in); + full_prec_ref_.set(lattice_in); + } - if (ref_.SuperCellEnum != SUPERCELL_SLAB && LRCoulombSingleton::isQuasi2D()) + if (full_prec_ref_.getSuperCellEnum() != SUPERCELL_SLAB && LRCoulombSingleton::isQuasi2D()) throw UniformCommunicateError("LatticeParser::put. Quasi 2D Ewald only works with boundary condition 'p p n'!"); - if (ref_.SuperCellEnum == SUPERCELL_OPEN) - ref_.WignerSeitzRadius = ref_.SimulationCellRadius; - + if (full_prec_ref_.getSuperCellEnum() == SUPERCELL_OPEN) + { + full_prec_ref_.WignerSeitzRadius = full_prec_ref_.SimulationCellRadius; + } std::string unit_name = "bohr"; app_log() << std::fixed; - app_log() << " Simulation cell radius = " << ref_.SimulationCellRadius << " " << unit_name << std::endl; - app_log() << " Wigner-Seitz cell radius = " << ref_.WignerSeitzRadius << " " << unit_name << std::endl; + app_log() << " Simulation cell radius = " << full_prec_ref_.SimulationCellRadius << " " << unit_name << std::endl; + app_log() << " Wigner-Seitz cell radius = " << full_prec_ref_.getWignerSeitzRadius() << " " << unit_name << std::endl; app_log() << std::endl; return lattice_defined; } + +CrystalLattice makeFullPrecParticleLayout(xmlNodePtr cur) +{ + using ParticleLayout = ParticleLayoutT; + const int DIM = ParticleLayout::SingleParticlePos::Size; + double a0 = 1.0; + double rs = -1.0; + int nptcl = 0; + int nsh = 0; //for backwards compatibility w/ odd heg initialization style + int pol = 0; + using SingleParticleIndex = ParticleLayout::SingleParticleIndex; + TinyVector bconds("p"); + + Tensor lattice_in; + bool lattice_defined = false; + bool bconds_defined = false; + int boxsum = 0; + + ParticleLayoutT full_prec_lattice; + + app_summary() << std::endl; + app_summary() << " Lattice" << std::endl; + app_summary() << " -------" << std::endl; + cur = cur->xmlChildrenNode; + while (cur != NULL) + { + std::string cname((const char*)cur->name); + if (cname == "parameter") + { + const std::string aname(getXMLAttributeValue(cur, "name")); + if (aname == "scale") + { + putContent(a0, cur); + } + else if (aname == "lattice") + { + const std::string units_prop(getXMLAttributeValue(cur, "units")); + if (!units_prop.empty() && units_prop != "bohr") + { + std::ostringstream err_msg; + err_msg << "LatticeParser::put. Only atomic units (bohr) supported for lattice units. Input file uses: " + << units_prop; + throw UniformCommunicateError(err_msg.str()); + } + + putContent(lattice_in, cur); + lattice_defined = true; + //putContent(full_prec_lattice.R,cur); + } + else if (aname == "bconds") + { + putContent(bconds, cur); + bconds_defined = true; + for (int idir = 0; idir < DIM; idir++) + { + char b = bconds[idir][0]; + if (b == 'n' || b == 'N') + { + full_prec_lattice.BoxBConds[idir] = false; + + } + else if (b == 'p' || b == 'P') + { + full_prec_lattice.BoxBConds[idir] = true; + + boxsum++; + } + else + { + std::ostringstream err_msg; + err_msg << "LatticeParser::put. Unknown label '" + bconds[idir] + + "' used for periodicity. Only 'p', 'P', 'n' and 'N' are valid!"; + throw UniformCommunicateError(err_msg.str()); + } + + // Protect BCs which are not implemented. + if (idir > 0 && !full_prec_lattice.BoxBConds[idir - 1] && full_prec_lattice.BoxBConds[idir]) + { + std::ostringstream err_msg; + err_msg + << "LatticeParser::put. In \"bconds\", non periodic directions must be placed after the periodic ones."; + throw UniformCommunicateError(err_msg.str()); + } + } + } + else if (aname == "vacuum") + { + putContent(full_prec_lattice.VacuumScale, cur); + + } + else if (aname == "LR_dim_cutoff") + { + putContent(full_prec_lattice.LR_dim_cutoff, cur); + + } + else if (aname == "ewald_grid") + { + putContent(full_prec_lattice.num_ewald_grid_points, cur); + + } + else if (aname == "LR_handler") + { + std::string handler_type("opt_breakup"); + //This chops whitespace so the simple str == comparisons work + putContent(handler_type, cur); + handler_type = lowerCase(handler_type); + if (handler_type == "ewald") + LRCoulombSingleton::this_lr_type = LRCoulombSingleton::EWALD; + else if (handler_type == "opt_breakup") + LRCoulombSingleton::this_lr_type = LRCoulombSingleton::ESLER; + else if (handler_type == "opt_breakup_original") + LRCoulombSingleton::this_lr_type = LRCoulombSingleton::NATOLI; + else if (handler_type == "ewald_strict2d") + { + LRCoulombSingleton::this_lr_type = LRCoulombSingleton::STRICT2D; + full_prec_lattice.ndim = 2; + + } + else if (handler_type == "ewald_quasi2d") + LRCoulombSingleton::this_lr_type = LRCoulombSingleton::QUASI2D; + else + throw UniformCommunicateError("LatticeParser::put. Long range breakup handler not recognized."); + } + else if (aname == "LR_tol") + { + putContent(full_prec_lattice.LR_tol, cur); + + } + else if (aname == "rs") + { + lattice_defined = true; + OhmmsAttributeSet rAttrib; + rAttrib.add(nptcl, "condition"); + rAttrib.add(pol, "polarized"); + rAttrib.add(nsh, "shell"); + rAttrib.put(cur); + putContent(rs, cur); + } + else if (aname == "nparticles") + { + putContent(nptcl, cur); + } + } + cur = cur->next; + } + + // checking boundary conditions + if (lattice_defined) + { + if (!bconds_defined) + { + app_log() << " Lattice is specified but boundary conditions are not. Assuming PBC." << std::endl; + full_prec_lattice.BoxBConds = true; + + } + } + else if (boxsum == 0) + app_log() << " Lattice is not specified for the Open BC. Add a huge box." << std::endl; + else + throw UniformCommunicateError("LatticeParser::put. Mixed boundary is supported only when a lattice is specified!"); + + //special heg processing + if (rs > 0.0) + { + HEGGrid heg(full_prec_lattice); + if (pol == 0) + { + if (nsh > 0) + nptcl = 2 * heg.getNumberOfKpoints(nsh); + else + nsh = heg.getShellIndex(nptcl / 2); + } + else + { // spin polarized + if (nsh > 0) + nptcl = heg.getNumberOfKpoints(nsh); + else + nsh = heg.getShellIndex(nptcl); + } + typename ParticleLayout::Scalar_t acubic = heg.getCellLength(nptcl, rs); + app_log() << " " << OHMMS_DIM << "D HEG system" + << "\n rs = " << rs; + if (pol == 0) + { + app_log() << "\n number of up particles = " << nptcl / 2 << "\n number of dn particles = " << nptcl / 2; + } + else + { + app_log() << "\n number of up particles = " << nptcl; + } + app_log() << "\n filled kshells = " << nsh << "\n lattice constant = " << acubic << " bohr" + << std::endl; + lattice_in = 0.0; + for (int idim = 0; idim < DIM; idim++) + lattice_in(idim, idim) = acubic; + a0 = 1.0; + } + + if (lattice_defined) + { + lattice_in *= a0; + full_prec_lattice.set(lattice_in); + + } + + if (full_prec_lattice.getSuperCellEnum() != SUPERCELL_SLAB && LRCoulombSingleton::isQuasi2D()) + throw UniformCommunicateError("LatticeParser::put. Quasi 2D Ewald only works with boundary condition 'p p n'!"); + + if (full_prec_lattice.getSuperCellEnum() == SUPERCELL_OPEN) + { + full_prec_lattice.WignerSeitzRadius = full_prec_lattice.SimulationCellRadius; + } + std::string unit_name = "bohr"; + app_log() << std::fixed; + app_log() << " Simulation cell radius = " << full_prec_lattice.SimulationCellRadius << " " << unit_name << std::endl; + app_log() << " Wigner-Seitz cell radius = " << full_prec_lattice.getWignerSeitzRadius() << " " << unit_name << std::endl; + app_log() << std::endl; + + return full_prec_lattice; +} bool LatticeXMLWriter::get(std::ostream& os) const { os << "" << std::endl; os << R"()" << std::endl; - os << ref_.R << "" << std::endl; + os << ref_.getR() << "" << std::endl; os << ""; const int DIM = ParticleLayout::SingleParticlePos::Size; for (int idir = 0; idir < DIM; idir++) { - if (ref_.BoxBConds[idir]) + if (ref_.getBoxBConds()[idir]) os << "p "; else os << "n "; @@ -262,9 +494,10 @@ xmlNodePtr LatticeXMLWriter::createNode() std::ostringstream l; l.setf(std::ios_base::scientific); l.precision(12); - l << ref_.R; + l << ref_.getR(); xmlNodePtr p = xmlNewTextChild(cur, NULL, (const xmlChar*)"parameter", (const xmlChar*)l.str().c_str()); xmlNewProp(p, (const xmlChar*)"name", (const xmlChar*)"lattice"); return cur; } + } // namespace qmcplusplus diff --git a/src/Particle/ParticleIO/LatticeIO.h b/src/Particle/ParticleIO/LatticeIO.h index a52e17858d..1fd24d71b5 100644 --- a/src/Particle/ParticleIO/LatticeIO.h +++ b/src/Particle/ParticleIO/LatticeIO.h @@ -20,20 +20,30 @@ namespace qmcplusplus { + +ParticleLayoutT makeFullPrecParticleLayout(xmlNodePtr cur); + + class LatticeParser { - using ParticleLayout = PtclOnLatticeTraits::ParticleLayout; + ParticleLayoutT& full_prec_ref_; + using ParticleLayout = ParticleLayoutT; ParticleLayout& ref_; - public: - LatticeParser(ParticleLayout& lat) : ref_(lat) {} + template + LatticeParser(CrystalLattice& full_lat) : full_prec_ref_(full_lat), ref_(full_lat) { + static_assert(std::is_same_v, "This should never get called with a reduced precision lattice"); + } + template + LatticeParser(CrystalLattice& full_lat, CrystalLattice& lat ) : full_prec_ref_(full_lat), ref_(lat) {} bool put(xmlNodePtr cur); }; - class LatticeXMLWriter { - using ParticleLayout = PtclOnLatticeTraits::ParticleLayout; + template + using ParticleLayoutT = typename PtclOnLatticeTraitsT::ParticleLayout; + using ParticleLayout = ParticleLayoutT; const ParticleLayout& ref_; public: @@ -42,6 +52,6 @@ class LatticeXMLWriter xmlNodePtr createNode(); }; - + } // namespace qmcplusplus #endif diff --git a/src/Particle/ParticleIO/XMLParticleIO.cpp b/src/Particle/ParticleIO/XMLParticleIO.cpp index 291201d296..c8e4772073 100644 --- a/src/Particle/ParticleIO/XMLParticleIO.cpp +++ b/src/Particle/ParticleIO/XMLParticleIO.cpp @@ -518,7 +518,7 @@ void XMLSaveParticle::get(std::ostream& fxml, int olevel) const ref_.begin_node(fxml); fxml.setf(std::ios::scientific); fxml.precision(15); - LatticeXMLWriter latticeout(ref_.getLattice()); + LatticeXMLWriter latticeout(ref_.getFullPrecLattice()); latticeout.get(fxml); for (int i = 0; i < SpeciesName.size(); i++) { diff --git a/src/Particle/ParticleIO/tests/test_lattice_parser.cpp b/src/Particle/ParticleIO/tests/test_lattice_parser.cpp index dbb15a72cf..f5d7e78e19 100644 --- a/src/Particle/ParticleIO/tests/test_lattice_parser.cpp +++ b/src/Particle/ParticleIO/tests/test_lattice_parser.cpp @@ -49,14 +49,13 @@ TEST_CASE("read_lattice_xml", "[particle_io][xml]") xmlNodePtr root = doc.getRoot(); - CrystalLattice uLattice; - LatticeParser lp(uLattice); - REQUIRE_NOTHROW(lp.put(root)); + REQUIRE_NOTHROW(makeFullPrecParticleLayout(root)); + ParticleLayoutT lattice = makeFullPrecParticleLayout(root); - CHECK(uLattice.R[0] == Approx(3.8)); - CHECK(uLattice.Volume == Approx(3.8 * 3.8 * 3.8)); + CHECK(lattice.R[0] == Approx(3.8)); + CHECK(lattice.getVolume() == Approx(3.8 * 3.8 * 3.8)); - CHECK(uLattice.LR_dim_cutoff == Approx(20)); + CHECK(lattice.LR_dim_cutoff == Approx(20)); } SECTION("invalid n p p input") @@ -81,9 +80,7 @@ TEST_CASE("read_lattice_xml", "[particle_io][xml]") xmlNodePtr root = doc.getRoot(); - CrystalLattice uLattice; - LatticeParser lp(uLattice); - REQUIRE_THROWS_WITH(lp.put(root), + REQUIRE_THROWS_WITH(makeFullPrecParticleLayout(root), "LatticeParser::put. In \"bconds\", non periodic directions must be placed after the periodic " "ones."); } @@ -110,9 +107,7 @@ TEST_CASE("read_lattice_xml", "[particle_io][xml]") xmlNodePtr root = doc.getRoot(); - CrystalLattice uLattice; - LatticeParser lp(uLattice); - REQUIRE_THROWS_WITH(lp.put(root), + REQUIRE_THROWS_WITH(makeFullPrecParticleLayout(root), "LatticeParser::put. In \"bconds\", non periodic directions must be placed after the periodic " "ones."); } @@ -143,12 +138,11 @@ TEST_CASE("read_lattice_xml_lrhandle", "[particle_io][xml]") xmlNodePtr root = doc.getRoot(); - CrystalLattice uLattice; - LatticeParser lp(uLattice); - REQUIRE_NOTHROW(lp.put(root)); + REQUIRE_NOTHROW(makeFullPrecParticleLayout(root)); + ParticleLayoutT lattice = makeFullPrecParticleLayout(root); - CHECK(uLattice.R[8] == Approx(10.0)); - CHECK(uLattice.LR_dim_cutoff == Approx(30)); + CHECK(lattice.R[8] == Approx(10.0)); + CHECK(lattice.LR_dim_cutoff == Approx(30)); } SECTION("valid p p n ewald_quasi2d input") @@ -174,9 +168,7 @@ TEST_CASE("read_lattice_xml_lrhandle", "[particle_io][xml]") xmlNodePtr root = doc.getRoot(); - CrystalLattice uLattice; - LatticeParser lp(uLattice); - REQUIRE_NOTHROW(lp.put(root)); + REQUIRE_NOTHROW(makeFullPrecParticleLayout(root)); } SECTION("invalid p p p ewald_quasi2d input") @@ -202,9 +194,7 @@ TEST_CASE("read_lattice_xml_lrhandle", "[particle_io][xml]") xmlNodePtr root = doc.getRoot(); - CrystalLattice uLattice; - LatticeParser lp(uLattice); - REQUIRE_THROWS_WITH(lp.put(root), + REQUIRE_THROWS_WITH(makeFullPrecParticleLayout(root), "LatticeParser::put. Quasi 2D Ewald only works with boundary condition 'p p n'!"); } } diff --git a/src/Particle/ParticleSet.h b/src/Particle/ParticleSet.h index 2a0cb3b047..f616f488a9 100644 --- a/src/Particle/ParticleSet.h +++ b/src/Particle/ParticleSet.h @@ -249,8 +249,10 @@ class ParticleSet : public QMCTraits, public OhmmsElementBase, public PtclOnLatt const auto& getSimulationCell() const { return simulation_cell_; } const auto& getLattice() const { return simulation_cell_.getLattice(); } + const auto& getFullPrecLattice() const { return simulation_cell_.getFullPrecLattice(); } auto& getPrimitiveLattice() const { return const_cast(simulation_cell_.getPrimLattice()); } const auto& getLRBox() const { return simulation_cell_.getLRBox(); } + const auto& getFullLRBox() const { return simulation_cell_.getFullLRBox(); } inline bool isSameMass() const { return same_mass_; } inline bool isSpinor() const { return is_spinor_; } diff --git a/src/Particle/ParticleSetPool.cpp b/src/Particle/ParticleSetPool.cpp index 7f4cb7f3a5..4dff60922e 100644 --- a/src/Particle/ParticleSetPool.cpp +++ b/src/Particle/ParticleSetPool.cpp @@ -87,7 +87,7 @@ bool ParticleSetPool::readSimulationCellXML(xmlNodePtr cur) bool lattice_defined = false; try { - LatticeParser a(simulation_cell_->lattice_); + LatticeParser a(simulation_cell_->full_lattice_, simulation_cell_->lattice_); lattice_defined = a.put(cur); } catch (const UniformCommunicateError& ue) diff --git a/src/Particle/SimulationCell.cpp b/src/Particle/SimulationCell.cpp index cbd9b5f053..eb094d9488 100644 --- a/src/Particle/SimulationCell.cpp +++ b/src/Particle/SimulationCell.cpp @@ -2,7 +2,7 @@ // This file is distributed under the University of Illinois/NCSA Open Source License. // See LICENSE file in top directory for details. // -// Copyright (c) 2021 QMCPACK developers. +// Copyright (c) 2025 QMCPACK developers. // // File developed by: Ye Luo, yeluo@anl.gov, Argonne National Laboratory // @@ -11,55 +11,81 @@ #include "SimulationCell.h" +#include "Lattice/CrystalLattice.h" +#include namespace qmcplusplus { -SimulationCell::SimulationCell() = default; +template +SimulationCellT::SimulationCellT() = default; -SimulationCell::SimulationCell(const Lattice& lattice) - : lattice_(lattice) + template + constexpr auto always_false = false; + +template +template +SimulationCellT::SimulationCellT(const CrystalLattice& lattice) { + static_assert(std::is_floating_point_v && std::is_floating_point_v ); + if constexpr (!std::is_same_v) + static_assert(always_false, "You should never be trying to use a reduced precision lattice to construct a simulation cell"); + full_lattice_ = lattice; resetLRBox(); } - -void SimulationCell::resetLRBox() + +template +void SimulationCellT::resetLRBox() { - if (lattice_.SuperCellEnum != SUPERCELL_OPEN) + // We don't want to use the reduced precision lattice for any of this + if (full_lattice_.getSuperCellEnum() != SUPERCELL_OPEN) { - lattice_.SetLRCutoffs(lattice_.Rv); - LRBox_ = lattice_; + full_lattice_.SetLRCutoffs(full_lattice_.getRv()); + full_lrbox_ = full_lattice_; bool changed = false; - if (lattice_.SuperCellEnum == SUPERCELL_SLAB && lattice_.VacuumScale != 1.0) + if (full_lattice_.getSuperCellEnum() == SUPERCELL_SLAB && full_lattice_.getVacuumScale() != 1.0) { - LRBox_.R(2, 0) *= lattice_.VacuumScale; - LRBox_.R(2, 1) *= lattice_.VacuumScale; - LRBox_.R(2, 2) *= lattice_.VacuumScale; + full_lrbox_.getR()(2, 0) *= full_lattice_.getVacuumScale(); + full_lrbox_.getR()(2, 1) *= full_lattice_.getVacuumScale(); + full_lrbox_.getR()(2, 2) *= full_lattice_.getVacuumScale(); changed = true; } - else if (lattice_.SuperCellEnum == SUPERCELL_WIRE && lattice_.VacuumScale != 1.0) + else if (full_lattice_.getSuperCellEnum() == SUPERCELL_WIRE && full_lattice_.getVacuumScale() != 1.0) { - LRBox_.R(1, 0) *= lattice_.VacuumScale; - LRBox_.R(1, 1) *= lattice_.VacuumScale; - LRBox_.R(1, 2) *= lattice_.VacuumScale; - LRBox_.R(2, 0) *= lattice_.VacuumScale; - LRBox_.R(2, 1) *= lattice_.VacuumScale; - LRBox_.R(2, 2) *= lattice_.VacuumScale; + full_lrbox_.getR()(1, 0) *= full_lattice_.getVacuumScale(); + full_lrbox_.getR()(1, 1) *= full_lattice_.getVacuumScale(); + full_lrbox_.getR()(1, 2) *= full_lattice_.getVacuumScale(); + full_lrbox_.getR()(2, 0) *= full_lattice_.getVacuumScale(); + full_lrbox_.getR()(2, 1) *= full_lattice_.getVacuumScale(); + full_lrbox_.getR()(2, 2) *= full_lattice_.getVacuumScale(); changed = true; } - LRBox_.reset(); - LRBox_.SetLRCutoffs(LRBox_.Rv); - LRBox_.printCutoffs(app_log()); + full_lrbox_.reset(); + full_lrbox_.SetLRCutoffs(full_lrbox_.getRv()); + full_lrbox_.printCutoffs(app_log()); if (changed) { app_summary() << " Simulation box changed by vacuum supercell conditions" << std::endl; app_log() << "--------------------------------------- " << std::endl; - LRBox_.print(app_log()); + full_lrbox_.print(app_log()); app_log() << "--------------------------------------- " << std::endl; } - - k_lists_.updateKLists(LRBox_, LRBox_.LR_kc, LRBox_.ndim); + full_lrbox_.reset(); + full_lrbox_.SetLRCutoffs(full_lrbox_.getRv()); + full_lrbox_.printCutoffs(app_log()); + + k_lists_.updateKLists(full_lrbox_, full_lrbox_.LR_kc, full_lrbox_.ndim); } + LRBox_ = full_lrbox_; + lattice_ = full_lattice_; } -} + +#ifdef MIXED_PRECISION +template class SimulationCellT; +template SimulationCellT::SimulationCellT(const CrystalLattice& lattice); +#else +template class SimulationCellT; +template SimulationCellT::SimulationCellT(const CrystalLattice& lattice); +#endif +} // namespace qmcplusplus diff --git a/src/Particle/SimulationCell.h b/src/Particle/SimulationCell.h index 87f630812f..e2d47d662a 100644 --- a/src/Particle/SimulationCell.h +++ b/src/Particle/SimulationCell.h @@ -20,23 +20,32 @@ namespace qmcplusplus { class ParticleSetPool; -class SimulationCell +template +class SimulationCellT { public: - using Lattice = PtclOnLatticeTraits::ParticleLayout; - - SimulationCell(); - SimulationCell(const Lattice& lattice); + using FullPrecReal = QMCTraits::FullPrecRealType; + using Lattice = typename PtclOnLatticeTraits::ParticleLayout; + using LatticeFullPrec = ParticleLayoutT; + SimulationCellT(); + // Who uses these, the application uses the default constructor and that fills in lattice_ and full_lattice_ + // from ParticleSetPool + template + SimulationCellT(const CrystalLattice& lattice); const Lattice& getLattice() const { return lattice_; } + /// Full Precision Lattice, if you doing anything with the lattice wrt kpoints use this! + const auto& getFullPrecLattice() const { return full_lattice_; } const Lattice& getPrimLattice() const { return primative_lattice_; } const Lattice& getLRBox() const { return LRBox_; } + const auto& getFullLRBox() const { return full_lrbox_; } void resetLRBox(); /// access k_lists_ read only const KContainer& getKLists() const { return k_lists_; } + LatticeFullPrec& getFullLattice() { return full_lattice_; } private: ///simulation cell lattice Lattice lattice_; @@ -44,11 +53,26 @@ class SimulationCell Lattice primative_lattice_; ///long-range box Lattice LRBox_; + ///For kpoint calculations + LatticeFullPrec full_lattice_; + LatticeFullPrec full_lrbox_; /// K-Vector List. KContainer k_lists_; friend class ParticleSetPool; }; + +using SimulationCell = SimulationCellT; + +#ifdef MIXED_PRECISION +extern template class SimulationCellT; +extern template SimulationCellT::SimulationCellT(const CrystalLattice& lattice); +#else +extern template class SimulationCellT; +extern template SimulationCellT::SimulationCellT(const CrystalLattice& lattice); +#endif + + } // namespace qmcplusplus #endif diff --git a/src/Particle/tests/test_ParticleSet.cpp b/src/Particle/tests/test_ParticleSet.cpp index eceec67326..32f20f0a70 100644 --- a/src/Particle/tests/test_ParticleSet.cpp +++ b/src/Particle/tests/test_ParticleSet.cpp @@ -91,7 +91,7 @@ TEST_CASE("symmetric_distance_table OpenBC", "[particle]") TEST_CASE("symmetric_distance_table PBC", "[particle]") { - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; // periodic Lattice.R = ParticleSet::Tensor_t(6.74632230, 6.74632230, 0.00000000, 0.00000000, 3.37316115, 3.37316115, 3.37316115, 0.00000000, 3.37316115); @@ -123,7 +123,7 @@ TEST_CASE("symmetric_distance_table PBC", "[particle]") TEST_CASE("particle set lattice with vacuum", "[particle]") { // PPP case - CrystalLattice Lattice; + CrystalLattice Lattice; Lattice.BoxBConds = true; Lattice.R = {1.0, 2.0, 3.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0}; Lattice.explicitly_defined = true; diff --git a/src/Particle/tests/test_distance_table.cpp b/src/Particle/tests/test_distance_table.cpp index 8064b46eaa..8b256f256c 100644 --- a/src/Particle/tests/test_distance_table.cpp +++ b/src/Particle/tests/test_distance_table.cpp @@ -338,9 +338,7 @@ SimulationCell parse_pbc_fcc_lattice() xmlNodePtr part1 = xmlFirstElementChild(root); // read lattice - ParticleSet::ParticleLayout lattice; - LatticeParser lp(lattice); - lp.put(part1); + ParticleLayoutT lattice = makeFullPrecParticleLayout(part1); lattice.print(app_log(), 0); return SimulationCell(lattice); @@ -371,9 +369,7 @@ SimulationCell parse_pbc_lattice() xmlNodePtr part1 = xmlFirstElementChild(root); // read lattice - ParticleSet::ParticleLayout lattice; - LatticeParser lp(lattice); - lp.put(part1); + ParticleLayoutT lattice = makeFullPrecParticleLayout(part1); lattice.print(app_log(), 0); return SimulationCell(lattice); diff --git a/src/QMCHamiltonians/CoulombPBCAA.cpp b/src/QMCHamiltonians/CoulombPBCAA.cpp index 165cbb8402..1d8b0f7605 100644 --- a/src/QMCHamiltonians/CoulombPBCAA.cpp +++ b/src/QMCHamiltonians/CoulombPBCAA.cpp @@ -306,7 +306,7 @@ void CoulombPBCAA::mw_evaluatePerParticle(const RefVectorWithLeaderevaluate(pset.getSimulationCell().getKLists().kshell, PtclRhoK.rhok_r[s], PtclRhoK.rhok_i[s], + cpbcaa.AA->evaluate(pset.getSimulationCell().getKLists().getKShell(), PtclRhoK.rhok_r[s], PtclRhoK.rhok_i[s], PtclRhoK.eikr_r[i], PtclRhoK.eikr_i[i]); v_sample[i] += v1; Vlr += v1; @@ -420,7 +420,7 @@ CoulombPBCAA::Return_t CoulombPBCAA::evaluate_sp(ParticleSet& P) v1 = 0.0; for (int s = 0; s < NumSpecies; ++s) v1 += z * Zspec[s] * - AA->evaluate(P.getSimulationCell().getKLists().kshell, PtclRhoK.rhok_r[s], PtclRhoK.rhok_i[s], + AA->evaluate(P.getSimulationCell().getKLists().getKShell(), PtclRhoK.rhok_r[s], PtclRhoK.rhok_i[s], PtclRhoK.eikr_r[i], PtclRhoK.eikr_i[i]); V_samp(i) += v1; Vlr += v1; @@ -623,7 +623,7 @@ CoulombPBCAA::Return_t CoulombPBCAA::evalConsts(bool report) } // perform long-range Madelung sum const StructFact& PtclRhoK(Ps.getSK()); - v1 = AA->evaluate_slab(0, Ps.getSimulationCell().getKLists().kshell, PtclRhoK.eikr_r[0], PtclRhoK.eikr_i[0], + v1 = AA->evaluate_slab(0, Ps.getSimulationCell().getKLists().getKShell(), PtclRhoK.eikr_r[0], PtclRhoK.eikr_i[0], PtclRhoK.eikr_r[0], PtclRhoK.eikr_i[0]); if (report) app_log() << " LR Madelung = " << v1 << std::endl; @@ -794,7 +794,7 @@ CoulombPBCAA::Return_t CoulombPBCAA::evalLR(const ParticleSet& P) const { const RealType z = std::abs(dr[jat][slab_dir]); u += Zat[jat] * - AA->evaluate_slab(z, P.getSimulationCell().getKLists().kshell, PtclRhoK.eikr_r[iat], PtclRhoK.eikr_i[iat], + AA->evaluate_slab(z, P.getSimulationCell().getKLists().getKShell(), PtclRhoK.eikr_r[iat], PtclRhoK.eikr_i[iat], PtclRhoK.eikr_r[jat], PtclRhoK.eikr_i[jat]); } res += Zat[iat] * u; @@ -807,7 +807,7 @@ CoulombPBCAA::Return_t CoulombPBCAA::evalLR(const ParticleSet& P) const mRealType Z1 = Zspec[spec1]; for (int spec2 = spec1; spec2 < NumSpecies; spec2++) { - mRealType temp = AA->evaluate(P.getSimulationCell().getKLists().kshell, PtclRhoK.rhok_r[spec1], + mRealType temp = AA->evaluate(P.getSimulationCell().getKLists().getKShell(), PtclRhoK.rhok_r[spec1], PtclRhoK.rhok_i[spec1], PtclRhoK.rhok_r[spec2], PtclRhoK.rhok_i[spec2]); if (spec2 == spec1) temp *= 0.5; diff --git a/src/QMCHamiltonians/CoulombPBCAB.cpp b/src/QMCHamiltonians/CoulombPBCAB.cpp index dcddac7814..5c2cab788f 100644 --- a/src/QMCHamiltonians/CoulombPBCAB.cpp +++ b/src/QMCHamiltonians/CoulombPBCAB.cpp @@ -201,7 +201,7 @@ CoulombPBCAB::Return_t CoulombPBCAB::evaluate_sp(ParticleSet& P) v1 = 0.0; for (int s = 0; s < NumSpeciesA; s++) v1 += Zspec[s] * q * - AB->evaluate(pset_ions_.getSimulationCell().getKLists().kshell, RhoKA.rhok_r[s], RhoKA.rhok_i[s], + AB->evaluate(pset_ions_.getSimulationCell().getKLists().getKShell(), RhoKA.rhok_r[s], RhoKA.rhok_i[s], RhoKB.eikr_r[i], RhoKB.eikr_i[i]); Ve_samp(i) += v1; Vlr += v1; @@ -212,7 +212,7 @@ CoulombPBCAB::Return_t CoulombPBCAB::evaluate_sp(ParticleSet& P) v1 = 0.0; for (int s = 0; s < NumSpeciesB; s++) v1 += Qspec[s] * q * - AB->evaluate(P.getSimulationCell().getKLists().kshell, RhoKB.rhok_r[s], RhoKB.rhok_i[s], RhoKA.eikr_r[i], + AB->evaluate(P.getSimulationCell().getKLists().getKShell(), RhoKB.rhok_r[s], RhoKB.rhok_i[s], RhoKA.eikr_r[i], RhoKA.eikr_i[i]); Vi_samp(i) += v1; Vlr += v1; @@ -341,7 +341,7 @@ void CoulombPBCAB::mw_evaluatePerParticle(const RefVectorWithLeaderevaluate(pset_source.getSimulationCell().getKLists().kshell, RhoKA.rhok_r[s], + cpbcab.AB->evaluate(pset_source.getSimulationCell().getKLists().getKShell(), RhoKA.rhok_r[s], RhoKA.rhok_i[s], RhoKB.eikr_r[i], RhoKB.eikr_i[i]); ve_sample[i] += v1; Vlr += v1; @@ -353,7 +353,7 @@ void CoulombPBCAB::mw_evaluatePerParticle(const RefVectorWithLeaderevaluate(pset.getSimulationCell().getKLists().kshell, RhoKB.rhok_r[s], RhoKB.rhok_i[s], + cpbcab.AB->evaluate(pset.getSimulationCell().getKLists().getKShell(), RhoKB.rhok_r[s], RhoKB.rhok_i[s], RhoKA.eikr_r[i], RhoKA.eikr_i[i]); vi_sample[i] += v1; Vlr += v1; @@ -469,7 +469,7 @@ CoulombPBCAB::Return_t CoulombPBCAB::evalLR(ParticleSet& P) mRealType esum = 0.0; for (int j = 0; j < NumSpeciesB; j++) esum += Qspec[j] * - AB->evaluate(pset_ions_.getSimulationCell().getKLists().kshell, RhoKA.rhok_r[i], RhoKA.rhok_i[i], + AB->evaluate(pset_ions_.getSimulationCell().getKLists().getKShell(), RhoKA.rhok_r[i], RhoKA.rhok_i[i], RhoKB.rhok_r[j], RhoKB.rhok_i[j]); res += Zspec[i] * esum; } diff --git a/src/QMCHamiltonians/SkAllEstimator.cpp b/src/QMCHamiltonians/SkAllEstimator.cpp index 66cf16eb4f..da2dc7f3cf 100644 --- a/src/QMCHamiltonians/SkAllEstimator.cpp +++ b/src/QMCHamiltonians/SkAllEstimator.cpp @@ -31,9 +31,9 @@ SkAllEstimator::SkAllEstimator(ParticleSet& source, ParticleSet& target) NumIonSpecies = ions->getSpeciesSet().getTotalNum(); update_mode_.set(COLLECTABLE, 1); - NumK = source.getSimulationCell().getKLists().numk; + NumK = source.getSimulationCell().getKLists().getNumK(); OneOverN = 1.0 / static_cast(source.getTotalNum()); - Kshell = source.getSimulationCell().getKLists().kshell; + Kshell = source.getSimulationCell().getKLists().getKShell(); MaxKshell = Kshell.size() - 1; RhokTot_r.resize(NumK); @@ -46,7 +46,7 @@ SkAllEstimator::SkAllEstimator(ParticleSet& source, ParticleSet& target) OneOverDnk.resize(MaxKshell); for (int ks = 0; ks < MaxKshell; ks++) { - Kmag[ks] = std::sqrt(source.getSimulationCell().getKLists().ksq[Kshell[ks]]); + Kmag[ks] = std::sqrt(source.getSimulationCell().getKLists().getKSQWorking()[Kshell[ks]]); OneOverDnk[ks] = 1.0 / static_cast(Kshell[ks + 1] - Kshell[ks]); } hdf5_out = false; @@ -71,7 +71,7 @@ void SkAllEstimator::evaluateIonIon() for (int k = 0; k < NumK; k++) { - PosType kvec = ions->getSimulationCell().getKLists().kpts_cart[k]; + PosType kvec = ions->getSimulationCell().getKLists().getKptsCartWorking()[k]; filebuffer << kvec; for (int i = 0; i < NumIonSpecies; i++) @@ -230,7 +230,7 @@ void SkAllEstimator::registerCollectables(std::vector& h5desc, hdf_path hdf_name{name_}; h5desc.emplace_back(hdf_name / "kpoints"); auto& ohKPoints = h5desc.back(); - ohKPoints.addProperty(const_cast&>(ions->getSimulationCell().getKLists().kpts_cart), "value", + ohKPoints.addProperty(const_cast&>(ions->getSimulationCell().getKLists().getKptsCartWorking()), "value", file); // Add electron-electron S(k) diff --git a/src/QMCHamiltonians/SkEstimator.cpp b/src/QMCHamiltonians/SkEstimator.cpp index 18a5543696..a5f97f4e89 100644 --- a/src/QMCHamiltonians/SkEstimator.cpp +++ b/src/QMCHamiltonians/SkEstimator.cpp @@ -25,9 +25,9 @@ SkEstimator::SkEstimator(ParticleSet& source) sourcePtcl = &source; update_mode_.set(COLLECTABLE, 1); NumSpecies = source.getSpeciesSet().getTotalNum(); - NumK = source.getSimulationCell().getKLists().numk; + NumK = source.getSimulationCell().getKLists().getNumK(); OneOverN = 1.0 / static_cast(source.getTotalNum()); - Kshell = source.getSimulationCell().getKLists().kshell; + Kshell = source.getSimulationCell().getKLists().getKShell(); MaxKshell = Kshell.size() - 1; RhokTot_r.resize(NumK); RhokTot_i.resize(NumK); @@ -36,7 +36,7 @@ SkEstimator::SkEstimator(ParticleSet& source) OneOverDnk.resize(MaxKshell); for (int ks = 0; ks < MaxKshell; ks++) { - Kmag[ks] = std::sqrt(source.getSimulationCell().getKLists().ksq[Kshell[ks]]); + Kmag[ks] = std::sqrt(source.getSimulationCell().getKLists().getKSQWorking()[Kshell[ks]]); OneOverDnk[ks] = 1.0 / static_cast(Kshell[ks + 1] - Kshell[ks]); } hdf5_out = true; @@ -131,7 +131,7 @@ void SkEstimator::registerCollectables(std::vector& h5desc, hd hid_t k_set = H5Dcreate(file.getFileID(), kpath.c_str(), H5T_NATIVE_DOUBLE, k_space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT); hid_t mem_space = H5Screate_simple(2, kdims, NULL); - auto* ptr = &(sourcePtcl->getSimulationCell().getKLists().kpts_cart[0][0]); + auto* ptr = &(sourcePtcl->getSimulationCell().getKLists().getKptsCartWorking()[0][0]); herr_t ret = H5Dwrite(k_set, H5T_NATIVE_DOUBLE, mem_space, k_space, H5P_DEFAULT, ptr); H5Dclose(k_set); H5Sclose(mem_space); diff --git a/src/QMCHamiltonians/SkPot.cpp b/src/QMCHamiltonians/SkPot.cpp index 5cc6055290..741962f141 100644 --- a/src/QMCHamiltonians/SkPot.cpp +++ b/src/QMCHamiltonians/SkPot.cpp @@ -22,9 +22,9 @@ SkPot::SkPot(ParticleSet& source) { sourcePtcl = &source; NumSpecies = source.getSpeciesSet().getTotalNum(); - NumK = source.getSimulationCell().getKLists().numk; + NumK = source.getSimulationCell().getKLists().getNumK(); OneOverN = 1.0 / static_cast(source.getTotalNum()); - Kshell = source.getSimulationCell().getKLists().kshell; + Kshell = source.getSimulationCell().getKLists().getKShell(); MaxKshell = Kshell.size() - 1; RhokTot.resize(NumK); Fk.resize(NumK); @@ -32,7 +32,7 @@ SkPot::SkPot(ParticleSet& source) OneOverDnk.resize(MaxKshell); for (int ks = 0; ks < MaxKshell; ks++) { - Kmag[ks] = std::sqrt(source.getSimulationCell().getKLists().ksq[Kshell[ks]]); + Kmag[ks] = std::sqrt(source.getSimulationCell().getKLists().getKSQWorking()[Kshell[ks]]); OneOverDnk[ks] = 1.0 / static_cast(Kshell[ks + 1] - Kshell[ks]); } } diff --git a/src/QMCHamiltonians/SkPot.h b/src/QMCHamiltonians/SkPot.h index 49bcf41ecd..dd67fc9ee7 100644 --- a/src/QMCHamiltonians/SkPot.h +++ b/src/QMCHamiltonians/SkPot.h @@ -42,8 +42,8 @@ class SkPot : public OperatorBase { for (int ki = 0; ki < NumK; ki++) { - RealType k = dot(sourcePtcl->getSimulationCell().getKLists().kpts_cart[ki], - sourcePtcl->getSimulationCell().getKLists().kpts_cart[ki]); + RealType k = dot(sourcePtcl->getSimulationCell().getKLists().getKptsCartWorking()[ki], + sourcePtcl->getSimulationCell().getKLists().getKptsCartWorking()[ki]); k = std::sqrt(k) - K_0; Fk[ki] = OneOverN * V_0 * std::exp(-k * k); // app_log()<& { h5desc.emplace_back(hdf_path(name_) / "kpoints"); auto& oh = h5desc.back(); - oh.addProperty(const_cast&>(Pinit.getSimulationCell().getKLists().kpts_cart), "value", file); + oh.addProperty(const_cast&>(Pinit.getSimulationCell().getKLists().getKptsCartWorking()), "value", file); std::vector ng(2); ng[0] = 2; diff --git a/src/QMCHamiltonians/StressPBC.cpp b/src/QMCHamiltonians/StressPBC.cpp index cd814eb071..286e6bddce 100644 --- a/src/QMCHamiltonians/StressPBC.cpp +++ b/src/QMCHamiltonians/StressPBC.cpp @@ -102,7 +102,7 @@ SymTensor StressPBC::evaluateLR_AB(ParticleSet& esum = 0.0; for (int j = 0; j < NumSpeciesB; j++) esum += Qspec[j] * - AA->evaluateStress(P.getSimulationCell().getKLists().kshell, RhoKA.rhok_r[i], RhoKA.rhok_i[i], + AA->evaluateStress(P.getSimulationCell().getKLists().getKShell(), RhoKA.rhok_r[i], RhoKA.rhok_i[i], RhoKB.rhok_r[j], RhoKB.rhok_i[j]); res += Zspec[i] * esum; } @@ -173,7 +173,7 @@ SymTensor StressPBC::evaluateLR_AA(ParticleSet& for (int spec2 = spec1; spec2 < NumSpecies; spec2++) { SymTensor temp = - AA->evaluateStress(P.getSimulationCell().getKLists().kshell, PtclRhoK.rhok_r[spec1], PtclRhoK.rhok_i[spec1], + AA->evaluateStress(P.getSimulationCell().getKLists().getKShell(), PtclRhoK.rhok_r[spec1], PtclRhoK.rhok_i[spec1], PtclRhoK.rhok_r[spec2], PtclRhoK.rhok_i[spec2]); if (spec2 == spec1) temp *= 0.5; diff --git a/src/QMCHamiltonians/tests/test_NonLocalECPotential.cpp b/src/QMCHamiltonians/tests/test_NonLocalECPotential.cpp index 4ade716478..f6cabfe717 100644 --- a/src/QMCHamiltonians/tests/test_NonLocalECPotential.cpp +++ b/src/QMCHamiltonians/tests/test_NonLocalECPotential.cpp @@ -69,7 +69,7 @@ TEST_CASE("NonLocalECPotential", "[hamiltonian]") using Position = QMCTraits::PosType; using testing::getParticularListener; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(20.0); lattice.LR_dim_cutoff = 15; diff --git a/src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp b/src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp index 84d55b9c32..541c04efcb 100644 --- a/src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp +++ b/src/QMCHamiltonians/tests/test_RotatedSPOs_NLPP.cpp @@ -47,7 +47,7 @@ void test_hcpBe_rotation(bool use_single_det, bool use_nlpp_batched) ParticleSetPool pp(c); - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R(0, 0) = 4.32747284; lattice.R(0, 1) = 0.00000000; lattice.R(0, 2) = 0.00000000; diff --git a/src/QMCHamiltonians/tests/test_SOECPotential.cpp b/src/QMCHamiltonians/tests/test_SOECPotential.cpp index 45c0ee1311..4ce3dbe532 100644 --- a/src/QMCHamiltonians/tests/test_SOECPotential.cpp +++ b/src/QMCHamiltonians/tests/test_SOECPotential.cpp @@ -83,7 +83,7 @@ void doSOECPotentialTest(bool use_VPs) //Cell definition: - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = false; // periodic lattice.R.diagonal(20); lattice.LR_dim_cutoff = 15; diff --git a/src/QMCHamiltonians/tests/test_SkAllEstimator.cpp b/src/QMCHamiltonians/tests/test_SkAllEstimator.cpp index 7dc78c39d3..ae5d9389b2 100644 --- a/src/QMCHamiltonians/tests/test_SkAllEstimator.cpp +++ b/src/QMCHamiltonians/tests/test_SkAllEstimator.cpp @@ -208,7 +208,7 @@ TEST_CASE("SkAll", "[hamiltonian]") // In order to compare to analytic result, need the list // of k-vectors in cartesian coordinates. // Luckily, ParticleSet stores that in SK->getKLists().kpts_cart - int nkpts = elec->getSimulationCell().getKLists().numk; + int nkpts = elec->getSimulationCell().getKLists().getNumK(); std::cout << "\n"; std::cout << "SkAll results:\n"; std::cout << std::fixed; @@ -229,7 +229,7 @@ TEST_CASE("SkAll", "[hamiltonian]") std::cout << std::setprecision(5); for (int k = 0; k < nkpts; k++) { - auto kvec = elec->getSimulationCell().getKLists().kpts_cart[k]; + auto kvec = elec->getSimulationCell().getKLists().getKptsCartWorking()[k]; RealType kx = kvec[0]; RealType ky = kvec[1]; RealType kz = kvec[2]; diff --git a/src/QMCHamiltonians/tests/test_bare_kinetic.cpp b/src/QMCHamiltonians/tests/test_bare_kinetic.cpp index 19b0d81f76..058d4ed29d 100644 --- a/src/QMCHamiltonians/tests/test_bare_kinetic.cpp +++ b/src/QMCHamiltonians/tests/test_bare_kinetic.cpp @@ -96,7 +96,7 @@ TEST_CASE("Bare KE Pulay PBC", "[hamiltonian]") //Cell definition: - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(20); lattice.LR_dim_cutoff = 15; diff --git a/src/QMCHamiltonians/tests/test_coulomb_pbcAA.cpp b/src/QMCHamiltonians/tests/test_coulomb_pbcAA.cpp index 57be806e18..b06069baa1 100644 --- a/src/QMCHamiltonians/tests/test_coulomb_pbcAA.cpp +++ b/src/QMCHamiltonians/tests/test_coulomb_pbcAA.cpp @@ -43,7 +43,7 @@ TEST_CASE("Coulomb PBC A-A", "[hamiltonian]") const double vmad_sc = -1.4186487397403098; LRCoulombSingleton::CoulombHandler = 0; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(1.0); lattice.reset(); @@ -82,7 +82,7 @@ TEST_CASE("Coulomb PBC A-A BCC H", "[hamiltonian]") const double vmad_sc = -1.4186487397403098 / alat; LRCoulombSingleton::CoulombHandler = 0; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(alat); lattice.reset(); @@ -120,7 +120,7 @@ TEST_CASE("Coulomb PBC A-A elec", "[hamiltonian]") { LRCoulombSingleton::CoulombHandler = 0; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(1.0); lattice.reset(); @@ -158,7 +158,7 @@ TEST_CASE("Coulomb PBC A-A BCC", "[hamiltonian]") const double vmad_bcc = -1.819616724754322 / alat; LRCoulombSingleton::CoulombHandler = 0; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R = 0.5 * alat; lattice.R(0, 0) = -0.5 * alat; @@ -199,7 +199,7 @@ void test_CoulombPBCAA_3p(DynamicCoordinateKind kind) const double vmad_bcc = -1.819616724754322 / alat; LRCoulombSingleton::CoulombHandler = 0; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R = 0.5 * alat; lattice.R(0, 0) = -0.5 * alat; @@ -277,7 +277,7 @@ TEST_CASE("CoulombAA::mw_evaluatePerParticle", "[hamiltonian]") LRCoulombSingleton::CoulombHandler = 0; // Constructing a mock "golden" set of walker elements - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(1.0); lattice.reset(); diff --git a/src/QMCHamiltonians/tests/test_coulomb_pbcAA_ewald.cpp b/src/QMCHamiltonians/tests/test_coulomb_pbcAA_ewald.cpp index 4283ddfe04..142f4d335a 100644 --- a/src/QMCHamiltonians/tests/test_coulomb_pbcAA_ewald.cpp +++ b/src/QMCHamiltonians/tests/test_coulomb_pbcAA_ewald.cpp @@ -27,7 +27,7 @@ namespace qmcplusplus { TEST_CASE("Coulomb PBC A-A Ewald3D", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(1.0); lattice.reset(); @@ -61,7 +61,7 @@ TEST_CASE("Coulomb PBC A-A Ewald3D", "[hamiltonian]") TEST_CASE("Coulomb PBC A-A BCC H Ewald3D", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(3.77945227); lattice.reset(); @@ -97,7 +97,7 @@ TEST_CASE("Coulomb PBC A-A BCC H Ewald3D", "[hamiltonian]") TEST_CASE("Coulomb PBC A-A elec Ewald3D", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(1.0); lattice.reset(); diff --git a/src/QMCHamiltonians/tests/test_coulomb_pbcAB.cpp b/src/QMCHamiltonians/tests/test_coulomb_pbcAB.cpp index 0b0bd67d8b..74534dd750 100644 --- a/src/QMCHamiltonians/tests/test_coulomb_pbcAB.cpp +++ b/src/QMCHamiltonians/tests/test_coulomb_pbcAB.cpp @@ -38,7 +38,7 @@ TEST_CASE("Coulomb PBC A-B", "[hamiltonian]") { LRCoulombSingleton::CoulombHandler = 0; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(1.0); lattice.reset(); @@ -95,7 +95,7 @@ TEST_CASE("Coulomb PBC A-B BCC H", "[hamiltonian]") { LRCoulombSingleton::CoulombHandler = 0; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(3.77945227); lattice.reset(); @@ -157,7 +157,7 @@ TEST_CASE("CoulombAB::Listener", "[hamiltonian]") LRCoulombSingleton::CoulombHandler = 0; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(3.77945227); lattice.reset(); diff --git a/src/QMCHamiltonians/tests/test_coulomb_pbcAB_ewald.cpp b/src/QMCHamiltonians/tests/test_coulomb_pbcAB_ewald.cpp index a18869e35e..5c66fdb57d 100644 --- a/src/QMCHamiltonians/tests/test_coulomb_pbcAB_ewald.cpp +++ b/src/QMCHamiltonians/tests/test_coulomb_pbcAB_ewald.cpp @@ -28,7 +28,7 @@ namespace qmcplusplus { TEST_CASE("Coulomb PBC A-B Ewald3D", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(1.0); lattice.reset(); @@ -93,7 +93,7 @@ TEST_CASE("Coulomb PBC A-B Ewald3D", "[hamiltonian]") TEST_CASE("Coulomb PBC A-B BCC H Ewald3D", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(3.77945227); lattice.reset(); diff --git a/src/QMCHamiltonians/tests/test_ecp.cpp b/src/QMCHamiltonians/tests/test_ecp.cpp index 96cbae06e1..eb9b5b6f09 100644 --- a/src/QMCHamiltonians/tests/test_ecp.cpp +++ b/src/QMCHamiltonians/tests/test_ecp.cpp @@ -161,7 +161,7 @@ TEST_CASE("Evaluate_ecp", "[hamiltonian]") //Cell definition: - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(20); lattice.LR_dim_cutoff = 15; @@ -432,7 +432,7 @@ TEST_CASE("Evaluate_soecp", "[hamiltonian]") //Cell definition: - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = false; // periodic lattice.R.diagonal(20); lattice.LR_dim_cutoff = 15; diff --git a/src/QMCHamiltonians/tests/test_ewald2d.cpp b/src/QMCHamiltonians/tests/test_ewald2d.cpp index e23535c89b..bb9ef11116 100644 --- a/src/QMCHamiltonians/tests/test_ewald2d.cpp +++ b/src/QMCHamiltonians/tests/test_ewald2d.cpp @@ -22,7 +22,7 @@ TEST_CASE("Coulomb PBC A-A Ewald2D square", "[hamiltonian]") LRCoulombSingleton::CoulombHandler = 0; LRCoulombSingleton::this_lr_type = LRCoulombSingleton::STRICT2D; const double vmad_sq = -1.95013246; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.ndim = 2; lattice.R.diagonal(1.0); @@ -57,7 +57,7 @@ TEST_CASE("Coulomb PBC A-A Ewald2D body center", "[hamiltonian]") LRCoulombSingleton::this_lr_type = LRCoulombSingleton::STRICT2D; const double vmad_bc = -2.7579038; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.ndim = 2; lattice.R = 0.0; @@ -101,7 +101,7 @@ TEST_CASE("Coulomb PBC A-A Ewald2D triangular", "[hamiltonian]") const double vmad_tri = -1.1061025865191676; const double alat = std::sqrt(2.0*M_PI/std::sqrt(3)); - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.ndim = 2; lattice.R = 0.0; @@ -141,7 +141,7 @@ TEST_CASE("Coulomb PBC A-A Ewald2D honeycomb", "[hamiltonian]") const double vmad_hon = -1.510964233; const double alat = std::sqrt(2.0*M_PI/std::sqrt(3)); - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.ndim = 2; lattice.R = 0.0; @@ -189,7 +189,7 @@ TEST_CASE("Coulomb PBC A-A Ewald2D tri. in rect.", "[hamiltonian]") const double vmad_tri = -1.1061025865191676; const RealType alat = std::sqrt(2.0*M_PI/std::sqrt(3)); - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.ndim = 2; lattice.R = 0.0; diff --git a/src/QMCHamiltonians/tests/test_ewald_quasi2d.cpp b/src/QMCHamiltonians/tests/test_ewald_quasi2d.cpp index 7d9d6848ad..4fa4b7f01f 100644 --- a/src/QMCHamiltonians/tests/test_ewald_quasi2d.cpp +++ b/src/QMCHamiltonians/tests/test_ewald_quasi2d.cpp @@ -20,7 +20,7 @@ TEST_CASE("Coulomb PBC A-A Ewald Quasi2D exception", "[hamiltonian]") { LRCoulombSingleton::CoulombHandler = 0; LRCoulombSingleton::this_lr_type = LRCoulombSingleton::QUASI2D; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; lattice.BoxBConds[2] = false; // ppn lattice.ndim = 2; @@ -52,7 +52,7 @@ TEST_CASE("Coulomb PBC A-A Ewald Quasi2D square", "[hamiltonian]") LRCoulombSingleton::CoulombHandler = 0; LRCoulombSingleton::this_lr_type = LRCoulombSingleton::QUASI2D; const double vmad_sq = -1.95013246; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; lattice.BoxBConds[2] = false; // ppn lattice.ndim = 2; @@ -89,7 +89,7 @@ TEST_CASE("Coulomb PBC A-A Ewald Quasi2D triangular", "[hamiltonian]") const double vmad_tri = -1.106102587; const double alat = std::sqrt(2.0*M_PI/std::sqrt(3)); - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; lattice.BoxBConds[2] = false; // ppn lattice.ndim = 2; @@ -127,7 +127,7 @@ TEST_CASE("Coulomb PBC A-A Ewald Quasi2D staggered square", "[hamiltonian]") { LRCoulombSingleton::CoulombHandler = 0; // !!!! crucial if not first test LRCoulombSingleton::this_lr_type = LRCoulombSingleton::QUASI2D; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; lattice.BoxBConds[2] = false; // ppn lattice.ndim = 2; @@ -177,7 +177,7 @@ TEST_CASE("Coulomb PBC A-A Ewald Quasi2D staggered square 2x2", "[hamiltonian]") LRCoulombSingleton::CoulombHandler = 0; // !!!! crucial if not first test LRCoulombSingleton::this_lr_type = LRCoulombSingleton::QUASI2D; //const double vmad_sq = -1.95013246; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; lattice.BoxBConds[2] = false; // ppn lattice.ndim = 2; @@ -232,7 +232,7 @@ TEST_CASE("Coulomb PBC A-A Ewald Quasi2D staggered triangle", "[hamiltonian]") { LRCoulombSingleton::CoulombHandler = 0; // !!!! crucial if not first test LRCoulombSingleton::this_lr_type = LRCoulombSingleton::QUASI2D; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; lattice.BoxBConds[2] = false; // ppn lattice.ndim = 2; @@ -288,7 +288,7 @@ TEST_CASE("Coulomb PBC A-A Ewald Quasi2D staggered triangle 2x2", "[hamiltonian] { LRCoulombSingleton::CoulombHandler = 0; // !!!! crucial if not first test LRCoulombSingleton::this_lr_type = LRCoulombSingleton::QUASI2D; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; lattice.BoxBConds[2] = false; // ppn lattice.ndim = 2; diff --git a/src/QMCHamiltonians/tests/test_force.cpp b/src/QMCHamiltonians/tests/test_force.cpp index 763a09ae18..bb02e8b9be 100644 --- a/src/QMCHamiltonians/tests/test_force.cpp +++ b/src/QMCHamiltonians/tests/test_force.cpp @@ -129,7 +129,7 @@ void check_force_copy(ForceChiesaPBCAA& force, ForceChiesaPBCAA& force2) // PBC case TEST_CASE("Chiesa Force", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(5.0); lattice.LR_dim_cutoff = 25; diff --git a/src/QMCHamiltonians/tests/test_force_ewald.cpp b/src/QMCHamiltonians/tests/test_force_ewald.cpp index d6bae9f159..82ce4ba007 100644 --- a/src/QMCHamiltonians/tests/test_force_ewald.cpp +++ b/src/QMCHamiltonians/tests/test_force_ewald.cpp @@ -34,7 +34,7 @@ TEST_CASE("Chiesa Force BCC H Ewald3D", "[hamiltonian]") { Communicate* c = OHMMS::Controller; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(3.77945227); lattice.LR_dim_cutoff = 40; @@ -111,7 +111,7 @@ TEST_CASE("Chiesa Force BCC H Ewald3D", "[hamiltonian]") // test SR and LR pieces separately TEST_CASE("fccz sr lr clone", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(3.77945227); lattice.LR_dim_cutoff = 40; @@ -201,7 +201,7 @@ TEST_CASE("fccz sr lr clone", "[hamiltonian]") // 3 H atoms randomly distributed in a box TEST_CASE("fccz h3", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(3.77945227); lattice.LR_dim_cutoff = 40; diff --git a/src/QMCHamiltonians/tests/test_ion_derivs.cpp b/src/QMCHamiltonians/tests/test_ion_derivs.cpp index faec3428c7..283badb7f6 100644 --- a/src/QMCHamiltonians/tests/test_ion_derivs.cpp +++ b/src/QMCHamiltonians/tests/test_ion_derivs.cpp @@ -1299,7 +1299,7 @@ TEST_CASE("Eloc_Derivatives:slater_fastderiv_complex_pbc", "[hamiltonian]") Communicate* c = OHMMS::Controller; - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds[0] = 1; // periodic lattice.BoxBConds[1] = 1; // periodic lattice.BoxBConds[2] = 1; // periodic diff --git a/src/QMCHamiltonians/tests/test_stress.cpp b/src/QMCHamiltonians/tests/test_stress.cpp index 356e29074f..c0893d3c51 100644 --- a/src/QMCHamiltonians/tests/test_stress.cpp +++ b/src/QMCHamiltonians/tests/test_stress.cpp @@ -30,7 +30,7 @@ namespace qmcplusplus // PBC case TEST_CASE("Stress BCC H Ewald3D", "[hamiltonian]") { - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; // periodic lattice.R.diagonal(3.24957306); lattice.LR_dim_cutoff = 40; diff --git a/src/QMCTools/QMCFiniteSize/QMCFiniteSize.cpp b/src/QMCTools/QMCFiniteSize/QMCFiniteSize.cpp index 65b1270ebe..78c4974892 100644 --- a/src/QMCTools/QMCFiniteSize/QMCFiniteSize.cpp +++ b/src/QMCTools/QMCFiniteSize/QMCFiniteSize.cpp @@ -362,7 +362,7 @@ void QMCFiniteSize::initialize() rs = std::pow(3.0 / (4 * M_PI) * Vol / RealType(Ne), 1.0 / 3.0); rho = RealType(Ne) / Vol; Klist = P->getSimulationCell().getKLists(); - kpts = Klist.kpts; //These are in reduced coordinates. + kpts = Klist.getKpts(); //These are in reduced coordinates. //Easier to spline, but will have to convert //for real space integration. @@ -375,14 +375,14 @@ void QMCFiniteSize::initialize() void QMCFiniteSize::printSkRawSphAvg(const std::vector& sk) { - std::vector vsk_1d(Klist.kshell.size()); + std::vector vsk_1d(Klist.getKShell().size()); // Average within each shell - for (int ks = 0; ks < Klist.kshell.size() - 1; ks++) + for (int ks = 0; ks < Klist.getKShell().size() - 1; ks++) { RealType u = 0; RealType n = 0; - for (int ki = Klist.kshell[ks]; ki < Klist.kshell[ks + 1]; ki++) + for (int ki = Klist.getKShell()[ks]; ki < Klist.getKShell()[ks + 1]; ki++) { u += sk[ki]; n++; @@ -401,13 +401,13 @@ void QMCFiniteSize::printSkRawSphAvg(const std::vector& sk) app_log() << "\nSpherically averaged raw S(k):\n"; app_log() << std::setw(12) << "k" << std::setw(12) << "S(k)" << std::setw(12) << "vk" << "\n"; - for (int ks = 0; ks < Klist.kshell.size() - 1; ks++) + for (int ks = 0; ks < Klist.getKShell().size() - 1; ks++) { - app_log() << std::setw(12) << std::setprecision(8) << std::sqrt(Klist.ksq[Klist.kshell[ks]]) << std::setw(12) + app_log() << std::setw(12) << std::setprecision(8) << std::sqrt(Klist.getKSQWorking()[Klist.getKShell()[ks]]) << std::setw(12) << std::setprecision(8) << vsk_1d[ks] << std::setw(12) << std::setprecision(8) << AA->Fk_symm[ks] << '\n'; } - if (vsk_1d[Klist.kshell.size() - 2] < 0.99) + if (vsk_1d[Klist.getKShell().size() - 2] < 0.99) { app_log() << "####################################################################\n"; app_log() << "WARNING: The S(k) in the largest kshell is less than 0.99\n"; @@ -460,7 +460,7 @@ void QMCFiniteSize::printSkSplineSphAvg(UBspline_3d_d* spline) QMCFiniteSize::RealType QMCFiniteSize::calcPotentialDiscrete(std::vector sk) { //This is the \frac{1}{Omega} \sum_{\mathbf{k}} \frac{v_k}{2} S(\mathbf{k}) term. - return 0.5 * AA->evaluate_w_sk(Klist.kshell, sk.data()); + return 0.5 * AA->evaluate_w_sk(Klist.getKShell(), sk.data()); } QMCFiniteSize::RealType QMCFiniteSize::calcPotentialInt(std::vector sk) @@ -468,7 +468,7 @@ QMCFiniteSize::RealType QMCFiniteSize::calcPotentialInt(std::vector sk auto spline = std::unique_ptr{getSkSpline(sk), destroy_Bspline}; RealType kmax = AA->get_kc(); - IndexType ngrid = 2 * Klist.kshell.size() - 1; //make a lager kmesh + IndexType ngrid = 2 * Klist.getKShell().size() - 1; //make a lager kmesh std::vector unigrid1d, k2vksk; RealType dk = kmax / ngrid; diff --git a/src/QMCWaveFunctions/ElectronGas/FreeOrbitalBuilder.cpp b/src/QMCWaveFunctions/ElectronGas/FreeOrbitalBuilder.cpp index 5861dc9d0f..06f4b2f12d 100644 --- a/src/QMCWaveFunctions/ElectronGas/FreeOrbitalBuilder.cpp +++ b/src/QMCWaveFunctions/ElectronGas/FreeOrbitalBuilder.cpp @@ -62,20 +62,20 @@ std::unique_ptr FreeOrbitalBuilder::createSPOSetFromXML(xmlNodePtr cur) #ifdef QMC_COMPLEX for (int ik = 1; ik < npw; ik++) { - kpts[ik] = klists.kpts_cart[ik - 1]; + kpts[ik] = klists.getKptsCartWorking()[ik - 1]; } #else - const int nktot = klists.kpts.size(); + const int nktot = klists.getKpts().size(); std::vector mkidx(npw, 0); int ik = 1; for (int jk = 0; jk < nktot; jk++) { // check if -k is already chosen - const int jmk = klists.minusk[jk]; + const int jmk = klists.getMinusK(jk); if (in_list(jk, mkidx)) continue; // if not, then add this kpoint - kpts[ik] = klists.kpts_cart[jk]; + kpts[ik] = klists.getKptsCartWorking()[jk]; mkidx[ik] = jmk; // keep track of its minus ik++; if (ik >= npw) diff --git a/src/QMCWaveFunctions/Fermion/BackflowBuilder.cpp b/src/QMCWaveFunctions/Fermion/BackflowBuilder.cpp index a8b8a39e99..c01d641049 100644 --- a/src/QMCWaveFunctions/Fermion/BackflowBuilder.cpp +++ b/src/QMCWaveFunctions/Fermion/BackflowBuilder.cpp @@ -403,8 +403,8 @@ std::unique_ptr BackflowBuilder::addRPA(xmlNodePtr cur) Rs = 100.0; } } - int indx = targetPtcl.getSimulationCell().getKLists().ksq.size() - 1; - RealType Kc_max = std::pow(targetPtcl.getSimulationCell().getKLists().ksq[indx], 0.5); + int indx = targetPtcl.getSimulationCell().getKLists().getKSQWorking().size() - 1; + RealType Kc_max = std::pow(targetPtcl.getSimulationCell().getKLists().getKSQWorking()[indx], 0.5); if (Kc < 0) { Kc = 2.0 * std::pow(2.25 * M_PI, 1.0 / 3.0) / tlen; @@ -563,7 +563,7 @@ void BackflowBuilder::makeLongRange_twoBody(xmlNodePtr cur, Backflow_ee_kSpace* { fout << std::sqrt(targetPtcl.getSimulationCell() .getKLists() - .ksq[targetPtcl.getSimulationCell().getKLists().kshell[i]]) + .getKSQWorking()[targetPtcl.getSimulationCell().getKLists().getKShell()[i]]) << " " << yk[i] << std::endl; } fout.close(); diff --git a/src/QMCWaveFunctions/Fermion/Backflow_ee_kSpace.h b/src/QMCWaveFunctions/Fermion/Backflow_ee_kSpace.h index 5178de3f5c..35f45dd4de 100644 --- a/src/QMCWaveFunctions/Fermion/Backflow_ee_kSpace.h +++ b/src/QMCWaveFunctions/Fermion/Backflow_ee_kSpace.h @@ -64,7 +64,7 @@ class Backflow_ee_kSpace : public BackflowFunctionBase { NumKShells = yk.size(); Fk = yk; - NumKVecs = P.getSimulationCell().getKLists().kshell[NumKShells + 1]; + NumKVecs = P.getSimulationCell().getKLists().getKShell()[NumKShells + 1]; Rhok.resize(NumKVecs); if (Optimize) numParams = NumKShells; diff --git a/src/QMCWaveFunctions/Jastrow/J2KECorrection.h b/src/QMCWaveFunctions/Jastrow/J2KECorrection.h index 82d89d519d..a2ff24e209 100644 --- a/src/QMCWaveFunctions/Jastrow/J2KECorrection.h +++ b/src/QMCWaveFunctions/Jastrow/J2KECorrection.h @@ -46,7 +46,7 @@ class J2KECorrection num_elec_in_groups_.push_back(targetPtcl.last(i) - targetPtcl.first(i)); if (SK_enabled) - G0mag = std::sqrt(targetPtcl.getSimulationCell().getKLists().ksq[0]); + G0mag = std::sqrt(targetPtcl.getSimulationCell().getKLists().getKSQWorking()[0]); } RT computeKEcorr() diff --git a/src/QMCWaveFunctions/Jastrow/RPAJastrow.cpp b/src/QMCWaveFunctions/Jastrow/RPAJastrow.cpp index f18c00c28b..3df82f28fa 100644 --- a/src/QMCWaveFunctions/Jastrow/RPAJastrow.cpp +++ b/src/QMCWaveFunctions/Jastrow/RPAJastrow.cpp @@ -96,8 +96,8 @@ void RPAJastrow::buildOrbital(const std::string& name, Rs = 100.0; } } - int indx = targetPtcl.getSimulationCell().getKLists().ksq.size() - 1; - double Kc_max = std::pow(targetPtcl.getSimulationCell().getKLists().ksq[indx], 0.5); + int indx = targetPtcl.getSimulationCell().getKLists().getKSQWorking().size() - 1; + double Kc_max = std::pow(targetPtcl.getSimulationCell().getKLists().getKSQWorking()[indx], 0.5); if (Kc < 0) { Kc = 2.0 * std::pow(2.25 * M_PI, 1.0 / 3.0) / tlen; diff --git a/src/QMCWaveFunctions/Jastrow/RadialJastrowBuilder.cpp b/src/QMCWaveFunctions/Jastrow/RadialJastrowBuilder.cpp index 7748688d83..e006feb6a2 100644 --- a/src/QMCWaveFunctions/Jastrow/RadialJastrowBuilder.cpp +++ b/src/QMCWaveFunctions/Jastrow/RadialJastrowBuilder.cpp @@ -267,9 +267,9 @@ void RadialJastrowBuilder::computeJ2uk(const std::vector& functors throw std::runtime_error("Error generating filename"); fout = fopen(fname.data(), "w"); } - for (int iG = 0; iG < targetPtcl.getSimulationCell().getKLists().ksq.size(); iG++) + for (int iG = 0; iG < targetPtcl.getSimulationCell().getKLists().getKSQWorking().size(); iG++) { - RealType Gmag = std::sqrt(targetPtcl.getSimulationCell().getKLists().ksq[iG]); + RealType Gmag = std::sqrt(targetPtcl.getSimulationCell().getKLists().getKSQWorking()[iG]); RealType sum = 0.0; RealType uk = 0.0; for (int i = 0; i < targetPtcl.groups(); i++) diff --git a/src/QMCWaveFunctions/tests/test_2d_jastrow.cpp b/src/QMCWaveFunctions/tests/test_2d_jastrow.cpp index d85377fc67..264206a7c1 100644 --- a/src/QMCWaveFunctions/tests/test_2d_jastrow.cpp +++ b/src/QMCWaveFunctions/tests/test_2d_jastrow.cpp @@ -38,7 +38,7 @@ TEST_CASE("Jastrow 2D", "[wavefunction]") // TwoBodyJastrow> j2; // RadialJastrowBuilder jastrow(Communicator, ParticleSet); // ParticleSet( SimulationCell( CrystalLattice ) ) - CrystalLattice lattice; + CrystalLattice lattice; lattice.BoxBConds = true; lattice.R.diagonal(70.89815403622065); lattice.ndim = 2; diff --git a/src/QMCWaveFunctions/tests/test_DiracDeterminant.cpp b/src/QMCWaveFunctions/tests/test_DiracDeterminant.cpp index 30d3c7f31d..d3b5e802ef 100644 --- a/src/QMCWaveFunctions/tests/test_DiracDeterminant.cpp +++ b/src/QMCWaveFunctions/tests/test_DiracDeterminant.cpp @@ -469,7 +469,7 @@ void test_DiracDeterminant_spinor_update(const DetMatInvertor inverter_kind) using ParticleLaplacian = ParticleSet::ParticleLaplacian; // O2 test example from pwscf non-collinear calculation. - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {5.10509515, -3.23993545, 0.00000000, 5.10509515, 3.23993545, 0.00000000, -6.49690625, 0.00000000, 7.08268015}; diff --git a/src/QMCWaveFunctions/tests/test_DiracDeterminantBatched.cpp b/src/QMCWaveFunctions/tests/test_DiracDeterminantBatched.cpp index 3e08df927d..509a4a209d 100644 --- a/src/QMCWaveFunctions/tests/test_DiracDeterminantBatched.cpp +++ b/src/QMCWaveFunctions/tests/test_DiracDeterminantBatched.cpp @@ -499,7 +499,7 @@ void test_DiracDeterminantBatched_spinor_update(const int delay_rank, DetMatInve using ParticleLaplacian = ParticleSet::ParticleLaplacian; // O2 test example from pwscf non-collinear calculation. - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {5.10509515, -3.23993545, 0.00000000, 5.10509515, 3.23993545, 0.00000000, -6.49690625, 0.00000000, 7.08268015}; diff --git a/src/QMCWaveFunctions/tests/test_LCAO_diamondC_2x1x1.cpp b/src/QMCWaveFunctions/tests/test_LCAO_diamondC_2x1x1.cpp index eb3aa0bfd5..e66eb1beaa 100644 --- a/src/QMCWaveFunctions/tests/test_LCAO_diamondC_2x1x1.cpp +++ b/src/QMCWaveFunctions/tests/test_LCAO_diamondC_2x1x1.cpp @@ -55,9 +55,8 @@ void test_LCAO_DiamondC_2x1x1_real(const bool useOffload) REQUIRE(doc_lattice.parseFromString(particles)); // read lattice - ParticleSet::ParticleLayout lattice; - LatticeParser lp(lattice); - lp.put(doc_lattice.getRoot()); + ParticleLayoutT lattice = makeFullPrecParticleLayout(doc_lattice.getRoot()); + lattice.print(app_log(), 0); SimulationCell simcell(lattice); @@ -472,9 +471,7 @@ void test_LCAO_DiamondC_2x1x1_cplx(const bool useOffload) REQUIRE(doc_lattice.parseFromString(particles)); // read lattice - ParticleSet::ParticleLayout lattice; - LatticeParser lp(lattice); - lp.put(doc_lattice.getRoot()); + ParticleLayoutT lattice = makeFullPrecParticleLayout(doc_lattice.getRoot()); lattice.print(app_log(), 0); SimulationCell simcell(lattice); diff --git a/src/QMCWaveFunctions/tests/test_RotatedSPOs.cpp b/src/QMCWaveFunctions/tests/test_RotatedSPOs.cpp index f0d8cdfeb4..3b95d95cf7 100644 --- a/src/QMCWaveFunctions/tests/test_RotatedSPOs.cpp +++ b/src/QMCWaveFunctions/tests/test_RotatedSPOs.cpp @@ -48,7 +48,7 @@ TEST_CASE("RotatedSPOs via SplineR2R", "[wavefunction]") Communicate* c = OHMMS::Controller; // We get a "Mismatched supercell lattices" error due to default ctor? - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; // diamondC_1x1x1 lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; @@ -566,7 +566,7 @@ TEST_CASE("RotatedSPOs hcpBe", "[wavefunction]") using RealType = QMCTraits::RealType; Communicate* c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {4.32747284, 0.00000000, 0.00000000, -2.16373642, 3.74770142, 0.00000000, 0.00000000, 0.00000000, 6.78114995}; diff --git a/src/QMCWaveFunctions/tests/test_TrialWaveFunction.cpp b/src/QMCWaveFunctions/tests/test_TrialWaveFunction.cpp index 6d28422628..119968c715 100644 --- a/src/QMCWaveFunctions/tests/test_TrialWaveFunction.cpp +++ b/src/QMCWaveFunctions/tests/test_TrialWaveFunction.cpp @@ -50,7 +50,7 @@ TEST_CASE("TrialWaveFunction_diamondC_1x1x1", "[wavefunction]") const DynamicCoordinateKind kind_selected = DynamicCoordinateKind::DC_POS; #endif // diamondC_1x1x1 - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; lattice.BoxBConds = {1, 1, 1}; lattice.reset(); diff --git a/src/QMCWaveFunctions/tests/test_TrialWaveFunction_diamondC_2x1x1.cpp b/src/QMCWaveFunctions/tests/test_TrialWaveFunction_diamondC_2x1x1.cpp index 1ee974b7c8..4f15e9ce4e 100644 --- a/src/QMCWaveFunctions/tests/test_TrialWaveFunction_diamondC_2x1x1.cpp +++ b/src/QMCWaveFunctions/tests/test_TrialWaveFunction_diamondC_2x1x1.cpp @@ -63,9 +63,10 @@ void testTrialWaveFunction_diamondC_2x1x1(const int ndelay, const OffloadSwitche offload_switches.jas ? DynamicCoordinateKind::DC_POS_OFFLOAD : DynamicCoordinateKind::DC_POS; // diamondC_2x1x1 - ParticleSet::ParticleLayout lattice; - lattice.R = {6.7463223, 6.7463223, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; - lattice.BoxBConds = {1, 1, 1}; + ParticleLayoutT lattice; + Tensor lattice_mat{6.7463223, 6.7463223, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; + lattice.set(lattice_mat); + lattice.setBoxBConds({1, 1, 1}); lattice.reset(); ParticleSetPool ptcl = ParticleSetPool(c); diff --git a/src/QMCWaveFunctions/tests/test_einset_LiH.cpp b/src/QMCWaveFunctions/tests/test_einset_LiH.cpp index 4bd3a536cf..3f9d03626c 100644 --- a/src/QMCWaveFunctions/tests/test_einset_LiH.cpp +++ b/src/QMCWaveFunctions/tests/test_einset_LiH.cpp @@ -39,7 +39,7 @@ void test_einset_LiH_x(bool use_offload) { Communicate* c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {-3.55, 0.0, 3.55, 0.0, 3.55, 3.55, -3.55, 3.55, 0.0}; ParticleSetPool ptcl = ParticleSetPool(c); diff --git a/src/QMCWaveFunctions/tests/test_einset_diamondC.cpp b/src/QMCWaveFunctions/tests/test_einset_diamondC.cpp index 9d6465322e..c34a9801a4 100644 --- a/src/QMCWaveFunctions/tests/test_einset_diamondC.cpp +++ b/src/QMCWaveFunctions/tests/test_einset_diamondC.cpp @@ -34,7 +34,7 @@ void test_einset_diamond_1x1x1(bool use_offload) { Communicate* c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; // monoO // lattice.R(0,0) = {5.10509515, -3.23993545, 0.0, 5.10509515, 3.23993545, 0.0, -6.49690625, 0.0, 7.08268015}; @@ -305,7 +305,7 @@ TEST_CASE("Einspline SPO from HDF diamond_2x1x1 5 electrons", "[wavefunction]") { Communicate* c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; // diamondC_2x1x1 lattice.R = {6.7463223, 6.7463223, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; @@ -503,7 +503,7 @@ TEST_CASE("EinsplineSetBuilder CheckLattice", "[wavefunction]") { Communicate* c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = 0.0; lattice.R(0, 0) = 1.0; lattice.R(1, 1) = 1.0; diff --git a/src/QMCWaveFunctions/tests/test_einset_spinor.cpp b/src/QMCWaveFunctions/tests/test_einset_spinor.cpp index b30f1b3064..9e00bedbfe 100644 --- a/src/QMCWaveFunctions/tests/test_einset_spinor.cpp +++ b/src/QMCWaveFunctions/tests/test_einset_spinor.cpp @@ -43,7 +43,7 @@ TEST_CASE("Einspline SpinorSet from HDF", "[wavefunction]") using RealType = SPOSet::RealType; Communicate* c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; // O2 test example from pwscf non-collinear calculation. lattice.R = {5.10509515, -3.23993545, 0.00000000, 5.10509515, 3.23993545, 0.00000000, -6.49690625, 0.00000000, 7.08268015}; diff --git a/src/QMCWaveFunctions/tests/test_hybridrep.cpp b/src/QMCWaveFunctions/tests/test_hybridrep.cpp index 4393797853..42426137ef 100644 --- a/src/QMCWaveFunctions/tests/test_hybridrep.cpp +++ b/src/QMCWaveFunctions/tests/test_hybridrep.cpp @@ -35,7 +35,7 @@ TEST_CASE("Hybridrep SPO from HDF diamond_1x1x1", "[wavefunction]") { Communicate* c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; // diamondC_1x1x1 lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; @@ -193,7 +193,7 @@ TEST_CASE("Hybridrep SPO from HDF diamond_2x1x1", "[wavefunction]") { Communicate* c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; // diamondC_2x1x1 lattice.R = {6.7463223, 6.7463223, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; diff --git a/src/QMCWaveFunctions/tests/test_kspace_jastrow.cpp b/src/QMCWaveFunctions/tests/test_kspace_jastrow.cpp index 85f1bc71ac..2e89b97c96 100644 --- a/src/QMCWaveFunctions/tests/test_kspace_jastrow.cpp +++ b/src/QMCWaveFunctions/tests/test_kspace_jastrow.cpp @@ -54,9 +54,7 @@ TEST_CASE("kspace jastrow", "[wavefunction]") xmlNodePtr part1 = xmlFirstElementChild(root); // read lattice - ParticleSet::ParticleLayout lattice; - LatticeParser lp(lattice); - lp.put(part1); + ParticleLayoutT lattice = makeFullPrecParticleLayout(part1); lattice.print(app_log(), 0); const SimulationCell simulation_cell(lattice); diff --git a/src/QMCWaveFunctions/tests/test_lattice_gaussian.cpp b/src/QMCWaveFunctions/tests/test_lattice_gaussian.cpp index 3d13240dd1..09bae7fe36 100644 --- a/src/QMCWaveFunctions/tests/test_lattice_gaussian.cpp +++ b/src/QMCWaveFunctions/tests/test_lattice_gaussian.cpp @@ -36,7 +36,6 @@ TEST_CASE("lattice gaussian", "[wavefunction]") Communicate* c; c = OHMMS::Controller; - ParticleSet::ParticleLayout lattice; // initialize simulationcell for kvectors const char* xmltext = R"( @@ -59,8 +58,8 @@ TEST_CASE("lattice gaussian", "[wavefunction]") xmlNodePtr root = doc.getRoot(); xmlNodePtr part1 = xmlFirstElementChild(root); - LatticeParser lp(lattice); - lp.put(part1); + ParticleLayoutT lattice = makeFullPrecParticleLayout(part1); + lattice.print(app_log(), 0); const SimulationCell simulation_cell(lattice); auto ions_ptr = std::make_unique(simulation_cell); diff --git a/src/QMCWaveFunctions/tests/test_pw.cpp b/src/QMCWaveFunctions/tests/test_pw.cpp index fd9e90520d..1cb0b8c47d 100644 --- a/src/QMCWaveFunctions/tests/test_pw.cpp +++ b/src/QMCWaveFunctions/tests/test_pw.cpp @@ -31,7 +31,7 @@ TEST_CASE("PlaneWave SPO from HDF for BCC H", "[wavefunction]") Communicate* c = OHMMS::Controller; // BCC H - PtclOnLatticeTraits::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {3.77945227, 0.0, 0.0, 0.0, 3.77945227, 0.0, 0.0, 0.0, 3.77945227}; lattice.reset(); @@ -133,7 +133,7 @@ TEST_CASE("PlaneWave SPO from HDF for LiH arb", "[wavefunction]") Communicate* c = OHMMS::Controller; // LiH - PtclOnLatticeTraits::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {-3.55, 0.0, 3.55, 0.0, 3.55, 3.55, -3.55, 3.55, 0.0}; lattice.reset(); diff --git a/src/QMCWaveFunctions/tests/test_pyscf_complex_MO.cpp b/src/QMCWaveFunctions/tests/test_pyscf_complex_MO.cpp index 2e64b9b704..d2c5bd3b06 100644 --- a/src/QMCWaveFunctions/tests/test_pyscf_complex_MO.cpp +++ b/src/QMCWaveFunctions/tests/test_pyscf_complex_MO.cpp @@ -44,7 +44,7 @@ void test_C_diamond() REQUIRE(okay); xmlNodePtr root = doc.getRoot(); - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; // BCC H lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; lattice.reset(); diff --git a/src/QMCWaveFunctions/tests/test_rpa_jastrow.cpp b/src/QMCWaveFunctions/tests/test_rpa_jastrow.cpp index 22c572137c..c99e359e68 100644 --- a/src/QMCWaveFunctions/tests/test_rpa_jastrow.cpp +++ b/src/QMCWaveFunctions/tests/test_rpa_jastrow.cpp @@ -52,9 +52,7 @@ TEST_CASE("RPA Jastrow", "[wavefunction]") xmlNodePtr part1 = xmlFirstElementChild(root); // read lattice - ParticleSet::ParticleLayout lattice; - LatticeParser lp(lattice); - lp.put(part1); + ParticleLayoutT lattice = makeFullPrecParticleLayout(part1); lattice.print(app_log(), 0); const SimulationCell simulation_cell(lattice); diff --git a/src/QMCWaveFunctions/tests/test_spline_applyrotation.cpp b/src/QMCWaveFunctions/tests/test_spline_applyrotation.cpp index 5864d5eaa8..fdfff9bbaf 100644 --- a/src/QMCWaveFunctions/tests/test_spline_applyrotation.cpp +++ b/src/QMCWaveFunctions/tests/test_spline_applyrotation.cpp @@ -35,7 +35,7 @@ TEST_CASE("Spline applyRotation zero rotation", "[wavefunction]") Communicate* c = OHMMS::Controller; // diamondC_1x1x1 - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; ParticleSetPool ptcl = ParticleSetPool(c); @@ -171,7 +171,7 @@ TEST_CASE("Spline applyRotation one rotation", "[wavefunction]") Communicate* c = OHMMS::Controller; // diamondC_1x1x1 - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; ParticleSetPool ptcl = ParticleSetPool(c); @@ -380,7 +380,7 @@ TEST_CASE("Spline applyRotation two rotations", "[wavefunction]") Communicate* c = OHMMS::Controller; // diamondC_1x1x1 - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; ParticleSetPool ptcl = ParticleSetPool(c); @@ -684,7 +684,7 @@ TEST_CASE("Spline applyRotation complex rotation", "[wavefunction]") Communicate* c = OHMMS::Controller; // diamondC_1x1x1 - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {3.37316115, 3.37316115, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; ParticleSetPool ptcl = ParticleSetPool(c); diff --git a/src/QMCWaveFunctions/tests/test_spo_collection_input_spline.cpp b/src/QMCWaveFunctions/tests/test_spo_collection_input_spline.cpp index 2246ffbf0c..a46c25edbb 100644 --- a/src/QMCWaveFunctions/tests/test_spo_collection_input_spline.cpp +++ b/src/QMCWaveFunctions/tests/test_spo_collection_input_spline.cpp @@ -32,7 +32,7 @@ void test_diamond_2x1x1_xml_input(const std::string& spo_xml_string) Communicate* c = OHMMS::Controller; // diamondC_2x1x1 - ParticleSet::ParticleLayout lattice; + CrystalLattice lattice; lattice.R = {6.7463223, 6.7463223, 0.0, 0.0, 3.37316115, 3.37316115, 3.37316115, 0.0, 3.37316115}; ParticleSetPool ptcl = ParticleSetPool(c); diff --git a/src/Utilities/for_testing/ApproximateEquality.hpp b/src/Utilities/for_testing/ApproximateEquality.hpp index 0e6c28fadb..96c36ded70 100644 --- a/src/Utilities/for_testing/ApproximateEquality.hpp +++ b/src/Utilities/for_testing/ApproximateEquality.hpp @@ -16,6 +16,8 @@ #include #include "type_traits/complex_help.hpp" +#include "OhmmsPETE/TinyVector.h" + namespace qmcplusplus { @@ -36,7 +38,7 @@ bool approxEquality(T val_a, T val_b, std::optional eps) else return val_a == Approx(val_b); } - + extern template bool approxEquality(float val_a, float val_b, std::optional eps); extern template bool approxEquality>(std::complex val_a, std::complex val_b, diff --git a/src/Utilities/for_testing/checkVector.hpp b/src/Utilities/for_testing/checkVector.hpp index 4e7df62ab8..0fd37b4baf 100644 --- a/src/Utilities/for_testing/checkVector.hpp +++ b/src/Utilities/for_testing/checkVector.hpp @@ -64,6 +64,33 @@ struct CheckVectorResult * \param[in] eps - add a tolerance for Catch Approx checks. Default to same as in Approx. * The semantics of the return value are discussed above. */ +template +CheckVectorResult checkVector(const std::vector>& a_vec, + const std::vector>& b_vec, + const bool check_all = false) +{ + // This allows use to check a padded b matrix with a nonpadded a + if (a_vec.size() > b_vec.size()) + return {false, "b_vec is too small for a_vec to be a checkable segment"}; + std::stringstream result_msg; + auto vectorElementError = [&result_msg](int i, auto& a_vec, auto& b_vec) { + result_msg << "checkVector found bad element at " << i << " " << a_vec[i] << " != " << b_vec[i] << '\n'; + }; + bool all_elements_match = true; + for (int i = 0; i < a_vec.size(); i++) + { + bool equality = a_vec[i] == b_vec[i]; + if (!equality) + { + vectorElementError(i, a_vec, b_vec); + all_elements_match = false; + if (!check_all) + return {false, result_msg.str()}; + } + } + return {all_elements_match, result_msg.str()}; +} + template CheckVectorResult checkVector(const M1& a_vec, const M2& b_vec, @@ -91,6 +118,7 @@ CheckVectorResult checkVector(const M1& a_vec, } return {all_elements_match, result_msg.str()}; } + } // namespace qmcplusplus #endif diff --git a/tests/solids/diamondC_1x1x1-Gaussian_pp/CMakeLists.txt b/tests/solids/diamondC_1x1x1-Gaussian_pp/CMakeLists.txt index 09d1fd5c4d..b0125965d0 100644 --- a/tests/solids/diamondC_1x1x1-Gaussian_pp/CMakeLists.txt +++ b/tests/solids/diamondC_1x1x1-Gaussian_pp/CMakeLists.txt @@ -95,7 +95,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_SCALARS "kinetic" "10.15426733 0.000221") list(APPEND DET_DIAMOND_SCALARS "potential" "-20.42328009 0.000005") list(APPEND DET_DIAMOND_SCALARS "eeenergy" "-1.329163913 0.000003") - list(APPEND DET_DIAMOND_SCALARS "ionion" "-12.77567012 0.000001") + list(APPEND DET_DIAMOND_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_SCALARS "localecp" "-6.762353003 0.000007") list(APPEND DET_DIAMOND_SCALARS "nonlocalecp" "0.44390473 0.000001") list(APPEND DET_DIAMOND_SCALARS "samples" "9 0.0") @@ -127,7 +127,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_VMCBATCH_SCALARS "kinetic" "12.23702380 0.000221") list(APPEND DET_DIAMOND_VMCBATCH_SCALARS "potential" "-23.06376891 0.000015") list(APPEND DET_DIAMOND_VMCBATCH_SCALARS "eeenergy" "-3.00267948 0.000003") - list(APPEND DET_DIAMOND_VMCBATCH_SCALARS "ionion" "-12.77567012 0.000001") + list(APPEND DET_DIAMOND_VMCBATCH_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_VMCBATCH_SCALARS "localecp" "-7.99462588 0.00002") list(APPEND DET_DIAMOND_VMCBATCH_SCALARS "nonlocalecp" "0.70920650 0.00001") list(APPEND DET_DIAMOND_VMCBATCH_SCALARS "samples" "9 0.0") diff --git a/tests/solids/diamondC_1x1x1-Gaussian_pp_MSD/CMakeLists.txt b/tests/solids/diamondC_1x1x1-Gaussian_pp_MSD/CMakeLists.txt index 526e79aa95..4b03319a54 100644 --- a/tests/solids/diamondC_1x1x1-Gaussian_pp_MSD/CMakeLists.txt +++ b/tests/solids/diamondC_1x1x1-Gaussian_pp_MSD/CMakeLists.txt @@ -51,7 +51,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "eeenergy" "-2.50996032 0.000002") list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "localecp" "-7.67975015 0.00001") list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "nonlocalecp" "0.33604476 0.000005") - list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "ionion" "-12.77567016 0.000001") + list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "ionion" "-12.77566507 0.000001") if(QMC_COMPLEX) #DMC list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "totenergy" "-10.99915119 0.00002") @@ -60,7 +60,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "eeenergy" "-2.97216487 0.000002") list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "localecp" "-6.84338204 0.000002") list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "nonlocalecp" "-0.35256283 0.000002") - list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "ionion" "-12.77567016 0.000001") + list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "ionion" "-12.77566507 0.000001") else() #DMC list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "totenergy" "-10.63742696 0.00002") @@ -69,7 +69,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "eeenergy" "-2.72638743 0.000002") list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "localecp" "-7.91852665 0.00002") list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "nonlocalecp" "0.70941796 0.00002") - list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "ionion" "-12.77567016 0.000001") + list(APPEND det_diamondC_1x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "ionion" "-12.77566507 0.000001") endif() else() #VMC diff --git a/tests/solids/diamondC_1x1x1_pp/CMakeLists.txt b/tests/solids/diamondC_1x1x1_pp/CMakeLists.txt index 6d0fa29dfa..4f64646195 100644 --- a/tests/solids/diamondC_1x1x1_pp/CMakeLists.txt +++ b/tests/solids/diamondC_1x1x1_pp/CMakeLists.txt @@ -270,7 +270,7 @@ list(APPEND LONG_DIAMOND_ALLP_SCALARS "totenergy" "-10.491445 0.0065") list(APPEND LONG_DIAMOND_ALLP_SCALARS "kinetic" "11.434392 0.006") list(APPEND LONG_DIAMOND_ALLP_SCALARS "potential" "-21.925822 0.006") list(APPEND LONG_DIAMOND_ALLP_SCALARS "eeenergy" "-2.700534 0.0015") -list(APPEND LONG_DIAMOND_ALLP_SCALARS "ionion" "-12.77567000 0.0004") +list(APPEND LONG_DIAMOND_ALLP_SCALARS "ionion" "-12.77566507 0.00001") list(APPEND LONG_DIAMOND_ALLP_SCALARS "localecp" "-7.046740 0.0065") list(APPEND LONG_DIAMOND_ALLP_SCALARS "nonlocalecp" "0.597119 0.0019") list(APPEND LONG_DIAMOND_ALLP_SCALARS "mpc" "-2.453044 0.0014") @@ -1259,7 +1259,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_SCALARS "kinetic" "16.03245992 0.00001650") list(APPEND DET_DIAMOND_SCALARS "potential" "-26.68267474 0.00000819") list(APPEND DET_DIAMOND_SCALARS "eeenergy" "-1.64876197 0.00000211") - list(APPEND DET_DIAMOND_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_SCALARS "localecp" "-13.45055537 0.00000725") list(APPEND DET_DIAMOND_SCALARS "nonlocalecp" "1.19231153 0.00000439") list(APPEND DET_DIAMOND_SCALARS "mpc" "-1.45236931 0.00000196") @@ -1295,7 +1295,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_EXCITED_SCALARS "kinetic" "14.67050590 0.00001980") list(APPEND DET_DIAMOND_EXCITED_SCALARS "potential" "-24.81885848 0.00003") list(APPEND DET_DIAMOND_EXCITED_SCALARS "eeenergy" "-3.54361899 0.00001190") - list(APPEND DET_DIAMOND_EXCITED_SCALARS "ionion" "-12.77567050 0.000001") + list(APPEND DET_DIAMOND_EXCITED_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_EXCITED_SCALARS "localecp" "-8.35089725 0.00005") list(APPEND DET_DIAMOND_EXCITED_SCALARS "nonlocalecp" "-0.14867641 0.00002") list(APPEND DET_DIAMOND_EXCITED_SCALARS "mpc" "-3.24606471 0.00001149") @@ -1331,7 +1331,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_MESHF_SCALARS "kinetic" "12.60307264 0.00022263") list(APPEND DET_DIAMOND_MESHF_SCALARS "potential" "-23.26040613 0.00001348") list(APPEND DET_DIAMOND_MESHF_SCALARS "eeenergy" "-3.48893504 0.00000280") - list(APPEND DET_DIAMOND_MESHF_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_MESHF_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_MESHF_SCALARS "localecp" "-8.52555859 0.00002025") list(APPEND DET_DIAMOND_MESHF_SCALARS "nonlocalecp" "1.52975113 0.00000811") list(APPEND DET_DIAMOND_MESHF_SCALARS "mpc" "-3.34182284 0.00000307") @@ -1367,7 +1367,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_KSPACE_SCALARS "kinetic" "11.79557753 0.00001421") list(APPEND DET_DIAMOND_KSPACE_SCALARS "potential" "-22.22624477 0.00000791") list(APPEND DET_DIAMOND_KSPACE_SCALARS "eeenergy" "-1.30357070 0.00000629") - list(APPEND DET_DIAMOND_KSPACE_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_KSPACE_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_KSPACE_SCALARS "localecp" "-9.17379702 0.00001481") list(APPEND DET_DIAMOND_KSPACE_SCALARS "nonlocalecp" "1.02680376 0.00000270") list(APPEND DET_DIAMOND_KSPACE_SCALARS "mpc" "-1.00378374 0.00000754") @@ -1405,7 +1405,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_SCALARS "kinetic" "4.49057680 0.00001257") list(APPEND DET_DIAMOND_DMC_SCALARS "potential" "-15.01388990 0.00000253") list(APPEND DET_DIAMOND_DMC_SCALARS "eeenergy" "0.83205956 0.00000157") - list(APPEND DET_DIAMOND_DMC_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_SCALARS "localecp" "-4.00159178 0.00000147") list(APPEND DET_DIAMOND_DMC_SCALARS "nonlocalecp" "0.93131260 0.000001") list(APPEND DET_DIAMOND_DMC_SCALARS "mpc" "1.40050428 0.00000225") @@ -1439,7 +1439,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_EXCITED_SCALARS "kinetic" "9.63546916 0.00001143") list(APPEND DET_DIAMOND_DMC_EXCITED_SCALARS "potential" "-19.47214772 0.00000463") list(APPEND DET_DIAMOND_DMC_EXCITED_SCALARS "eeenergy" "-2.70238228 0.00000125") - list(APPEND DET_DIAMOND_DMC_EXCITED_SCALARS "ionion" "-12.77567050 0.000001") + list(APPEND DET_DIAMOND_DMC_EXCITED_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_EXCITED_SCALARS "localecp" "-4.36957276 0.0000047") list(APPEND DET_DIAMOND_DMC_EXCITED_SCALARS "nonlocalecp" "0.37547763 0.000001 ") list(APPEND DET_DIAMOND_DMC_EXCITED_SCALARS "mpc" "-2.42116567 0.000001") @@ -1474,7 +1474,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_MULTI1_SCALARS "kinetic" "9.00930034 0.00001647") list(APPEND DET_DIAMOND_DMC_MULTI1_SCALARS "potential" "-18.54051114 0.00000446") list(APPEND DET_DIAMOND_DMC_MULTI1_SCALARS "eeenergy" "-2.11983595 0.000001") - list(APPEND DET_DIAMOND_DMC_MULTI1_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_MULTI1_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_MULTI1_SCALARS "localecp" "-4.36659965 0.00000448") list(APPEND DET_DIAMOND_DMC_MULTI1_SCALARS "nonlocalecp" "0.72159739 0.00000178") list(APPEND DET_DIAMOND_DMC_MULTI1_SCALARS "mpc" "-1.93675985 0.00000122") @@ -1484,7 +1484,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "kinetic" "14.41362921 0.00003329") list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "potential" "-24.98245366 0.00003051") list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "eeenergy" "-2.89879032 0.00000133") - list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "localecp" "-15.41387689 0.00001471") list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "nonlocalecp" "6.10588419 0.00001448") list(APPEND DET_DIAMOND_DMC_MULTI2_SCALARS "mpc" "-2.61905734 0.00000179") @@ -1494,7 +1494,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "kinetic" "19.70827934 0.00003064") list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "potential" "-28.64051062 0.00001851") list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "eeenergy" "-1.15369571 0.00000776") - list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "localecp" "-16.18244873 0.00001536") list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "nonlocalecp" "1.47130834 0.00000689") list(APPEND DET_DIAMOND_DMC_MULTI3_SCALARS "mpc" "-0.80671517 0.00000857") @@ -1554,7 +1554,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_VMC_MWALKERS1_SCALARS "kinetic" "12.21076917 0.00000858") list(APPEND DET_DIAMOND_VMC_MWALKERS1_SCALARS "potential" "-22.72964386 0.00000257") list(APPEND DET_DIAMOND_VMC_MWALKERS1_SCALARS "eeenergy" "-1.39227245 0.000001") - list(APPEND DET_DIAMOND_VMC_MWALKERS1_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_VMC_MWALKERS1_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_VMC_MWALKERS1_SCALARS "localecp" "-8.27168446 0.0000035") list(APPEND DET_DIAMOND_VMC_MWALKERS1_SCALARS "nonlocalecp" "-0.29001602 0.00000126") list(APPEND DET_DIAMOND_VMC_MWALKERS1_SCALARS "mpc" "-0.95019080 0.00000112") @@ -1564,7 +1564,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_VMC_MWALKERS2_SCALARS "kinetic" "13.81347725 0.0000143") list(APPEND DET_DIAMOND_VMC_MWALKERS2_SCALARS "potential" "-24.38354103 0.00000366") list(APPEND DET_DIAMOND_VMC_MWALKERS2_SCALARS "eeenergy" "-2.08653505 0.000001") - list(APPEND DET_DIAMOND_VMC_MWALKERS2_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_VMC_MWALKERS2_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_VMC_MWALKERS2_SCALARS "localecp" "-10.59945535 0.00000897") list(APPEND DET_DIAMOND_VMC_MWALKERS2_SCALARS "nonlocalecp" "1.07811994 0.00000743") list(APPEND DET_DIAMOND_VMC_MWALKERS2_SCALARS "mpc" "-2.00098290 0.000001") @@ -1574,7 +1574,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_MWALKERS1_SCALARS "kinetic" "7.04049333 0.00000959") list(APPEND DET_DIAMOND_DMC_MWALKERS1_SCALARS "potential" "-17.57593026 0.00000443") list(APPEND DET_DIAMOND_DMC_MWALKERS1_SCALARS "eeenergy" "-1.15002939 0.00000344") - list(APPEND DET_DIAMOND_DMC_MWALKERS1_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_MWALKERS1_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_MWALKERS1_SCALARS "localecp" "-3.78048184 0.00000184") list(APPEND DET_DIAMOND_DMC_MWALKERS1_SCALARS "nonlocalecp" "0.13025148 0.000001") list(APPEND DET_DIAMOND_DMC_MWALKERS1_SCALARS "mpc" "-1.01499425 0.00000365") @@ -1584,7 +1584,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_MWALKERS2_SCALARS "kinetic" "11.45079701 0.00000847") list(APPEND DET_DIAMOND_DMC_MWALKERS2_SCALARS "potential" "-21.17426291 0.00000232") list(APPEND DET_DIAMOND_DMC_MWALKERS2_SCALARS "eeenergy" "-1.73937136 0.000001") - list(APPEND DET_DIAMOND_DMC_MWALKERS2_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_MWALKERS2_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_MWALKERS2_SCALARS "localecp" "-8.33546910 0.00000206") list(APPEND DET_DIAMOND_DMC_MWALKERS2_SCALARS "nonlocalecp" "1.67624709 0.00000168") list(APPEND DET_DIAMOND_DMC_MWALKERS2_SCALARS "mpc" "-1.50889162 0.000001") @@ -1711,7 +1711,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_TM1_SCALARS "kinetic" "11.35705140 0.00003064") list(APPEND DET_DIAMOND_DMC_TM1_SCALARS "potential" "-21.79959076 0.00000232") list(APPEND DET_DIAMOND_DMC_TM1_SCALARS "eeenergy" "-0.69361370 0.00000776") - list(APPEND DET_DIAMOND_DMC_TM1_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_TM1_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_TM1_SCALARS "localecp" "-9.65190864 0.00001536") list(APPEND DET_DIAMOND_DMC_TM1_SCALARS "nonlocalecp" "1.32159905 0.00000689") list(APPEND DET_DIAMOND_DMC_TM1_SCALARS "mpc" "-0.23519803 0.00000857") @@ -1720,7 +1720,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_TM2_SCALARS "kinetic" "12.78036761 0.00003064") list(APPEND DET_DIAMOND_DMC_TM2_SCALARS "potential" "-23.27326883 0.00000232") list(APPEND DET_DIAMOND_DMC_TM2_SCALARS "eeenergy" "-1.36300017 0.00000776") - list(APPEND DET_DIAMOND_DMC_TM2_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_TM2_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_TM2_SCALARS "localecp" "-10.21261249 0.00001536") list(APPEND DET_DIAMOND_DMC_TM2_SCALARS "nonlocalecp" "1.07801130 0.00000689") list(APPEND DET_DIAMOND_DMC_TM2_SCALARS "mpc" "-0.98142311 0.00000857") @@ -1729,7 +1729,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_DMC_TM3_SCALARS "kinetic" "14.08671956 0.00003064") list(APPEND DET_DIAMOND_DMC_TM3_SCALARS "potential" "-24.59736212 0.00000232") list(APPEND DET_DIAMOND_DMC_TM3_SCALARS "eeenergy" "-1.90175515 0.00000776") - list(APPEND DET_DIAMOND_DMC_TM3_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_TM3_SCALARS "ionion" "-12.77566507 0.000001") list(APPEND DET_DIAMOND_DMC_TM3_SCALARS "localecp" "-11.18722424 0.00001536") list(APPEND DET_DIAMOND_DMC_TM3_SCALARS "nonlocalecp" "1.26728473 0.00000689") list(APPEND DET_DIAMOND_DMC_TM3_SCALARS "mpc" "-1.59078038 0.00000857") @@ -1783,27 +1783,27 @@ if(QMC_MIXED_PRECISION) #v0 list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "totenergy" "-10.34857080 0.00001861") list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "kinetic" "9.94328567 0.00003064") - list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "potential" "-20.29186355 0.00000232") + list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "potential" "-20.29185640 0.00000232") list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "eeenergy" "-2.70623197 0.00000776") - list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "ionion" "-12.77566333 0.000001") list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "localecp" "-5.26283000 0.00001536") list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "nonlocalecp" "0.45287649 0.00000689") list(APPEND DET_DIAMOND_DMC_TM1_BATCH_SCALARS "mpc" "-2.43479306 0.00000857") #v1 list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "totenergy" "-10.47605841 0.00001861") list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "kinetic" "10.81438943 0.00003064") - list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "potential" "-21.29044786 0.00000232") + list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "potential" "-21.29044088 0.00000232") list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "eeenergy" "-2.90631955 0.00000776") - list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "ionion" "-12.77566370 0.000001") list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "localecp" "-5.56045812 0.00001536") list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "nonlocalecp" "-0.04800030 0.00000689") list(APPEND DET_DIAMOND_DMC_TM2_BATCH_SCALARS "mpc" "-2.64915619 0.00000857") #v3 list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "totenergy" "-10.29166891 0.00001861") list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "kinetic" "12.08875246 0.00003064") - list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "potential" "-22.38042133 0.00000232") + list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "potential" "-22.38041792 0.00000232") list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "eeenergy" "-2.82248174 0.00000776") - list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "ionion" "-12.77567000 0.000001") + list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "ionion" "-12.77566535 0.000001") list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "localecp" "-6.53921012 0.00001536") list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "nonlocalecp" "-0.24305956 0.00000689") list(APPEND DET_DIAMOND_DMC_TM3_BATCH_SCALARS "mpc" "-2.57378019 0.00000857") diff --git a/tests/solids/diamondC_2x1x1-Gaussian_pp/CMakeLists.txt b/tests/solids/diamondC_2x1x1-Gaussian_pp/CMakeLists.txt index 650ad26859..0981bbd504 100644 --- a/tests/solids/diamondC_2x1x1-Gaussian_pp/CMakeLists.txt +++ b/tests/solids/diamondC_2x1x1-Gaussian_pp/CMakeLists.txt @@ -97,7 +97,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND_SCALARS "kinetic" "15.76862594 0.000516") list(APPEND DET_DIAMOND_SCALARS "potential" "-38.46978416 0.000025") list(APPEND DET_DIAMOND_SCALARS "eeenergy" "-5.67930456 0.000009") - list(APPEND DET_DIAMOND_SCALARS "ionion" "-25.55133282 0.000001") + list(APPEND DET_DIAMOND_SCALARS "ionion" "-25.55132413 0.000001") list(APPEND DET_DIAMOND_SCALARS "localecp" "-12.0143307 0.000051") list(APPEND DET_DIAMOND_SCALARS "nonlocalecp" "4.77523301 0.000026") list(APPEND DET_DIAMOND_SCALARS "samples" "9 0.0") @@ -141,7 +141,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND-r1-t4_SCALARS "kinetic" "18.72979475 0.000516") list(APPEND DET_DIAMOND-r1-t4_SCALARS "potential" "-40.85806527 0.000025") list(APPEND DET_DIAMOND-r1-t4_SCALARS "eeenergy" "-4.65173512 0.000009") - list(APPEND DET_DIAMOND-r1-t4_SCALARS "ionion" "-25.55133196 0.000001") + list(APPEND DET_DIAMOND-r1-t4_SCALARS "ionion" "-25.55132413 0.000001") list(APPEND DET_DIAMOND-r1-t4_SCALARS "localecp" "-12.55060882 0.000051") list(APPEND DET_DIAMOND-r1-t4_SCALARS "nonlocalecp" "1.89561077 0.000026") else() diff --git a/tests/solids/diamondC_2x1x1-Gaussian_pp_MSD/CMakeLists.txt b/tests/solids/diamondC_2x1x1-Gaussian_pp_MSD/CMakeLists.txt index 56dfbc2962..7a1932e677 100644 --- a/tests/solids/diamondC_2x1x1-Gaussian_pp_MSD/CMakeLists.txt +++ b/tests/solids/diamondC_2x1x1-Gaussian_pp_MSD/CMakeLists.txt @@ -52,7 +52,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "eeenergy" "-4.77761915 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "localecp" "-10.90122112 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "nonlocalecp" "1.10699937 0.0001") - list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "ionion" "-25.55132413 0.000002") #DMC list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "totenergy" "-21.69556787 0.0005") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "kinetic" "18.36514441 0.0005") @@ -60,7 +60,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "eeenergy" "-5.32649930 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "localecp" "-10.70569492 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "nonlocalecp" "1.52281538 0.0001") - list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "ionion" "-25.55132413 0.000002") else() # VMC list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "totenergy" "-21.00670927 0.0005") @@ -69,7 +69,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "eeenergy" "-4.24910344 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "localecp" "-13.65564795 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "nonlocalecp" "1.60484851 0.0001") - list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_VMC_SCALARS "ionion" "-25.55132413 0.000002") #DMC list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "totenergy" "-21.62353122 0.0005") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "kinetic" "20.66684133 0.0005") @@ -77,7 +77,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "eeenergy" "-4.94421717 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "localecp" "-13.24215237 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "nonlocalecp" "1.44733044 0.0001") - list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_SHORT_DMC_SCALARS "ionion" "-25.55132413 0.000002") endif() else() if(QMC_COMPLEX) @@ -143,7 +143,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "eeenergy" "-4.20408649 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "localecp" "-14.93105730 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "nonlocalecp" @@ -159,7 +159,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "eeenergy" "-4.99765058 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "localecp" "-14.00169909 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "nonlocalecp" @@ -175,7 +175,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "eeenergy" "-4.47590829 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "localecp" "-15.03973198 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "nonlocalecp" @@ -191,7 +191,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "eeenergy" "-4.43122622 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "localecp" "-12.89019745 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "nonlocalecp" @@ -207,7 +207,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "eeenergy" "-4.34588506 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "localecp" "-13.94038870 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "nonlocalecp" @@ -223,7 +223,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "eeenergy" "-4.03628785 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "localecp" "-14.32128624 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "nonlocalecp" @@ -357,7 +357,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "eeenergy" "-5.08527221 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "localecp" "-9.83228444 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "nonlocalecp" @@ -373,7 +373,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "eeenergy" "-4.68529565 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "localecp" "-15.31087459 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "nonlocalecp" @@ -389,7 +389,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "eeenergy" "-4.60729524 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132353 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "localecp" "-17.12262279 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "nonlocalecp" @@ -405,7 +405,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "eeenergy" "-5.04910503 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "localecp" "-10.87790041 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "nonlocalecp" @@ -421,7 +421,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "eeenergy" "-4.64881369 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "localecp" "-14.32409006 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "nonlocalecp" @@ -437,7 +437,7 @@ if(QMC_MIXED_PRECISION) list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "eeenergy" "-4.62934502 0.00003") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "ionion" - "-25.55133363 0.000002") + "-25.55132413 0.000002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "localecp" "-14.42788710 0.0002") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "nonlocalecp" @@ -503,7 +503,7 @@ else() list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "eeenergy" "-5.06956602 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "ionion" - "-25.55132719 0.000001") + "-25.55132413 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "localecp" "-12.19151812 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "nonlocalecp" @@ -519,7 +519,7 @@ else() list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "eeenergy" "-4.69046880 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "ionion" - "-25.55132719 0.000001") + "-25.55132413 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "localecp" "-13.26890009 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "nonlocalecp" @@ -535,7 +535,7 @@ else() list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "eeenergy" "-4.90231612 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "ionion" - "-25.55132719 0.000001") + "-25.55132413 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "localecp" "-13.86140151 0.000001") list(APPEND det_diamondC_2x1x1-Gaussian_pp_MSD_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "nonlocalecp" diff --git a/tests/solids/diamondC_2x1x1_pp/CMakeLists.txt b/tests/solids/diamondC_2x1x1_pp/CMakeLists.txt index 6d7b6bd326..d5bb933653 100644 --- a/tests/solids/diamondC_2x1x1_pp/CMakeLists.txt +++ b/tests/solids/diamondC_2x1x1_pp/CMakeLists.txt @@ -327,7 +327,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_SCALARS "kinetic" "19.25970008 0.00012922") list(APPEND DET_DIAMOND2_SCALARS "potential" "-41.56500083 0.00009881") list(APPEND DET_DIAMOND2_SCALARS "eeenergy" "-7.25690848 0.00002388") - list(APPEND DET_DIAMOND2_SCALARS "ionion" "-25.55133296 0.0000014") + list(APPEND DET_DIAMOND2_SCALARS "ionion" "-25.55132413 0.0000014") list(APPEND DET_DIAMOND2_SCALARS "localecp" "-10.85086697 0.00021079") list(APPEND DET_DIAMOND2_SCALARS "nonlocalecp" "2.09409341 0.00008703") list(APPEND DET_DIAMOND2_SCALARS "samples" "9.00000000 0.0") @@ -338,7 +338,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_SCALARS "kinetic" "19.26598410 0.00014541") list(APPEND DET_DIAMOND2_SCALARS "potential" "-41.56735736 0.00007327") list(APPEND DET_DIAMOND2_SCALARS "eeenergy" "-7.25613581 0.00002740") - list(APPEND DET_DIAMOND2_SCALARS "ionion" "-25.55133291 0.00000135") + list(APPEND DET_DIAMOND2_SCALARS "ionion" "-25.55132413 0.00000135") list(APPEND DET_DIAMOND2_SCALARS "localecp" "-10.85690056 0.00018856") list(APPEND DET_DIAMOND2_SCALARS "nonlocalecp" "2.09698211 0.00010037") list(APPEND DET_DIAMOND2_SCALARS "samples" "9.00000000 0.0") @@ -399,7 +399,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_EXCITED_SCALARS "kinetic" "19.81050328 0.00005723") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "potential" "-40.71023491 0.00004795") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "eeenergy" "-4.88692256 0.00001674") - list(APPEND DET_DIAMOND2_EXCITED_SCALARS "ionion" "-25.55133347 0.000002") + list(APPEND DET_DIAMOND2_EXCITED_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "localecp" "-12.28339315 0.00005318") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "nonlocalecp" "2.01141963 0.00000726") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "samples" "9.00000000 0.0") @@ -409,7 +409,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_EXCITED_SCALARS "kinetic" "19.80808002 0.00006011") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "potential" "-40.71000239 0.00004784") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "eeenergy" "-4.88667164 0.00001946") - list(APPEND DET_DIAMOND2_EXCITED_SCALARS "ionion" "-25.55133347 0.000002") + list(APPEND DET_DIAMOND2_EXCITED_SCALARS "ionion" "-25.55132413 0.0000015") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "localecp" "-12.28328453 0.00004867") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "nonlocalecp" "2.01130431 0.00000802") list(APPEND DET_DIAMOND2_EXCITED_SCALARS "samples" "9.00000000 0.0") @@ -458,7 +458,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DELAY_SCALARS "kinetic" "16.53206588 0.00002208") list(APPEND DET_DIAMOND2_DELAY_SCALARS "potential" "-37.48037247 0.00002475") list(APPEND DET_DIAMOND2_DELAY_SCALARS "eeenergy" "-4.25515637 0.00000418") - list(APPEND DET_DIAMOND2_DELAY_SCALARS "ionion" "-25.55133296 0.0000014") + list(APPEND DET_DIAMOND2_DELAY_SCALARS "ionion" "-25.55132413 0.0000014") list(APPEND DET_DIAMOND2_DELAY_SCALARS "localecp" "-9.39410011 0.00002983") list(APPEND DET_DIAMOND2_DELAY_SCALARS "nonlocalecp" "1.72022581 0.0000045") list(APPEND DET_DIAMOND2_DELAY_SCALARS "samples" "9.00000000 0.0") @@ -468,7 +468,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DELAY_SCALARS "kinetic" "16.53548278 0.00002493") list(APPEND DET_DIAMOND2_DELAY_SCALARS "potential" "-37.48014302 0.00002767") list(APPEND DET_DIAMOND2_DELAY_SCALARS "eeenergy" "-4.25504497 0.00000506") - list(APPEND DET_DIAMOND2_DELAY_SCALARS "ionion" "-25.55133291 0.00000135") + list(APPEND DET_DIAMOND2_DELAY_SCALARS "ionion" "-25.55132413 0.00000135") list(APPEND DET_DIAMOND2_DELAY_SCALARS "localecp" "-9.39386018 0.00002929") list(APPEND DET_DIAMOND2_DELAY_SCALARS "nonlocalecp" "1.72009549 0.0000045") list(APPEND DET_DIAMOND2_DELAY_SCALARS "samples" "9.00000000 0.0") @@ -517,7 +517,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DMC_SCALARS "kinetic" "22.67695498 0.00001003") list(APPEND DET_DIAMOND2_DMC_SCALARS "potential" "-43.71422745 0.00000515") list(APPEND DET_DIAMOND2_DMC_SCALARS "eeenergy" "-6.17624904 0.000001") - list(APPEND DET_DIAMOND2_DMC_SCALARS "ionion" "-25.55133296 0.0000014") + list(APPEND DET_DIAMOND2_DMC_SCALARS "ionion" "-25.55132413 0.0000014") list(APPEND DET_DIAMOND2_DMC_SCALARS "localecp" "-9.10928079 0.00000442") list(APPEND DET_DIAMOND2_DMC_SCALARS "nonlocalecp" "-2.87736895 0.00000177") list(APPEND DET_DIAMOND2_DMC_SCALARS "samples" "9.00000000 0.0") @@ -526,7 +526,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DMC_SCALARS "kinetic" "22.66898761 0.00001749") list(APPEND DET_DIAMOND2_DMC_SCALARS "potential" "-43.71426623 0.00000912") list(APPEND DET_DIAMOND2_DMC_SCALARS "eeenergy" "-6.17623877 0.00000144") - list(APPEND DET_DIAMOND2_DMC_SCALARS "ionion" "-25.55133291 0.00000135") + list(APPEND DET_DIAMOND2_DMC_SCALARS "ionion" "-25.55132413 0.00000135") list(APPEND DET_DIAMOND2_DMC_SCALARS "localecp" "-9.10933337 0.00000562") list(APPEND DET_DIAMOND2_DMC_SCALARS "nonlocalecp" "-2.87736218 0.00000442") list(APPEND DET_DIAMOND2_DMC_SCALARS "samples" "9.00000000 0.0") @@ -571,7 +571,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "kinetic" "24.80059962 0.00002563") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "potential" "-44.85581823 0.00000861") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "eeenergy" "-5.88258978 0.00000192") - list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "ionion" "-25.55133347 0.000002") + list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "localecp" "-16.39535242 0.00000777") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "nonlocalecp" "2.97345613 0.00001229") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "samples" "9.00000000 0.0") @@ -580,7 +580,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "kinetic" "24.78874085 0.00002343") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "potential" "-44.85577373 0.00001142") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "eeenergy" "-5.88258752 0.00000163") - list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "ionion" "-25.55133347 0.000002") + list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "ionion" "-25.55132413 0.0000015") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "localecp" "-16.39536396 0.00001074") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "nonlocalecp" "2.97349421 0.00001354") list(APPEND DET_DIAMOND2_DMC_EXCITED_SCALARS "samples" "9.00000000 0.0") @@ -626,7 +626,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "kinetic" "19.21103034 0.0005") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "potential" "-41.26064989 0.0001") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "eeenergy" "-6.68405093 0.00003") - list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "localecp" "-10.92577863 0.0002") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "nonlocalecp" "1.90051359 0.0001") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "flux" "-0.31336816 0.001") @@ -636,7 +636,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "kinetic" "19.77013829 0.0005") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "potential" "-41.07208174 0.0001") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "eeenergy" "-6.35883147 0.00003") - list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "localecp" "-10.53491810 0.0002") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "nonlocalecp" "1.37300099 0.0001") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "flux" "-9.80945206 0.001") @@ -647,7 +647,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "kinetic" "19.21031605 0.0005") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "potential" "-41.26065015 0.0001") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "eeenergy" "-6.68405093 0.00003") - list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "localecp" "-10.92577863 0.0002") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "nonlocalecp" "1.90051333 0.0001") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS1_SCALARS "flux" "-0.31142934 0.001") @@ -657,7 +657,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "kinetic" "19.76116869 0.0005") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "potential" "-41.07208140 0.0001") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "eeenergy" "-6.35883147 0.00003") - list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "localecp" "-10.53491810 0.0002") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "nonlocalecp" "1.37300133 0.0001") list(APPEND DET_DIAMOND2_VMC_BATCH_MWALKERS2_SCALARS "flux" "-9.79154968 0.001") @@ -744,7 +744,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "kinetic" "21.58412194 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "potential" "-43.34107537 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "eeenergy" "-4.93051914 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "localecp" "-14.55016309 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "nonlocalecp" "1.69094030 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "flux" "14.56015197 0.001") @@ -754,7 +754,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "kinetic" "21.75835414 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "potential" "-43.16599791 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "eeenergy" "-5.31127989 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "localecp" "-13.83088578 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "nonlocalecp" "1.52749084 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "flux" "1.55142989 0.001") @@ -764,7 +764,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "kinetic" "24.31653559 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "potential" "-46.08009462 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "eeenergy" "-5.15140370 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "localecp" "-17.32746386 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "nonlocalecp" "1.95010638 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "flux" "-15.81523996 0.001") @@ -774,7 +774,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "kinetic" "20.67891363 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "potential" "-42.44378484 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "eeenergy" "-4.97687774 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "localecp" "-13.97216887 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "nonlocalecp" "2.05659522 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_1_SCALARS "flux" "22.16100872 0.001") @@ -784,7 +784,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "kinetic" "22.16238919 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "potential" "-43.50991019 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "eeenergy" "-5.07821053 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "localecp" "-14.40620204 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "nonlocalecp" "1.52584469 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_2_SCALARS "flux" "1.35192553 0.001") @@ -794,7 +794,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "kinetic" "24.02746675 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "potential" "-45.75247577 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "eeenergy" "-5.05948524 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "localecp" "-16.92160668 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "nonlocalecp" "1.77994960 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t4_3_SCALARS "flux" "-15.34938772 0.001") @@ -886,7 +886,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "kinetic" "20.59152300 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "potential" "-42.28743906 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "eeenergy" "-4.99385904 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "localecp" "-13.52316837 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "nonlocalecp" "1.78092056 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "flux" "0.04231199 0.001") @@ -896,7 +896,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "kinetic" "20.01371014 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "potential" "-41.48156478 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "eeenergy" "-5.33482570 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "localecp" "-12.01852844 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "nonlocalecp" "1.42312156 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "flux" "-3.44516609 0.001") @@ -906,7 +906,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "kinetic" "19.99149153 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "potential" "-41.44921562 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "eeenergy" "-5.08977813 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "ionion" "-25.55132393 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "localecp" "-11.98988102 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "nonlocalecp" "1.18177600 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "flux" "-11.51920996 0.001") @@ -916,7 +916,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "kinetic" "20.58979677 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "potential" "-42.28743106 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "eeenergy" "-4.99385904 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "localecp" "-13.52316837 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "nonlocalecp" "1.78092855 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_1_SCALARS "flux" "0.04614580 0.001") @@ -926,7 +926,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "kinetic" "20.01428913 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "potential" "-41.48073196 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "eeenergy" "-5.33498643 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "localecp" "-12.01816179 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "nonlocalecp" "1.42374846 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_2_SCALARS "flux" "-3.47440676 0.0015") @@ -936,7 +936,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "kinetic" "19.99034278 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "potential" "-41.44933941 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "eeenergy" "-5.08983408 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "localecp" "-11.98992030 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "nonlocalecp" "1.18174540 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS_SERIALIZED-r1-t4_3_SCALARS "flux" "-11.51845874 0.001") @@ -1060,7 +1060,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "kinetic" "19.37229488 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "potential" "-40.95570760 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "eeenergy" "-5.29734575 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "ionion" "-25.55132371 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "localecp" "-11.85045674 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "nonlocalecp" "1.74342834 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "flux" "-6.02205066 0.001") @@ -1070,7 +1070,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "kinetic" "19.49291275 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "potential" "-41.25801003 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "eeenergy" "-5.74480542 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "ionion" "-25.55132371 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "localecp" "-11.45744019 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "nonlocalecp" "1.49558003 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "flux" "-1.28278001 0.001") @@ -1080,7 +1080,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "kinetic" "19.10457607 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "potential" "-41.32836692 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "eeenergy" "-5.53681243 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "ionion" "-25.55132393 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "localecp" "-12.48670659 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "nonlocalecp" "2.24647505 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "flux" "-6.00048904 0.001") @@ -1090,7 +1090,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "kinetic" "19.37039175 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "potential" "-40.95569793 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "eeenergy" "-5.29734575 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "localecp" "-11.85045674 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "nonlocalecp" "1.74343801 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_1_SCALARS "flux" "-6.01896369 0.001") @@ -1100,7 +1100,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "kinetic" "19.49451168 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "potential" "-41.25805477 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "eeenergy" "-5.74484542 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "localecp" "-11.45746322 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "nonlocalecp" "1.49557430 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_2_SCALARS "flux" "-1.29073155 0.001") @@ -1110,7 +1110,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "kinetic" "19.10316757 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "potential" "-41.32873326 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "eeenergy" "-5.53677170 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "ionion" "-25.55133345 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "localecp" "-12.48674850 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "nonlocalecp" "2.24611461 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r1-t16_3_SCALARS "flux" "-5.99726842 0.001") @@ -1248,7 +1248,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_1_SCALARS "kinetic" "19.06945306 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_1_SCALARS "potential" "-40.64908701 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_1_SCALARS "eeenergy" "-4.95910877 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_1_SCALARS "ionion" "-25.55133363 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_1_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_1_SCALARS "localecp" "-11.60386802 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_1_SCALARS "nonlocalecp" "1.46522161 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_1_SCALARS "flux" "9.88054883 0.001") @@ -1258,7 +1258,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_2_SCALARS "kinetic" "21.54062110 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_2_SCALARS "potential" "-42.95374255 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_2_SCALARS "eeenergy" "-5.02235546 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_2_SCALARS "ionion" "-25.55133363 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_2_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_2_SCALARS "localecp" "-13.10432010 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_2_SCALARS "nonlocalecp" "0.72425784 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_2_SCALARS "flux" "-12.59721251 0.001") @@ -1268,7 +1268,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_3_SCALARS "kinetic" "21.97767070 0.0005") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_3_SCALARS "potential" "-43.55734994 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_3_SCALARS "eeenergy" "-5.25255007 0.00003") - list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_3_SCALARS "ionion" "-25.55133363 0.000002") + list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_3_SCALARS "ionion" "-25.55132413 0.000002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_3_SCALARS "localecp" "-14.40431020 0.0002") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_3_SCALARS "nonlocalecp" "1.65084377 0.0001") list(APPEND DET_DIAMOND2_VMC_DMC_BATCH_MWALKERS-r2-t2_3_SCALARS "flux" "-10.97712288 0.001") @@ -1565,7 +1565,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "kinetic" "17.47436757 0.00002563") list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "potential" "-38.41717159 0.00000861") list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "eeenergy" "-5.71276953 0.00000192") - list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "ionion" "-25.55133347 0.000002") + list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "ionion" "-25.55132690 0.000002") list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "localecp" "-8.33530885 0.00000777") list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "nonlocalecp" "1.18224586 0.00001229") else() @@ -1573,7 +1573,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "kinetic" "17.47460491 0.00002343") list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "potential" "-38.41708469 0.00001142") list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "eeenergy" "-5.71281757 0.00000163") - list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "ionion" "-25.55133347 0.000002") + list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "ionion" "-25.55132735 0.0000015") list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "localecp" "-8.33525669 0.00001074") list(APPEND DET_DIAMOND2_DMC_BATCH_EXCITED_SCALARS "nonlocalecp" "1.18232314 0.00001354") endif() @@ -1614,7 +1614,7 @@ if(QMC_MIXED_PRECISION) list(APPEND DET_DIAMOND2_DMC_PW_SCALARS "kinetic" "17.30728109 0.00001749") list(APPEND DET_DIAMOND2_DMC_PW_SCALARS "potential" "-31.43386071 0.00000912") list(APPEND DET_DIAMOND2_DMC_PW_SCALARS "eeenergy" "-5.82744511 0.00000144") - list(APPEND DET_DIAMOND2_DMC_PW_SCALARS "ionion" "-25.55133371 0.00000135") + list(APPEND DET_DIAMOND2_DMC_PW_SCALARS "ionion" "-25.55132413 0.00000135") list(APPEND DET_DIAMOND2_DMC_PW_SCALARS "localecp" "-2.73935358 0.00000562") list(APPEND DET_DIAMOND2_DMC_PW_SCALARS "nonlocalecp" "2.68426957 0.00000442") list(APPEND DET_DIAMOND2_DMC_PW_SCALARS "samples" "151 0.0")