Skip to content

CHGNet

Bowen Deng / Lawrence Berkeley National Laboratory; University of California, Berkeley

CHGNet is a pretrained, charge-informed neural network potential for crystal structures, predicting energies, forces, stresses and magnetic moments for relaxation and molecular dynamics workflows.

Catalog updated ·

Overview

CHGNet (Crystal Hamiltonian Graph neural Network) is a pretrained atomistic potential for materials modeling. Its charge-informed representation uses DFT magnetic moments to regularize atomic features, linking local environments with information about charge distribution. The README describes pretraining on Materials Project GGA/GGA+U static calculations and relaxation trajectories. Materials Project supplies the upstream training data; CHGNet is the predictive model and accompanying software, not the database itself.

For direct inference, the documented workflow accepts a pymatgen Structure, including structures loaded from CIF files, and returns energy per atom, atomic forces, stress and site-wise magnetic moments. Structure optimization produces a relaxed structure and a trajectory containing energies. Molecular dynamics runs through an ASE interface, with a separately linked LAMMPS integration; ASE trajectory files support subsequent analysis. The repository also documents fine-tuning with labeled structures, energies, forces, stresses and magnetic moments, and links examples for phonon and elastic-property workflows using atomate2.

Checkpoint choice and training-label conventions matter. The README distinguishes MPtrj-pretrained checkpoints from an R2SCAN transfer-learned model and specifies energy-per-atom targets for fine-tuning. It recommends consistent Materials Project energy corrections and refitting AtomRef when changing functionals. The repository is described as a legacy implementation with limited future feature development: newer implementations and MatPES checkpoints are located in MatGL. These documented capabilities do not establish accuracy for a particular material or simulation regime; application-specific validation remains an intended evaluation step.

Key Features

  • Predicts energy in eV/atom, forces in eV/Å, stress in GPa and site-wise magnetic moments from crystal structures.
  • Provides structure relaxation with a final structure, energy trajectory and site-wise magnetic moments for potential DFT initialization.
  • Supports molecular dynamics through ASE, saving trajectories for analysis, and links a separate LAMMPS integration.
  • Provides MPtrj-pretrained checkpoints and an R2SCAN transfer-learned checkpoint with documented loading options.
  • Supports training and fine-tuning through StructureData and Trainer, including guidance on energy normalization, corrections and stress units.
  • Links atomate2 examples for finite-displacement phonon calculations and stress–strain elastic-property calculations.

Use Cases

  • Intended evaluation: pre-relax candidate crystal structures and assess predicted magnetic moments as starting values for spin-polarized DFT calculations.
  • Intended evaluation: explore structural evolution and magnetic-moment changes in ASE molecular dynamics, checking representative configurations against reference calculations.
  • Intended evaluation: fine-tune a pretrained checkpoint for a selected materials system using consistently labeled DFT data and held-out validation structures.
  • Intended evaluation: adapt the linked atomate2 examples to investigate phonon spectra or elastic properties, validating results for the target material.

How to Use

  1. Read the repository README and API documentation. Note the legacy-development status and decide whether this implementation or the linked MatGL implementation fits your workflow.
  2. Follow the README installation instructions for a Python 3.10-or-newer environment. Select a documented checkpoint according to its training basis rather than treating all pretrained models as interchangeable.
  3. Work through CHGNet Basics. Load a representative crystal structure and inspect predicted energy, forces, stress and magnetic moments, retaining their documented units.
  4. Use the same notebook to examine relaxation or molecular dynamics outputs. As an intended evaluation, compare selected structures and predictions with suitable reference calculations before expanding the study.
  5. For system-specific adaptation, consult Tuning CHGNet. Prepare energy-per-atom labels, check correction and functional consistency, and reserve validation and test data. If using MPtrj, consult the linked Materials Project terms separately from the repository code licence.

Related resources

Allegro

Model

Allegro implements an E(3)-equivariant interatomic potential as a NequIP extension, with documented GPU acceleration options and a separate plugin for LAMMPS simulations.

Open sourcePython

Computational Chemistry · Materials Discovery

An ASE routing Skill in the computational-chemistry-agent-skills collection that separates workflow preparation from calculator configuration and delegates execution elsewhere.

Computational Chemistry · Materials Discovery

ChemAgent (AI4Chem) is a research framework for chemistry and materials tool use, linked to the CheMatAgent paper on tree-search planning, tool execution and ChemToolBench-based training.

Computational Chemistry · Materials Discovery

ChemGraph is a Python agent framework that connects natural-language chemistry requests to molecular construction, simulations, analysis, and reporting, with CLI, Python, Streamlit, and MCP interfaces.

Open sourcePython

Computational Chemistry · Materials Discovery

DeePMD-kit is a toolkit for training and fine-tuning Deep Potential interatomic models from quantum-mechanical reference data, then exporting them for inference and molecular dynamics.

Open sourcePythonC++

Computational Chemistry · Materials Discovery

DP-GEN

Open Source

DP-GEN is a Python concurrent-learning platform that coordinates molecular simulation, first-principles calculations and DeePMD-kit workflows to generate interatomic potential models.

Open sourcePython

Computational Chemistry · Materials Discovery

Related guides