FeNNol: Force-field-enhanced Neural Networks optimized library
FeNNol is a library for building, training and running neural network potentials for molecular simulations. It is based on the JAX library and is designed to be fast and flexible.
FeNNol's documentation is available here and the article describing the library at https://doi.org/10.1063/5.0217688
Active Learning tutorial in this Colab notebook
Table of Contents
Pre-trained models
Pre-trained models can be downloaded from the Pre-trained Models Collection. Available models include:
After downloading the model (for example fennix-bio1S.fnx), you can load it and start predicting energies and forces with:
import fennol
import numpy as np
model = fennol.load("fennix-bio1S.fnx")
species = np.array([8, 1, 1])
coordinates = np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]])
energy, forces, output_dict = model.energy_and_forces(species=species, coordinates=coordinates, unit="ev")
print("Energy:", energy,"ev")
print("Forces:", forces,"ev/Å")
Alternatively, you can use the provided ASE calculator and run a short molecular dynamics simulation:
from fennol.ase import FENNIXCalculator
from ase import Atoms
from ase.md.verlet import VelocityVerlet
import ase.units as units
atoms = Atoms(symbols=["O", "H", "H"], positions=[[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0]])
calculator = FENNIXCalculator(model="fennix-bio1S.fnx", gpu_preprocessing=True)
atoms.calc = calculator
energy = atoms.get_potential_energy()
forces = atoms.get_forces()
print("Energy:", energy,"ev")
print("Forces:", forces,"ev/Å")
dyn = VelocityVerlet(atoms, timestep=1.0*units.fs)
print("Starting MD simulation. ")
for step in range(10):
dyn.run(10)
print(f"Step {10*(step+1)}, Potential energy: {atoms.get_potential_energy()} ev")
For better performance, we recommend using fennol_md, FeNNol's native MD engine. (see the examples/md directory for instructions and example input files)
Installation
From PyPI
# CPU version
pip install fennol
# GPU version
pip install "fennol[cuda]"
Latest version from Github repo
You can start with a fresh environment, for example using venv:
python -m venv fennol
source fennol/bin/activate
The first step is to install jax (see details at: https://jax.readthedocs.io/en/latest/installation.html). For example, to install the latest version using pip:
# CPU version
pip install -U jax
# GPU version
pip install -U "jax[cuda12]"
Then, you can clone the repo and install FeNNol using pip:
git clone https://github.com/FeNNol-tools/FeNNol.git
cd FeNNol
pip install .
Optional dependencies
- Some modules require e3nn-jax (https://github.com/e3nn/e3nn-jax) which can be installed with:
pip install --upgrade e3nn-jax
- The provided training script requires pytorch (at least the cpu version) for dataloaders:
pip install torch --index-url https://download.pytorch.org/whl/cpu
- For the Deep-HP interface, cffi and pycuda are required:
pip install cffi pycuda
Examples
To learn how to train a FeNNol model, you can check the examples in the examples/training directory. The README.md file in that directory contains instructions on how to train a model on the aspirin revMD17 dataset.
To learn how to run molecular dynamics simulations with FeNNol models, you can check the examples in the examples/md directory. The README.md file in that directory contains instructions on how to run simulations with the provided ANI-2x model.
Citation
Please cite this paper if you use the library.
T. Plé, O. Adjoua, L. Lagardère and J-P. Piquemal. FeNNol: an Efficient and Flexible Library for Building Force-field-enhanced Neural Network Potentials. J. Chem. Phys. 161, 042502 (2024)
@article{ple2024fennol,
author = {Plé, Thomas and Adjoua, Olivier and Lagardère, Louis and Piquemal, Jean-Philip},
title = {FeNNol: An efficient and flexible library for building force-field-enhanced neural network potentials},
journal = {The Journal of Chemical Physics},
volume = {161},
number = {4},
pages = {042502},
year = {2024},
month = {07},
doi = {10.1063/5.0217688},
url = {https://doi.org/10.1063/5.0217688},
}
License
This project is licensed under the terms of the GNU LGPLv3 license. See LICENSE for additional details.
Metadata
Release files for FeNNol 2026.6.29
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fennol-2026.6.29.tar.gz | 10.3 MB | With provenance | Details for fennol-2026.6.29.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fennol-2026.6.29-py3-none-any.whl | Python 3 | none | any | Details for fennol-2026.6.29-py3-none-any.whl |
Total release size: 11.3 MB
Release files / fennol-2026.6.29.tar.gz
| Download URL | fennol-2026.6.29.tar.gz |
|---|---|
| Size | 10.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6b3381d1b933446a8d71edc6bc22e219c77c7a2e226fe98b85c19836d97389ac
|
|
BLAKE2b-256 checksum How to use checksums |
0d54763b5b78dafe396dd14d2b58d1120a07412e5e3d2f18c68c8ef115410462
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logRelease files / fennol-2026.6.29-py3-none-any.whl
| Download URL | fennol-2026.6.29-py3-none-any.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5959c588db5811f414679467ec0df1c11619c5d68a28155a5f66f4512a04fc1c
|
|
BLAKE2b-256 checksum How to use checksums |
2fe413cb67e245d75a8f5f097cfab3e404e85680e80846920ed76999419c1a8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logSecurity for FeNNol 2026.6.29
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for fennol-2026.6.29.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.