DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to train a machine learning interatomic potential with Mace

Fit a MACE model to your own DFT data with mace_run_train and get loss and RMSE plots at the end.

Short answer: Install with pip install --upgrade pip and pip install mace-torch; then Prepare train.xyz and test.xyz, labeling isolated atoms with config_type=IsolatedAtom or using --E0s="average"; run mace_run_train with --name, --train_file, --valid_fraction, --test_file, --model="MACE", --r_max=5.0 and the other flags from the README example. All steps.

Who it is forA materials researcher with a set of DFT calculations who needs a faster force field.

The problemDFT is too slow for long molecular dynamics runs.

The outcomeA trained .model file plus training curves and scatter plots in the results folder.

What you need first

  • Python 3.11 or later and PyTorch 2.5 or later, installed first
  • Install with `pip install mace-torch` (the PyPI package named MACE is unrelated)
  • Training data as XYZ files; a CUDA GPU or Apple Silicon (mps) for practical training speed

Steps

  1. Install with pip install --upgrade pip and pip install mace-torch
  2. Prepare train.xyz and test.xyz, labeling isolated atoms with config_type=IsolatedAtom or using --E0s="average"
  3. Run mace_run_train with --name, --train_file, --valid_fraction, --test_file, --model="MACE", --r_max=5.0 and the other flags from the README example
  4. Use --default_dtype float32 for about a 2x training speed-up and --device=mps on Apple Silicon

Prompt for your agent

Using ACEsuit/mace, train a model on <my train.xyz> with mace_run_train following the README example flags, and report the final energy and force RMSE on the test set.

Caveat. Batch size and epochs should be adapted to your training set size, as the README explains.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for ACEsuit/mace and "Train a machine learning interatomic potential"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer