How materialyzeai/m3gnet works
M3GNet is a TensorFlow materials graph neural network for property prediction and interatomic potentials. Users provide structures or material graphs; conversion creates atom, bond, and three-body features, which the model processes to predict properties or energy. Potential workflows derive forces and stresses for simulation and relaxation, while trainers support property and potential fitting. The graph highlights the documented relaxation and prediction capabilities alongside training. Edges are limited to relationships visible in excerpts, SOURCE INDEX references, or README; some internal calls and relaxation details are unsampled.
Main entry points: _m3gnet.py M3GNet model · _gn.py Graph featurizer · _types.py Material graph · _base.py Model interface
Components 21
Graph representation
- Structure conversion
m3gnet/graph/_converters.py - Material graph
m3gnet/graph/_types.py - Geometry features
m3gnet/graph/_compute.py - Graph batching
m3gnet/graph/_batch.py
Neural network
- Graph featurizer
m3gnet/layers/_gn.py - Atom and state embedding
m3gnet/layers/_atom.py - Radial and angular bases
m3gnet/layers/_three_body.py - Bond interactions
m3gnet/layers/_bond.py - Graph updates
m3gnet/layers/_gn.py - Property readout
m3gnet/layers/_readout.py - Core layer operations
m3gnet/layers/_core.py - Numeric precision
m3gnet/config.py - Math and tensor utilities
m3gnet/utils/_math.py
Prediction and dynamics
- M3GNet model
m3gnet/models/_m3gnet.py - Model interface
m3gnet/models/_base.py - Energy force stress
m3gnet/models/_dynamics.py - Structure relaxation
m3gnet/models/_dynamics.py
Model training
- Property trainer
m3gnet/trainers/_property.py - Potential trainer
m3gnet/trainers/_potential.py
Other components
- Materials user
- Structures
Connections 30
- Materials user → Structures: provides
- Structures → Structure conversion: converts
m3gnet/graph/_converters.py - Structure conversion → Material graph: creates
m3gnet/graph/_converters.py - Structure conversion → Geometry features: computes geometry
m3gnet/graph/_converters.py - Material graph → Graph batching: assembles
m3gnet/graph/_batch.py - Material graph → Graph featurizer: feeds
- Graph featurizer → Atom and state embedding: embeds fields
m3gnet/layers/_gn.py - Graph featurizer → Radial and angular bases: builds bases
- Graph featurizer → Bond interactions: sets interactions
m3gnet/layers/_gn.py - M3GNet model → Structure conversion: configures
m3gnet/models/_m3gnet.py - M3GNet model → Graph featurizer: featurizes
m3gnet/models/_m3gnet.py - M3GNet model → Bond interactions: applies blocks
- M3GNet model → Property readout: produces outputs
- Bond interactions → Graph updates: updates graph
m3gnet/layers/_gn.py - Graph updates → Core layer operations: uses operations
m3gnet/layers/_gn.py - Model interface → M3GNet model: invokes
m3gnet/models/_base.py - Model interface → Material graph: assembles batches
m3gnet/models/_base.py - Model interface → Energy force stress: computes derivatives
m3gnet/models/_base.py - Energy force stress → M3GNet model: evaluates energy
m3gnet/models/_dynamics.py - Materials user → Model interface: requests prediction
- Energy force stress → Structure relaxation: supplies potential
m3gnet/models/_dynamics.py - Materials user → Structure relaxation: requests relaxation
- Materials user → Property trainer: provides targets
- Property trainer → M3GNet model: trains
m3gnet/trainers/_property.py - Property trainer → Material graph: converts structures
m3gnet/trainers/_property.py - Materials user → Potential trainer: provides targets
- Potential trainer → M3GNet model: trains
m3gnet/trainers/_potential.py - Potential trainer → Material graph: uses graphs
m3gnet/trainers/_potential.py - Numeric precision → Geometry features: sets dtypes
m3gnet/graph/_compute.py - Math and tensor utilities → Graph featurizer: supports operations