Skip to content

phonopy/phonors

Repository files navigation

phonors

Rust kernels for phonopy and phono3py.

phonors is a Rust extension module providing the heavy numerical kernels used by phono3py (via the phono3py[rust] extra) and intended to also back phonopy as its C kernels are ported. It is built with maturin and PyO3, distributed as abi3-py310 wheels (Python 3.10+).

Installation

From PyPI

pip install phonors

From conda-forge

conda install -c conda-forge phonors

Development

For local development, build and install the extension in editable mode against the active Python environment:

maturin develop --release

maturin develop installs the phonors extension into the active environment; from then on, import phonors from anywhere hits the editable build. Re-run after Rust changes.

Optional: native CPU tuning

By default, maturin develop --release builds with the Rust baseline target (x86-64 v1 on x86_64, Armv8.0 on aarch64), so the resulting module runs on any CPU of that architecture. For a local build that will only run on the current machine, enabling the host CPU's full instruction set can recover a few percent of wall-clock:

RUSTFLAGS='-C target-cpu=native' maturin develop --release

License

BSD-3-Clause. See LICENSE.

About

A Python module implemented in Rust for Phonopy

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages