Artem commited on
Commit
27f7350
·
0 Parent(s):

first commit

Browse files
Files changed (1) hide show
  1. README.md +302 -0
README.md ADDED
@@ -0,0 +1,302 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ![toc](https://github.com/AIRI-Institute/LiTraj/raw/main/figures/toc.png)
2
+
3
+ ### LiTraj: A Dataset for Benchmarking Machine Learning Models for Predicting Lithium Ion Migration
4
+ ![License](https://img.shields.io/badge/License-MIT-darkred.svg)
5
+ [![GitHub](https://img.shields.io/badge/-Github-181717?logo=github&logoColor=white)](https://github.com/AIRI-Institute/LiTraj)
6
+ [![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)
7
+
8
+
9
+ 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.
10
+
11
+
12
+
13
+ ## Contents
14
+ - [About](#about)
15
+ - [Source links](#available-datasets-and-source-links)
16
+ - [Python tools](#installation)
17
+ - [Datasets in detail](#datasets-in-detail)
18
+ - [nebDFT2k](#nebdft2k-dataset)
19
+ - [MPLiTrj](#mplitrj-dataset)
20
+ - [BVEL13k](#bvel13k-dataset)
21
+ - [nebBVSE122k](#nebbvse122k-dataset)
22
+ - [Notebooks](#notebooks)
23
+ - [Citation](#how-to-cite)
24
+
25
+
26
+
27
+ ## About
28
+
29
+ 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.
30
+
31
+ 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.
32
+
33
+
34
+ ## Available datasets and source links
35
+
36
+ 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.
37
+
38
+ <table style="font-size: 12px;">
39
+ <tr>
40
+ <th>Dataset</th>
41
+ <th>Theory level</th>
42
+ <th>Specs</th>
43
+ <th>File</th>
44
+ <th>Size</th>
45
+ </tr>
46
+ <tr>
47
+ <td><a href="#nebdft2k-dataset">nebDFT2k</a></td>
48
+ <td>DFT(PBE)</td>
49
+ <td>target: migration barrier, geometry <br/> # of samples: 1,681</td>
50
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/nebDFT2k.zip">zip</a> (65 MB)</td>
51
+ <td>0.7 GB</td>
52
+ </tr>
53
+ <tr>
54
+ <td><a href="#nebdft2k-dataset">nebDFT2k_U</a></td>
55
+ <td>DFT(PBE+U)</td>
56
+ <td>target: migration barrier, geometry <br/> # of samples: in progress</td>
57
+ <td>in progress</td>
58
+ <td></td>
59
+ </tr>
60
+ <tr>
61
+ <td><a href="#mplitrj-dataset">MPLiTrj</a></td>
62
+ <td>DFT(PBE)</td>
63
+ <td>target: energy, forces, stress tensor <br/> # of samples: 929,066</td>
64
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/MPLiTrj.zip">zip</a> (3.8 GB)</td>
65
+ <td>16 GB</td>
66
+ </tr>
67
+ <tr>
68
+ <td><a href="#mplitrj-dataset">MPLiTrj_subsample</a></td>
69
+ <td>DFT(PBE)</td>
70
+ <td>target: energy, forces, stress tensor <br/> # of samples: 118,024</td>
71
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/MPLiTrj_subsample.zip">zip</a> (0.5 GB)</td>
72
+ <td>2.1 GB</td>
73
+ </tr>
74
+ <tr>
75
+ <td><a href="#bvel13k-dataset">BVEL13k</a></td>
76
+ <td>BVSE</td>
77
+ <td>target: 1-3D percolation barrier <br/> # of samples: 12,807</td>
78
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/BVEL13k.zip">zip</a> (11 MB)</td>
79
+ <td>35 MB</td>
80
+ </tr>
81
+ <tr>
82
+ <td><a href="#nebbvse122k-dataset">nebBVSE122k</a></td>
83
+ <td>BVSE</td>
84
+ <td>target: migration barrier <br/> # of samples: 122,421</td>
85
+ <td><a href="https://bs3u.obs.ru-moscow-1.hc.sbercloud.ru/litraj/nebBVSE122k.zip">zip</a> (0.2 GB)</td>
86
+ <td>0.9 GB</td>
87
+ </tr>
88
+ </table>
89
+
90
+
91
+ ## Python tools
92
+ ### Installation
93
+
94
+ ```
95
+ pip install litraj
96
+ ```
97
+
98
+ or
99
+
100
+ ```python
101
+ git clone https://github.com/AIRI-Institute/LiTraj
102
+ cd LiTraj
103
+ pip install .
104
+ ```
105
+ ### Download a specific dataset
106
+ ```python
107
+ from litraj.data import download_dataset
108
+ download_dataset('BVEL13k', '.', unzip = True) # save to the current directory and unzip
109
+ ```
110
+
111
+ ### Read the downloaded dataset
112
+ ```python
113
+ from litraj.data import load_data
114
+ train, val, text, index = load_data('BVEL13k', '.')
115
+
116
+ for atoms in train:
117
+ mp_id = atoms.info['material_id']
118
+ e1d = atoms.info['E_1D']
119
+ e2d = atoms.info['E_2D']
120
+ e3d = atoms.info['E_3D']
121
+ # do stuff
122
+ pass
123
+ ```
124
+
125
+ For more details see [Datasets basics](notebooks/datasets.ipynb) in the [notebooks](#notebooks)
126
+
127
+ ## Datasets in detail
128
+ ### nebDFT2k dataset
129
+
130
+ ![benchmark](https://github.com/AIRI-Institute/LiTraj/raw/main/figures/benchmark.png)
131
+
132
+ 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.
133
+
134
+
135
+ 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.
136
+
137
+
138
+ 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.
139
+
140
+
141
+ **Structure of the nebDFT2k dataset**
142
+
143
+ nebDFT2k/
144
+ ├── nebDFT2k_index.csv # Table with material_id, edge_id, chemsys, _split, .., columns
145
+ ├── edge-id1_init.xyz # Initial (BVSE-NEB optimized) trajectory file, edge_id1 = mp-id1_source_target_offsetx_offsety_offsetz
146
+ ├── edge-id1_relaxed.xyz # Final (DFT-NEB optimized) trajectory file
147
+ ├── ...
148
+ └── nebDFT2k_centroids.xyz # File with centroid supercells
149
+
150
+ **Usage example**
151
+
152
+ ```python
153
+ from litraj.data import download_dataset, load_data
154
+
155
+ # download the dataset to the selected folder
156
+ download_dataset('nebDFT2k', 'path/to/save/data')
157
+
158
+ # read the dataset from the folder
159
+ data = load_data('nebDFT2k', 'path/to/save/data')
160
+
161
+ data_train = data[data._split == 'train']
162
+ for atoms in data_train.centroid:
163
+ edge_id = atoms.info['edge_id']
164
+ mp_id = atoms.info['material_id']
165
+ em = atoms.info['em']
166
+ # do stuff
167
+
168
+
169
+ for traj_init, traj_relaxed in zip(data.trajectory_init, data.trajectory_relaxed):
170
+ # do stuff
171
+ pass
172
+
173
+ ```
174
+
175
+
176
+ ### MPLiTrj dataset
177
+
178
+ 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.
179
+
180
+ **Structure of the MPLiTrj dataset**
181
+
182
+ MPLiTraj/
183
+ ├── MPLiTrj_train.xyz # Training file
184
+ ├── MPLiTrj_val.xyz # Validation file
185
+ └── MPLiTrj_test.xyz # Test file
186
+
187
+ **Usage example**
188
+
189
+ ```python
190
+ from litraj.data import download_dataset, load_data
191
+
192
+ # download the dataset to the selected folder
193
+ download_dataset('MPLiTrj_subsample', 'path/to/save/data')
194
+
195
+ train, val, test = load_data('MPLiTrj_subsample', 'path/to/save/data')
196
+
197
+ structures, energies, forces, stresses = [], [], [], []
198
+ for atoms in train:
199
+ structures.append(atoms)
200
+ energies.append(atoms.calc.get_potential_energy())
201
+ forces.append(atoms.calc.get_forces().tolist())
202
+ stresses.append(atoms.calc.get_stress().tolist())
203
+ ```
204
+
205
+ ### BVEL13k dataset
206
+
207
+ ![BVEL13k_stats_figure](https://github.com/AIRI-Institute/LiTraj/raw/main/figures/bvel.png)
208
+
209
+
210
+ 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>.
211
+
212
+
213
+ **Structure of the BVEL13k dataset**
214
+
215
+ BVEL13k/
216
+ ├── BVEL13k_index.csv # Table with material_id, chemsys, _split, E_1D, E_2D, E_3D columns
217
+ ├── BVEL13k_train.xyz # Training file
218
+ ├── BVEL13k_val.xyz # Validation file
219
+ └── BVEL13k_test.xyz # Test file
220
+
221
+ **Usage example**
222
+
223
+ ```python
224
+ from litraj.data import download_dataset, load_data
225
+
226
+ # download the dataset to the selected folder
227
+ download_dataset('BVEL13k', 'path/to/save/data')
228
+
229
+ # get train, val, test split of the dataset and the index dataframe
230
+ atoms_list_train, atoms_list_val, atoms_list_test, index = load_data('BVEL13k', 'path/to/save/data')
231
+
232
+ # the data is stored in the Ase's Atoms object
233
+ for atoms in atoms_list_train:
234
+
235
+ mp_id = atoms.info['material_id']
236
+ e1d = atoms.info['E_1D']
237
+ e2d = atoms.info['E_2D']
238
+ e3d = atoms.info['E_3D']
239
+ # do stuff
240
+ ```
241
+
242
+ ### nebBVSE122k dataset
243
+ ![nebBVSE_stats_figure](https://github.com/AIRI-Institute/LiTraj/raw/main/figures/bvse.png)
244
+ 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.
245
+
246
+ 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.
247
+
248
+ **Structure of the nebBVSE122k dataset**
249
+
250
+ nebBVSE122k/
251
+ ├── nebBVSE122k_index.csv # Table with material_id, chemsys, _split, em columns
252
+ ├── nebBVSE122k_train.xyz # Training file
253
+ ├── nebBVSE122k_val.xyz # Validation file
254
+ └── nebBVSE122k_test.xyz # Test file
255
+
256
+
257
+ **Usage example**
258
+
259
+ ```python
260
+ from litraj.data import download_dataset, load_data
261
+
262
+ # download the dataset to the selected folder
263
+ download_dataset('nebBVSE122k', 'path/to/save/data')
264
+
265
+ # get train, val, test split of the dataset and the index dataframe
266
+ atoms_list_train, atoms_list_val, atoms_list_test, index = load_data('nebBVSE122k', 'path/to/save/data')
267
+
268
+ for atoms_with_centroid in atoms_list_train:
269
+ edge_id = atoms_with_centroid.info['edge_id'] # mp-id_source_target_offsetx_offsety_offsetz
270
+ mp_id = atoms_with_centroid.info['material_id']
271
+ em = atoms_with_centroid.info['em']
272
+ centroid_index = np.argwhere(atoms_with_centroid.symbols =='X')
273
+ # do stuff
274
+ ```
275
+
276
+ ### Notebooks
277
+
278
+ - [Datasets basics](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/datasets.ipynb)
279
+ - [Benchmarking uMLIPs on nebDFT2k](notebooks/nebDFT2k_benchmark_MACE_MP_small.ipynb)
280
+ - [M3GNet training on centroids from nebDFT2k](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/m3gnet_nebDFT2k_centroids.ipynb)
281
+ - [Allegro training on BVEL13k](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/allegro_BVEL13k.ipynb)
282
+ - [BVEL calculations](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/bvel.ipynb)
283
+ - [BVSE-NEB calculations](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/bvse_neb.ipynb)
284
+ - [Featurizers](https://github.com/AIRI-Institute/LiTraj/tree/main/notebooks/featurizers.ipynb)
285
+
286
+
287
+
288
+ ### How to cite
289
+ If you use the LiTraj dataset, please, consider citing our paper
290
+
291
+ ```
292
+ @article{dembitskiy2025benchmarking,
293
+ title = {{Benchmarking machine learning models for predicting lithium ion migration}},
294
+ author = {Dembitskiy, Artem D. and Humonen, Innokentiy S. and Eremin, Roman A. and Aksyonov, Dmitry A. and Fedotov, Stanislav S. and Budennyy, Semen A.},
295
+ journal = {npj Comput. Mater.},
296
+ volume = {11},
297
+ number = {131},
298
+ year = {2025},
299
+ publisher = {Nature Publishing Group},
300
+ doi = {10.1038/s41524-025-01571-z}
301
+ }
302
+ ```