v0.3.13
MACE 0.3.13 Release Notes
🚀 LAMMPS Integration Enhancements
- Added new MLIAP interface for LAMMPS, enabling significantly improved performance and flexibility. (Documentation)
- Implemented CuEquivariance support in LAMMPS models for GPU acceleration.
- Added multi-GPU inference support for large-scale molecular dynamics simulations using MPI message passing of intermediate tensors for effecient scaling.
- Improved timing and profiling capabilities via environment variable controls.
- New command-line option in
create_lammps_model.pyto select betweenlibtorch(legacy) andMLIAPformats:
# Convert model to MLIAP format
python -m mace.cli.create_lammps_model model.pt --format=mliap🧮 Atomic Stresses Computation
- Added support for computing atomic stresses and atomic virials.
- Useful for analyzing local stress distributions in materials simulations.
from mace.calculators import mace_mp
from ase import build
# Create structure with 10 atoms
atoms = build.bulk("Al", "fcc", a=4.05, cubic=True)
atoms = atoms.repeat((2, 2, 2))
calc = mace_mp(device="cpu", compute_atomic_stresses=True)
atoms.set_calculator(calc)
atoms.get_potential_energy()
stress = atoms.get_stress()
stresses = atoms.get_stresses()
print("Stress tensor:\n", stress.shape)
print("Stresses tensor:\n", stresses.shape)🗝️ Property Keys System Redesign
- Reworked the property keys system for improved flexibility and maintainability.
- Introduced
KeySpecificationclass to manage mappings between data formats. - Added
DefaultKeysenum to standardize access patterns. - Enhanced error reporting when keys are missing.
- Fully backward compatible with previous key conventions.
🧱 New Foundation Models
- MACE-MATPES: New foundation models finetuned on matpes dataset.
- New PBE model without +U inconsistencies and a new R2SCAN model.
- Better transferability for fine-tuning on domain-specific datasets.
| Model | Method | Energy (meV/atom) | Force (meV/Å) | Stress (GPa) |
|---|---|---|---|---|
| M3GNet | PBE | 45 | 177 | 0.898 |
| CHGNet | PBE | 32 | 124 | 0.617 |
| TensorNet | PBE | 36 | 138 | 0.695 |
| MACE | PBE | 34 | 122 | 0.296 |
| MACE-MATPES-0 | PBE | 23 | 107 | 0.304 |
| M3GNet | r2SCAN | 45 | 208 | 0.982 |
| CHGNet | r2SCAN | 27 | 150 | 0.705 |
| TensorNet | r2SCAN | 34 | 163 | 0.754 |
| MACE-MAPTES-0 | r2SCAN | 19 | 119 | 0.265 |
🧠 Improved Model Head Selection
- Added explicit head selection in the MACE calculator for multi-head models.
- You can now directly specify the head:
# Example of selecting a specific head
calc = MACECalculator(model_path="model.pt", head="DFT")- Automatically falls back to
"default"head if not specified. - Clear error messages when requested head is unavailable.
- Head-specific configurations supported during inference.
🧪 MACE Fine-Tuning Preselection CLI
MACE a tool for selecting configurations when fine-tuning foundation models.
🔍 Key Features
-
Multiple Filtering Strategies:
combinations: Only elements in your subsetexclusive: Exactly your elementsinclusive: All your elements plus potentially others
-
Selection Methods:
fps(Farthest Point Sampling) for maximum diversityrandomfor uniform random sampling
-
Weighting Control:
- Adjust the importance of pretraining vs. fine-tuning data during selection
💡 Usage Example
python -m mace.cli.fine_tuning_select \
--configs_pt path/to/pretraining_data.xyz \
--atomic_numbers "[1, 6, 8]" \
--num_samples 5000 \
--filtering_type combinations \
--output selected_configs.xyzThis functionality is also available directly in run_train.py when using the --atomic_numbers parameter. One can no longer do the filtering from run_train without adding the atomic numbers.
🧠 L-BFGS Training Support
MACE now supports L-BFGS optimization for enhanced convergence in energy and force training. This second-order optimizer can refine models beyond what first-order methods like Adam achieve.
🚀 Key Points
- Ideal for final-stage training (1–2 epochs) after Adam
- Often achieves lower energy errors and better balance of energy vs. force loss
- Supports multi-GPU training
- Slower per epoch but may require fewer total epochs
🛠️ Usage
First, pretrain with Adam:
python -m mace.cli.run_train --optimizer adam [...other options...]Then refine with L-BFGS:
python -m mace.cli.run_train --lbfgs --restart_latest [...other options...]ℹ️ Uses
history_size=200andmax_iter=20with strong Wolfe line search.
Requires more memory as it processes the full dataset per update.
📦 Installation
pip install --upgrade mace-torch
# For CUDA acceleration (CUDA 12)
pip install cuequivariance cuequivariance-torch cuequivariance-ops-torch-cu12
# For CUDA 11
pip install cuequivariance-ops-torch-cu11For complete usage and documentation, please see our official documentation.
If you encounter any issues, please report them on our GitHub Issues page.
🔄 Full Changelog
Full Changelog: v0.3.12...v0.3.13