Skip to content

Conversation

@yangmr04
Copy link
Collaborator

@yangmr04 yangmr04 commented Dec 8, 2025

This pull request adds support for Machine Learning Interatomic Potentials (MLIPs) to FreeBird.jl, enabling the use of advanced Python-based potentials (UMA, MACE, ORB, CHGNet) via ASE calculators. The changes introduce new types and interfaces for MLIPs, update documentation, and extend Monte Carlo and nested sampling routines to work with MLIP-backed walkers. The most important changes are grouped below.

MLIP Support and Integration:

  • Added MLIPAtomWalkers struct to represent atom walkers using MLIPs, with automatic energy assignment from the MLIP potential (src/AbstractLiveSets/atomistic_livesets.jl, src/AbstractLiveSets/AbstractLiveSets.jl). [1] [2]
  • Introduced PyMLPotential wrapper and model-loading functions (mace_model, orb_model, uma_model, chgnet_model) for seamless ASE calculator integration (src/AbstractPotentials/ase_calculators.jl, src/AbstractPotentials/AbstractPotentials.jl). [1] [2] [3]
  • Implemented interacting_energy and frozen_energy methods for MLIP potentials, enabling energy evaluation via Python calculators (src/EnergyEval/atomistic_energies.jl, src/EnergyEval/atomistic_many_body.jl). [1] [2] [3]

Documentation and Usability:

  • Added a comprehensive guide for using MLIPs (UMA, MACE, ORB, CHGNet) in FreeBird.jl, including setup instructions and examples (docs/src/MLIPs.md, docs/make.jl). [1] [2]

Monte Carlo and Sampling Enhancements:

  • Extended mixed moves Monte Carlo routine to support MLIP potentials, including a new parallel version for multi-component systems (src/MonteCarloMoves/mixed_moves.jl, src/SamplingSchemes/SamplingSchemes.jl, src/SamplingSchemes/nested_sampling.jl). [1] [2] [3] [4]

CI and Build Adjustments:

  • Updated CI workflow to use pre instead of nightly Julia version (.github/workflows/CI.yml).

These changes collectively enable FreeBird.jl to leverage state-of-the-art machine learning potentials for atomistic simulations, with improved documentation and compatibility across the codebase.This pull request adds support for using machine learning interatomic potentials (MLIPs) in FreeBird.jl by integrating with ASE Python calculators. It introduces a new MLIPAtomWalkers live set and a PyMLPotential wrapper for ASE-compatible MLIPs, along with documentation and example usage for UMA, MACE, and ORB models. The changes also provide the necessary infrastructure for users to add additional MLIPs and evaluate energies using these potentials.

MLIP Integration and Infrastructure

  • Added PyMLPotential type and constructor in src/AbstractPotentials/ase_calculators.jl to wrap ASE-compatible MLIPs (UMA, MACE, ORB) and expose them in Julia.
  • Introduced MLIPAtomWalkers live set in src/AbstractLiveSets/atomistic_livesets.jl to manage walkers with MLIP potentials, and exported it for use. [1] [2]
  • Implemented energy evaluation functions for MLIPs in src/EnergyEval/atomistic_energies.jl and src/EnergyEval/atomistic_many_body.jl, including dummy frozen_energy for compatibility. [1] [2]

Documentation

  • Added docs/src/MLIPs.md with detailed instructions and examples for setting up and using UMA, MACE, and ORB MLIPs, including how to add new ASE-compatible MLIPs.
  • Linked the new MLIP documentation in the docs menu in docs/make.jl.

Package and Module Updates

  • Exported relevant MLIP-related types and functions (PyCalculator, PyMLPotential, etc.) and included the new ase_calculators.jl module in src/AbstractPotentials/AbstractPotentials.jl. [1] [2]
  • Added necessary dependencies for MLIP support (AtomsCalculators, ASEconvert, PythonCall) in relevant modules. [1] [2]

eyob-tewelde and others added 18 commits September 16, 2025 17:45
- Created a new pixi.toml file for CondaPkg with specified dependencies and project metadata.
- Added a new CondaPkg.toml file to define pip dependencies for the project.
- Updated Project.toml to include CondaPkg as a dependency with the appropriate UUID and version.
… and generalize related live sets into MLIPAtomWalkers.
- Adjusted OpenSSL version constraint in pixi.toml to ">=3, <3.6".
- Specified numpy version constraint in pixi.toml to "<2.3".
- Updated Python version constraint in pixi.toml to ">=3.10,<3.14, =3.11".
- Removed outdated dependencies from pixi.toml and CondaPkg.toml.
- Set fairchem-core version in both files to ">=2.10".
@yangmr04 yangmr04 linked an issue Dec 8, 2025 that may be closed by this pull request
14 tasks
@coveralls
Copy link

coveralls commented Dec 8, 2025

Coverage Status

coverage: 83.19% (-5.7%) from 88.861%
when pulling ee4128f on feature/ml-ipi
into f4fdc66 on dev.

@yangmr04 yangmr04 marked this pull request as ready for review December 8, 2025 20:53
Copy link
Collaborator

@junchichen21 junchichen21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Corresponding test codes are needed later.

@yangmr04
Copy link
Collaborator Author

Just added CHGNet, I mean, why not :)

@junchichen21 junchichen21 self-requested a review December 11, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integrate MLIPs as energy calculators for sampling schemes

5 participants