mat-sample-pes-by-md

Sample off-equilibrium atomic configurations via MD and latent-feature clustering.

144|21|Updated Jan 8, 2026
One-click install
npx skills add https://github.com/learningmatter-mit/AtomisticSkills --skill mat-sample-pes-by-md
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mat-sample-pes-by-md
Source: https://github.com/learningmatter-mit/AtomisticSkills/tree/main/.agents/skills/mat-sample-pes-by-md
Command: npx skills add https://github.com/learningmatter-mit/AtomisticSkills --skill mat-sample-pes-by-md

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires argparse, numpy, ase, pymatgen, matgl, matcalc, sklearn, torch, yaml, scikit-learn, dgl, and includes scripts (resource) components.

What problem does it solve?

This Skill generates diverse, physically meaningful atomic configurations by sampling off-equilibrium potential energy surfaces (PES) with molecular dynamics (MD) and then selecting representative structures via latent-feature clustering.

Core Features & Use Cases

  • Off-equilibrium MD sampling: Runs short MD trajectories at a chosen temperature to explore non-equilibrium configurations for MLIP/PES dataset augmentation.
  • Crystal-feature extraction for clustering: Extracts crystal/latent features from MatGL or MACE models to represent each saved MD frame.
  • Representative structure selection: Uses clustering (e.g., K-Means; plus small-dataset fallbacks) to downselect a smaller, diverse set of configurations for fine-tuning and benchmarking.
  • Supercell expansion and stabilization: Automatically expands to a target atom count (with safety caps) and relaxes before MD to reduce instability from residual stress.
  • Practical outputs for ML workflows: Writes sampled CIF structures and records metadata (sample indices and MD step positions), enabling downstream DFT labeling or MLIP training.

Quick Start

Use the mat-sample-pes-by-md skill to sample off-equilibrium PES configurations from LiMnO2 by running the provided run_sampling.py script on your input CIF with MatGL or MACE, setting total steps, temperature, number of clusters, and an output directory.

Frequently Asked Questions about mat-sample-pes-by-md

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate off-equilibrium configurations for machine learning interatomic potential training?

To generate off-equilibrium configurations for machine learning interatomic potential training, run ASE-based molecular dynamics on a crystal to sample the potential energy surface, then use scikit-learn clustering on extracted latent crystal features to select diverse structures. The workflow outputs CIF files and metadata for downstream DFT labeling.

What is the best way to sample a potential energy surface for MLIP dataset augmentation?

The best way to sample a potential energy surface for MLIP dataset augmentation is to run short MD trajectories at a chosen temperature, extract crystal features using MatGL or MACE backends, and downselect representative structures via K-Means clustering to ensure physically meaningful diversity.

Can I use MatGL and MACE calculators for crystal feature extraction in MD sampling?

Yes, you can use MatGL or MACE calculator backends for crystal feature extraction in MD sampling. The workflow uses these frameworks to extract latent crystal features from saved MD frames, which are then passed to scikit-learn clustering for representative structure selection.

Do I need to expand my crystal structure to a supercell before running molecular dynamics for MLIP sampling?

Yes, you need to expand your crystal structure to a supercell before running molecular dynamics for MLIP sampling. The workflow automatically expands the input CIF to a target atom count of approximately 40–70 atoms by default and relaxes the structure to reduce instability from residual stress before MD.

How do I select representative structures from MD trajectories for MLIP fine-tuning?

To select representative structures from MD trajectories for MLIP fine-tuning, extract latent crystal features from the saved MD frames and apply clustering algorithms like K-Means via scikit-learn. This downsamples the frames into a diverse set of configurations while recording sample indices and metadata.

What formats are outputted when sampling potential energy surfaces for DFT labeling?

When sampling potential energy surfaces for DFT labeling, the workflow outputs sampled CIF structures and records run metadata containing sample indices and MD step positions. These practical outputs enable seamless downstream DFT labeling or direct MLIP training.