Zhongning commited on
Commit
d0a5d19
·
verified ·
1 Parent(s): c9cb8d9

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -1,60 +1,90 @@
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
- *.avro filter=lfs diff=lfs merge=lfs -text
4
  *.bin filter=lfs diff=lfs merge=lfs -text
 
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
6
- *.ckpt filter=lfs diff=lfs merge=lfs -text
7
  *.ftz filter=lfs diff=lfs merge=lfs -text
8
  *.gz filter=lfs diff=lfs merge=lfs -text
9
  *.h5 filter=lfs diff=lfs merge=lfs -text
10
  *.joblib filter=lfs diff=lfs merge=lfs -text
11
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
12
- *.lz4 filter=lfs diff=lfs merge=lfs -text
13
- *.mds filter=lfs diff=lfs merge=lfs -text
14
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
15
  *.model filter=lfs diff=lfs merge=lfs -text
16
  *.msgpack filter=lfs diff=lfs merge=lfs -text
17
- *.npy filter=lfs diff=lfs merge=lfs -text
18
- *.npz filter=lfs diff=lfs merge=lfs -text
19
  *.onnx filter=lfs diff=lfs merge=lfs -text
20
  *.ot filter=lfs diff=lfs merge=lfs -text
21
  *.parquet filter=lfs diff=lfs merge=lfs -text
22
  *.pb filter=lfs diff=lfs merge=lfs -text
23
- *.pickle filter=lfs diff=lfs merge=lfs -text
24
- *.pkl filter=lfs diff=lfs merge=lfs -text
25
  *.pt filter=lfs diff=lfs merge=lfs -text
26
  *.pth filter=lfs diff=lfs merge=lfs -text
27
  *.rar filter=lfs diff=lfs merge=lfs -text
28
- *.safetensors filter=lfs diff=lfs merge=lfs -text
29
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
30
- *.tar.* filter=lfs diff=lfs merge=lfs -text
31
  *.tar filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
32
  *.tflite filter=lfs diff=lfs merge=lfs -text
33
  *.tgz filter=lfs diff=lfs merge=lfs -text
34
- *.wasm filter=lfs diff=lfs merge=lfs -text
35
  *.xz filter=lfs diff=lfs merge=lfs -text
36
  *.zip filter=lfs diff=lfs merge=lfs -text
37
- *.zst filter=lfs diff=lfs merge=lfs -text
38
- *tfevents* filter=lfs diff=lfs merge=lfs -text
39
- # Audio files - uncompressed
40
- *.pcm filter=lfs diff=lfs merge=lfs -text
41
- *.sam filter=lfs diff=lfs merge=lfs -text
42
- *.raw filter=lfs diff=lfs merge=lfs -text
43
- # Audio files - compressed
44
- *.aac filter=lfs diff=lfs merge=lfs -text
45
- *.flac filter=lfs diff=lfs merge=lfs -text
46
- *.mp3 filter=lfs diff=lfs merge=lfs -text
47
- *.ogg filter=lfs diff=lfs merge=lfs -text
48
- *.wav filter=lfs diff=lfs merge=lfs -text
49
- # Image files - uncompressed
50
- *.bmp filter=lfs diff=lfs merge=lfs -text
51
- *.gif filter=lfs diff=lfs merge=lfs -text
52
- *.png filter=lfs diff=lfs merge=lfs -text
53
- *.tiff filter=lfs diff=lfs merge=lfs -text
54
- # Image files - compressed
55
  *.jpg filter=lfs diff=lfs merge=lfs -text
 
56
  *.jpeg filter=lfs diff=lfs merge=lfs -text
 
 
57
  *.webp filter=lfs diff=lfs merge=lfs -text
58
- # Video files - compressed
 
 
 
 
 
 
 
 
 
 
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
- *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
 
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
 
6
  *.ftz filter=lfs diff=lfs merge=lfs -text
7
  *.gz filter=lfs diff=lfs merge=lfs -text
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
 
 
 
11
  *.model filter=lfs diff=lfs merge=lfs -text
12
  *.msgpack filter=lfs diff=lfs merge=lfs -text
 
 
13
  *.onnx filter=lfs diff=lfs merge=lfs -text
14
  *.ot filter=lfs diff=lfs merge=lfs -text
15
  *.parquet filter=lfs diff=lfs merge=lfs -text
16
  *.pb filter=lfs diff=lfs merge=lfs -text
 
 
17
  *.pt filter=lfs diff=lfs merge=lfs -text
18
  *.pth filter=lfs diff=lfs merge=lfs -text
19
  *.rar filter=lfs diff=lfs merge=lfs -text
 
20
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
 
21
  *.tar filter=lfs diff=lfs merge=lfs -text
22
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
23
+ *.mat filter=lfs diff=lfs merge=lfs -text
24
+ *.npz filter=lfs diff=lfs merge=lfs -text
25
+ *.npy filter=lfs diff=lfs merge=lfs -text
26
+ *.h5 filter=lfs diff=lfs merge=lfs -text
27
+ *.hdf5 filter=lfs diff=lfs merge=lfs -text
28
+ *.pickle filter=lfs diff=lfs merge=lfs -text
29
+ *.pkl filter=lfs diff=lfs merge=lfs -text
30
  *.tflite filter=lfs diff=lfs merge=lfs -text
31
  *.tgz filter=lfs diff=lfs merge=lfs -text
 
32
  *.xz filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zstandard filter=lfs diff=lfs merge=lfs -text
35
+ *.tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ *.db* filter=lfs diff=lfs merge=lfs -text
37
+ *.ark* filter=lfs diff=lfs merge=lfs -text
38
+ **/*ckpt*data* filter=lfs diff=lfs merge=lfs -text
39
+ **/*ckpt*.meta filter=lfs diff=lfs merge=lfs -text
40
+ **/*ckpt*.index filter=lfs diff=lfs merge=lfs -text
41
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
42
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
 
 
 
 
43
  *.jpg filter=lfs diff=lfs merge=lfs -text
44
+ *.png filter=lfs diff=lfs merge=lfs -text
45
  *.jpeg filter=lfs diff=lfs merge=lfs -text
46
+ *.bmp filter=lfs diff=lfs merge=lfs -text
47
+ *.gif filter=lfs diff=lfs merge=lfs -text
48
  *.webp filter=lfs diff=lfs merge=lfs -text
49
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
50
+ *.wav filter=lfs diff=lfs merge=lfs -text
51
+ *.wma filter=lfs diff=lfs merge=lfs -text
52
+ *.aac filter=lfs diff=lfs merge=lfs -text
53
+ *.ogg filter=lfs diff=lfs merge=lfs -text
54
+ *.m4a filter=lfs diff=lfs merge=lfs -text
55
+ *.m3u8 filter=lfs diff=lfs merge=lfs -text
56
+ *.amr filter=lfs diff=lfs merge=lfs -text
57
+ *.audio filter=lfs diff=lfs merge=lfs -text
58
+ *.avi filter=lfs diff=lfs merge=lfs -text
59
+ *.flv filter=lfs diff=lfs merge=lfs -text
60
  *.mp4 filter=lfs diff=lfs merge=lfs -text
61
+ *.mpg filter=lfs diff=lfs merge=lfs -text
62
+ *.asf filter=lfs diff=lfs merge=lfs -text
63
+ *.mov filter=lfs diff=lfs merge=lfs -text
64
+ *.mpeg filter=lfs diff=lfs merge=lfs -text
65
+ *.3gp filter=lfs diff=lfs merge=lfs -text
66
+ *.wmv filter=lfs diff=lfs merge=lfs -text
67
+ *.rmvb filter=lfs diff=lfs merge=lfs -text
68
+ *.rm filter=lfs diff=lfs merge=lfs -text
69
+ *.ts filter=lfs diff=lfs merge=lfs -text
70
+ *.mkv filter=lfs diff=lfs merge=lfs -text
71
+ *.flash filter=lfs diff=lfs merge=lfs -text
72
+ *.vob filter=lfs diff=lfs merge=lfs -text
73
+ *.pdf filter=lfs diff=lfs merge=lfs -text
74
+ *.ost filter=lfs diff=lfs merge=lfs -text
75
+ *.pst filter=lfs diff=lfs merge=lfs -text
76
+ *.doc filter=lfs diff=lfs merge=lfs -text
77
+ *.docx filter=lfs diff=lfs merge=lfs -text
78
+ *.txt filter=lfs diff=lfs merge=lfs -text
79
+ *.ppt filter=lfs diff=lfs merge=lfs -text
80
+ *.pptx filter=lfs diff=lfs merge=lfs -text
81
+ *.xls filter=lfs diff=lfs merge=lfs -text
82
+ *.xlsx filter=lfs diff=lfs merge=lfs -text
83
+ *.vsd filter=lfs diff=lfs merge=lfs -text
84
+ *.vsdx filter=lfs diff=lfs merge=lfs -text
85
+ *.jsonl filter=lfs diff=lfs merge=lfs -text
86
+ *.json filter=lfs diff=lfs merge=lfs -text
87
+ dataset_infos.json ignore
88
+ *.csv filter=lfs diff=lfs merge=lfs -text
89
+ *.tsv filter=lfs diff=lfs merge=lfs -text
90
+ *.extxyz filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - OC20
5
+ - Open Catalyst
6
+ - catalysis
7
+ - S2EF
8
+ - UMA
9
+ - extxyz
10
+ - ASE-lmdb
11
+ language:
12
+ - en
13
+ - zh
14
+ ---
15
+
16
+ <p align="center">
17
+ <strong>
18
+ <span style="font-size: 30px;">OC20</span>
19
+ </strong>
20
+ </p>
21
+
22
+ ## Dataset Description
23
+
24
+ The OC20 dataset is an extxyz subset of the Open Catalyst 2020 (OC20) S2EF (Structure to Energy and Forces) dataset. It contains atomic coordinates, unit-cell information, energies, and forces for adsorption configurations on catalytic material surfaces. Its energy and force fields are consistent with those in the UMA OC20 configuration, making it a standard benchmark dataset for developing and validating machine-learned interatomic potential methods for catalytic materials.
25
+
26
+ This repository currently contains two splits:
27
+
28
+ - `s2ef_200k_uncompressed`: Training subset with 2 shards and 10,000 frames in total, with 8–221 atoms per frame.
29
+ - `s2ef_val_id_uncompressed`: In-distribution validation subset with 4 shards and 20,000 frames in total, with 8–223 atoms per frame.
30
+
31
+ The original data comes from the [Open Catalyst Project / fair-chem OC20](https://fair-chem.github.io/oc20/). This repository provides the accompanying data package for the OneScience UMA fine-tuning example.
32
+
33
+ The current data package contains approximately 8 files totaling approximately 1.2 GB.
34
+
35
+ ## Supported Tasks
36
+
37
+ This standardized data repository organizes the complete OC20 S2EF subset package, including training and validation sets, to support:
38
+ - Fine-tuning machine-learned interatomic potentials on adsorption configurations at catalytic material surfaces
39
+ - Training and validation of energy and force prediction models
40
+ - Functional testing and benchmark evaluation of the UMA framework
41
+
42
+ ## Dataset Format and Structure
43
+
44
+ The data files are located in the `data/oc20/` directory and organized into shards by split:
45
+
46
+ | File Path | Format | Shape / Content | Description |
47
+ |---|---|---|---|
48
+ | `oc20/s2ef_200k_uncompressed/0.extxyz` | extxyz | `[N_frames, N_atoms]` | Training subset shard 0, 5,000 frames |
49
+ | `oc20/s2ef_200k_uncompressed/1.extxyz` | extxyz | `[N_frames, N_atoms]` | Training subset shard 1, 5,000 frames |
50
+ | `oc20/s2ef_val_id_uncompressed/0.extxyz` | extxyz | `[N_frames, N_atoms]` | Validation subset shard 0, 5,000 frames |
51
+ | `oc20/s2ef_val_id_uncompressed/1.extxyz` | extxyz | `[N_frames, N_atoms]` | Validation subset shard 1, 5,000 frames |
52
+ | `oc20/s2ef_val_id_uncompressed/2.extxyz` | extxyz | `[N_frames, N_atoms]` | Validation subset shard 2, 5,000 frames |
53
+ | `oc20/s2ef_val_id_uncompressed/3.extxyz` | extxyz | `[N_frames, N_atoms]` | Validation subset shard 3, 5,000 frames |
54
+ | `metadata/schema.yaml` | YAML | Data structure description | extxyz field schema definition |
55
+ | `metadata/sha256_manifest.txt` | SHA256 | Checksum manifest | File integrity verification |
56
+
57
+ ### extxyz Data Format
58
+
59
+ Each configuration consists of an atom-count line, a comment line, and atom lines. The comment line contains `Lattice`, `Properties`, `energy`, `free_energy`, and `pbc`. Each atom line contains the element, coordinates, `move_mask`, `tags`, and `forces`.
60
+
61
+ | Field | Type | Shape | Description |
62
+ |---|---|---|---|
63
+ | `species` | str | `[N_atoms]` | Element symbols spanning various metals and nonmetals |
64
+ | `pos` | float | `[N_atoms, 3]` | Atomic coordinates in Å |
65
+ | `move_mask` | bool | `[N_atoms]` | Whether each atom can move, `T` or `F` |
66
+ | `tags` | int | `[N_atoms]` | Atomic labels distinguishing adsorbates, surfaces, subsurfaces, and other categories |
67
+ | `forces` | float | `[N_atoms, 3]` | Atomic forces in eV/Å |
68
+ | `energy` | float | `[1]` | Total configuration energy in eV |
69
+ | `free_energy` | float | `[1]` | Configuration free energy in eV |
70
+ | `pbc` | bool | `[3]` | Periodic boundary conditions |
71
+ | `Lattice` | float | `[3, 3]` | Periodic cell matrix |
72
+
73
+
74
+ ## How to Use the Dataset
75
+
76
+ ### Download the Dataset
77
+
78
+ ```bash
79
+ hf download --dataset OneScience-Sugon/oc20 --local-dir ./data
80
+ ```
81
+
82
+ ## Official OneScience Information
83
+
84
+ | Platform | OneScience Main Repository | Skills Repository |
85
+ |---|---|---|
86
+ | Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
87
+ | GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
88
+
89
+ ## Limitations and License
90
+
91
+ This dataset is an official S2EF subset of Open Catalyst 2020 (OC20). No new samples were generated, and the original data content was not altered.
92
+
93
+ - **Original source**: [Open Catalyst Project / fair-chem OC20](https://fair-chem.github.io/oc20/)
94
+ - **License**: Apache License 2.0
95
+ - **Usage restrictions**: Refer to the original OC20 data source and the information provided by the OneScience repository and ModelScope page
96
+
97
+ When using the OC20 dataset, cite the original Open Catalyst paper:
98
+
99
+ - Chanussot, L.; Das, A.; Goyal, S.; Lavril, T.; Shuaibi, M.; Riviere, M.; Tran, K.; Heras-Domingo, J.; Ho, C.; Hu, W.; Palizhati, A.; Sriram, A.; Wood, B.; Yoon, J.; Parikh, D.; Zitnick, C. L.; Ulissi, Z. Open Catalyst 2020 (OC20) Dataset and Community Challenges. *ACS Catal.* **2021**, *11* (10), 6059–6072. https://doi.org/10.1021/acscatal.0c04525
README_zh.md ADDED
@@ -0,0 +1,99 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: Apache-2.0
3
+ tags:
4
+ - OC20
5
+ - Open Catalyst
6
+ - catalysis
7
+ - S2EF
8
+ - UMA
9
+ - extxyz
10
+ - ASE-lmdb
11
+ language:
12
+ - en
13
+ - zh
14
+ ---
15
+
16
+ <p align="center">
17
+ <strong>
18
+ <span style="font-size: 30px;">OC20</span>
19
+ </strong>
20
+ </p>
21
+
22
+ ## 数据集描述
23
+
24
+ OC20 数据集是Open Catalyst 2020 (OC20) S2EF(Structure to Energy and Forces)extxyz 子集。数据包含催化材料表面吸附构型的原子坐标、晶胞信息、能量和受力数据,字段与 UMA OC20 配置中的能量、受力字段一致,是学习和验证催化材料机器学习原子间势方法的标准基准数据集。
25
+
26
+ 本仓库当前包含两个 split:
27
+
28
+ - `s2ef_200k_uncompressed`:训练子集,2 个分片,共 10000 帧,每帧 8–221 个原子。
29
+ - `s2ef_val_id_uncompressed`:验证子集(in-distribution),4 个分片,共 20000 帧,每帧 8–223 个原子。
30
+
31
+ 原始数据来自 [Open Catalyst Project / fair-chem OC20](https://fair-chem.github.io/oc20/),本仓库是其面向 OneScience UMA 微调示例的配套数据包。
32
+
33
+ 当前数据包包含约 8 个文件,约 1.2 GB。
34
+
35
+ ## 数据集支持的任务
36
+
37
+ 本标准化数据仓库整理了 OC20 S2EF 子集的完整数据包,包含训练集和验证集,可用于:
38
+ - 催化材料表面吸附构型的机器学习原子间势微调
39
+ - 能量与受力预测模型的训练与验证
40
+ - UMA 框架的功能测试与基准评测
41
+
42
+ ## 数据集的格式和结构
43
+
44
+ 数据文件位于 `data/oc20/` 目录下,按 split 分片组织:
45
+
46
+ | 文件路径 | 格式 | shape / 内容 | 说明 |
47
+ |---|---|---|---|
48
+ | `oc20/s2ef_200k_uncompressed/0.extxyz` | extxyz | `[N_frames, N_atoms]` | 训练子集分片 0,5000 帧 |
49
+ | `oc20/s2ef_200k_uncompressed/1.extxyz` | extxyz | `[N_frames, N_atoms]` | 训练子集分片 1,5000 帧 |
50
+ | `oc20/s2ef_val_id_uncompressed/0.extxyz` | extxyz | `[N_frames, N_atoms]` | 验证子集分片 0,5000 帧 |
51
+ | `oc20/s2ef_val_id_uncompressed/1.extxyz` | extxyz | `[N_frames, N_atoms]` | 验证子集分片 1,5000 帧 |
52
+ | `oc20/s2ef_val_id_uncompressed/2.extxyz` | extxyz | `[N_frames, N_atoms]` | 验证子集分片 2,5000 帧 |
53
+ | `oc20/s2ef_val_id_uncompressed/3.extxyz` | extxyz | `[N_frames, N_atoms]` | 验证子集分片 3,5000 帧 |
54
+ | `metadata/schema.yaml` | YAML | 数据结构说明 | extxyz 字段 schema 定义 |
55
+ | `metadata/sha256_manifest.txt` | SHA256 | 校验清单 | 文件完整性校验 |
56
+
57
+ ### extxyz 数据格式
58
+
59
+ 每个构型由原子数行、comment 行和原子行组成。comment 行包含 `Lattice`、`Properties`、`energy`、`free_energy` 和 `pbc`。原子行包含元素、坐标、`move_mask`、`tags` 和 `forces`。
60
+
61
+ | 字段 | 类型 | shape | 说明 |
62
+ |---|---|---|---|
63
+ | `species` | str | `[N_atoms]` | 元素符号,覆盖多种金属、非金属元素 |
64
+ | `pos` | float | `[N_atoms, 3]` | 原子坐标,单位 Å |
65
+ | `move_mask` | bool | `[N_atoms]` | 原子是否可移动,`T` 或 `F` |
66
+ | `tags` | int | `[N_atoms]` | 原子标签,区分吸附质、表面、次表面等 |
67
+ | `forces` | float | `[N_atoms, 3]` | 原子受力,单位 eV/Å |
68
+ | `energy` | float | `[1]` | 构型总能量,单位 eV |
69
+ | `free_energy` | float | `[1]` | 构型自由能,单位 eV |
70
+ | `pbc` | bool | `[3]` | 周期边界条件 |
71
+ | `Lattice` | float | `[3, 3]` | 周期盒矩阵 |
72
+
73
+
74
+ ## 数据集使用方式
75
+
76
+ ### 下载数据集
77
+
78
+ ```bash
79
+ hf download --dataset OneScience-Sugon/oc20 --local-dir ./data
80
+ ```
81
+
82
+ ## OneScience 官方信息
83
+
84
+ | 平台 | OneScience 主仓库 | Skills 仓库 |
85
+ |---|---|---|
86
+ | Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
87
+ | GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
88
+
89
+ ## 限制与许可证
90
+
91
+ 本数据集为 Open Catalyst 2020 (OC20) 官方 S2EF 子集,未生成新样本或改变原始数据内容。
92
+
93
+ - **原始来源**:[Open Catalyst Project / fair-chem OC20](https://fair-chem.github.io/oc20/)
94
+ - **许可证**:Apache License 2.0
95
+ - **使用限制**:以原始 OC20 数据来源、OneScience 仓库及 ModelScope 页面说明为准
96
+
97
+ 使用 OC20 数据集时请引用原始 Open Catalyst 论文:
98
+
99
+ - Chanussot, L.; Das, A.; Goyal, S.; Lavril, T.; Shuaibi, M.; Riviere, M.; Tran, K.; Heras-Domingo, J.; Ho, C.; Hu, W.; Palizhati, A.; Sriram, A.; Wood, B.; Yoon, J.; Parikh, D.; Zitnick, C. L.; Ulissi, Z. Open Catalyst 2020 (OC20) Dataset and Community Challenges. *ACS Catal.* **2021**, *11* (10), 6059–6072. https://doi.org/10.1021/acscatal.0c04525
data/oc20/s2ef_200k_uncompressed/0.extxyz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c1498dcf9304060c19fcdd75b4f527ed56ed2c9a56678a19783884cb6744190a
3
+ size 43774115
data/oc20/s2ef_200k_uncompressed/1.extxyz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:803b86307583bc351a843c8b773a0297abb9bccc784369fdf26455d5ddd1c249
3
+ size 44149032
data/oc20/s2ef_val_id_uncompressed/0.extxyz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c73976d4ee4e584bed87bd4cdc58555a468f8fe9c4325f3df46b5e24b408902f
3
+ size 43464190
data/oc20/s2ef_val_id_uncompressed/1.extxyz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:137f740e3bbe21fa4f103d0cd0fd22aed109a33ec59ebe4a6715688d1948c2a8
3
+ size 44072937
data/oc20/s2ef_val_id_uncompressed/2.extxyz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1cf2998fa84110cbf21cc0ca4dd5461c654bf9960e5a8bd90bf1399d74b9ac64
3
+ size 43857708
data/oc20/s2ef_val_id_uncompressed/3.extxyz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9361f52f466a08ce04d381d162532f5a2ec18a10feb559e8c067fbbe9edd0ffa
3
+ size 43572013
manifest.yaml ADDED
@@ -0,0 +1,430 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ onescience_manifest_version: "0.1"
2
+ resource_type: dataset
3
+ resource:
4
+ id: OneScience/oc20
5
+ name: OC20
6
+ domain: matchem
7
+ domain_tags:
8
+ - matchem
9
+ - catalysis
10
+ - oc20
11
+ - atomistic_dataset
12
+ task: mlip_training_data
13
+ task_tags:
14
+ - mlip
15
+ - energy_prediction
16
+ - force_prediction
17
+ - extxyz_training
18
+ modalities:
19
+ - atomistic_structure
20
+ input_formats:
21
+ - extxyz
22
+ output_formats: []
23
+ summary: 面向 OneScience/UMA 微调和训练评测示例的 Open Catalyst 2020 (OC20) S2EF extxyz 子集。
24
+
25
+ platform_resource:
26
+ primary:
27
+ platform: modelscope
28
+ repo_id: OneScience/oc20
29
+ repo_type: dataset
30
+ url: https://modelscope.cn/datasets/OneScience/oc20
31
+ revision: main
32
+ readme_path: README.md
33
+ manifest_path: manifest.yaml
34
+ mirrors: []
35
+ access:
36
+ visibility: public
37
+ license: Apache License 2.0
38
+
39
+ website_integration:
40
+ enabled: true
41
+ click_target:
42
+ platform: modelscope
43
+ resource_url: https://modelscope.cn/datasets/OneScience/oc20
44
+ llm_handoff:
45
+ readme_required: true
46
+ manifest_required: true
47
+ download_readme_first: true
48
+ resolve_related_models: true
49
+ default_run_goal: minimal_validation
50
+
51
+ runtime:
52
+ enabled: true
53
+ onescience_domain: matchem
54
+ min_onescience_version: null
55
+ supported_execution:
56
+ - local
57
+ - local_slurm
58
+ - remote_slurm
59
+ - scnet_mcp
60
+
61
+ onescience:
62
+ repo: https://gitee.com/onescience-ai/onescience
63
+ official_links:
64
+ gitee:
65
+ doc: https://gitee.com/onescience-ai/onescience-doc
66
+ onescience: https://gitee.com/onescience-ai/onescience
67
+ skills: https://gitee.com/onescience-ai/oneskills
68
+ github:
69
+ doc: https://github.com/onescience-ai/OneScience-doc
70
+ onescience: https://github.com/onescience-ai/OneScience
71
+ skills: https://github.com/onescience-ai/oneskills
72
+ install:
73
+ required_by_default: false
74
+ command: bash install.sh matchem
75
+ source_paths:
76
+ - matchem/uma/oc20
77
+ compatibility:
78
+ examples_path: examples/matchem/uma
79
+ status: examples_compatible
80
+
81
+ runtime_package:
82
+ kind: standard_runtime_package
83
+ package_root: .
84
+ standard_layout:
85
+ workdir: .
86
+ config_dir: metadata
87
+ checkpoint_dir: null
88
+ data_dir: data
89
+ output_dir: outputs
90
+ apply_policy:
91
+ mode: direct_use
92
+ target: session_workdir
93
+ overwrite: true
94
+ protect_installed_onescience: true
95
+ entry_files:
96
+ - scripts/validate_oc20.py
97
+ - metadata/schema.yaml
98
+ - metadata/sha256_manifest.txt
99
+ entrypoints:
100
+ preflight: scripts/validate_oc20.py
101
+ inference: null
102
+ train: null
103
+ finetune: null
104
+ evaluate: null
105
+ visualize: null
106
+ deploy: null
107
+
108
+ files:
109
+ model_files: []
110
+ dataset_files:
111
+ - id: oc20_s2ef_200k_uncompressed
112
+ path: data/oc20/s2ef_200k_uncompressed
113
+ role: train_split
114
+ description_zh: OC20 S2EF 200k 训练子集 extxyz 文件,当前包含 2 个分片、共 10000 帧。
115
+ required: true
116
+ required_for: [preflight, train]
117
+ format: extxyz
118
+ source:
119
+ platform: modelscope
120
+ repo_id: OneScience/oc20
121
+ repo_type: dataset
122
+ path: data/oc20/s2ef_200k_uncompressed
123
+ revision: main
124
+ url: null
125
+ download_method: command_ref
126
+ command_ref: commands.download.download_dataset_package
127
+ mirrors: []
128
+ local_path: session_workdir/data/oc20/s2ef_200k_uncompressed
129
+ size: 84M
130
+ checksum: metadata/sha256_manifest.txt
131
+ large_file: true
132
+ - id: oc20_s2ef_val_id_uncompressed
133
+ path: data/oc20/s2ef_val_id_uncompressed
134
+ role: validation_split
135
+ description_zh: OC20 S2EF val_id 验证子集 extxyz 文件,当前包含 4 个分片、共 20000 帧。
136
+ required: true
137
+ required_for: [preflight, evaluate]
138
+ format: extxyz
139
+ source:
140
+ platform: modelscope
141
+ repo_id: OneScience/oc20
142
+ repo_type: dataset
143
+ path: data/oc20/s2ef_val_id_uncompressed
144
+ revision: main
145
+ url: null
146
+ download_method: command_ref
147
+ command_ref: commands.download.download_dataset_package
148
+ mirrors: []
149
+ local_path: session_workdir/data/oc20/s2ef_val_id_uncompressed
150
+ size: 167M
151
+ checksum: metadata/sha256_manifest.txt
152
+ large_file: true
153
+ config_files:
154
+ - id: schema
155
+ path: metadata/schema.yaml
156
+ role: schema
157
+ description_zh: OC20 extxyz 数据结构、字段名、shape、单位、split 和 UMA 配置键说明。
158
+ required: true
159
+ required_for: [preflight, train, evaluate]
160
+ format: yaml
161
+ source:
162
+ platform: modelscope
163
+ repo_id: OneScience/oc20
164
+ repo_type: dataset
165
+ path: metadata/schema.yaml
166
+ revision: main
167
+ url: null
168
+ download_method: command_ref
169
+ command_ref: commands.download.download_dataset_package
170
+ mirrors: []
171
+ local_path: session_workdir/metadata/schema.yaml
172
+ size: null
173
+ checksum: null
174
+ large_file: false
175
+ - id: sha256_manifest
176
+ path: metadata/sha256_manifest.txt
177
+ role: checksum
178
+ description_zh: OC20 数据文件 SHA256 清单,用于校验整理后数据与原始数据一致。
179
+ required: true
180
+ required_for: [preflight]
181
+ format: txt
182
+ source:
183
+ platform: modelscope
184
+ repo_id: OneScience/oc20
185
+ repo_type: dataset
186
+ path: metadata/sha256_manifest.txt
187
+ revision: main
188
+ url: null
189
+ download_method: command_ref
190
+ command_ref: commands.download.download_dataset_package
191
+ mirrors: []
192
+ local_path: session_workdir/metadata/sha256_manifest.txt
193
+ size: null
194
+ checksum: null
195
+ large_file: false
196
+ sample_files:
197
+ - id: validate_script
198
+ path: scripts/validate_oc20.py
199
+ role: script
200
+ description_zh: OC20 数据读取验证脚本,检查 extxyz 字段、shape、帧数、元素集合和 SHA256。
201
+ required: true
202
+ required_for: [preflight]
203
+ format: py
204
+ source:
205
+ platform: modelscope
206
+ repo_id: OneScience/oc20
207
+ repo_type: dataset
208
+ path: scripts/validate_oc20.py
209
+ revision: main
210
+ url: null
211
+ download_method: command_ref
212
+ command_ref: commands.download.download_dataset_package
213
+ mirrors: []
214
+ local_path: session_workdir/scripts/validate_oc20.py
215
+ size: null
216
+ checksum: null
217
+ large_file: false
218
+
219
+ dataset:
220
+ format:
221
+ - extxyz
222
+ sample_unit: 单个催化剂表面吸附构型,包含元素、坐标、energy、free_energy 和 forces。
223
+ schema:
224
+ path: metadata/schema.yaml
225
+ splits:
226
+ train:
227
+ path: data/oc20/s2ef_200k_uncompressed
228
+ frames: 10000
229
+ validation:
230
+ path: data/oc20/s2ef_val_id_uncompressed
231
+ frames: 20000
232
+ test:
233
+ path: null
234
+ note_zh: "当前未提供独立测试集;如需测试可使用 s2ef_val_id_uncompressed 或从 OC20 官网下载完整 split。"
235
+
236
+ relations:
237
+ required_datasets: []
238
+ optional_datasets: []
239
+ compatible_models:
240
+ - id: OneScience/UMA
241
+ role: finetune_data
242
+ required_for: [preflight, train, evaluate]
243
+ resource_ref:
244
+ platform: modelscope
245
+ repo_id: OneScience/UMA
246
+ repo_type: model
247
+ url: https://modelscope.cn/models/OneScience/UMA
248
+ revision: main
249
+ readme_path: README.md
250
+ manifest_path: manifest.yaml
251
+ expected_local_path: session_workdir/data/oc20
252
+ adapter: null
253
+
254
+ run_matrix:
255
+ scenarios:
256
+ - name: validate_dataset
257
+ default: true
258
+ capability: preflight
259
+ required_datasets:
260
+ - id: OneScience/oc20
261
+ role: train_data
262
+ local_path: data/oc20
263
+ required_model_files: []
264
+ required_data_files:
265
+ - data/oc20/s2ef_200k_uncompressed
266
+ - data/oc20/s2ef_val_id_uncompressed
267
+ - metadata/sha256_manifest.txt
268
+ preconditions:
269
+ - 已下载数据集仓库 OneScience/oc20。
270
+ command_refs:
271
+ - commands.preflight.validate_dataset
272
+ outputs:
273
+ - path: stdout
274
+ description_zh: 数据字段、帧数、元素集合和 SHA256 检查结果。
275
+
276
+ capabilities:
277
+ inference: false
278
+ train: false
279
+ finetune: false
280
+ evaluate: false
281
+ visualize: false
282
+ deploy: false
283
+
284
+ commands:
285
+ download:
286
+ - name: download_dataset_package
287
+ target: dataset
288
+ repo_id: OneScience/oc20
289
+ source: .
290
+ local_path: session_workdir/
291
+ required: true
292
+ required_for: [preflight, train, evaluate]
293
+ cwd: .
294
+ command: modelscope download --dataset OneScience/oc20 --local_dir session_workdir
295
+ expected_outputs:
296
+ - path: session_workdir/data/oc20/s2ef_200k_uncompressed
297
+ type: file
298
+ success_criteria:
299
+ - exit_code == 0
300
+ - output_path_exists
301
+ preflight:
302
+ - name: validate_dataset
303
+ description: 验证 OC20 extxyz 文件结构、字段名、帧数和 SHA256。
304
+ cwd: .
305
+ command: python scripts/validate_oc20.py --dataset-root data/oc20 --checksum-manifest metadata/sha256_manifest.txt
306
+ required_files:
307
+ - data/oc20/s2ef_200k_uncompressed
308
+ - data/oc20/s2ef_val_id_uncompressed
309
+ - metadata/sha256_manifest.txt
310
+ - scripts/validate_oc20.py
311
+ required_env:
312
+ - python
313
+ expected_outputs:
314
+ - path: stdout
315
+ type: text
316
+ success_criteria:
317
+ - exit_code == 0
318
+ prepare: []
319
+ inference: []
320
+ train: []
321
+ finetune: []
322
+ evaluate: []
323
+ visualize: []
324
+ deploy: []
325
+
326
+ expected_outputs:
327
+ - path: stdout
328
+ type: text
329
+ description_zh: 验证脚本输出每个 split、字段和 SHA256 的 OK 结果。
330
+
331
+ diagnostics:
332
+ - error_pattern: "缺少文件"
333
+ likely_cause: 数据集下载不完整或运行 cwd 不在数据集仓库根目录。
334
+ action: 重新执行 modelscope download --dataset OneScience/oc20,并在下载后的数据集根目录运行验证命令。
335
+ - error_pattern: "SHA256 不一致"
336
+ likely_cause: 文件被截断、损坏或被替换。
337
+ action: 删除损坏文件后重新下载数据集��
338
+ - error_pattern: "energy"
339
+ likely_cause: extxyz comment 中缺少 UMA OC20 配置要求的能量字段。
340
+ action: 检查数据是否为本仓库 OC20 数据,或同步修改模型配置 energy_key。
341
+ - error_pattern: "forces"
342
+ likely_cause: extxyz Properties 中缺少 UMA OC20 配置要求的力字段。
343
+ action: 检查数据是否为本仓库 OC20 数据,或同步修改模型配置 forces_key。
344
+
345
+ domain_extension:
346
+ matchem:
347
+ chemical_system:
348
+ elements:
349
+ - Ag
350
+ - Al
351
+ - As
352
+ - Au
353
+ - B
354
+ - Bi
355
+ - C
356
+ - Ca
357
+ - Cd
358
+ - Cl
359
+ - Co
360
+ - Cr
361
+ - Cs
362
+ - Cu
363
+ - Fe
364
+ - Ga
365
+ - Ge
366
+ - H
367
+ - Hf
368
+ - Hg
369
+ - In
370
+ - Ir
371
+ - K
372
+ - Mn
373
+ - Mo
374
+ - N
375
+ - Na
376
+ - Nb
377
+ - Ni
378
+ - O
379
+ - Os
380
+ - P
381
+ - Pb
382
+ - Pd
383
+ - Pt
384
+ - Rb
385
+ - Re
386
+ - Rh
387
+ - Ru
388
+ - S
389
+ - Sb
390
+ - Sc
391
+ - Se
392
+ - Si
393
+ - Sn
394
+ - Sr
395
+ - Ta
396
+ - Tc
397
+ - Te
398
+ - Ti
399
+ - Tl
400
+ - V
401
+ - W
402
+ - Y
403
+ - Zn
404
+ - Zr
405
+ properties:
406
+ - energy
407
+ - forces
408
+ units:
409
+ energy: eV
410
+ forces: eV/Angstrom
411
+ structure_format:
412
+ - extxyz
413
+
414
+ large_resource:
415
+ enabled: true
416
+ total_size: 251M
417
+ file_count: 6
418
+ download_policy: full
419
+ default_download: full
420
+ minimal_files:
421
+ - data/oc20/s2ef_200k_uncompressed
422
+ - data/oc20/s2ef_val_id_uncompressed
423
+
424
+ reproducibility:
425
+ level: minimal
426
+ goal: 完成一次 OC20 extxyz 数据读取和 SHA256 校验。
427
+ command_ref: commands.preflight.validate_dataset
428
+ expected_runtime: 2-5 minutes
429
+ expected_outputs:
430
+ - stdout
metadata/schema.yaml ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ dataset: OC20
2
+ standardized_repo_id: OneScience/oc20
3
+ domain: matchem
4
+ format:
5
+ - extxyz
6
+ splits:
7
+ train:
8
+ path: data/oc20/s2ef_200k_uncompressed
9
+ pattern: "*.extxyz"
10
+ files:
11
+ - 0.extxyz
12
+ - 1.extxyz
13
+ frames: 10000
14
+ atoms_per_frame: 8-221
15
+ validation:
16
+ path: data/oc20/s2ef_val_id_uncompressed
17
+ pattern: "*.extxyz"
18
+ files:
19
+ - 0.extxyz
20
+ - 1.extxyz
21
+ - 2.extxyz
22
+ - 3.extxyz
23
+ frames: 20000
24
+ atoms_per_frame: 8-223
25
+ sample_schema:
26
+ extxyz_comment_fields:
27
+ - Lattice
28
+ - Properties
29
+ - energy
30
+ - free_energy
31
+ - pbc
32
+ properties:
33
+ species:
34
+ dtype: string
35
+ shape: [num_atoms]
36
+ description_zh: 元素符号。
37
+ pos:
38
+ dtype: float
39
+ shape: [num_atoms, 3]
40
+ unit: Angstrom
41
+ description_zh: 原子坐标。
42
+ move_mask:
43
+ dtype: bool
44
+ shape: [num_atoms]
45
+ description_zh: 原子是否可移动。
46
+ tags:
47
+ dtype: int
48
+ shape: [num_atoms]
49
+ description_zh: 原子标签,用于区分吸附质、表面等。
50
+ forces:
51
+ dtype: float
52
+ shape: [num_atoms, 3]
53
+ unit: eV/Angstrom
54
+ description_zh: 原子受力。
55
+ config_fields:
56
+ energy:
57
+ dtype: float
58
+ unit: eV
59
+ description_zh: 构型总能量。
60
+ free_energy:
61
+ dtype: float
62
+ unit: eV
63
+ description_zh: 构型自由能。
64
+ model_expected_keys:
65
+ energy_key: energy
66
+ forces_key: forces
67
+ elements:
68
+ - Ag
69
+ - Al
70
+ - As
71
+ - Au
72
+ - B
73
+ - Bi
74
+ - C
75
+ - Ca
76
+ - Cd
77
+ - Cl
78
+ - Co
79
+ - Cr
80
+ - Cs
81
+ - Cu
82
+ - Fe
83
+ - Ga
84
+ - Ge
85
+ - H
86
+ - Hf
87
+ - Hg
88
+ - In
89
+ - Ir
90
+ - K
91
+ - Mn
92
+ - Mo
93
+ - N
94
+ - Na
95
+ - Nb
96
+ - Ni
97
+ - O
98
+ - Os
99
+ - P
100
+ - Pb
101
+ - Pd
102
+ - Pt
103
+ - Rb
104
+ - Re
105
+ - Rh
106
+ - Ru
107
+ - S
108
+ - Sb
109
+ - Sc
110
+ - Se
111
+ - Si
112
+ - Sn
113
+ - Sr
114
+ - Ta
115
+ - Tc
116
+ - Te
117
+ - Ti
118
+ - Tl
119
+ - V
120
+ - W
121
+ - Y
122
+ - Zn
123
+ - Zr
metadata/sha256_manifest.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ c1498dcf9304060c19fcdd75b4f527ed56ed2c9a56678a19783884cb6744190a data/oc20/s2ef_200k_uncompressed/0.extxyz
2
+ 803b86307583bc351a843c8b773a0297abb9bccc784369fdf26455d5ddd1c249 data/oc20/s2ef_200k_uncompressed/1.extxyz
3
+ c73976d4ee4e584bed87bd4cdc58555a468f8fe9c4325f3df46b5e24b408902f data/oc20/s2ef_val_id_uncompressed/0.extxyz
4
+ 137f740e3bbe21fa4f103d0cd0fd22aed109a33ec59ebe4a6715688d1948c2a8 data/oc20/s2ef_val_id_uncompressed/1.extxyz
5
+ 1cf2998fa84110cbf21cc0ca4dd5461c654bf9960e5a8bd90bf1399d74b9ac64 data/oc20/s2ef_val_id_uncompressed/2.extxyz
6
+ 9361f52f466a08ce04d381d162532f5a2ec18a10feb559e8c067fbbe9edd0ffa data/oc20/s2ef_val_id_uncompressed/3.extxyz
onescience_relations.yaml ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ required_datasets: []
2
+ optional_datasets: []
3
+ compatible_models:
4
+ - id: OneScience/UMA
5
+ role: finetune_data
6
+ required_for:
7
+ - preflight
8
+ - train
9
+ - evaluate
10
+ resource_ref:
11
+ platform: modelscope
12
+ repo_id: OneScience/UMA
13
+ repo_type: model
14
+ url: https://modelscope.cn/models/OneScience/UMA
15
+ revision: main
16
+ readme_path: README.md
17
+ manifest_path: manifest.yaml
18
+ expected_local_path: session_workdir/data/oc20
19
+ adapter: null
scripts/validate_oc20.py ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Validate the standardized OC20 extxyz dataset package."""
3
+
4
+ from __future__ import annotations
5
+
6
+ import argparse
7
+ import hashlib
8
+ import re
9
+ from pathlib import Path
10
+
11
+
12
+ EXPECTED_SPLITS = {
13
+ "s2ef_200k_uncompressed": {
14
+ "files": ["0.extxyz", "1.extxyz"],
15
+ "expected_total_frames": 10000,
16
+ },
17
+ "s2ef_val_id_uncompressed": {
18
+ "files": ["0.extxyz", "1.extxyz", "2.extxyz", "3.extxyz"],
19
+ "expected_total_frames": 20000,
20
+ },
21
+ }
22
+ EXPECTED_ENERGY_KEY = "energy"
23
+ EXPECTED_FORCES_KEY = "forces"
24
+ EXPECTED_ELEMENTS = {
25
+ "Ag", "Al", "As", "Au", "B", "Bi", "C", "Ca", "Cd", "Cl", "Co", "Cr", "Cs", "Cu",
26
+ "Fe", "Ga", "Ge", "H", "Hf", "Hg", "In", "Ir", "K", "Mn", "Mo", "N", "Na", "Nb",
27
+ "Ni", "O", "Os", "P", "Pb", "Pd", "Pt", "Rb", "Re", "Rh", "Ru", "S", "Sb", "Sc",
28
+ "Se", "Si", "Sn", "Sr", "Ta", "Tc", "Te", "Ti", "Tl", "V", "W", "Y", "Zn", "Zr",
29
+ }
30
+
31
+
32
+ def sha256_file(path: Path) -> str:
33
+ h = hashlib.sha256()
34
+ with path.open("rb") as f:
35
+ for chunk in iter(lambda: f.read(1024 * 1024), b""):
36
+ h.update(chunk)
37
+ return h.hexdigest()
38
+
39
+
40
+ def validate_checksum_manifest(dataset_root: Path, manifest_path: Path) -> None:
41
+ checked = 0
42
+ with manifest_path.open("r", encoding="utf-8") as f:
43
+ for line in f:
44
+ line = line.strip()
45
+ if not line or line.startswith("#"):
46
+ continue
47
+ digest, rel = line.split(maxsplit=1)
48
+ path = dataset_root.parent.parent / rel
49
+ if not path.exists():
50
+ raise SystemExit(f"[FAIL] 清单文件不存在: {path}")
51
+ actual = sha256_file(path)
52
+ if actual != digest:
53
+ raise SystemExit(f"[FAIL] SHA256 不一致: {rel}")
54
+ checked += 1
55
+ print(f"[OK] SHA256 清单验证通过: {checked} 个文件")
56
+
57
+
58
+ def parse_properties(comment: str) -> list[tuple[str, str, int]]:
59
+ match = re.search(r'Properties=("[^"]+"|\S+)', comment)
60
+ if not match:
61
+ raise SystemExit("[FAIL] extxyz comment 缺少 Properties")
62
+ raw = match.group(1).strip('"')
63
+ parts = raw.split(":")
64
+ if len(parts) % 3:
65
+ raise SystemExit(f"[FAIL] Properties 格式异常: {raw}")
66
+ parsed = []
67
+ for i in range(0, len(parts), 3):
68
+ name, kind, width = parts[i], parts[i + 1], int(parts[i + 2])
69
+ parsed.append((name, kind, width))
70
+ return parsed
71
+
72
+
73
+ def validate_xyz(path: Path) -> int:
74
+ frames = 0
75
+ elements: set[str] = set()
76
+ min_atoms: int | None = None
77
+ max_atoms = 0
78
+
79
+ with path.open("r", encoding="utf-8") as f:
80
+ while True:
81
+ first = f.readline()
82
+ if not first:
83
+ break
84
+ if not first.strip():
85
+ continue
86
+ try:
87
+ atom_count = int(first.strip())
88
+ except ValueError as exc:
89
+ raise SystemExit(f"[FAIL] 原子数行不是整数: {path}:{frames + 1}") from exc
90
+ comment = f.readline().rstrip("\n")
91
+ if f"{EXPECTED_ENERGY_KEY}=" not in comment:
92
+ raise SystemExit(f"[FAIL] comment 缺少 {EXPECTED_ENERGY_KEY}: {path} frame {frames}")
93
+ if "free_energy=" not in comment:
94
+ raise SystemExit(f"[FAIL] comment 缺少 free_energy: {path} frame {frames}")
95
+ if "pbc=" not in comment:
96
+ raise SystemExit(f"[FAIL] comment 缺少 pbc: {path} frame {frames}")
97
+ if "Lattice=" not in comment:
98
+ raise SystemExit(f"[FAIL] comment 缺少 Lattice: {path} frame {frames}")
99
+ props = parse_properties(comment)
100
+ prop_names = [p[0] for p in props]
101
+ if prop_names[0:2] != ["species", "pos"]:
102
+ raise SystemExit(f"[FAIL] Properties 前两项必须是 species,pos: {path} frame {frames}")
103
+ if EXPECTED_FORCES_KEY not in prop_names:
104
+ raise SystemExit(f"[FAIL] Properties 缺少 {EXPECTED_FORCES_KEY}: {path} frame {frames}")
105
+ if "move_mask" not in prop_names:
106
+ raise SystemExit(f"[FAIL] Properties 缺少 move_mask: {path} frame {frames}")
107
+ if "tags" not in prop_names:
108
+ raise SystemExit(f"[FAIL] Properties 缺少 tags: {path} frame {frames}")
109
+ expected_cols = sum(width for _, _, width in props)
110
+
111
+ for atom_index in range(atom_count):
112
+ atom_line = f.readline()
113
+ if not atom_line:
114
+ raise SystemExit(f"[FAIL] 文件提前结束: {path} frame {frames}")
115
+ cols = atom_line.split()
116
+ if len(cols) != expected_cols:
117
+ raise SystemExit(
118
+ f"[FAIL] 原子列数异常: {path} frame {frames} atom {atom_index}: "
119
+ f"{len(cols)} != {expected_cols}"
120
+ )
121
+ elements.add(cols[0])
122
+ col_idx = 1
123
+ for _, kind, width in props:
124
+ if kind == "S":
125
+ continue
126
+ values = cols[col_idx:col_idx + width]
127
+ if kind == "R":
128
+ for value in values:
129
+ float(value)
130
+ elif kind == "I":
131
+ for value in values:
132
+ int(value)
133
+ elif kind == "L":
134
+ for value in values:
135
+ if value not in ("T", "F"):
136
+ raise SystemExit(
137
+ f"[FAIL] bool 字段值异常: {value} at {path} frame {frames}"
138
+ )
139
+ else:
140
+ raise SystemExit(f"[FAIL] 不支持的 Properties 类型: {kind}")
141
+ col_idx += width
142
+ frames += 1
143
+ min_atoms = atom_count if min_atoms is None else min(min_atoms, atom_count)
144
+ max_atoms = max(max_atoms, atom_count)
145
+
146
+ if not elements.issubset(EXPECTED_ELEMENTS):
147
+ raise SystemExit(f"[FAIL] 元素集合异常: {sorted(elements)}")
148
+ print(
149
+ f"[OK] {path.name}: frames={frames}, atoms={min_atoms}-{max_atoms}, "
150
+ f"elements={sorted(elements)[:5]}..."
151
+ )
152
+ return frames
153
+
154
+
155
+ def main() -> int:
156
+ parser = argparse.ArgumentParser()
157
+ parser.add_argument("--dataset-root", default="data/oc20")
158
+ parser.add_argument("--checksum-manifest", default="metadata/sha256_manifest.txt")
159
+ args = parser.parse_args()
160
+
161
+ repo_root = Path.cwd()
162
+ dataset_root = Path(args.dataset_root)
163
+ if not dataset_root.is_absolute():
164
+ dataset_root = repo_root / dataset_root
165
+ checksum_manifest = Path(args.checksum_manifest)
166
+ if not checksum_manifest.is_absolute():
167
+ checksum_manifest = repo_root / checksum_manifest
168
+
169
+ if not dataset_root.exists():
170
+ raise SystemExit(f"[FAIL] 数据目录不存在: {dataset_root}")
171
+
172
+ for split_name, split_info in EXPECTED_SPLITS.items():
173
+ split_dir = dataset_root / split_name
174
+ if not split_dir.exists():
175
+ raise SystemExit(f"[FAIL] 缺少 split 目录: {split_dir}")
176
+ total_frames = 0
177
+ for file_name in split_info["files"]:
178
+ path = split_dir / file_name
179
+ if not path.exists():
180
+ raise SystemExit(f"[FAIL] 缺少文件: {path}")
181
+ if path.stat().st_size <= 0:
182
+ raise SystemExit(f"[FAIL] 文件为空: {path}")
183
+ total_frames += validate_xyz(path)
184
+ expected = split_info["expected_total_frames"]
185
+ if total_frames != expected:
186
+ raise SystemExit(
187
+ f"[FAIL] {split_name} 总帧数异常: {total_frames} != {expected}"
188
+ )
189
+ print(f"[OK] {split_name}: total_frames={total_frames}")
190
+
191
+ validate_checksum_manifest(dataset_root, checksum_manifest)
192
+ print("[OK] OC20 数据集读取验证通过")
193
+ return 0
194
+
195
+
196
+ if __name__ == "__main__":
197
+ raise SystemExit(main())