rgpot 2.2.1__tar.gz → 2.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {rgpot-2.2.1 → rgpot-2.3.0}/PKG-INFO +5 -3
- rgpot-2.3.0/docs/newsfragments/+pip-nanobind-abi3-multi-torch.added.md +4 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/pixi.toml +1 -1
- {rgpot-2.2.1 → rgpot-2.3.0}/pyproject.toml +6 -4
- {rgpot-2.2.1 → rgpot-2.3.0}/python/bind/bind_module.cpp +61 -67
- rgpot-2.3.0/python/meson.build +154 -0
- rgpot-2.3.0/python/rgpot/__init__.py +107 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/rgpot_build_wheel.sh +8 -4
- rgpot-2.3.0/scripts/rgpot_pack_multi_abi_engines.sh +147 -0
- rgpot-2.3.0/scripts/rgpot_repair_wheel.sh +80 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/test_rgpot_metatomic_dlopen.py +17 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/test_rgpot_pip_core.py +15 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/towncrier.toml +1 -1
- rgpot-2.2.1/python/meson.build +0 -75
- rgpot-2.2.1/python/rgpot/__init__.py +0 -65
- rgpot-2.2.1/scripts/rgpot_repair_wheel.sh +0 -72
- {rgpot-2.2.1 → rgpot-2.3.0}/.gitattributes +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/CODEOWNERS +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/actions/ensure-potctl/action.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/actions/restore-ci-tools/action.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/actions/setup-ci-tools/action.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/dependabot.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/workflows/ci-orchestrator.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/workflows/ci_doc_commenter.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/workflows/ci_docs.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/workflows/cosmo-potctl.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/workflows/coverage.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/workflows/release-prepare.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.github/workflows/release.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.gitignore +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.lychee.toml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/.snapper.toml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CHANGELOG.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CMakeLists.txt +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CODEOWNERS +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CODE_OF_CONDUCT.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/Cargo.lock +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/Cargo.toml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/.clang-format +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/examples/call_cuh2.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/examples/eigen_call_cuh2.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/examples/eigen_call_ljpot.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/examples/xt_call_cuh2.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CPMDPot/CPMDPot.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CPMDPot/CPMDPot.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CPMDPot/README.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CPMDPot/cpmd_c_abi.h +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CPMDPot/cpmd_c_abi_stub.c +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CPMDPot/cpmd_feature_table.inc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CPMDPot/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CuH2/CuH2Pot.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CuH2/CuH2Pot.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CuH2/cuh2Utils.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CuH2/cuh2Utils.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CuH2/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CuH2/tmp.con +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/CuH2/tmp_tiny.con +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/ForceStructs.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/LennardJones/LJPot.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/LennardJones/LJPot.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/LennardJones/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/MetatomicConfig.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/MetatomicDlopen.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/MetatomicDlopen.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/MetatomicEngineAbi.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/MetatomicPot.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/MetatomicPot.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/metatomic_c_abi.h +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/MetatomicPot/vesin_compat.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/NWChemPot/DynLib.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/NWChemPot/NWChemPot.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/NWChemPot/NWChemPot.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/NWChemPot/README.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/NWChemPot/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/NWChemPot/nwchem_c_abi.h +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/NWChemPot/nwchem_c_abi_stub.c +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/PotHelpers.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/PotHelpers.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/Potential.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/PotentialCache.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/PotentialCache.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/TBLitePot/TBLitePot.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/TBLitePot/TBLitePot.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/TBLitePot/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/XTBPot/XTBPot.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/XTBPot/XTBPot.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/XTBPot/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/abi/ProfileLoader.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/base_types.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/pot_types.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/Potentials.capnp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/ase_calculator.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/ase_helpers.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/capnp_compile.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/pot_bridge.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/pot_bridge.h +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/py_comp_multiprocess.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/py_mpi_comp.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/py_parclient.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/pyclient.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/rpc/server.cpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/types/AtomMatrix.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/types/adapters/capnp/capnp_adapter.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/types/adapters/eigen.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/types/adapters/xtensor.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/units.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/rgpot/units.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/BridgeStressTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/CPMDPotMessageAbiTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/CacheTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/CapnpAdapterTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/CuH2PotTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/InvarianceTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/MetatomicPotTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/NWChemPotMessageAbiTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/NWChemPotTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/ProfileLoaderTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/TBLitePotTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/UnitsTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/XTBPotTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/cpmdc_fake_engine.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/cuh2UtilsTest.cc +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/data/lj38/lennard-jones.pt +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/nwchemc_fake_engine.c +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/test_cpmd_abi_main.c +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/test_cpmd_dlopen_contract.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/test_nwchem_abi_main.c +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/test_nwchem_dlopen_contract.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/CppCore/tests/test_rpc_schema_sync.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/LICENSE +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/README.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/SECURITY.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/branding/logo/rgpot_logo.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/branding/logo/rgpot_logo_dark.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/branding/logo/rgpot_logo_light.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/branding/logo/rgpot_notext.svg +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/branding/logo/rgpot_notext_dark.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/branding/logo/rgpot_notext_light.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/README.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/build.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/check-drift.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/ci_doc_commenter.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/ci_docs.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/cosmo_potctl.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/docs_quality.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/export-plan.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/format.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/gen.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/lib/pins.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/lib/steps.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/plan.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/potentials.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/prek.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/release.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/release_prepare.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/towncrier.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/ci/gha/workflow.ncl +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/codecov.yml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/cog.toml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/export.el +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/newsfragments/+metatomic-engine-dlopen.added.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/newsfragments/+metatomic-strict-determinism.added.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/newsfragments/+pip-metatomic-dlopen.added.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/newsfragments/+pip-rgpot-wheel.added.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/newsfragments/+pip-rpath-repair-hook.added.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/newsfragments/.gitkeep +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/newsfragments/47.added.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/newsfragments/README.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/_static/eon_min_landscape.png +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/_static/pes_double_well.png +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/changelog.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/code_of_conduct.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/contributing/developer/faq.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/contributing/developer/index.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/contributing/developer/release.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/contributing/developer/testing.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/contributing/index.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/howto/eindir-anneal.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/howto/embedding.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/howto/eon-rgpot.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/howto/integration.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/index.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/reference/architecture.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/tutorials/molecular-global-optimization.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/orgmode/tutorials/quickstart.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/Doxyfile_base.cfg +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/Doxyfile_potlib.cfg +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/_static/custom.css +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/_static/rgpot_logo_dark.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/_static/rgpot_logo_light.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/_static/rgpot_notext_dark.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/_static/rgpot_notext_light.webp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/_templates/partials/extra-head.html +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/_templates/partials/site-foot.html +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/conf.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/source/doxyrest-config.lua +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/docs/style_guide.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/include/rgpot/errors.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/include/rgpot/potential.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/include/rgpot/rgpot.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/include/rgpot/rpc_client.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/include/rgpot/types.hpp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/meson_options.txt +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/pixi.lock +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/Cargo.toml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/README.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/cosmo/README.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/cosmo/aarch64-unknown-linux-cosmo.json +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/cosmo/x86_64-unknown-linux-cosmo.json +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/src/ci.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/src/cosmo.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/src/cosmo_ld.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/src/lockstep.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/potctl/src/main.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/prek.toml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/readme_src.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/Cargo.lock +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/Cargo.toml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/README.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/README.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/build.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/cbindgen.toml +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/include/rgpot.h +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/schema/Potentials.capnp +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/c_api/mod.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/c_api/potential.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/c_api/rpc.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/c_api/types.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/eindir.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/lib.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/potential.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/rpc/client.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/rpc/mod.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/rpc/server.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/status.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/tensor.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/rgpot-core/src/types.rs +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/ase_anneal_compare.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/check_codecov_config.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/cpmd_inprocess_vs_subprocess_timing.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/org_to_md.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/patches/doxyrest/doxyrest.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/patches/doxyrest/enum_class_fix.patch +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/patches/doxyrest/readme.org +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/pes_double_well.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/run_coverage_cpp.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/run_coverage_fortran.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/run_coverage_python.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/scripts/run_coverage_rust.sh +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/eigen.wrap +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fmt.wrap +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/.gitignore +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/LICENSE +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/eam_dat.f90 +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/eam_isoc.f90 +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/eamroutines.f90 +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/main.f90 +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/readme.md +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2/tmp.con +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/fortcuh2.wrap +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/packagefiles/fortcuh2/meson.build +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/potentials-schema.wrap +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/subprojects/xxhash.wrap +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/ase_vs_anneal.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/con_relax_demo.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/cpmd_params.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/eon_min_landscape.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/nwchem_params.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/pes_double_well.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/rpc_integ.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/test_cpmd_params.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/test_nwchem_params.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/test_rpc_e2e_c_abi.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/test_rpc_integ_cpmd.py +0 -0
- {rgpot-2.2.1 → rgpot-2.3.0}/tests/test_rpc_integ_nwchem.py +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: rgpot
|
|
3
|
-
Version: 2.
|
|
4
|
-
Summary: Potential energy surfaces for atomistic simulation (LJ + Metatomic dlopen
|
|
5
|
-
Keywords: potential,Lennard-Jones,metatomic,rgpot,potlib,dlopen
|
|
3
|
+
Version: 2.3.0
|
|
4
|
+
Summary: Potential energy surfaces for atomistic simulation (LJ + Metatomic multi-ABI dlopen; nanobind abi3)
|
|
5
|
+
Keywords: potential,Lennard-Jones,metatomic,rgpot,potlib,dlopen,nanobind,abi3
|
|
6
6
|
Author-Email: Rohit Goswami <rgoswami@ieee.org>
|
|
7
7
|
License: MIT
|
|
8
8
|
Classifier: Development Status :: 4 - Beta
|
|
@@ -10,6 +10,8 @@ Classifier: Intended Audience :: Science/Research
|
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Programming Language :: C++
|
|
12
12
|
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
13
15
|
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
14
16
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
15
17
|
Project-URL: Homepage, https://github.com/OmniPotentRPC/rgpot
|
|
@@ -4,7 +4,7 @@ channels = ["conda-forge"]
|
|
|
4
4
|
description = "RPC based core for potential energy surface functionality."
|
|
5
5
|
name = "rgpot"
|
|
6
6
|
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
|
|
7
|
-
version = "2.
|
|
7
|
+
version = "2.3.0"
|
|
8
8
|
|
|
9
9
|
[feature.cigen.tasks]
|
|
10
10
|
# Export every ci/gha/*.ncl workflow (shared pins/steps in ci/gha/lib/).
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "rgpot"
|
|
3
|
-
version = "2.
|
|
4
|
-
description = "Potential energy surfaces for atomistic simulation (LJ + Metatomic dlopen
|
|
3
|
+
version = "2.3.0"
|
|
4
|
+
description = "Potential energy surfaces for atomistic simulation (LJ + Metatomic multi-ABI dlopen; nanobind abi3)"
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
license = { text = "MIT" }
|
|
7
7
|
authors = [
|
|
@@ -17,10 +17,12 @@ classifiers = [
|
|
|
17
17
|
"License :: OSI Approved :: MIT License",
|
|
18
18
|
"Programming Language :: C++",
|
|
19
19
|
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
20
22
|
"Topic :: Scientific/Engineering :: Chemistry",
|
|
21
23
|
"Topic :: Scientific/Engineering :: Physics",
|
|
22
24
|
]
|
|
23
|
-
keywords = ["potential", "Lennard-Jones", "metatomic", "rgpot", "potlib", "dlopen"]
|
|
25
|
+
keywords = ["potential", "Lennard-Jones", "metatomic", "rgpot", "potlib", "dlopen", "nanobind", "abi3"]
|
|
24
26
|
|
|
25
27
|
[project.urls]
|
|
26
28
|
Homepage = "https://github.com/OmniPotentRPC/rgpot"
|
|
@@ -46,7 +48,7 @@ requires = [
|
|
|
46
48
|
"meson-python>=0.16",
|
|
47
49
|
"meson>=1.3",
|
|
48
50
|
"ninja",
|
|
49
|
-
"
|
|
51
|
+
"nanobind>=2.2",
|
|
50
52
|
"numpy>=1.24",
|
|
51
53
|
# Build-time for libmetatomic_engine.so (same purelib layout at runtime)
|
|
52
54
|
"torch>=2.3",
|
|
@@ -1,79 +1,78 @@
|
|
|
1
1
|
// MIT License
|
|
2
2
|
// Copyright 2023--present rgpot developers
|
|
3
3
|
//
|
|
4
|
-
// Python surface:
|
|
4
|
+
// Python surface: nanobind (stable ABI / abi3 when Python >= 3.12).
|
|
5
|
+
// LJ + MetatomicDlopen frontend (engine .so optional via C ABI).
|
|
5
6
|
|
|
6
7
|
#include <array>
|
|
8
|
+
#include <cstdint>
|
|
9
|
+
#include <cstring>
|
|
7
10
|
#include <stdexcept>
|
|
8
11
|
#include <string>
|
|
9
12
|
#include <tuple>
|
|
10
13
|
#include <vector>
|
|
11
14
|
|
|
12
|
-
#include <
|
|
13
|
-
#include <
|
|
14
|
-
#include <
|
|
15
|
+
#include <nanobind/nanobind.h>
|
|
16
|
+
#include <nanobind/ndarray.h>
|
|
17
|
+
#include <nanobind/stl/string.h>
|
|
18
|
+
#include <nanobind/stl/tuple.h>
|
|
15
19
|
|
|
16
20
|
#include "rgpot/LennardJones/LJPot.hpp"
|
|
17
21
|
#include "rgpot/MetatomicPot/MetatomicConfig.hpp"
|
|
18
22
|
#include "rgpot/MetatomicPot/MetatomicDlopen.hpp"
|
|
19
23
|
#include "rgpot/types/AtomMatrix.hpp"
|
|
20
24
|
|
|
21
|
-
namespace
|
|
25
|
+
namespace nb = nanobind;
|
|
22
26
|
using rgpot::types::AtomMatrix;
|
|
23
27
|
|
|
28
|
+
using NpF64 = nb::ndarray<nb::numpy, double, nb::c_contig, nb::device::cpu>;
|
|
29
|
+
using NpI32 = nb::ndarray<nb::numpy, int32_t, nb::c_contig, nb::device::cpu>;
|
|
30
|
+
|
|
24
31
|
namespace {
|
|
25
32
|
|
|
26
|
-
AtomMatrix numpy_to_atom_matrix(const
|
|
27
|
-
|
|
28
|
-
if (buf.shape(1) != 3) {
|
|
33
|
+
AtomMatrix numpy_to_atom_matrix(const NpF64 &arr) {
|
|
34
|
+
if (arr.ndim() != 2 || arr.shape(1) != 3) {
|
|
29
35
|
throw std::invalid_argument("positions must have shape (n_atoms, 3)");
|
|
30
36
|
}
|
|
31
|
-
const auto n = static_cast<size_t>(
|
|
37
|
+
const auto n = static_cast<size_t>(arr.shape(0));
|
|
32
38
|
AtomMatrix mat(n, 3);
|
|
33
|
-
|
|
34
|
-
for (size_t j = 0; j < 3; ++j) {
|
|
35
|
-
mat(i, j) = buf(i, j);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
39
|
+
std::memcpy(mat.data(), arr.data(), n * 3 * sizeof(double));
|
|
38
40
|
return mat;
|
|
39
41
|
}
|
|
40
42
|
|
|
41
|
-
std::vector<int> numpy_to_types(const
|
|
42
|
-
|
|
43
|
-
if (static_cast<size_t>(buf.shape(0)) != n_atoms) {
|
|
43
|
+
std::vector<int> numpy_to_types(const NpI32 &arr, size_t n_atoms) {
|
|
44
|
+
if (arr.ndim() != 1 || static_cast<size_t>(arr.shape(0)) != n_atoms) {
|
|
44
45
|
throw std::invalid_argument("atom_types length must match n_atoms");
|
|
45
46
|
}
|
|
46
47
|
std::vector<int> types(n_atoms);
|
|
47
48
|
for (size_t i = 0; i < n_atoms; ++i) {
|
|
48
|
-
types[i] =
|
|
49
|
+
types[i] = static_cast<int>(arr.data()[i]);
|
|
49
50
|
}
|
|
50
51
|
return types;
|
|
51
52
|
}
|
|
52
53
|
|
|
53
|
-
std::array<std::array<double, 3>, 3>
|
|
54
|
-
|
|
55
|
-
auto buf = arr.unchecked<2>();
|
|
56
|
-
if (buf.shape(0) != 3 || buf.shape(1) != 3) {
|
|
54
|
+
std::array<std::array<double, 3>, 3> numpy_to_box(const NpF64 &arr) {
|
|
55
|
+
if (arr.ndim() != 2 || arr.shape(0) != 3 || arr.shape(1) != 3) {
|
|
57
56
|
throw std::invalid_argument("box must have shape (3, 3)");
|
|
58
57
|
}
|
|
59
58
|
std::array<std::array<double, 3>, 3> box{};
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
59
|
+
const double *p = arr.data();
|
|
60
|
+
for (size_t i = 0; i < 3; ++i)
|
|
61
|
+
for (size_t j = 0; j < 3; ++j)
|
|
62
|
+
box[i][j] = p[i * 3 + j];
|
|
65
63
|
return box;
|
|
66
64
|
}
|
|
67
65
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
66
|
+
nb::ndarray<nb::numpy, double, nb::c_contig>
|
|
67
|
+
atom_matrix_to_numpy(const AtomMatrix &mat) {
|
|
68
|
+
const size_t rows = mat.rows();
|
|
69
|
+
const size_t cols = mat.cols();
|
|
70
|
+
double *buf = new double[rows * cols];
|
|
71
|
+
std::memcpy(buf, mat.data(), rows * cols * sizeof(double));
|
|
72
|
+
nb::capsule owner(buf, [](void *p) noexcept {
|
|
73
|
+
delete[] static_cast<double *>(p);
|
|
74
|
+
});
|
|
75
|
+
return nb::ndarray<nb::numpy, double, nb::c_contig>(buf, {rows, cols}, owner);
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
void flat_box(const std::array<std::array<double, 3>, 3> &box, double out[9]) {
|
|
@@ -82,9 +81,8 @@ void flat_box(const std::array<std::array<double, 3>, 3> &box, double out[9]) {
|
|
|
82
81
|
out[i * 3 + j] = box[i][j];
|
|
83
82
|
}
|
|
84
83
|
|
|
85
|
-
|
|
86
|
-
const
|
|
87
|
-
const py::array_t<double> &box) {
|
|
84
|
+
nb::tuple evaluate_lj(const NpF64 &positions, const NpI32 &atom_types,
|
|
85
|
+
const NpF64 &box) {
|
|
88
86
|
if (positions.ndim() != 2 || atom_types.ndim() != 1 || box.ndim() != 2) {
|
|
89
87
|
throw std::invalid_argument(
|
|
90
88
|
"evaluate_lj expects positions (n,3), atom_types (n,), box (3,3)");
|
|
@@ -94,12 +92,11 @@ py::tuple evaluate_lj(const py::array_t<double> &positions,
|
|
|
94
92
|
auto cell = numpy_to_box(box);
|
|
95
93
|
rgpot::LJPot pot;
|
|
96
94
|
auto [energy, forces, variance] = pot(pos, types, cell);
|
|
97
|
-
return
|
|
95
|
+
return nb::make_tuple(energy, atom_matrix_to_numpy(forces), variance);
|
|
98
96
|
}
|
|
99
97
|
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
const py::array_t<double> &box,
|
|
98
|
+
nb::tuple evaluate_metatomic_dlopen(const NpF64 &positions,
|
|
99
|
+
const NpI32 &atom_types, const NpF64 &box,
|
|
103
100
|
const std::string &model_path,
|
|
104
101
|
const std::string &engine_path,
|
|
105
102
|
const std::string &device) {
|
|
@@ -132,44 +129,41 @@ py::tuple evaluate_metatomic_dlopen(const py::array_t<double> &positions,
|
|
|
132
129
|
rgpot::ForceInput in{n, pos.data(), types.data(), flat};
|
|
133
130
|
rgpot::ForceOut out{forces.data(), 0.0, 0.0};
|
|
134
131
|
front.forceImpl(in, &out);
|
|
135
|
-
return
|
|
132
|
+
return nb::make_tuple(out.energy, atom_matrix_to_numpy(forces), out.variance);
|
|
136
133
|
}
|
|
137
134
|
|
|
138
135
|
} // namespace
|
|
139
136
|
|
|
140
|
-
|
|
141
|
-
m.doc() =
|
|
142
|
-
|
|
137
|
+
NB_MODULE(_core, m) {
|
|
138
|
+
m.doc() =
|
|
139
|
+
"rgpot Python bindings (nanobind): LJ core + Metatomic dlopen frontend. "
|
|
140
|
+
"Stable ABI (abi3) when built with Python >= 3.12.";
|
|
141
|
+
m.attr("__version__") = "2.3.0";
|
|
143
142
|
m.attr("has_metatomic_dlopen") = true;
|
|
144
143
|
|
|
145
|
-
m.def("evaluate_lj", &evaluate_lj,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
m.def(
|
|
149
|
-
"evaluate_metatomic_dlopen", &evaluate_metatomic_dlopen,
|
|
150
|
-
py::arg("positions"), py::arg("atom_types"), py::arg("box"),
|
|
151
|
-
py::arg("model_path"), py::arg("engine_path") = "",
|
|
152
|
-
py::arg("device") = "cpu",
|
|
153
|
-
R"pbdoc(
|
|
154
|
-
Evaluate forces via MetatomicDlopen (dlopen libmetatomic_engine.so).
|
|
144
|
+
m.def("evaluate_lj", &evaluate_lj, nb::arg("positions"),
|
|
145
|
+
nb::arg("atom_types"), nb::arg("box"));
|
|
155
146
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
)
|
|
147
|
+
m.def("evaluate_metatomic_dlopen", &evaluate_metatomic_dlopen,
|
|
148
|
+
nb::arg("positions"), nb::arg("atom_types"), nb::arg("box"),
|
|
149
|
+
nb::arg("model_path"), nb::arg("engine_path") = "",
|
|
150
|
+
nb::arg("device") = "cpu",
|
|
151
|
+
"Evaluate forces via MetatomicDlopen (dlopen libmetatomic_engine.so). "
|
|
152
|
+
"engine_path may be empty to use RGPOT_METATOMIC_ENGINE / "
|
|
153
|
+
"package-bundled multi-ABI engine under rgpot/lib/torch-X.Y/.");
|
|
159
154
|
|
|
160
|
-
|
|
161
|
-
.def(
|
|
155
|
+
nb::class_<rgpot::LJPot>(m, "LJPot")
|
|
156
|
+
.def(nb::init<>())
|
|
162
157
|
.def(
|
|
163
158
|
"__call__",
|
|
164
|
-
[](rgpot::LJPot &self, const
|
|
165
|
-
const
|
|
166
|
-
const py::array_t<double> &box) {
|
|
159
|
+
[](rgpot::LJPot &self, const NpF64 &positions,
|
|
160
|
+
const NpI32 &atom_types, const NpF64 &box) {
|
|
167
161
|
auto pos = numpy_to_atom_matrix(positions);
|
|
168
162
|
auto types = numpy_to_types(atom_types, pos.rows());
|
|
169
163
|
auto cell = numpy_to_box(box);
|
|
170
164
|
auto [energy, forces, variance] = self(pos, types, cell);
|
|
171
|
-
return
|
|
165
|
+
return nb::make_tuple(energy, atom_matrix_to_numpy(forces),
|
|
172
166
|
variance);
|
|
173
167
|
},
|
|
174
|
-
|
|
168
|
+
nb::arg("positions"), nb::arg("atom_types"), nb::arg("box"));
|
|
175
169
|
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
# Python package: rgpot — nanobind-only bindings (no pybind11).
|
|
2
|
+
#
|
|
3
|
+
# Policy (match pyeonclient):
|
|
4
|
+
# * Nanobind only for the public extension.
|
|
5
|
+
# * Stable ABI (abi3 / Py_LIMITED_API 3.12) on GIL builds with Python >= 3.12.
|
|
6
|
+
# * Free-threaded (NB_FREE_THREADED) when Py_GIL_DISABLED; no abi3 then.
|
|
7
|
+
#
|
|
8
|
+
# Layout:
|
|
9
|
+
# rgpot/__init__.py
|
|
10
|
+
# rgpot/_core*.so | _core*.abi3.so
|
|
11
|
+
# rgpot/lib/torch-X.Y/libmetatomic_engine.so (multi-ABI engines, post-pack)
|
|
12
|
+
|
|
13
|
+
py_mod = import('python')
|
|
14
|
+
py = py_mod.find_installation(pure: false)
|
|
15
|
+
py_dep = py.dependency()
|
|
16
|
+
|
|
17
|
+
_nb_probe = run_command(
|
|
18
|
+
py,
|
|
19
|
+
'-c',
|
|
20
|
+
'''
|
|
21
|
+
import nanobind, pathlib, sys, sysconfig
|
|
22
|
+
p = pathlib.Path(nanobind.__file__).resolve().parent
|
|
23
|
+
cands = [p / "src" / "nb_combined.cpp", p / "nb_combined.cpp"]
|
|
24
|
+
comb = next(c for c in cands if c.is_file())
|
|
25
|
+
robin = p / "ext" / "robin_map" / "include"
|
|
26
|
+
if not (robin / "tsl" / "robin_map.h").is_file():
|
|
27
|
+
for alt in (p / "include", pathlib.Path(nanobind.include_dir())):
|
|
28
|
+
if (alt / "tsl" / "robin_map.h").is_file():
|
|
29
|
+
robin = alt
|
|
30
|
+
break
|
|
31
|
+
ft = bool(sysconfig.get_config_var("Py_GIL_DISABLED"))
|
|
32
|
+
ver = sys.version_info
|
|
33
|
+
print(nanobind.include_dir())
|
|
34
|
+
print(robin)
|
|
35
|
+
print(comb)
|
|
36
|
+
print("1" if ft else "0")
|
|
37
|
+
print(f"{ver.major}.{ver.minor}")
|
|
38
|
+
print(nanobind.__version__)
|
|
39
|
+
''',
|
|
40
|
+
check: false,
|
|
41
|
+
)
|
|
42
|
+
if _nb_probe.returncode() != 0
|
|
43
|
+
error(
|
|
44
|
+
'with_python requires nanobind>=2.2 in the build Python '
|
|
45
|
+
+ '(pip/pixi install nanobind)',
|
|
46
|
+
)
|
|
47
|
+
endif
|
|
48
|
+
_nb_lines = _nb_probe.stdout().strip().split('\n')
|
|
49
|
+
_nb_include = _nb_lines[0]
|
|
50
|
+
_nb_robin = _nb_lines[1]
|
|
51
|
+
_nb_combined = _nb_lines[2]
|
|
52
|
+
_nb_free_threaded = _nb_lines[3] == '1'
|
|
53
|
+
_nb_version = _nb_lines[5]
|
|
54
|
+
|
|
55
|
+
message('rgpot python: nanobind @0@'.format(_nb_version))
|
|
56
|
+
message('rgpot python: free-threaded interpreter = @0@'.format(_nb_free_threaded))
|
|
57
|
+
|
|
58
|
+
# -isystem so abs paths under .pixi/site-packages are allowed
|
|
59
|
+
nanobind_dep = declare_dependency(
|
|
60
|
+
compile_args: [
|
|
61
|
+
'-isystem' + _nb_include,
|
|
62
|
+
'-isystem' + _nb_robin,
|
|
63
|
+
],
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
if not is_variable('rgpot')
|
|
67
|
+
error('with_python requires the full rgpot library (disable with_rpc_client_only)')
|
|
68
|
+
endif
|
|
69
|
+
if not is_variable('metatomic_dlopen')
|
|
70
|
+
error('with_python requires MetatomicDlopen (rgpot/MetatomicPot)')
|
|
71
|
+
endif
|
|
72
|
+
|
|
73
|
+
_py_incs = _incdirs
|
|
74
|
+
_py_rpath = '$ORIGIN:$ORIGIN/../.rgpot.mesonpy.libs:$ORIGIN/lib'
|
|
75
|
+
_py_link = [rgpot, lennard_jones, metatomic_dlopen]
|
|
76
|
+
# Do not link cuh2 into the pip extension (fortcuh2 subproject not in wheel
|
|
77
|
+
# when install --skip-subprojects; LJ + metatomic dlopen are the product).
|
|
78
|
+
|
|
79
|
+
dl_dep = dependency('dl', required: false)
|
|
80
|
+
if not dl_dep.found()
|
|
81
|
+
dl_dep = meson.get_compiler('cpp').find_library('dl', required: false)
|
|
82
|
+
endif
|
|
83
|
+
|
|
84
|
+
_nb_cpp_args = _args + [
|
|
85
|
+
'-DNB_DOMAIN=rgpot',
|
|
86
|
+
'-Wno-unused-parameter',
|
|
87
|
+
]
|
|
88
|
+
|
|
89
|
+
_core_sources = files('bind/bind_module.cpp') + [_nb_combined]
|
|
90
|
+
|
|
91
|
+
if _nb_free_threaded
|
|
92
|
+
_nb_cpp_args += ['-DNB_FREE_THREADED']
|
|
93
|
+
message('rgpot python: FREE_THREADED build; stable ABI skipped')
|
|
94
|
+
py.extension_module(
|
|
95
|
+
'_core',
|
|
96
|
+
sources: _core_sources,
|
|
97
|
+
dependencies: [py_dep, nanobind_dep, dl_dep] + _deps,
|
|
98
|
+
include_directories: _py_incs,
|
|
99
|
+
link_with: _py_link,
|
|
100
|
+
cpp_args: _nb_cpp_args,
|
|
101
|
+
install: true,
|
|
102
|
+
install_rpath: _py_rpath,
|
|
103
|
+
build_rpath: _py_rpath,
|
|
104
|
+
subdir: 'rgpot',
|
|
105
|
+
gnu_symbol_visibility: 'hidden',
|
|
106
|
+
)
|
|
107
|
+
else
|
|
108
|
+
_use_abi3 = py.language_version().version_compare('>=3.12')
|
|
109
|
+
if _use_abi3
|
|
110
|
+
message('rgpot python: STABLE_ABI build (abi3, Py_LIMITED_API=3.12)')
|
|
111
|
+
py.extension_module(
|
|
112
|
+
'_core',
|
|
113
|
+
sources: _core_sources,
|
|
114
|
+
dependencies: [py_dep, nanobind_dep, dl_dep] + _deps,
|
|
115
|
+
include_directories: _py_incs,
|
|
116
|
+
link_with: _py_link,
|
|
117
|
+
cpp_args: _nb_cpp_args,
|
|
118
|
+
install: true,
|
|
119
|
+
install_rpath: _py_rpath,
|
|
120
|
+
build_rpath: _py_rpath,
|
|
121
|
+
subdir: 'rgpot',
|
|
122
|
+
gnu_symbol_visibility: 'hidden',
|
|
123
|
+
limited_api: '3.12',
|
|
124
|
+
)
|
|
125
|
+
else
|
|
126
|
+
warning(
|
|
127
|
+
'rgpot python: Python < 3.12 — version-specific extension '
|
|
128
|
+
+ '(stable ABI requires 3.12+)',
|
|
129
|
+
)
|
|
130
|
+
py.extension_module(
|
|
131
|
+
'_core',
|
|
132
|
+
sources: _core_sources,
|
|
133
|
+
dependencies: [py_dep, nanobind_dep, dl_dep] + _deps,
|
|
134
|
+
include_directories: _py_incs,
|
|
135
|
+
link_with: _py_link,
|
|
136
|
+
cpp_args: _nb_cpp_args,
|
|
137
|
+
install: true,
|
|
138
|
+
install_rpath: _py_rpath,
|
|
139
|
+
build_rpath: _py_rpath,
|
|
140
|
+
subdir: 'rgpot',
|
|
141
|
+
gnu_symbol_visibility: 'hidden',
|
|
142
|
+
)
|
|
143
|
+
endif
|
|
144
|
+
endif
|
|
145
|
+
|
|
146
|
+
py.install_sources(
|
|
147
|
+
files('rgpot/__init__.py'),
|
|
148
|
+
pure: false,
|
|
149
|
+
subdir: 'rgpot',
|
|
150
|
+
)
|
|
151
|
+
|
|
152
|
+
if is_variable('metatomic_engine')
|
|
153
|
+
message('metatomic_engine installs into the wheel; multi-ABI pack via scripts/rgpot_pack_multi_abi_engines.sh')
|
|
154
|
+
endif
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
"""rgpot — potential energy surfaces for atomistic simulation.
|
|
2
|
+
|
|
3
|
+
Core: Lennard-Jones. Metatomic path uses **dlopen** of a portable
|
|
4
|
+
``libmetatomic_engine.so`` (stable C ABI). Engines are multi-ABI:
|
|
5
|
+
|
|
6
|
+
``rgpot/lib/torch-X.Y/libmetatomic_engine.so``
|
|
7
|
+
|
|
8
|
+
selected from the installed ``torch`` major (same layout as metatomic-torch).
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import os
|
|
14
|
+
from pathlib import Path
|
|
15
|
+
|
|
16
|
+
from rgpot._core import (
|
|
17
|
+
LJPot,
|
|
18
|
+
__version__,
|
|
19
|
+
evaluate_lj,
|
|
20
|
+
evaluate_metatomic_dlopen,
|
|
21
|
+
has_metatomic_dlopen,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _torch_major() -> str | None:
|
|
26
|
+
"""Return installed torch X.Y, or None if torch is not importable."""
|
|
27
|
+
try:
|
|
28
|
+
import torch
|
|
29
|
+
|
|
30
|
+
v = torch.__version__.split("+", 1)[0]
|
|
31
|
+
parts = v.split(".")
|
|
32
|
+
return f"{parts[0]}.{parts[1]}"
|
|
33
|
+
except Exception:
|
|
34
|
+
return None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def default_metatomic_engine_path() -> str | None:
|
|
38
|
+
"""Return package-bundled engine matching installed torch ABI if possible."""
|
|
39
|
+
here = Path(__file__).resolve().parent
|
|
40
|
+
maj = _torch_major()
|
|
41
|
+
candidates: list[Path] = []
|
|
42
|
+
# Multi-ABI layout first (rgpot/lib/torch-X.Y/) — preferred product path
|
|
43
|
+
if maj:
|
|
44
|
+
candidates.append(here / "lib" / f"torch-{maj}" / "libmetatomic_engine.so")
|
|
45
|
+
lib_root = here / "lib"
|
|
46
|
+
if lib_root.is_dir():
|
|
47
|
+
for d in sorted(lib_root.glob("torch-*")):
|
|
48
|
+
candidates.append(d / "libmetatomic_engine.so")
|
|
49
|
+
# Legacy single-engine layouts (last resort)
|
|
50
|
+
candidates.extend(
|
|
51
|
+
[
|
|
52
|
+
here / "lib" / "libmetatomic_engine.so",
|
|
53
|
+
here.parent / ".rgpot.mesonpy.libs" / "libmetatomic_engine.so",
|
|
54
|
+
here / "libmetatomic_engine.so",
|
|
55
|
+
]
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
for c in candidates:
|
|
59
|
+
if c.is_file():
|
|
60
|
+
return str(c)
|
|
61
|
+
|
|
62
|
+
env = os.environ.get("RGPOT_METATOMIC_ENGINE") or os.environ.get(
|
|
63
|
+
"METATOMIC_ENGINE"
|
|
64
|
+
)
|
|
65
|
+
if env and Path(env).is_file():
|
|
66
|
+
return env
|
|
67
|
+
return None
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
def available_metatomic_engine_abis() -> list[str]:
|
|
71
|
+
"""List torch-X.Y majors for which a bundled engine is present."""
|
|
72
|
+
here = Path(__file__).resolve().parent / "lib"
|
|
73
|
+
out: list[str] = []
|
|
74
|
+
if not here.is_dir():
|
|
75
|
+
return out
|
|
76
|
+
for d in sorted(here.glob("torch-*")):
|
|
77
|
+
if (d / "libmetatomic_engine.so").is_file():
|
|
78
|
+
out.append(d.name.removeprefix("torch-"))
|
|
79
|
+
return out
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
def evaluate_metatomic(
|
|
83
|
+
positions,
|
|
84
|
+
atom_types,
|
|
85
|
+
box,
|
|
86
|
+
*,
|
|
87
|
+
model_path: str,
|
|
88
|
+
engine_path: str | None = None,
|
|
89
|
+
device: str = "cpu",
|
|
90
|
+
):
|
|
91
|
+
"""Force evaluation through MetatomicDlopen (real engine plugin)."""
|
|
92
|
+
eng = engine_path or default_metatomic_engine_path() or ""
|
|
93
|
+
return evaluate_metatomic_dlopen(
|
|
94
|
+
positions, atom_types, box, model_path, eng, device
|
|
95
|
+
)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
__all__ = [
|
|
99
|
+
"LJPot",
|
|
100
|
+
"evaluate_lj",
|
|
101
|
+
"evaluate_metatomic",
|
|
102
|
+
"evaluate_metatomic_dlopen",
|
|
103
|
+
"default_metatomic_engine_path",
|
|
104
|
+
"available_metatomic_engine_abis",
|
|
105
|
+
"has_metatomic_dlopen",
|
|
106
|
+
"__version__",
|
|
107
|
+
]
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# Build +
|
|
3
|
-
#
|
|
4
|
-
# Requires torch/metatomic for engine link; sets CMAKE_PREFIX_PATH from torch.
|
|
2
|
+
# Build + multi-ABI engine pack + RPATH repair for portable rgpot wheels.
|
|
3
|
+
# Nanobind abi3 when build Python >= 3.12.
|
|
5
4
|
set -euo pipefail
|
|
6
5
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
7
6
|
cd "$ROOT"
|
|
8
|
-
python -m pip install -U build meson ninja meson-python
|
|
7
|
+
python -m pip install -U build meson ninja meson-python nanobind numpy wheel 2>/dev/null || true
|
|
9
8
|
rm -rf dist build .mesonpy*
|
|
10
9
|
if python -c "import torch, metatomic.torch" 2>/dev/null; then
|
|
11
10
|
export CMAKE_PREFIX_PATH="$(python -c 'import torch; print(torch.utils.cmake_prefix_path)')${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}"
|
|
@@ -16,4 +15,9 @@ else
|
|
|
16
15
|
fi
|
|
17
16
|
WHL=$(ls -1 dist/rgpot-*.whl | head -1)
|
|
18
17
|
bash "$ROOT/scripts/rgpot_repair_wheel.sh" "$WHL"
|
|
18
|
+
if [[ "${RGPOT_SKIP_MULTI_ABI:-0}" != "1" ]]; then
|
|
19
|
+
bash "$ROOT/scripts/rgpot_pack_multi_abi_engines.sh" "$WHL" || {
|
|
20
|
+
echo "WARN multi-ABI pack failed; wheel keeps primary engine only" >&2
|
|
21
|
+
}
|
|
22
|
+
fi
|
|
19
23
|
echo "WHEEL_OK $WHL"
|