HamGNN Parameter Details
This section explains in detail the parameter modules and parameters in the config.yaml configuration file.
setup (Basic Settings)
Parameter |
Type |
Description |
Default/Recommended Value |
|---|---|---|---|
|
String |
Type of GNN network used |
|
|
null or String |
Accelerator type |
|
|
Boolean |
Whether to ignore warnings |
|
|
String |
Checkpoint path for resuming training or path used during testing |
|
|
Boolean |
Whether to load model parameters from checkpoint |
|
|
Boolean |
Whether to continue training from interruption |
|
|
null, Integer, or List |
Number or ID of GPUs to use |
|
|
Integer |
Computation precision |
|
|
String |
Type of physical quantity output by the network |
|
|
String |
Execution stage |
|
|
String |
Host identifier (auto-detected) |
Auto-detected system hostname |
|
String |
Job identifier for tracking |
Auto-generated (e.g., |
profiler_params (Profiler Parameters)
Parameter |
Type |
Description |
Default/Recommended Value |
|---|---|---|---|
|
String |
Training output directory (tensorboard logs, checkpoints) |
|
|
Integer |
Progress bar refresh rate |
|
dataset_params (Dataset Parameters)
Parameter |
Type |
Description |
Default/Recommended Value |
|---|---|---|---|
|
Integer |
Number of samples processed per batch |
|
|
Float |
Proportion of test set in the entire dataset |
|
|
Float |
Proportion of training set in the entire dataset |
|
|
Float |
Proportion of validation set in the entire dataset |
|
|
String or null |
Path to save/load pre-defined dataset split indices |
|
|
String |
Directory of processed compressed graph data files |
No default value, must be manually set |
|
Integer |
Number of parallel DataLoader worker processes |
|
|
Integer |
Number of graphs to preload into memory on startup |
|
|
String |
Input data format: |
|
|
Boolean |
Use entire dataset as test set (skip train/val split) |
|
Note
For large-scale datasets, using LMDB format (data_format: lmdb) with npz_to_lmdb.py conversion provides significantly faster I/O compared to NPZ format.
losses_metrics (Loss Functions and Evaluation Metrics)
Parameter |
Type |
Description |
Default/Recommended Value |
|---|---|---|---|
|
List |
List of loss function definitions |
Must include at least Hamiltonian loss |
|
Float |
Loss function weight |
|
|
String |
Loss calculation method |
|
|
String |
Prediction output |
|
|
String |
Target data |
|
|
List |
List of evaluation metric definitions |
Usually the same as losses |
optim_params (Optimizer Parameters)
Parameter |
Type |
Description |
Default/Recommended Value |
|---|---|---|---|
|
Float |
Learning rate |
|
|
Float |
Learning rate decay factor |
|
|
Integer |
Number of epochs to tolerate before triggering learning rate decay |
|
|
Float |
Gradient clipping value |
|
|
Integer |
Maximum number of training epochs |
|
|
Integer |
Minimum number of training epochs before early stopping can trigger |
|
|
Integer |
Number of epochs to tolerate for early stopping |
|
output_nets.HamGNN_out (Output Network Parameters)
Parameter |
Type |
Description |
Default/Recommended Value |
|---|---|---|---|
|
String |
Type of Hamiltonian to fit |
|
|
Integer |
Maximum number of orbitals per atom |
|
|
Boolean |
Whether to add H_nonscf to predicted H_scf |
|
|
Boolean |
Add non-SOC Hamiltonian (for SOC-coupled systems) |
|
|
Boolean |
Whether to apply Hermitian constraints to Hamiltonian |
|
|
Boolean |
Whether to calculate bands for band training |
|
|
Integer |
Number of k-points used for band calculation |
|
|
Integer, Dictionary, or null |
Control the number of orbitals considered in band calculation |
|
|
List, String, or null |
k-space path for band structure calculation; |
|
|
Boolean |
Whether to fit SOC Hamiltonian |
|
|
String |
SOC basis type |
|
|
String |
Type of non-linear activation function |
|
|
Boolean |
Whether to apply zero-point potential correction to Hamiltonian matrix |
|
|
Boolean |
Whether to constrain spin |
|
|
Boolean |
Whether for collinear spin |
|
|
Float |
Minimum magnetic moment |
|
|
Boolean |
When |
|
|
Boolean |
Include triplet interaction terms in output |
|
|
Boolean |
Export reciprocal space values during forward pass |
|
|
Boolean |
Use learned weight factors in the output |
|
|
Boolean |
Compute nonzero element mask tensor for sparse Hamiltonian |
|
|
Boolean |
Compute atomic forces during forward pass |
|
|
Boolean |
Create computational graph for backprop (required for force derivatives) |
|
|
Boolean |
Calculate sparsity ratio for loss correction |
|
representation_nets.HamGNN_pre (Representation Network Parameters)
Parameter |
Type |
Description |
Default/Recommended Value |
|---|---|---|---|
|
Float |
Atomic distance cutoff radius |
|
|
String |
Type of distance cutoff function |
|
|
String |
Atomic radius table source |
|
|
Float |
Radius scaling factor |
|
|
String |
Edge spherical harmonic normalization method |
|
|
Boolean |
Whether to normalize edge spherical harmonics |
|
|
String |
Spherical harmonic representation of edges |
|
|
String |
O(3) irreducible representation of initial atomic features |
|
|
Integer |
Number of interaction layers or orbital convolution layers |
|
|
Integer |
Number of Bessel bases |
|
|
Integer |
Maximum number of atom types |
|
|
String |
Type of radial basis function |
|
|
Boolean |
Whether to set features |
|
|
List |
Hidden layer sizes of radial multilayer perceptron |
|
|
Boolean |
Whether to use correlation product |
|
|
Integer |
Correlation parameter |
|
|
Integer |
Number of hidden features |
|
|
Boolean |
Whether to use KAN (Kolmogorov-Arnold Network) activation function |
|
|
Boolean |
Whether to build internal neighbor graph |
|
|
Boolean |
Legacy edge update behavior (for old checkpoint compatibility only) |
|
|
Boolean |
Minimal parameter mode for faster inference (reduces parameter count) |
|
|
Boolean |
Enable charge doping atom embedding for charged defect systems |
|
|
Integer |
Number of charge attribution Gaussian features (only used if |
|
|
Boolean |
Enable gradient checkpointing to reduce memory usage during training |
|
Parameter Adjustment Recommendations
Initial Configuration:
When using for the first time, it’s recommended to first use default parameters for primary training, and then adjust based on results
Learning Rate Adjustment:
For primary training, set initial learning rate to
0.01For secondary training, set initial learning rate to
0.0001If training is unstable, lower the learning rate; if convergence is too slow, increase the learning rate appropriately
Network Depth Adjustment:
For simple systems,
num_layers=3is usually sufficientFor complex systems, try increasing
num_layersto 4-5
Orbital Number Adjustment:
nao_maxneeds to be selected based on the maximum number of atomic orbitals in the systemUse 14 for short-period elements (such as C, Si, O, etc.)
Use 19 for most common elements
Use 26 for all elements supported by OpenMX
Cutoff Radius Adjustment:
The default value of
cutoff26.0 is suitable for most systems; too small acutoffsometimes has poor effectsNote that the
cutoffhere only controls the decay factor of atomic interactions, without affecting the structure of the graph, i.e., not changing the number of edges
Loss Function Weight Adjustment:
In secondary training, the loss function weight for
band_energyis typically set to 0.001~0.01 times that ofhamiltonianIf band fitting effect is poor, the weight of
band_energycan be increased appropriately, but should not be too large to avoid affecting the prediction accuracy of the Hamiltonian
References
Transferable equivariant graph neural networks for the Hamiltonians of molecules and solids
Universal Machine Learning Kohn-Sham Hamiltonian for Materials
A Universal Spin-Orbit-Coupled Hamiltonian Model for Accelerated Quantum Material Discovery
Accelerating the electronic-structure calculation of magnetic systems by equivariant neural networks