Franken fine-tuning scheme for ML potentials
Project description
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, SchNet)
- 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).fairchem,mace,sevenninstall the necessary dependencies to use a specific backbone. Note that Fairchem v2 introduced breaking changes, so use v1 for SchNet support.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
You can directly run franken.autotune to get started with the franken library. A quick example is to fine-tune MACE-MP0 on a high-level-of-theory water dataset:
franken.autotune \
--dataset-name="water" --max-train-samples=8 \
--l2-penalty="(-10, -5, 5, log)" \
--force-weight="(0.01, 0.99, 5, linear)" \
--seed=42 \
--jac-chunk-size=64 \
--run-dir="./results" \
--backbone=mace --mace.path-or-id="mace_mp/small" --mace.interaction-block=2 \
--rf=gaussian --gaussian.num-rf=512 --gaussian.length-scale="[10.0, 15.0]"
For more details you can check out the autotune tutorial or the getting started notebook.
Citing
If you find this library useful, please cite our work using the folowing bibtex entry:
@misc{novelli25franken,
title={Fast and Fourier Features for Transfer Learning of Interatomic Potentials},
author={Pietro Novelli and Giacomo Meanti and Pedro J. Buigues and Lorenzo Rosasco and Michele Parrinello and Massimiliano Pontil and Luigi Bonati},
year={2025},
eprint={2505.05652},
archivePrefix={arXiv},
url={https://arxiv.org/abs/2505.05652},
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file franken-0.4.2.tar.gz.
File metadata
- Download URL: franken-0.4.2.tar.gz
- Upload date:
- Size: 111.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdaa76bc272e6c37691aff778af5662646483b842b6e1d986505aeec43f0ae39
|
|
| MD5 |
99eb066dff3209262b6d4428cd51b2c7
|
|
| BLAKE2b-256 |
64c9e7db2f926b2462e60b8f707e013095239441081d69e8cefc42f55869bc9e
|
Provenance
The following attestation bundles were made for franken-0.4.2.tar.gz:
Publisher:
CI.yaml on CSML-IIT-UCL/franken
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
franken-0.4.2.tar.gz -
Subject digest:
cdaa76bc272e6c37691aff778af5662646483b842b6e1d986505aeec43f0ae39 - Sigstore transparency entry: 776243396
- Sigstore integration time:
-
Permalink:
CSML-IIT-UCL/franken@76f4fee6a38ef3f4f5d81f63f83e3a644b2a5d6c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CSML-IIT-UCL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yaml@76f4fee6a38ef3f4f5d81f63f83e3a644b2a5d6c -
Trigger Event:
push
-
Statement type:
File details
Details for the file franken-0.4.2-py3-none-any.whl.
File metadata
- Download URL: franken-0.4.2-py3-none-any.whl
- Upload date:
- Size: 117.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1fd45a4501404e0b3933a033b529849412d1dd8b5cfc383ef99222541764f69c
|
|
| MD5 |
6b80c8ddd367cb65e55469f0f8e349ec
|
|
| BLAKE2b-256 |
84af783d86c8fbc601b16f2ae1877d1b3fd3c3d6ef20e5a8ac886f6581821899
|
Provenance
The following attestation bundles were made for franken-0.4.2-py3-none-any.whl:
Publisher:
CI.yaml on CSML-IIT-UCL/franken
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
franken-0.4.2-py3-none-any.whl -
Subject digest:
1fd45a4501404e0b3933a033b529849412d1dd8b5cfc383ef99222541764f69c - Sigstore transparency entry: 776243398
- Sigstore integration time:
-
Permalink:
CSML-IIT-UCL/franken@76f4fee6a38ef3f4f5d81f63f83e3a644b2a5d6c -
Branch / Tag:
refs/heads/main - Owner: https://github.com/CSML-IIT-UCL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
CI.yaml@76f4fee6a38ef3f4f5d81f63f83e3a644b2a5d6c -
Trigger Event:
push
-
Statement type: