From cb76773eb4f9b0dd15a8b9d40e7242bea2c5b960 Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Thu, 15 Oct 2026 10:04:35 -0500 Subject: [PATCH 1/2] refactored to use Plugin class --- cxx/include/chemcache/chemcache_mm.hpp | 10 ++-- cxx/src/chemcache/atoms/atoms.hpp | 16 +++--- cxx/src/chemcache/bases/bases.hpp | 14 +++-- cxx/src/chemcache/chemcache_mm.cpp | 27 +++++----- cxx/src/chemcache/density/density.hpp | 20 ++++--- cxx/src/chemcache/export_chemcache.cpp | 2 +- .../chemcache/hydrocarbons/hydrocarbons.hpp | 7 ++- cxx/src/chemcache/molecules/molecules.hpp | 10 ++-- tests/cxx/unit_tests/atoms/Z_from_sym.cpp | 2 +- tests/cxx/unit_tests/atoms/atoms_average.cpp | 2 +- tests/cxx/unit_tests/atoms/atoms_isotope.cpp | 2 +- tests/cxx/unit_tests/atoms/sym_from_Z.cpp | 2 +- tests/cxx/unit_tests/bases/bases.cpp | 4 +- tests/cxx/unit_tests/density/density.cpp | 4 +- .../hydrocarbons/straight_chain_alkane.cpp | 2 +- tests/cxx/unit_tests/molecules/molecules.cpp | 2 +- tests/cxx/unit_tests/test_chemcache_mm.cpp | 53 +++++++++++++++++++ tests/python/unit_tests/test_atoms.py | 4 +- tests/python/unit_tests/test_bases.py | 4 +- tests/python/unit_tests/test_molecule.py | 4 +- tests/python/unit_tests/test_plugin.py | 28 ++++++++++ utils/data_management/generate_basis.py | 16 +++--- utils/data_management/generate_densities.py | 17 +++--- 23 files changed, 165 insertions(+), 87 deletions(-) create mode 100644 tests/cxx/unit_tests/test_chemcache_mm.cpp create mode 100644 tests/python/unit_tests/test_plugin.py diff --git a/cxx/include/chemcache/chemcache_mm.hpp b/cxx/include/chemcache/chemcache_mm.hpp index efc44fe4..43e1d14f 100644 --- a/cxx/include/chemcache/chemcache_mm.hpp +++ b/cxx/include/chemcache/chemcache_mm.hpp @@ -18,9 +18,13 @@ #include namespace chemcache { -/** @brief Loads the modules contained in the ChemCache module collection into - * the provided ModuleManager instance. +/** @brief The ChemCache plugin. + * + * Load it into a ModuleManager with `mm.load_plugin()` + * (`mm.load_plugin(chemcache.ChemCache())` from Python). The plugin's name is + * "chemcache". All of the plugin's default submodules are provided by the + * plugin itself, so it does not need other plugins to be loaded. */ -void load_modules(pluginplay::ModuleManager& mm); +DECLARE_PLUGIN(ChemCache); } // namespace chemcache diff --git a/cxx/src/chemcache/atoms/atoms.hpp b/cxx/src/chemcache/atoms/atoms.hpp index 687157e0..cadff4c8 100644 --- a/cxx/src/chemcache/atoms/atoms.hpp +++ b/cxx/src/chemcache/atoms/atoms.hpp @@ -27,18 +27,16 @@ DECLARE_MODULE(Z_from_sym); namespace atom_mods { -inline void set_defaults(pluginplay::ModuleManager& mm) { +inline void set_defaults(pluginplay::ModuleMap& modules) { // Default submodules within this subcollection will be set here } -inline void load_modules(pluginplay::ModuleManager& mm) { - // Modules will be added to the ModuleManager here - mm.add_module("Atom"); - mm.add_module("Atom Isotope"); - mm.add_module("Symbol from Z"); - mm.add_module("Z from Symbol"); - - set_defaults(mm); +inline void load_modules(pluginplay::ModuleMap& modules) { + // Modules will be added to the plugin here + modules.add_module("Atom"); + modules.add_module("Atom Isotope"); + modules.add_module("Symbol from Z"); + modules.add_module("Z from Symbol"); } } // namespace atom_mods diff --git a/cxx/src/chemcache/bases/bases.hpp b/cxx/src/chemcache/bases/bases.hpp index cc23e2a0..5867f2ae 100644 --- a/cxx/src/chemcache/bases/bases.hpp +++ b/cxx/src/chemcache/bases/bases.hpp @@ -32,17 +32,15 @@ DECLARE_MODULE(sto_dash_3g_atom_basis); namespace bases_mods { -inline void set_defaults(pluginplay::ModuleManager& mm) { +inline void set_defaults(pluginplay::ModuleMap& modules) { // Default submodules within this subcollection will be set here - mm.change_submod("sto-3g", "Atomic Basis", "sto-3g atomic basis"); + modules.change_submod("sto-3g", "Atomic Basis", "sto-3g atomic basis"); } -inline void load_modules(pluginplay::ModuleManager& mm) { - // Modules will be added to the ModuleManager here - mm.add_module("sto-3g"); - mm.add_module("sto-3g atomic basis"); - - set_defaults(mm); +inline void load_modules(pluginplay::ModuleMap& modules) { + // Modules will be added to the plugin here + modules.add_module("sto-3g"); + modules.add_module("sto-3g atomic basis"); } } // namespace bases_mods diff --git a/cxx/src/chemcache/chemcache_mm.cpp b/cxx/src/chemcache/chemcache_mm.cpp index 8947bff0..384b5a03 100644 --- a/cxx/src/chemcache/chemcache_mm.cpp +++ b/cxx/src/chemcache/chemcache_mm.cpp @@ -23,20 +23,23 @@ namespace chemcache { -inline void set_defaults(pluginplay::ModuleManager& mm) { - // Default submodules between collections can be set here - mm.change_submod("NWX Molecules", "Atoms", "Atom"); -} +PLUGIN_CTOR(ChemCache) { + set_name("chemcache"); -void load_modules(pluginplay::ModuleManager& mm) { - // Add subcollection load calls here - atom_mods::load_modules(mm); - bases_mods::load_modules(mm); - density_mods::load_modules(mm); - hydrocarbons::load_modules(mm); - molecule_mods::load_modules(mm); + // The defaults refer to modules from more than one subcollection, so all + // modules are added before any defaults are set + atom_mods::load_modules(modules()); + bases_mods::load_modules(modules()); + density_mods::load_modules(modules()); + hydrocarbons::load_modules(modules()); + molecule_mods::load_modules(modules()); - set_defaults(mm); + atom_mods::set_defaults(modules()); + bases_mods::set_defaults(modules()); + density_mods::set_defaults(modules()); + hydrocarbons::set_defaults(modules()); + molecule_mods::set_defaults(modules()); + change_submod("NWX Molecules", "Atoms", "Atom"); } } // namespace chemcache diff --git a/cxx/src/chemcache/density/density.hpp b/cxx/src/chemcache/density/density.hpp index a0eaad26..054e349f 100644 --- a/cxx/src/chemcache/density/density.hpp +++ b/cxx/src/chemcache/density/density.hpp @@ -32,21 +32,19 @@ DECLARE_MODULE(sto_dash_3g_atom_density_matrix); namespace density_mods { -inline void set_defaults(pluginplay::ModuleManager& mm) { +inline void set_defaults(pluginplay::ModuleMap& modules) { // Default submodules within this subcollection will be set here - mm.change_submod("sto-3g SAD density", "Atomic Basis", - "sto-3g atomic basis"); - mm.change_submod("sto-3g SAD density", "Atomic Density", - "sto-3g atomic density matrix"); + modules.change_submod("sto-3g SAD density", "Atomic Basis", + "sto-3g atomic basis"); + modules.change_submod("sto-3g SAD density", "Atomic Density", + "sto-3g atomic density matrix"); } -inline void load_modules(pluginplay::ModuleManager& mm) { - // Modules will be added to the ModuleManager here - mm.add_module("sto-3g SAD density"); - mm.add_module( +inline void load_modules(pluginplay::ModuleMap& modules) { + // Modules will be added to the plugin here + modules.add_module("sto-3g SAD density"); + modules.add_module( "sto-3g atomic density matrix"); - - set_defaults(mm); } } // namespace density_mods diff --git a/cxx/src/chemcache/export_chemcache.cpp b/cxx/src/chemcache/export_chemcache.cpp index 2b726472..d4fb31d0 100644 --- a/cxx/src/chemcache/export_chemcache.cpp +++ b/cxx/src/chemcache/export_chemcache.cpp @@ -20,6 +20,6 @@ namespace chemcache { -EXPORT_PLUGIN(chemcache, m) {} +EXPORT_PLUGIN(chemcache, ChemCache, m) {} } // namespace chemcache diff --git a/cxx/src/chemcache/hydrocarbons/hydrocarbons.hpp b/cxx/src/chemcache/hydrocarbons/hydrocarbons.hpp index 8202456d..cb59af27 100644 --- a/cxx/src/chemcache/hydrocarbons/hydrocarbons.hpp +++ b/cxx/src/chemcache/hydrocarbons/hydrocarbons.hpp @@ -21,13 +21,12 @@ namespace chemcache::hydrocarbons { DECLARE_MODULE(StraightChainAlkane); -inline void set_defaults(pluginplay::ModuleManager& mm) { +inline void set_defaults(pluginplay::ModuleMap& modules) { // Default submodules within this subcollection will be set here } -inline void load_modules(pluginplay::ModuleManager& mm) { - mm.add_module("Straight Chain Alkane"); - set_defaults(mm); +inline void load_modules(pluginplay::ModuleMap& modules) { + modules.add_module("Straight Chain Alkane"); } } // namespace chemcache::hydrocarbons diff --git a/cxx/src/chemcache/molecules/molecules.hpp b/cxx/src/chemcache/molecules/molecules.hpp index 8818a019..adc5149b 100644 --- a/cxx/src/chemcache/molecules/molecules.hpp +++ b/cxx/src/chemcache/molecules/molecules.hpp @@ -24,15 +24,13 @@ DECLARE_MODULE(default_molecules); namespace molecule_mods { -inline void set_defaults(pluginplay::ModuleManager& mm) { +inline void set_defaults(pluginplay::ModuleMap& modules) { // Default submodules within this subcollection will be set here } -inline void load_modules(pluginplay::ModuleManager& mm) { - // Modules will be added to the ModuleManager here - mm.add_module("NWX Molecules"); - - set_defaults(mm); +inline void load_modules(pluginplay::ModuleMap& modules) { + // Modules will be added to the plugin here + modules.add_module("NWX Molecules"); } } // namespace molecule_mods diff --git a/tests/cxx/unit_tests/atoms/Z_from_sym.cpp b/tests/cxx/unit_tests/atoms/Z_from_sym.cpp index 222ad101..e14bf106 100644 --- a/tests/cxx/unit_tests/atoms/Z_from_sym.cpp +++ b/tests/cxx/unit_tests/atoms/Z_from_sym.cpp @@ -24,7 +24,7 @@ using Catch::Matchers::Message; TEST_CASE("Z from Symbol") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& z_mod = mm.at("Z From Symbol"); SECTION("sto-3g Hydrogen") { diff --git a/tests/cxx/unit_tests/atoms/atoms_average.cpp b/tests/cxx/unit_tests/atoms/atoms_average.cpp index fc3f8807..a858823b 100644 --- a/tests/cxx/unit_tests/atoms/atoms_average.cpp +++ b/tests/cxx/unit_tests/atoms/atoms_average.cpp @@ -27,7 +27,7 @@ using Catch::Matchers::Message; TEST_CASE("Atom") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& atom_mod = mm.at("Atom"); atomic_number_t Z; diff --git a/tests/cxx/unit_tests/atoms/atoms_isotope.cpp b/tests/cxx/unit_tests/atoms/atoms_isotope.cpp index 40b34c5b..29a1c503 100644 --- a/tests/cxx/unit_tests/atoms/atoms_isotope.cpp +++ b/tests/cxx/unit_tests/atoms/atoms_isotope.cpp @@ -28,7 +28,7 @@ using Catch::Matchers::Message; TEST_CASE("Atom Isotope") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& atom_mod = mm.at("Atom Isotope"); SECTION("Hydrogen-2") { diff --git a/tests/cxx/unit_tests/atoms/sym_from_Z.cpp b/tests/cxx/unit_tests/atoms/sym_from_Z.cpp index a448d091..ef2545fd 100644 --- a/tests/cxx/unit_tests/atoms/sym_from_Z.cpp +++ b/tests/cxx/unit_tests/atoms/sym_from_Z.cpp @@ -25,7 +25,7 @@ using Catch::Matchers::Message; TEST_CASE("Symbol from Z") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& sym_mod = mm.at("Symbol from Z"); atomic_number_t Z; diff --git a/tests/cxx/unit_tests/bases/bases.cpp b/tests/cxx/unit_tests/bases/bases.cpp index aaf55d04..65edc384 100644 --- a/tests/cxx/unit_tests/bases/bases.cpp +++ b/tests/cxx/unit_tests/bases/bases.cpp @@ -33,7 +33,7 @@ using Catch::Matchers::Message; TEST_CASE("Atomic Basis Set") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& atom_bs_mod = mm.at("sto-3g atomic basis"); SECTION("sto-3g Hydrogen") { @@ -79,7 +79,7 @@ TEST_CASE("Atomic Basis Set") { TEST_CASE("Molecular Basis Set") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& mol_bs_mod = mm.at("sto-3g"); atom_t h1{"H", 1, 0.0, 1.0, 1.0, 1.0}; diff --git a/tests/cxx/unit_tests/density/density.cpp b/tests/cxx/unit_tests/density/density.cpp index f4c56879..430d2bbd 100644 --- a/tests/cxx/unit_tests/density/density.cpp +++ b/tests/cxx/unit_tests/density/density.cpp @@ -37,7 +37,7 @@ using Catch::Matchers::Message; TEST_CASE("sto-3g atomic density matrix") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& atom_dm_mod = mm.at("sto-3g atomic density matrix"); auto rt = mm.get_runtime(); @@ -71,7 +71,7 @@ TEST_CASE("sto-3g atomic density matrix") { TEST_CASE("SAD Density") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& sad_mod = mm.at("sto-3g SAD density"); auto rt = mm.get_runtime(); diff --git a/tests/cxx/unit_tests/hydrocarbons/straight_chain_alkane.cpp b/tests/cxx/unit_tests/hydrocarbons/straight_chain_alkane.cpp index 755f9f25..b9db02c8 100644 --- a/tests/cxx/unit_tests/hydrocarbons/straight_chain_alkane.cpp +++ b/tests/cxx/unit_tests/hydrocarbons/straight_chain_alkane.cpp @@ -144,7 +144,7 @@ using pt = simde::MoleculeFromString; TEST_CASE("StraightChainAlkane") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& mod = mm.at("Straight Chain Alkane"); auto methane = mod.run_as(std::string("1")); diff --git a/tests/cxx/unit_tests/molecules/molecules.cpp b/tests/cxx/unit_tests/molecules/molecules.cpp index 4d6fd823..b21f28b3 100644 --- a/tests/cxx/unit_tests/molecules/molecules.cpp +++ b/tests/cxx/unit_tests/molecules/molecules.cpp @@ -29,7 +29,7 @@ using Catch::Matchers::Message; TEST_CASE("NWX Molecules") { pluginplay::ModuleManager mm; - chemcache::load_modules(mm); + mm.load_plugin(); auto& mol_mod = mm.at("NWX Molecules"); SECTION("Water") { diff --git a/tests/cxx/unit_tests/test_chemcache_mm.cpp b/tests/cxx/unit_tests/test_chemcache_mm.cpp new file mode 100644 index 00000000..ced6bcef --- /dev/null +++ b/tests/cxx/unit_tests/test_chemcache_mm.cpp @@ -0,0 +1,53 @@ +/* + * Copyright 2026 NWChemEx-Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "catch.hpp" +#include "chemcache/chemcache.hpp" + +TEST_CASE("ChemCache plugin") { + chemcache::ChemCache plugin; + const auto& modules = plugin.get_modules(); + + SECTION("Identity") { + REQUIRE(plugin.name() == "chemcache"); + // Every default comes from the plugin itself + REQUIRE(plugin.preferred_providers().empty()); + } + + SECTION("Modules from each subcollection") { + REQUIRE(modules.count("Atom")); + REQUIRE(modules.count("sto-3g")); + REQUIRE(modules.count("sto-3g SAD density")); + REQUIRE(modules.count("Straight Chain Alkane")); + REQUIRE(modules.count("NWX Molecules")); + } + + SECTION("Defaults set within and across subcollections") { + REQUIRE(modules.has_submod("sto-3g", "Atomic Basis")); + REQUIRE(modules.has_submod("sto-3g SAD density", "Atomic Basis")); + REQUIRE(modules.has_submod("sto-3g SAD density", "Atomic Density")); + REQUIRE(modules.has_submod("NWX Molecules", "Atoms")); + } + + SECTION("Can be loaded into a ModuleManager") { + pluginplay::ModuleManager mm; + mm.load_plugin(); + REQUIRE(mm.has_plugin("chemcache")); + REQUIRE(mm.size() == modules.size()); + REQUIRE(mm.at("NWX Molecules").submods().at("Atoms").value() == + mm.at("Atom")); + } +} diff --git a/tests/python/unit_tests/test_atoms.py b/tests/python/unit_tests/test_atoms.py index 2527d47e..7ca30200 100644 --- a/tests/python/unit_tests/test_atoms.py +++ b/tests/python/unit_tests/test_atoms.py @@ -16,7 +16,7 @@ import unittest -from chemcache import load_modules +from chemcache import ChemCache from chemist import Atom from pluginplay import ModuleManager from simde import AtomFromZ, SymbolFromZ, ZFromSymbol @@ -55,4 +55,4 @@ def test_Z_from_sym(self): def setUp(self): self.mm = ModuleManager() - load_modules(self.mm) + self.mm.load_plugin(ChemCache()) diff --git a/tests/python/unit_tests/test_bases.py b/tests/python/unit_tests/test_bases.py index df9a23e6..335da4af 100644 --- a/tests/python/unit_tests/test_bases.py +++ b/tests/python/unit_tests/test_bases.py @@ -16,7 +16,7 @@ import unittest -from chemcache import load_modules +from chemcache import ChemCache from chemist import Atom, Molecule, PointD, ShellType from chemist.basis_set import AOBasisSetD, AtomicBasisSetD, ShellD from pluginplay import ModuleManager @@ -57,4 +57,4 @@ def _h(self, r): def setUp(self): self.mm = ModuleManager() - load_modules(self.mm) + self.mm.load_plugin(ChemCache()) diff --git a/tests/python/unit_tests/test_molecule.py b/tests/python/unit_tests/test_molecule.py index 033ff028..9a4aa8d1 100644 --- a/tests/python/unit_tests/test_molecule.py +++ b/tests/python/unit_tests/test_molecule.py @@ -16,7 +16,7 @@ import unittest -from chemcache import load_modules +from chemcache import ChemCache from chemist import Atom, Molecule from pluginplay import ModuleManager from simde import MoleculeFromString @@ -45,4 +45,4 @@ def test_nwx_molecules(self): def setUp(self): self.mm = ModuleManager() - load_modules(self.mm) + self.mm.load_plugin(ChemCache()) diff --git a/tests/python/unit_tests/test_plugin.py b/tests/python/unit_tests/test_plugin.py new file mode 100644 index 00000000..a32fb8f6 --- /dev/null +++ b/tests/python/unit_tests/test_plugin.py @@ -0,0 +1,28 @@ +# +# Copyright 2026 NWChemEx-Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import unittest + +import chemcache +import pluginplay as pp + + +class TestChemCachePlugin(unittest.TestCase): + def test_load_plugin(self): + mm = pp.ModuleManager() + mm.load_plugin(chemcache.ChemCache()) + self.assertTrue(mm.has_plugin("chemcache")) + self.assertTrue(mm.count("NWX Molecules")) + self.assertEqual(mm.get_plugin("chemcache").preferred_providers(), []) diff --git a/utils/data_management/generate_basis.py b/utils/data_management/generate_basis.py index 209cb1eb..62036326 100644 --- a/utils/data_management/generate_basis.py +++ b/utils/data_management/generate_basis.py @@ -306,17 +306,15 @@ def _write_bases(src_dir: str, bases: dict, tab=" ") -> None: namespace bases_mods {{ -inline void set_defaults(pluginplay::ModuleManager& mm) {{ +inline void set_defaults(pluginplay::ModuleMap& modules) {{ // Default submodules within this subcollection will be set here {s} }} -inline void load_modules(pluginplay::ModuleManager& mm) {{ - // Modules will be added to the ModuleManager here +inline void load_modules(pluginplay::ModuleMap& modules) {{ + // Modules will be added to the plugin here {m} {b} - - set_defaults(mm); }} }} // namespace bases_mods @@ -325,9 +323,11 @@ def _write_bases(src_dir: str, bases: dict, tab=" ") -> None: """ d_template = "DECLARE_MODULE({}_atom_basis);" - s_template = 'mm.change_submod("{}", "Atomic Basis", "{} atomic basis");' - m_template = 'mm.add_module("{}");' - a_template = 'mm.add_module<{}_atom_basis>("{} atomic basis");' + s_template = ( + 'modules.change_submod("{}", "Atomic Basis", "{} atomic basis");' + ) + m_template = 'modules.add_module("{}");' + a_template = 'modules.add_module<{}_atom_basis>("{} atomic basis");' ntab = "\n" + tab diff --git a/utils/data_management/generate_densities.py b/utils/data_management/generate_densities.py index dd383310..daa7e6c9 100644 --- a/utils/data_management/generate_densities.py +++ b/utils/data_management/generate_densities.py @@ -184,18 +184,16 @@ def _write_densities(src_dir: str, bases: dict, tab=" ") -> None: namespace density_mods {{ -inline void set_defaults(pluginplay::ModuleManager& mm) {{ +inline void set_defaults(pluginplay::ModuleMap& modules) {{ // Default submodules within this subcollection will be set here {ao_submodules} {dm_submodules} }} -inline void load_modules(pluginplay::ModuleManager& mm) {{ - // Modules will be added to the ModuleManager here +inline void load_modules(pluginplay::ModuleMap& modules) {{ + // Modules will be added to the plugin here {guess_modules} {density_modules} - - set_defaults(mm); }} }} // namespace density_mods @@ -205,16 +203,17 @@ def _write_densities(src_dir: str, bases: dict, tab=" ") -> None: declaration_template = "DECLARE_MODULE({}_atom_density_matrix);" ao_submod_template = ( - 'mm.change_submod("{} SAD density", "Atomic Basis", ' + 'modules.change_submod("{} SAD density", "Atomic Basis", ' '"{} atomic basis");' ) dm_submod_template = ( - 'mm.change_submod("{} SAD density", ' + 'modules.change_submod("{} SAD density", ' '"Atomic Density", "{} atomic density matrix");' ) - guess_mod_template = 'mm.add_module("{} SAD density");' + guess_mod_template = 'modules.add_module("{} SAD density");' den_mod_template = ( - 'mm.add_module<{}_atom_density_matrix>("{} atomic density matrix");' + "modules.add_module<{}_atom_density_matrix>(" + '"{} atomic density matrix");' ) ntab = "\n" + tab From 8df33b2d16b6a6228882c0917ed2206c61f888ee Mon Sep 17 00:00:00 2001 From: "Ryan M. Richard" Date: Thu, 15 Oct 2026 13:00:41 -0500 Subject: [PATCH 2/2] bump simde floor --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 6971e498..a0298670 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,7 +22,7 @@ requires = [ # [project].dependencies; leave the floors unbounded so the newest # release is always resolved. "nwchemex-nwxcmake>=0.1.0", - "nwchemex-simde>=0.0.77", + "nwchemex-simde>=0.0.85", ] build-backend = "scikit_build_core.build" @@ -38,7 +38,7 @@ dependencies = [ # registries and breaks cross-module type exchange. "pybind11==3.1.0", "nwchemex-nwxcmake>=0.1.0", - "nwchemex-simde>=0.0.77", + "nwchemex-simde>=0.0.85", ] [project.optional-dependencies]