Franken
Introduction
Franken is an open-source library that can be used to enhance the accuracy of atomistic foundation models. It can be used for molecular dynamics simulations, and has a focus on computational efficiency.
franken features include:
- Supports fine-tuning for a variety of foundation models (MACE, SevenNet, UPET)
- Automatic hyperparameter tuning simplifies the adaptation procedure, for an out-of-the-box user experience.
- Several random-feature approximations to common kernels (e.g. Gaussian, polynomial) are available to flexibly fine-tune any foundation model.
- Support for running within LAMMPS molecular dynamics, as well as with ASE.
For detailed information and benchmarks please check our paper Fast and Fourier Features for Transfer Learning of Interatomic Potentials.
Documentation
A full documentation including several examples is available: https://franken.readthedocs.io/index.html. The paper also contains a comprehensive description of the methods behind franken.
Install
To install the latest release of franken, you can simply do:
pip install franken
Several optional dependencies can be specified, to install packages required for certain operations:
cudaincludes packages which speed up training on GPUs (note thatfrankenwill work on GPUs even without these dependencies thanks to pytorch).mace,sevenninstall the necessary dependencies to use a specific backbone.docsanddevelopare only needed if you wish to build the documentation, or work on extending the library.
They can be installed for example by running
pip install franken[mace,cuda]
For more details read the relevant documentation page
Quickstart
Train
You can directly run franken.autotune to get started with the franken library.
franken.autotune \
--train-path train.xyz \
--val-path val.xyz \
--backbone=mace --mace.path-or-id "mace_mp/small" --mace.interaction-block 2 \
--rf=ms-gaussian --ms-gaussian.num-rf 4096 --ms-gaussian.length-scale-num 5\
--ms-gaussian.length-scale-low 1 --ms-gaussian.length-scale-high 32 \
--force-weight=0.99 \
--l2-penalty="(-10, -6, 5, log)" \
--metrics energy_MAE forces_MAE \
--jac-chunk-size "auto"
For more details you can check out the autotune tutorial or the getting started notebook.
Inference/MD
The trained model can be used as a ASE (Atomistic Simulations Environment) calculator for easy inference.
from franken.calculators import FrankenCalculator
calc = FrankenCalculator('best_model.ckpt', device='cuda:0')
atoms.calc = calc
See the MD tutorial for a complete example about running molecular dynamics, while for deploying it to LAMMPS see the dedicated page.
Citing
If you find this library useful, please cite our work using the folowing bibtex entry:
@article{novelli2025fast,
title={Fast and Fourier features for transfer learning of interatomic potentials},
author={Novelli, Pietro and Meanti, Giacomo and Buigues, Pedro J and Rosasco, Lorenzo and Parrinello, Michele and Pontil, Massimiliano and Bonati, Luigi},
journal={npj Computational Materials},
volume={11},
number={1},
pages={293},
year={2025},
publisher={Nature Publishing Group UK London}
}
Metadata
Release files for franken 0.7.0
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 |
|---|---|---|---|---|
| franken-0.7.0.tar.gz | 176.6 kB | With provenance | Details for franken-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| franken-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for franken-0.7.0-py3-none-any.whl |
Total release size: 307.2 kB
Release files / franken-0.7.0.tar.gz
| Download URL | franken-0.7.0.tar.gz |
|---|---|
| Size | 176.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
257aff37d98f4b6d494a65083626df9aed23a3c17413c06cde91bd87fbbf68a1
|
|
BLAKE2b-256 checksum How to use checksums |
5a362873f51b70b00a7172ffab164137c4db6ceca3b17fcaa5c8e4321ed95f74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 21, 2026.
Transparency logRelease files / franken-0.7.0-py3-none-any.whl
| Download URL | franken-0.7.0-py3-none-any.whl |
|---|---|
| Size | 130.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5f49e10ede915f4a36fdfb0e1fab723a312d85d53c931f34b2eee4babac5538c
|
|
BLAKE2b-256 checksum How to use checksums |
abcb6612a638a0996441e035754ad861428c479e2e13a832ab85c3e3aa981b7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 21, 2026.
Transparency logSecurity for franken 0.7.0
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 franken-0.7.0.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 Jul 21, 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.