A toolkit for calculating thermodynamic stability (i.e. formation energy, energy above hull) of metal–organic frameworks (MOFs) using machine-learned interatomic potentials (MLIPs).
Note: For the QMOF-Thermo Database, please refer to the data available on Figshare.
Reference: B. Dallmann, A. Saha, A.S. Rosen, "Predicting the Thermodynamic Limits of Metal–Organic Framework Metastability" (2026).
This package provides a streamlined workflow to calculate the formation energy and energy above hull for MOFs. In order to utilize the energy-above-hull calculation method, one must follow the Setup Instructions directions.
This repository also includes scripts to reproduce key figures in the manuscript. To reproduce the manuscript figures, one can simply clone the repository and follow Figure Reproducability directions denoted below.
The following script allows users to relax a CIF file using an MLIP, as well as obtain an energy-above-hull calculation in eV/atom.
from ase.io import read
from qmof_thermo import set_log_level, relax_mof, get_energy_above_hull
# Set logging level
set_log_level("INFO")
# Load your structure
atoms = read("mof.cif")
# Relax the structure and get energy
energy = relax_mof(atoms, model="uma-s-1p1.pt", fmax=0.05, label="mymof")
# Calculate energy above hull
e_above_hull = get_energy_above_hull(atoms, energy)
print(f"Energy above hull: {e_above_hull} eV/atom")pip install git+https://github.com/Quantum-Accelerators/qmof_thermo.gitRefer to FairChem's documentation for detailed instructions on using their models.
You have two options:
-
Local checkpoint: Download the UMA model checkpoint directly.
-
HuggingFace: Log in with your HuggingFace credentials to download the model automatically:
hf auth login
Enter your HuggingFace token when prompted. If using this method, do not include the
.ptextension in themodelkeyword argument.
Local checkpoint: Download the eSEN-ODAC model checkpoint directly.
While we provide the phase diagram data with the package, to re-construct it (e.g. to add new phases), you can do as follows:
from qmof_thermo import setup_phase_diagrams
structures_path = "reference_thermo_structures.json" # from QMOF-Thermo figshare
thermo_path = "reference_thermo.json" # from QMOF-Thermo figshare
output_dir = "phase_diagrams" # directory to store patched_phase_diagram.json
setup_phase_diagrams(structures_path, thermo_path, output_dir=output_dir)The resulting phase_diagrams/patched_phase_diagram.json can then be passed to the serialized_phase_diagram keyword argument of qmof_thermo.get_energy_above_hull().
Scripts to reproduce the figures in the manuscript are also included in this repository and can be run as follows:
git clone https://github.com/Quantum-Accelerators/qmof_thermo.git
cd qmof_thermoRun the corresponding Python scripts:
python figures/figure_<N>.py