BowenD-UCB commited on
Commit
33dde2b
·
verified ·
1 Parent(s): ccc46b4

Add CHGNet PyG PBE model and model card

Browse files
Files changed (4) hide show
  1. README.md +91 -0
  2. model.json +159 -0
  3. model.pt +3 -0
  4. state.pt +3 -0
README.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: matgl
3
+ tags:
4
+ - matgl
5
+ - materials-science
6
+ - graph-neural-network
7
+ ---
8
+
9
+ # Description
10
+
11
+ This model is a CHGNet universal potential for the **PyTorch Geometric (PyG) backend** of
12
+ [MatGL](https://github.com/materialyzeai/matgl). The weights were **directly transferred**
13
+ from the DGL checkpoint
14
+ [materialyze/CHGNet-PES-MatPES-PBE-2025.2.10](https://huggingface.co/materialyze/CHGNet-PES-MatPES-PBE-2025.2.10)
15
+ — no retraining was performed.
16
+
17
+ The architecture is a faithful PyG port of the original DGL CHGNet implementation.
18
+ The DGL implementation has a slight modification from the original PyTorch implementation
19
+ by adding directed edge updates; this PyG port preserves that modification.
20
+
21
+ # Training dataset
22
+
23
+ MatPES-PBE-2024.11: Materials Energy Surface dataset that contains off-equilibrium PBE static calculations.
24
+ - Train-Val-Test splitting with mp-id: 0.9 - 0.5 - 0.5
25
+ - Train set size: 391241
26
+ - Validation set size: 21736
27
+ - Test set size: 21735
28
+
29
+ # Performance metrics
30
+ ## Training and validation errors
31
+
32
+ Identical to the source DGL checkpoint (weights are the same):
33
+
34
+ | partition | Energy (meV/atom) | Force (meV/Å) | stress (GPa) | magmom (μB) |
35
+ | ---------- |-------------------|---------------|--------------|-------------|
36
+ | Train | 26.54 | 81.4 | 0.375 | 0.066 |
37
+ | Validation | 32.02 | 123.8 | 0.617 | 0.067 |
38
+ | Test | 30.70 | 136.0 | 0.642 | 0.066 |
39
+
40
+ ## PyG vs DGL prediction parity
41
+
42
+ Evaluated on 10 structures spanning diverse chemistries (MoS, Fe, Mo, Al, NaCl, BaTiO₃,
43
+ Li₂O, MgO, and their perturbed variants) with both the PyG and DGL models running
44
+ independently.
45
+
46
+ | Quantity | Max |ΔPyG − ΔDGL| |
47
+ |---|---|
48
+ | Energy/atom (eV) | 0 (exact) |
49
+ | Forces (eV/Å) | 1.5 × 10⁻⁷ |
50
+ | Stress (GPa) | 4.1 × 10⁻⁶ |
51
+ | Magnetic moment (μB) | 0 (exact) |
52
+
53
+ Non-zero force/stress differences arise from floating-point summation order differences
54
+ between DGL and PyG message-passing kernels, not from any model divergence.
55
+ All differences are more than two orders of magnitude below the `atol = 1e-5` threshold
56
+ of the automated parity test.
57
+
58
+ # Usage
59
+
60
+ ```python
61
+ import matgl
62
+ from matgl.ext.pymatgen import Structure2Graph
63
+ import torch
64
+
65
+ pot = matgl.load_model("BowenD-UCB/CHGNet-PyG-MatPES-PBE-2025.2.10")
66
+ pot.eval()
67
+ ```
68
+
69
+ # References
70
+
71
+ ```txt
72
+ Deng, B. et al. CHGNet as a pretrained universal neural network potential for charge-informed atomistic modelling.
73
+ Nat. Mach. Intell. 1–11 (2023) doi:10.1038/s42256-023-00716-3.
74
+ ```
75
+
76
+ #### Date: 2025.2.10
77
+ #### Author: Bowen Deng
78
+
79
+ ## Metadata
80
+
81
+ ```json
82
+ {
83
+ "tags": [
84
+ "matgl",
85
+ "materials-science",
86
+ "graph-neural-network"
87
+ ],
88
+ "license": "BSD-3-Clause",
89
+ "author": "Bowen Deng"
90
+ }
91
+ ```
model.json ADDED
@@ -0,0 +1,159 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "@class": "Potential",
3
+ "@module": "matgl.apps._pes_pyg",
4
+ "@model_version": 3,
5
+ "metadata": null,
6
+ "kwargs": {
7
+ "model": {
8
+ "@class": "CHGNet",
9
+ "@module": "matgl.models._chgnet_pyg",
10
+ "@model_version": 1,
11
+ "init_args": {
12
+ "element_types": [
13
+ "H",
14
+ "He",
15
+ "Li",
16
+ "Be",
17
+ "B",
18
+ "C",
19
+ "N",
20
+ "O",
21
+ "F",
22
+ "Ne",
23
+ "Na",
24
+ "Mg",
25
+ "Al",
26
+ "Si",
27
+ "P",
28
+ "S",
29
+ "Cl",
30
+ "Ar",
31
+ "K",
32
+ "Ca",
33
+ "Sc",
34
+ "Ti",
35
+ "V",
36
+ "Cr",
37
+ "Mn",
38
+ "Fe",
39
+ "Co",
40
+ "Ni",
41
+ "Cu",
42
+ "Zn",
43
+ "Ga",
44
+ "Ge",
45
+ "As",
46
+ "Se",
47
+ "Br",
48
+ "Kr",
49
+ "Rb",
50
+ "Sr",
51
+ "Y",
52
+ "Zr",
53
+ "Nb",
54
+ "Mo",
55
+ "Tc",
56
+ "Ru",
57
+ "Rh",
58
+ "Pd",
59
+ "Ag",
60
+ "Cd",
61
+ "In",
62
+ "Sn",
63
+ "Sb",
64
+ "Te",
65
+ "I",
66
+ "Xe",
67
+ "Cs",
68
+ "Ba",
69
+ "La",
70
+ "Ce",
71
+ "Pr",
72
+ "Nd",
73
+ "Pm",
74
+ "Sm",
75
+ "Eu",
76
+ "Gd",
77
+ "Tb",
78
+ "Dy",
79
+ "Ho",
80
+ "Er",
81
+ "Tm",
82
+ "Yb",
83
+ "Lu",
84
+ "Hf",
85
+ "Ta",
86
+ "W",
87
+ "Re",
88
+ "Os",
89
+ "Ir",
90
+ "Pt",
91
+ "Au",
92
+ "Hg",
93
+ "Tl",
94
+ "Pb",
95
+ "Bi",
96
+ "Ac",
97
+ "Th",
98
+ "Pa",
99
+ "U",
100
+ "Np",
101
+ "Pu"
102
+ ],
103
+ "dim_state_feats": null,
104
+ "non_linear_bond_embedding": false,
105
+ "non_linear_angle_embedding": false,
106
+ "cutoff": 6.0,
107
+ "threebody_cutoff": 3.0,
108
+ "cutoff_exponent": 5,
109
+ "max_f": 32,
110
+ "learn_basis": false,
111
+ "num_blocks": 5,
112
+ "shared_bond_weights": "both",
113
+ "final_mlp_type": "mlp",
114
+ "final_hidden_dims": [
115
+ 128,
116
+ 128
117
+ ],
118
+ "final_dropout": 0.0,
119
+ "pooling_operation": "sum",
120
+ "readout_field": "atom_feat",
121
+ "activation_type": "swish",
122
+ "is_intensive": false,
123
+ "num_targets": 1,
124
+ "num_site_targets": 1,
125
+ "task_type": "regression",
126
+ "angle_update_hidden_dims": [],
127
+ "atom_conv_hidden_dims": [
128
+ 128
129
+ ],
130
+ "bond_conv_hidden_dims": [
131
+ 128
132
+ ],
133
+ "bond_update_hidden_dims": [
134
+ 128
135
+ ],
136
+ "conv_dropout": 0.0,
137
+ "dim_angle_embedding": 128,
138
+ "dim_atom_embedding": 128,
139
+ "dim_bond_embedding": 128,
140
+ "dim_state_embedding": null,
141
+ "layer_bond_weights": null,
142
+ "max_n": 63,
143
+ "normalization": "layer",
144
+ "normalize_hidden": false
145
+ }
146
+ },
147
+ "data_mean": "tensor(0.)",
148
+ "data_std": "tensor(3.2515)",
149
+ "element_refs": "tensor([ -3.6867, -1.9978, -3.7186, -3.3643, -6.6234, -8.4499, -5.5657,\n -6.9965, -4.9662, -0.0187, -1.5531, -1.6896, -4.4992, -6.0153,\n -6.3834, -4.9390, -2.6428, -0.0427, -1.7198, -5.0344, -7.1726,\n -9.6275, -9.8038, -9.5224, -9.3022, -7.7307, -6.3933, -4.3683,\n -3.1376, -0.9442, -3.3615, -4.5886, -4.4786, -4.1130, -2.3407,\n 7.9289, -1.5689, -3.9607, -8.6393, -9.3327, -10.5867, -10.7636,\n -8.6914, -8.1344, -6.6219, -4.7359, -1.0682, -0.7805, -2.6786,\n -3.9057, -3.9473, -3.1972, -1.8243, 11.1554, -1.7597, -5.2027,\n -7.8053, -7.3150, -7.9745, -8.8961, -7.8314, -11.5431, -13.3298,\n -15.1617, -11.3405, -10.4704, -8.9142, -8.1105, -6.9612, -4.9349,\n -6.2312, -10.3309, -12.0231, -12.5809, -10.7719, -9.5070, -7.7026,\n -5.5023, -2.7198, 0.8658, -1.7361, -3.2330, -3.5141, -3.2480,\n -8.0818, -8.3339, -11.9343, -11.9106, -13.3325])",
150
+ "calc_forces": true,
151
+ "calc_stresses": true,
152
+ "calc_hessian": false,
153
+ "calc_magmom": true,
154
+ "calc_charge": false,
155
+ "calc_repuls": false,
156
+ "zbl_trainable": false,
157
+ "debug_mode": false
158
+ }
159
+ }
model.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4485f0c99472de4672ad5f0cb84c2e89679137708b397cf927f94269a4019715
3
+ size 3974
state.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9bb47085b0395c8c19de76f15432feaafb81a9cebe22f65e7b13b444bf59b63
3
+ size 11099906