How cedergrouphub/chgnet works
CHGNet is a pretrained crystal-graph neural-network potential for atomistic materials modeling. A typical workflow supplies a crystal structure, converts it into a graph, and predicts energy and optionally forces, stress, magnetic moments, or site features. Those predictions also support ASE-based relaxation and molecular dynamics. Separate product branches cover supervised fine-tuning from labeled structures and parsing VASP outputs. The graph preserves the principal model and training layers; unsampled capabilities and their links are included only where the README documents them.
Main entry points: model.py CHGNet predictor · dynamics.py ASE calculator · converter.py Graph converter · dataset.py Labeled datasets
Components 23
Crystal graphs
- Graph converter
chgnet/graph/converter.py - Crystal graph
chgnet/graph/crystalgraph.py - Graph primitives
chgnet/graph/graph.py - Fast graph builder
chgnet/graph/fast_converter_libraries/create_graph.c - Hash-table support
chgnet/graph/fast_converter_libraries/uthash.h
Potential model
- CHGNet predictor
chgnet/model/model.py - Composition reference
chgnet/model/composition_model.py - Feature encoders
chgnet/model/encoders.py - Radial-angular basis
chgnet/model/basis.py - Graph convolution layers
chgnet/model/layers.py - Neural-network functions
chgnet/model/functions.py - Pretrained checkpoints
chgnet/pretrained
Atomistic simulation
- ASE calculator
chgnet/model/dynamics.py - Structure relaxation
chgnet/model/dynamics.py - Molecular dynamics
chgnet/model/dynamics.py - Equation of state
chgnet/model/dynamics.py
Training and data
- Labeled datasets
chgnet/data/dataset.py - Model trainer
chgnet/trainer/trainer.py
Materials utilities
- VASP parser
chgnet/utils/vasp_utils.py
Other components
- Materials user
- Crystal structure
- Predicted properties
- Simulation results
Connections 31
- Materials user → Crystal structure: provides
README.md - Crystal structure → Graph converter: converts
chgnet/graph/converter.py - Graph converter → Crystal graph: builds
chgnet/graph/converter.py - Graph converter → Graph primitives: uses
chgnet/graph/converter.py - Graph converter → Fast graph builder: dispatches
chgnet/graph/converter.py - Fast graph builder → Hash-table support: uses
chgnet/graph/fast_converter_libraries/create_graph.c - CHGNet predictor → Crystal graph: batches
chgnet/model/model.py - CHGNet predictor → Composition reference: uses
chgnet/model/model.py - CHGNet predictor → Feature encoders: uses
chgnet/model/model.py - Feature encoders → Radial-angular basis: uses
chgnet/model/encoders.py - CHGNet predictor → Graph convolution layers: uses
chgnet/model/model.py - Graph convolution layers → Neural-network functions: uses
chgnet/model/layers.py - Crystal graph → CHGNet predictor: predicts from
README.md - Pretrained checkpoints → CHGNet predictor: initializes
chgnet/model/model.py - CHGNet predictor → Predicted properties: returns
README.md - Materials user → ASE calculator: requests properties
README.md - ASE calculator → CHGNet predictor: evaluates
chgnet/model/dynamics.py - ASE calculator → Predicted properties: provides properties
README.md - Materials user → Structure relaxation: requests relaxation
README.md - Structure relaxation → ASE calculator: uses
chgnet/model/dynamics.py - Structure relaxation → Simulation results: produces
README.md - Materials user → Molecular dynamics: requests dynamics
README.md - Molecular dynamics → ASE calculator: uses
chgnet/model/dynamics.py - Molecular dynamics → Simulation results: produces
README.md - Materials user → Equation of state: requests equation of state
chgnet/model/dynamics.py - Equation of state → ASE calculator: uses
chgnet/model/dynamics.py - Materials user → Labeled datasets: supplies labels
README.md - Labeled datasets → Graph converter: converts structures
chgnet/data/dataset.py - Labeled datasets → Model trainer: provides training data
- Model trainer → CHGNet predictor: trains
chgnet/trainer/trainer.py - Materials user → VASP parser: provides VASP files
chgnet/utils/vasp_utils.py