dembart commited on
Commit
2509d55
·
verified ·
1 Parent(s): d1779b0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +292 -3
README.md CHANGED
@@ -1,3 +1,292 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - eng
4
+ pretty_name: "LiTraj"
5
+ tags:
6
+ - uMLIPs
7
+ - chemistry
8
+ - DFT
9
+ - GNN
10
+ - structure-to-property
11
+ license: "mit"
12
+ ---
13
+ ![toc](https://github.com/AIRI-Institute/LiTraj/raw/main/figures/toc.png)
14
+
15
+ ### LiTraj: A Dataset for Benchmarking Machine Learning Models for Predicting Lithium Ion Migration
16
+
17
+ [![GitHub](https://img.shields.io/badge/-Github-181717?logo=github&logoColor=white)](https://github.com/AIRI-Institute/LiTraj)
18
+ [![Custom Badge Text](https://img.shields.io/badge/MACE_uMLIP_benchmark_example-Colab_Notebook-orange?logo=googlecolab&color=orange)](https://colab.research.google.com/drive/1vkF8doorp58hKE0a_W2kVOAMWHPGOjzd#sandboxMode=true&scrollTo=s1TnrzPzoyDb)
19
+ ![License](https://img.shields.io/badge/License-MIT-darkred.svg)
20
+
21
+
22
+ This repository contains links to datasets for benchmarking machine learning models for predicting Li-ion migration, as described in our paper ["Benchmarking machine learning models for predicting lithium ion migration"](https://www.nature.com/articles/s41524-025-01571-z), along with the description of Python utilities for handling the datasets.
23
+
24
+
25
+ ## Contents
26
+ - [About](#about)
27
+ - [Source links](#available-datasets-and-source-links)
28
+ - [Python tools](#installation)
29
+ - [Datasets in detail](#datasets-in-detail)
30
+ - [nebDFT2k](#nebdft2k-dataset)
31
+ - [MPLiTrj](#mplitrj-dataset)
32
+ - [BVEL13k](#bvel13k-dataset)
33
+ - [nebBVSE122k](#nebbvse122k-dataset)
34
+ - [Notebooks](#notebooks)
35
+ - [Citation](#how-to-cite)
36
+
37
+
38
+
39
+ ## About
40
+
41
+ Modern electrochemical devices like Li-ion batteries require materials with fast ion transport. While traditional quantum chemistry methods for predicting ion mobility are computationally intensive, machine learning offers a faster alternative but depends on high-quality data. We introduce the LiTraj dataset, which provides 13,000 percolation barriers, 122,000 migration barriers, and 1,700 migration trajectories — key metrics for evaluating Li-ion mobility in crystals.
42
+
43
+ The datasets are calculated using density functional theory (DFT) and bond valence site energy (BVSE) methods. For the calculations, we used crystal structures collected from [the Materials Project database](https://next-gen.materialsproject.org/) (see [license](https://creativecommons.org/licenses/by/4.0/)). The data is stored in the extended .xyz format, which can be read by the [Atomistic Simulation Environment](https://wiki.fysik.dtu.dk/ase/) (ASE) Python library.
44
+
45
+
46
+ ## Available datasets and source links
47
+
48
+ We provide training, validation, and test data splits for each dataset. See the [Python Tools](#python-tools) and [Datasets in Detail](#datasets-in-detail) sections to learn how to work with the datasets.
49
+
50
+ <table style="font-size: 12px;">
51
+ <tr>
52
+ <th>Dataset</th>
53
+ <th>Theory level</th>
54
+ <th>Specs</th>
55
+ <th>File</th>
56
+ <th>Size</th>
57
+ </tr>
58
+ <tr>
59
+ <td><a href="#nebdft2k-dataset">nebDFT2k</a></td>
60
+ <td>DFT(PBE)</td>
61
+ <td>target: migration barrier, geometry <br/> # of samples: 1,681</td>
62
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/nebDFT2k.zip">zip</a> (65 MB)</td>
63
+ <td>0.7 GB</td>
64
+ </tr>
65
+ <tr>
66
+ <td><a href="#nebdft2k-dataset">nebDFT2k_U</a></td>
67
+ <td>DFT(PBE+U)</td>
68
+ <td>target: migration barrier, geometry <br/> # of samples: in progress</td>
69
+ <td>in progress</td>
70
+ <td></td>
71
+ </tr>
72
+ <tr>
73
+ <td><a href="#mplitrj-dataset">MPLiTrj</a></td>
74
+ <td>DFT(PBE)</td>
75
+ <td>target: energy, forces, stress tensor <br/> # of samples: 929,066</td>
76
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/MPLiTrj.zip">zip</a> (3.8 GB)</td>
77
+ <td>16 GB</td>
78
+ </tr>
79
+ <tr>
80
+ <td><a href="#mplitrj-dataset">MPLiTrj_subsample</a></td>
81
+ <td>DFT(PBE)</td>
82
+ <td>target: energy, forces, stress tensor <br/> # of samples: 118,024</td>
83
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/MPLiTrj_subsample.zip">zip</a> (0.5 GB)</td>
84
+ <td>2.1 GB</td>
85
+ </tr>
86
+ <tr>
87
+ <td><a href="#bvel13k-dataset">BVEL13k</a></td>
88
+ <td>BVSE</td>
89
+ <td>target: 1-3D percolation barrier <br/> # of samples: 12,807</td>
90
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/BVEL13k.zip">zip</a> (11 MB)</td>
91
+ <td>35 MB</td>
92
+ </tr>
93
+ <tr>
94
+ <td><a href="#nebbvse122k-dataset">nebBVSE122k</a></td>
95
+ <td>BVSE</td>
96
+ <td>target: migration barrier <br/> # of samples: 122,421</td>
97
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/nebBVSE122k.zip">zip</a> (0.2 GB)</td>
98
+ <td>0.9 GB</td>
99
+ </tr>
100
+ </table>
101
+
102
+ ## Python tools
103
+ ### Installation
104
+
105
+ ```
106
+ pip install litraj
107
+ ```
108
+
109
+ or
110
+
111
+ ```python
112
+ git clone https://github.com/AIRI-Institute/LiTraj
113
+ cd LiTraj
114
+ pip install .
115
+ ```
116
+ ### Download a specific dataset
117
+ ```python
118
+ from litraj.data import download_dataset
119
+ download_dataset('BVEL13k', '.', unzip = True) # save to the current directory and unzip
120
+ ```
121
+
122
+ ### Read the downloaded dataset
123
+ ```python
124
+ from litraj.data import load_data
125
+ train, val, text, index = load_data('BVEL13k', '.')
126
+ for atoms in train:
127
+ mp_id = atoms.info['material_id']
128
+ e1d = atoms.info['E_1D']
129
+ e2d = atoms.info['E_2D']
130
+ e3d = atoms.info['E_3D']
131
+ # do stuff
132
+ pass
133
+ ```
134
+
135
+ For more details see [Datasets basics](notebooks/datasets.ipynb) in the [notebooks](#notebooks)
136
+
137
+ ## Datasets in detail
138
+ ### nebDFT2k dataset
139
+
140
+ ![benchmark](https://github.com/AIRI-Institute/LiTraj/raw/main/figures/benchmark.png)
141
+
142
+ The nebDFT2k dataset includes Li-ion migration trajectories and corresponding **migration barriers** for 1,681 vacancy hops between initial and final equilibrium sites. The trajectories are optimized using the climbing image nudged elastic band (NEB) method with DFT for force and energy calculations. Initial trajectories were generated via linear interpolation between start and end positions, followed by preconditioning using the BVSE-NEB method from the [ions](https://github.com/dembart/ions) library.
143
+
144
+
145
+ For benchmarking universal machine learning interatomic potentials (uMLIPs), the BVSE-NEB optimized initial trajectories serve as the starting point for uMLIP-NEB optimization. The resulting trajectories are compared to the DFT ground truth. See an [example](notebooks/nebDFT2k_benchmark_MACE_MP_small.ipynb) to learn how to benchmark the pre-trained [MACE_MP](https://github.com/ACEsuit/mace-mp) model.
146
+
147
+
148
+ As an input for graph neural network (GNN) models for structure-to-property prediction of Li-ion migration barriers, we use the supercells with a centroid, marked as 'X' chemical element, added between the starting and final positions of the migrating ion.
149
+
150
+
151
+ **Structure of the nebDFT2k dataset**
152
+
153
+ nebDFT2k/
154
+ ├── nebDFT2k_index.csv # Table with material_id, edge_id, chemsys, _split, .., columns
155
+ ├── edge-id1_init.xyz # Initial (BVSE-NEB optimized) trajectory file, edge_id1 = mp-id1_source_target_offsetx_offsety_offsetz
156
+ ├── edge-id1_relaxed.xyz # Final (DFT-NEB optimized) trajectory file
157
+ ├── ...
158
+ └── nebDFT2k_centroids.xyz # File with centroid supercells
159
+ **Usage example**
160
+
161
+ ```python
162
+ from litraj.data import download_dataset, load_data
163
+ # download the dataset to the selected folder
164
+ download_dataset('nebDFT2k', 'path/to/save/data')
165
+ # read the dataset from the folder
166
+ data = load_data('nebDFT2k', 'path/to/save/data')
167
+ data_train = data[data._split == 'train']
168
+ for atoms in data_train.centroid:
169
+ edge_id = atoms.info['edge_id']
170
+ mp_id = atoms.info['material_id']
171
+ em = atoms.info['em']
172
+ # do stuff
173
+ for traj_init, traj_relaxed in zip(data.trajectory_init, data.trajectory_relaxed):
174
+ # do stuff
175
+ pass
176
+ ```
177
+
178
+
179
+ ### MPLiTrj dataset
180
+
181
+ The MPLiTrj dataset contains 929,066 configurations with calculated energies, forces and stress tensors obtained during the DFT-NEB optimization of 2,698 Li-ion migration pathways. Its subsample comprises 118,024 configurations. Each dataset has three .xyz files corresponding to the training, validation, and test data splits.
182
+
183
+ **Structure of the MPLiTrj dataset**
184
+
185
+ MPLiTraj/
186
+ ├── MPLiTrj_train.xyz # Training file
187
+ ├── MPLiTrj_val.xyz # Validation file
188
+ └── MPLiTrj_test.xyz # Test file
189
+ **Usage example**
190
+
191
+ ```python
192
+ from litraj.data import download_dataset, load_data
193
+ # download the dataset to the selected folder
194
+ download_dataset('MPLiTrj_subsample', 'path/to/save/data')
195
+ train, val, test = load_data('MPLiTrj_subsample', 'path/to/save/data')
196
+ structures, energies, forces, stresses = [], [], [], []
197
+ for atoms in train:
198
+ structures.append(atoms)
199
+ energies.append(atoms.calc.get_potential_energy())
200
+ forces.append(atoms.calc.get_forces().tolist())
201
+ stresses.append(atoms.calc.get_stress().tolist())
202
+ ```
203
+
204
+ ### BVEL13k dataset
205
+
206
+ ![BVEL13k_stats_figure](https://github.com/AIRI-Institute/LiTraj/raw/main/figures/bvel.png)
207
+
208
+
209
+ The BVEL13k dataset contains Li-ion 1-3D percolation barriers calculated for 12,807 Li-containing ionic crystal structures. The percolation barriers are calculated using BVEL method as implemented in the [BVlain](https://github.com/dembart/BVlain) python package. There are 73 chemical elements (species), each structure contains at most 160 atoms and has a unit cell volume smaller than 1500 Å<sup>3</sup>.
210
+
211
+
212
+ **Structure of the BVEL13k dataset**
213
+
214
+ BVEL13k/
215
+ ├── BVEL13k_index.csv # Table with material_id, chemsys, _split, E_1D, E_2D, E_3D columns
216
+ ├── BVEL13k_train.xyz # Training file
217
+ ├── BVEL13k_val.xyz # Validation file
218
+ └── BVEL13k_test.xyz # Test file
219
+ **Usage example**
220
+
221
+ ```python
222
+ from litraj.data import download_dataset, load_data
223
+ # download the dataset to the selected folder
224
+ download_dataset('BVEL13k', 'path/to/save/data')
225
+ # get train, val, test split of the dataset and the index dataframe
226
+ atoms_list_train, atoms_list_val, atoms_list_test, index = load_data('BVEL13k', 'path/to/save/data')
227
+ # the data is stored in the Ase's Atoms object
228
+ for atoms in atoms_list_train:
229
+ mp_id = atoms.info['material_id']
230
+ e1d = atoms.info['E_1D']
231
+ e2d = atoms.info['E_2D']
232
+ e3d = atoms.info['E_3D']
233
+ # do stuff
234
+ ```
235
+
236
+ ### nebBVSE122k dataset
237
+ ![nebBVSE_stats_figure](https://github.com/AIRI-Institute/LiTraj/raw/main/figures/bvse.png)
238
+ The nebBVSE122k dataset contains Li-ion migration barriers calculated for 122,421 Li-ion vacancy hops from its starting to final equilibrium positions. The migration barriers are calculated using the NEB method employing BVSE approach as implemented in the [ions](https://github.com/dembart/ions) python package.
239
+
240
+ As an input for GNN models for structure-to-property prediction, we use the supercells with a centroid, marked as 'X' chemical element, added between the starting and final positions of the migrating ion.
241
+
242
+ **Structure of the nebBVSE122k dataset**
243
+
244
+ nebBVSE122k/
245
+ ├── nebBVSE122k_index.csv # Table with material_id, chemsys, _split, em columns
246
+ ├── nebBVSE122k_train.xyz # Training file
247
+ ├── nebBVSE122k_val.xyz # Validation file
248
+ └── nebBVSE122k_test.xyz # Test file
249
+
250
+ **Usage example**
251
+
252
+ ```python
253
+ from litraj.data import download_dataset, load_data
254
+ # download the dataset to the selected folder
255
+ download_dataset('nebBVSE122k', 'path/to/save/data')
256
+ # get train, val, test split of the dataset and the index dataframe
257
+ atoms_list_train, atoms_list_val, atoms_list_test, index = load_data('nebBVSE122k', 'path/to/save/data')
258
+ for atoms_with_centroid in atoms_list_train:
259
+ edge_id = atoms_with_centroid.info['edge_id'] # mp-id_source_target_offsetx_offsety_offsetz
260
+ mp_id = atoms_with_centroid.info['material_id']
261
+ em = atoms_with_centroid.info['em']
262
+ centroid_index = np.argwhere(atoms_with_centroid.symbols =='X')
263
+ # do stuff
264
+ ```
265
+
266
+ ### Notebooks
267
+
268
+ - [Datasets basics](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/datasets.ipynb)
269
+ - [Benchmarking uMLIPs on nebDFT2k](notebooks/nebDFT2k_benchmark_MACE_MP_small.ipynb)
270
+ - [M3GNet training on centroids from nebDFT2k](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/m3gnet_nebDFT2k_centroids.ipynb)
271
+ - [Allegro training on BVEL13k](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/allegro_BVEL13k.ipynb)
272
+ - [BVEL calculations](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/bvel.ipynb)
273
+ - [BVSE-NEB calculations](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/bvse_neb.ipynb)
274
+ - [Featurizers](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/featurizers.ipynb)
275
+
276
+
277
+
278
+ ### How to cite
279
+ If you use the LiTraj dataset, please, consider citing our paper
280
+
281
+ ```
282
+ @article{dembitskiy2025benchmarking,
283
+ title = {{Benchmarking machine learning models for predicting lithium ion migration}},
284
+ author = {Dembitskiy, Artem D. and Humonen, Innokentiy S. and Eremin, Roman A. and Aksyonov, Dmitry A. and Fedotov, Stanislav S. and Budennyy, Semen A.},
285
+ journal = {npj Comput. Mater.},
286
+ volume = {11},
287
+ number = {131},
288
+ year = {2025},
289
+ publisher = {Nature Publishing Group},
290
+ doi = {10.1038/s41524-025-01571-z}
291
+ }
292
+ ```