ml-matgl-finetune

Official

Fine-tune MatGL potentials on your data.

Authorlearningmatter-mit
Version1.0.0
Installs0

System Documentation

What problem does it solve?

ML interatomic potentials often underperform for a specific material system or property, requiring users to fine-tune a foundation MatGL model for their labeled dataset.

Core Features & Use Cases

  • Prepare MatGL-ready training data: Convert JSON structure dictionaries (with energy/forces/stress) into the MatGL MGLDataset input format, including optional VASP stress unit conversion.
  • Run GPU fine-tuning end-to-end: Train a MatGL foundation model using PyTorch Lightning with configurable learning rate, epochs, and multi-term loss weights (energy, forces, stress).
  • Validate and register the trained checkpoint: Track training/validation metrics and save a fine-tuned checkpoint for reuse in subsequent workflows.

Use case example: You have a curated dataset of DFT-labeled structures (energies, forces, and stresses) for a catalyst family and want higher-accuracy predictions from a CHGNet/MatGL-like foundation potential by adapting it to your chemistry and thermodynamic regime.

Quick Start

Run fine-tuning for your labeled dataset by executing the provided prepare_matgl_data.py and train_matgl.py scripts inside the matgl-agent environment, starting with your input JSON file path and the base foundation model name.

Dependency Matrix

Required Modules

matglpymatgenasenumpytorchlightningdglpytorch-lightningscipy

Components

scripts

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: ml-matgl-finetune
Download link: https://github.com/learningmatter-mit/AtomisticSkills/archive/main.zip#ml-matgl-finetune

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.