Install GPRidge¶
GPRidge is a C++20 library (libgpridge) with two command-line drivers, gprn for nudged-elastic-band searches and gprd for dimer searches, and a Python module (gpridge) distributed as gpridge.
Use the table to pick an installation route and check what it provides.
Choose a route¶
Route |
What it builds |
Platform |
Status |
|---|---|---|---|
Pixi environment and Meson |
|
Linux x86-64 only (the manifest declares one platform: |
CI builds the documentation examples this way ( |
Meson with your own toolchain |
the same |
CI builds the drivers on Linux x86-64 ( |
CI: |
pip from a Git checkout |
Python module |
Linux |
Configured in |
pip from the release source distribution |
Python module |
Linux and macOS |
The Linux source install and all wheel builds use this archive |
Prebuilt wheel |
Python module |
CPython 3.11 to 3.13 on Linux x86-64 and aarch64 (manylinux_2_28), macOS arm64 and x86-64 |
Built by the wheel workflow for stable releases; see PyPI for available versions |
Conda recipe |
|
Linux (the variants file sets a glibc 2.28 sysroot) |
Local |
an easyconfig for one tagged source archive |
HPC systems with EasyBuild |
Generator in |
|
the library and drivers against the EESSI software stack |
Linux x86-64 with |
In the tree; no CI job |
|
the library, Fortran module, drivers, and optional Python module |
Linux |
Recipe in |
Other registries return 404 for the project as well: conda-forge, CRAN (gpridge), crates.io (gpridge-sys), and the Julia General registry and Yggdrasil (no GPRidge directory).
The R, Julia, Fortran and Rust packages in this repository are built from checkout directories against an installed library; Native packages and downstream bindings shows how.
For publication-aligned runs, use the reproducing guide and the preprint, arXiv:2611.20591.
Prerequisites¶
Every Meson route needs the rows marked “every build”. An option in the last column removes the requirement it names, at the cost stated in the second table.
Requirement |
Needed for |
Source and how to avoid it |
|---|---|---|
C++20 compiler |
every build |
|
Meson 1.8 or newer, Ninja |
every build |
|
Rust 1.88 or newer, with |
every build |
|
|
every build from a checkout |
Meson clones the |
LAPACK |
every build |
With the default |
libclang |
every build |
bindgen runs in rgmin’s |
cbindgen 0.29 or newer |
default |
|
HDF5 1.12 or newer (C library and headers) |
default |
|
Fortran compiler (gfortran) |
the drivers (default |
IRA, which the drivers need, is a Fortran library. rgpot builds its Fortran potentials whenever it finds a Fortran compiler (its |
Eigen |
every build |
Found through its CMake package ( |
CMake |
optional |
Meson uses it to look up dependencies that ship CMake packages and to build the vendored IRA subproject. |
Python 3.11 or newer, NumPy, nanobind 2.0 or newer, meson-python 0.17 or newer |
the Python module |
|
MPI and ScaLAPACK, or SLATE |
|
The other backends and the libraries they need are in Build options . |
pixi 0.81 or newer |
the pixi routes |
|
uv |
contributors |
The |
The Python test extra and the pixi Python environment select the readcon-chemfiles distribution.
It provides the readcon import, including the CON API and the Chemfiles reader for XYZ and other formats.
Use this distribution when those readers are required.
Options that remove a requirement, and what they cost:
Option |
Removes |
Cost |
|---|---|---|
|
Fortran compiler, IRA, |
Library and Python module only. |
|
HDF5 |
No HDF5 logs. |
|
cbindgen |
No anneal stage before the local GP fit. |
Meson feature options take enabled, disabled or auto; boolean options take true or false.
meson_options.txt gives the type of each option, and Build options lists them all.
If pixi is not on your command path, install it first with the
Pixi installation instructions
and open a new shell.
The commands below assume that pixi --version works.
Platform notes:
The default
simd_baseline=autoisx86-64-v3(AVX2 and FMA, Haswell and Zen 1 and later, per the option text) on x86-64 and the compiler default on other CPU families. On an older x86-64 CPU pass-Dsimd_baseline=x86-64-v2or an empty value (-Dsimd_baseline=) to keep the compiler default. A level the compiler rejects stopsmeson setupwith an error. The level changes speed only: every level gives the same results while Eigen stays unvectorized, which is the default (scalar_eigen=true).-Dscalar_eigen=falseopts into vectorized Eigen and can change results.The pixi manifest solves for Linux x86-64 only. There is no pixi route on macOS or aarch64.
CI builds macOS wheels. It builds no drivers and no pixi environment on macOS.
Windows is not built. The Rust subprojects name Unix shared libraries.
Build with pixi and Meson¶
Use this route on Linux x86-64 when you want the drivers.
The default pixi environment (pixi shell) has Meson, Ninja, CMake, Eigen, HDF5, OpenBLAS, Highway, Cap’n Proto and chemfiles, but no compiler, no Rust and no libclang.
The python environment adds GCC, G++ and gfortran 14 or newer, nanobind, meson-python and pip.
Rust 1.88 or newer and libclang must come from the host in that environment.
A host without them can use the scalapack environment instead.
It carries Rust, libclang 20 or 21, Ninja and the same compilers, sets LIBCLANG_PATH and the bindgen sysroot arguments on activation (scripts/activate_bindgen.sh), and also installs OpenMPI, ScaLAPACK and PyTorch from the CPU wheel index (a large download).
git clone --branch develop https://github.com/TheochemUI/gpridge.git
cd gpridge
pixi run -e python install-cbindgen
pixi run -e python meson setup builddir
pixi run -e python meson compile -C builddir gprn gprd
install-cbindgen runs scripts/install_cbindgen_pixi.sh, which puts cbindgen 0.29.4 into the environment (copied from the host if the version matches, otherwise cargo install --locked --root $CONDA_PREFIX, which needs Rust).
The task exists in the python and scalapack environments only.
The build writes builddir/gprn, builddir/gprd and builddir/libgpridge.so.
The drivers read .con structure files through readcon-core, which -Duse_readcon (default true) enables, so the commands above need no extra flag for them.
To add the Python module in the same environment:
pixi run -e python build
The task depends on install-cbindgen and runs pip install --no-build-isolation -e ..
The editable install builds in build/cp<version>, where <version> is the Python tag of the environment, and rebuilds when the module is imported after a source change.
Run Python with pixi run -e python python script.py or pixi shell -e python.
Checked: this tree was configured and compiled in the python environment with a host Rust and libclang, and install-cbindgen ran here and exited 0.
The documentation job of .github/workflows/docbuilder.yml builds the examples with the same environment on ubuntu-latest.
Build with Meson and your own toolchain¶
Use this route when the prerequisites above come from your system or from a module environment. Install cbindgen if it is missing:
git clone --branch develop https://github.com/TheochemUI/gpridge.git
cd gpridge
cargo install --locked --version 0.29.4 cbindgen
meson setup builddir
meson compile -C builddir
cargo install puts cbindgen in $CARGO_HOME/bin (~/.cargo/bin by default); add that directory to PATH.
The build type is release by default (meson.build).
To build and run the test suite, configure with -Dwith_tests=true and run meson test -C builddir.
Checked: .github/workflows/c-cpp.yml runs meson setup builddir -Dwith_tests=True -Duse_anneal=enabled -Duse_hdf5=True and meson compile -C builddir on ubuntu-latest, after scripts/install_cbindgen_pixi.sh has installed cbindgen.
Install into a prefix¶
The R, Julia, Fortran and C consumers need an installed library with its pkg-config file and CMake package. Install into a prefix of your choice:
meson setup builddir --prefix="$HOME/.local"
meson compile -C builddir
meson install -C builddir
The install writes bin/gprn, bin/gprd, include/gpr/capi/gpridge_c.h, libgpridge.so, the engine libraries (libgpr_engine.so, libgpr_canonical_tiles.so and others), libira.so, librgpot, pkgconfig/gpridge.pc and cmake/gpridge/gpridgeConfig.cmake under the library directory.
That directory is Meson’s libdir: lib/x86_64-linux-gnu on Debian and Ubuntu, lib or lib64 elsewhere.
Add --libdir=lib to meson setup for the plain layout.
Checked: meson install --destdir of a finished tree on an Ubuntu host wrote the files above under lib/x86_64-linux-gnu.
The pkg-config and CMake consumer checks of Native packages and downstream bindings ran against that tree.
Install the Python module with pip¶
python -m pip install .
Run it in a Linux checkout, in an environment that has the prerequisites above: a C++ compiler, Rust 1.88 or newer, libclang, cbindgen on PATH, OpenBLAS development files, and network access.
The Meson arguments are in [tool.meson-python.args] of pyproject.toml.
They build static libraries, turn the drivers, HDF5, Cap’n Proto and chemfiles off, turn OpenBLAS and OpenMP on, and force every dependency to build from its wrap.
The result has the Python module and no gprn or gprd.
Build isolation downloads meson-python, meson and nanobind from the package index.
A pip build from a checkout uses the default simd_baseline, which is x86-64-v3 on x86-64.
The wheel jobs pass -Dsimd_baseline= (empty) through [tool.cibuildwheel.config-settings] to keep the compiler default.
On macOS, install a prebuilt wheel or build from the release source distribution. The source distribution contains the portability changes for the packaged rgpot dependency.
CI builds the source distribution with python scripts/vendor_sdist_deps.py followed by python -m build --sdist.
The script downloads the wraps and the crates that the wheel configuration resolves, so that the sdist installs without access to crates.io.
The install_sdist job installs it on an Ubuntu runner after apt-get install build-essential gfortran cmake ninja-build pkg-config libopenblas-dev liblapacke-dev libclang-dev.
Checked: not run for this page, because it is a full source build.
The install_sdist job of .github/workflows/wheels.yml installs an sdist and runs the smoke test, and the pixi build task above uses the same configuration as an editable install.
Prebuilt wheels¶
.github/workflows/wheels.yml builds wheels with cibuildwheel for CPython 3.11, 3.12 and 3.13 on manylinux_2_28 (x86-64 and aarch64) and macOS (arm64 and x86-64).
Windows wheels are not built.
The publish job uploads to PyPI only when the repository is public and the ref is a stable v* tag (no hyphen).
The macOS wheels target macOS 14.0 or newer (MACOSX_DEPLOYMENT_TARGET in pyproject.toml) and the Linux wheels glibc 2.28 or newer (manylinux_2_28).
Check PyPI for available releases.
Install with python -m pip install 'gpridge>=1.0.0' to exclude the 0.0.0 name reservation, then import gpridge.
Conda recipe¶
packaging/conda/recipe.yaml is a rattler-build recipe with a local source path.
It builds the library, its pkg-config and CMake packages and the Python module with the drivers, HDF5, Cap’n Proto, rgmin, anneal, Highway and readcon turned off (packaging/conda/build.sh).
It is for local builds; the file header says it is never uploaded.
rattler-build build --recipe packaging/conda --channel conda-forge \
--output-dir build/rattler-output
Checked: .github/workflows/native-registries.yml runs this command with --output-dir in the runner’s temporary directory, and uploads nothing.
rattler-build was not run for this page.
Spack¶
The recipe repository is in packaging/spack and is not in upstream spack-packages yet.
Register it and install either the pinned release tag (the default spec) or develop:
git clone --branch develop https://github.com/TheochemUI/gpridge.git
cd gpridge
spack repo add packaging/spack
spack spec gpridge
spack install gpridge
See Spack installation for the full variant matrix (including +python, +mpi, +uma, +metatomic, and +highway), the nine companion recipes under packaging/spack/packages, and the verified spack test run and spack audit packages checks.
spack install --test=root "gpridge@develop +python +capnp +highway"
spack test run gpridge
spack test run gpridge runs the seven stand-alone tests: C API pkg-config smoke and C99 consumer, CMake find_package(gpridge) consumer, Fortran 2018 module consumer, Python gpridge.wheel_smoke, gprd=/=gprn --help, and a seven-image Lennard-Jones pentamer band.
Checked: on Ubuntu 24.04.5 LTS with Spack 1.3.0.dev0 and GCC 13.3.0 across the default tagged release spec (6 passed, 1 skipped), gpridge@develop +python +capnp +highway (7 passed), and all nine companion packages.
Check the install¶
Run these three checks after any route that builds the Python module or the drivers.
The first runs a short dimer search on the Muller-Brown surface and needs no input files.
It imports gpridge, so run it in the environment where the module was installed (pixi run -e python for the pixi route).
python -m gpridge.wheel_smoke
The command checks imports, positive oracle calls and finite numerical results from a short native dimer run.
Its summary reports the stop reason; a force stop can remain uncertified.
<version> is the installed package version.
gpridge <version>: Muller-Brown GP-dimer calls=<positive integer> energy=-72.2489 stop=<reason>
The drivers print their flag listings when the build works:
gprn --help
gprd --help
gprn --help starts with the heading and usage line below.
The heading carries ANSI color codes, and the usage line shows the name the program was started under.
gprd --help lists every option on one usage line, followed by one entry per option.
gprn -- GP-accelerated NEB chain driver
Usage: gprn --reactant <r.con> --product <p.con> [options]
Add the build directory to PATH or call builddir/gprn when the drivers are not installed.
The quickstart runs a complete band search next.
CMake package¶
meson install writes a CMake package (gpridgeConfig.cmake), which is checked in CI: packaging/native/cmake builds a consumer against it.
Use find_package(gpridge CONFIG) as shown in Native packages and downstream bindings.
Troubleshooting¶
“Reproduced” means the message was produced here by the command named. “Read” means the message or cause comes from the file named, and the failure was not provoked.
Message or symptom |
Cause |
Fix |
Status |
|---|---|---|---|
|
Rust is not on |
Install Rust 1.88 or newer and put |
Reproduced with |
|
The |
Install the matching |
Reproduced with a |
|
A feature option was given |
Use |
Reproduced with |
|
anneal requires cbindgen 0.29.0 or newer ( |
|
Reproduced with a stub |
|
bindgen in rgmin’s |
Install libclang development files and export |
Read (the |
|
The default configuration finds no LAPACK library. |
Install FlexiBLAS or a reference LAPACK development package, or configure with |
Read ( |
Configure stops at the |
HDF5 development files are missing and |
Install HDF5, point |
Read ( |
|
The HDF5 found is older than 1.12, which lacks |
Install HDF5 1.12 or newer, point |
Reproduced with |
|
The test suite needs the drivers and |
Drop |
Reproduced with |
|
The install put the CMake package under |
Pass |
Reproduced with the |
Illegal instruction at start-up on an older x86-64 CPU |
The default |
Configure with |
Read ( |
|
The editable install rebuilds the module on import. |
Wait for the rebuild, or set |
Read (the meson-python editable loader) |