Open
Conversation
modified: sample_inputs/input.in.mace modified: src/mace_mpi_api.F90
new file: interfaces/MACE/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add MACE Interface via MPI
Description
This PR adds a new interface for the MACE (Machine Learning Atomic Cluster Expansion) potential to ABIN. MACE is integrated via an MPI-based client-server architecture: a Python server loads and evaluates the MACE ML model, while the Fortran side communicates coordinates, energies, and forces over MPI. This follows the same pattern used for the existing TeraChem (
_tera_) interface.The interface supports configurable model paths, device selection (CPU/CUDA), precision settings, and various MACE-specific options -- all controlled through a new
&macenamelist in the ABIN input file.File Changes
Fortran Core
src/mace_mpi_api.F90mod_mace_mpi). Handles MPI port connection to the Python server, sends atom types/config/coordinates, and defines all MACE namelist variables (model path, device, dtype, batch size, etc.).src/force_mace.F90mod_force_mace). Orchestrates per-bead force evaluation -- sends coordinates viasend_mace, receives energy and forces viareceive_mace. Supports OpenMP.src/forces.F90_mace_case to theforce_wrapperpotential selector, routing toforce_mace().src/init.F90&macenamelist reading and MACE interface/server initialization whenpot='_mace_'.src/mpi_wrapper.F90_mace_to the MPI-required potential check so non-MPI builds raise a clear error.src/Makefilemace_mpi_api.oandforce_mace.oto the build.Python Server
interfaces/MACE/mace_server.pyinterfaces/MACE/README.md&macenamelist parameters. Includes MACE-OFF licensing notice.interfaces/MACE/MACE-OFF23_medium.modelTests
tests/MACE/test.shtests/MACE/mock_mace_server.pymace-torch/PyTorch.tests/MACE/input.inpot='_mace_'and&macenamelist.tests/MACE/mini.xyztests/MACE/*.refenergies.dat.ref,forces.xyz.ref,movie.xyz.ref,velocities.xyz.ref,temper.dat.ref).tests/test.shMACEin the MPI test folder list.unit_tests/test_mace.pfunit_tests/Makefilemacetarget to the unit test build, test runner, and clean targets.Utilities & Docs
utils/run.mace_mpi_abin.shdev_scripts/install_mace.shmace-torch,mpi4py).sample_inputs/input.in.mace&macenamelist configuration.README.md