Registry / ai-ml / sevenn

sevenn

JSON →
library0.12.1pypypi✓ verified 87d ago

SevenNet is a Python library implementing Scalable EquiVariance Enabled Neural Networks, primarily for atomistic simulations and materials science. It integrates with the Atomic Simulation Environment (ASE) for molecular dynamics, energy, and force calculations. The library is actively developed, with frequent minor releases and specific checkpoint releases for new pre-trained models. The current stable version is 0.12.1.

pip install sevenn
INSTALL
IMPORT
SIG · SEVENN
S
sevenn
ai-mlpythonv0.12.1
Install
86.7s avg
Import
17649ms
Disk
5325MB
Pass rate
2/ 10
Env Coverage2 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.12.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
1/8 runs
py 3.11
✕ build_error
7/8 runs
py 3.12
✕ build_error
✓ 88.26s
py 3.13
✕ build_error
✓ 85.08s
py 3.9
✕ build_error
✕ timeout
5325MB installed
● package 5325MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SevenNetCalculator
from sevenn.calculator import SevenNetCalculator
from sevenn import SevenNetCalculator
The calculator is located in the 'calculator' submodule.
SevenNet
from sevenn.model import SevenNet
from sevenn import SevenNet
The main model class resides in the 'model' submodule.
run
from sevenn.cli import run
import sevenn.train
CLI operations are consolidated under 'sevenn.cli'.

This quickstart demonstrates how to use `SevenNetCalculator` to compute energy, forces, and stress for an ASE `Atoms` object using a pre-trained SevenNet model. Ensure you have a model checkpoint available locally.

import os import numpy as np from ase.build import bulk from sevenn.calculator import SevenNetCalculator # Assuming a pre-trained model checkpoint path # Replace with your actual model path or a path to a downloaded checkpoint # Example: sevenn_cp download 'SevenNet-Omni-i8' will download to current dir MODEL_PATH = os.environ.get('SEVENN_MODEL_PATH', 'SevenNet-Omni-i8.ckpt') # Create an ASE atom object atoms = bulk('Si', 'diamond', a=5.43, cubic=True) atoms.set_positions(atoms.get_positions() + np.random.rand(*atoms.get_positions().shape) * 0.1) # Initialize the SevenNetCalculator calculator = SevenNetCalculator( path=MODEL_PATH, device='cuda' if os.environ.get('SEVENN_USE_CUDA', 'false').lower() == 'true' else 'cpu' ) atoms.set_calculator(calculator) # Get energy and forces energy = atoms.get_potential_energy() forces = atoms.get_forces() stress = atoms.get_stress() print(f"Energy: {energy:.4f} eV") print(f"Forces (first atom): {forces[0]}") print(f"Stress: {stress}") # Clean up (optional, if you're done with the calculator) calculator.cleanup()
Debug
Known issues
breakingThe command-line interface (CLI) was significantly refactored in v0.11.1, changing from a single `sevenn_train` or `sevenn_inference` script to a subcommand-based structure (e.g., `sevenn train`, `sevenn inference`).
fix
Update your CLI commands to use the `sevenn <subcommand>` pattern. Refer to the official documentation for updated subcommand syntax.
affects: >=0.11.1
gotchaSevenNet has strict compatibility requirements with the `e3nn` library. Versions `0.10.4` and older are compatible with `e3nn < 0.5.0`, while `0.11.1` and newer likely require `e3nn >= 0.5.0` or a specific range. Installing an incompatible `e3nn` version can lead to runtime errors.
fix
Always install `sevenn` using its `pip install sevenn` command, which will handle `e3nn` dependencies. If manually managing `e3nn`, check `sevenn`'s `pyproject.toml` or `setup.py` for the exact required `e3nn` version range for your `sevenn` version.
affects: All versions
gotchaUsing the FlashTP feature for accelerated calculations requires the `ninja` package to be installed, as it's used for compiling optimized kernels. If `ninja` is not present, FlashTP will fail to initialize.
fix
Install `ninja` manually (`pip install ninja`) or install `sevenn` with the `[flashtp]` extra (e.g., `pip install sevenn[flashtp]`) if available, or manually install dependencies for the FlashTP feature.
affects: >=0.12.0
deprecatedInconsistent argument naming for FlashTP-related settings in CLI and configuration files was fixed in `v0.12.1`. Older scripts or configs might use deprecated argument names.
fix
Upgrade to `v0.12.1` or later and review your configuration files and CLI calls, especially those related to FlashTP, to ensure they use the standardized argument names.
affects: <0.12.1
Errors
Common errors & fixes
AttributeError: module 'sevenn' has no attribute 'train'
Attempting to use the old CLI command style (e.g., `sevenn.train.run()`) after the CLI refactor in `v0.11.1`.
fix
Use the new subcommand-based CLI interface: `from sevenn.cli import run` and call `run(['train', ...])`, or execute `sevenn train ...` from the terminal.
RuntimeError: Could not find a suitable E3nn version. The installed version is X.Y.Z, but SevenNet requires A.B.C.
`e3nn` library version incompatibility with your installed `sevenn` version.
fix
Reinstall `sevenn` to ensure `e3nn` is installed correctly via its dependencies, or manually ensure your `e3nn` version matches the requirements for your `sevenn` version (e.g., `pip install 'e3nn>=0.5.0,<0.6.0'` if specified).
ModuleNotFoundError: No module named 'ninja'
Attempting to enable or use the FlashTP feature without the `ninja` package installed.
fix
Install the `ninja` package: `pip install ninja`. This dependency is required for FlashTP's optimized kernel compilation.
Upgrade
Version history
0.12.1latest on PyPI · released Mar 3, 2026
Audit
Dependencies
e3nnrequiredCore functionality for equivariant neural networks.
ninjaoptionalRequired for FlashTP compilation, an optional performance feature.
torchrequiredPrimary deep learning framework backend.
Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources