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
- 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.
- 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.
- Work through CHGNet Basics. Load a representative crystal structure and inspect predicted energy, forces, stress and magnetic moments, retaining their documented units.
- 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.
- 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.
Sources and verification
This entry describes capabilities documented by the linked project sources. Catalog edits are not evidence of a successful run, compatibility test or scientific performance evaluation.
Read the editorial and verification policy