Skip to content
wch3nPublic

About

A Grand Canonical Monte Carlo (GCMC) code with replica exchange and hybrid MC/MD support for alloy and adsorbate sampling with ASE-compatible MLIPs

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

96 Commits

Folders and files

Repository files navigation

gcmc

Monte Carlo workflows for alloy and adsorbate sampling on ASE-compatible atomistic models.

Documentation

  • Configuration overview: docs/configuration.md
  • Shared workflow keys: docs/configuration/shared.md
  • Adsorbate workflow keys: docs/configuration/adsorbate.md
  • Alloy workflow keys: docs/configuration/alloy.md
  • Adsorption-motif analysis: docs/adsorption_motifs.md

The codebase supports:

  • canonical alloy Monte Carlo on substitutional sublattices
  • fixed-loading canonical adsorbate Monte Carlo with replica exchange support
  • site-based grand-canonical adsorbate MC (AdsorbateGCMC)
  • legacy grand-canonical adsorbate MC (GCMC)
  • semi-grand alloy MC (SemiGrandAlloyMC)
  • local relaxation and short hybrid MC/MD proposals
  • local multiprocessing and Ray-backed distributed replica exchange
  • YAML-driven workflow wrappers for alloy and adsorbate runs
  • MXene-oriented analysis utilities for ordering, adsorption sites, surface motifs, and SRO

Installation

Base install:

pip3 install .

Optional extras:

pip3 install .[speedups]
pip3 install '.[active-learning]'
pip3 install ray

Notes:

  • mace-torch is a package dependency and enables the MACE examples.
  • The repository also works with other ASE-compatible calculators. Several production examples use Symmetrix, which is not bundled here.

Capabilities

  • AlloyCMC
    • canonical swap MC for substitutional alloys
    • neighbor-aware proposals
    • optional relaxation and hybrid MC/MD
  • ReplicaExchange
    • parallel tempering for alloy and fixed-loading adsorbate MC
    • multiprocessing and ray backends
  • AdsorbateCMC
    • fixed-loading MC for atomic and rigid molecular adsorbates
    • displacement, site_hop, reorientation, and hybrid move modes
  • AdsorbateGCMC
    • site-based grand-canonical MC
    • single-mu, mu-scan, and fixed-T mu-replica-exchange workflows
  • gcmc.analysis
    • MXene ordering, motif, adsorption-site, and SRO analysis utilities
  • auxiliary active-learning tools
    • committee/SOAP trajectory selection and VASP input preparation
    • committee validation with persistent error histories

Repository Layout

gcmc/
  workflows.py
  replica.py
  execution_backends.py
  alloy_cmc.py
  adsorbate_cmc.py
  adsorbate_gcmc.py
  analysis/
docs/
  configuration.md
  configuration/
examples/
  alloy/
  adsorbate/
tools/
  active_learning/
scripts/
  slurm/
tests/

Quick Start

The recommended entry points are installed YAML-driven commands. In practice, edit the YAML and keep the command unchanged.

Alloy CMC:

gcmc-run-alloy-cmc --config examples/alloy/configs/alloy_cmc.yaml

Alloy replica exchange:

gcmc-run-alloy-pt --config examples/alloy/configs/alloy_pt.yaml

Ray-backed alloy replica exchange:

gcmc-run-alloy-pt --config examples/alloy/configs/alloy_pt_ray.yaml

Adsorbate CMC:

gcmc-run-adsorbate-cmc --config examples/adsorbate/configs/adsorbate_cmc.yaml

Adsorbate GCMC:

gcmc-run-adsorbate-gcmc --config examples/adsorbate/configs/adsorbate_gcmc.yaml

Adsorbate GCMC scan or mu exchange:

gcmc-run-adsorbate-gcmc-scan --config examples/adsorbate/configs/adsorbate_gcmc_scan.yaml

Active-learning selection and committee evaluation:

gcmc-active-learning-select --help
gcmc-active-learning-evaluate --help

Adsorption motifs in tagged adsorbate CMC/PT trajectories:

gcmc-analyze-adsorption-motifs --traj <run-directory> --out-dir motif_analysis

These are auxiliary tools rather than part of the core gcmc namespace. See docs/active_learning.md for their workflow and defaults.

Configuration

The workflow loaders accept both:

  • nested YAML sections: system, cmc / gcmc / pt, backend, calculator, output
  • flat legacy YAML for backward compatibility

Use the docs for the actual keyword reference:

  • docs/configuration.md
  • docs/configuration/shared.md
  • docs/configuration/adsorbate.md
  • docs/configuration/alloy.md

Examples and Analysis

  • example layouts:
    • examples/alloy/README.md
    • examples/adsorbate/README.md
  • shared Slurm helper for Ray jobs:
    • scripts/slurm/ray_slurm_common.sh

Calculator Notes

The workflows expect ASE-compatible calculators.

Repository examples use:

  • ASE LennardJones
  • mace.calculators.MACECalculator
  • Symmetrix

Symmetrix is not bundled with this repository.

Version

pyproject.toml currently declares version 0.9.0.

About

A Grand Canonical Monte Carlo (GCMC) code with replica exchange and hybrid MC/MD support for alloy and adsorbate sampling with ASE-compatible MLIPs

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages