Datasets:
ArXiv:
License:
Upload folder using huggingface_hub
Browse files- .gitattributes +67 -32
- README.md +81 -0
- README_zh.md +81 -0
- data/water/dataset_1593.xyz +3 -0
- data/water/gene_xyz.py +6 -0
- data/water/water_test.xyz +0 -0
- data/water/water_train.xyz +3 -0
- manifest.yaml +440 -0
- metadata/schema.yaml +62 -0
- metadata/sha256_manifest.txt +4 -0
- onescience_relations.yaml +19 -0
- onescience_run_manifest.yaml +440 -0
- scripts/validate_water.py +159 -0
.gitattributes
CHANGED
|
@@ -1,60 +1,95 @@
|
|
| 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 |
-
*.
|
| 38 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 39 |
-
|
| 40 |
-
*.
|
| 41 |
-
*
|
| 42 |
-
*.
|
| 43 |
-
|
| 44 |
-
*.
|
| 45 |
-
*.
|
| 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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 59 |
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 60 |
-
*.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
|
| 91 |
+
data/water/dataset_1593.xyz filter=lfs diff=lfs merge=lfs -text
|
| 92 |
+
|
| 93 |
+
data/water/water_test.xyz filter=lfs diff=lfs merge=lfs -text
|
| 94 |
+
|
| 95 |
+
data/water/water_train.xyz filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- water
|
| 5 |
+
- MACE
|
| 6 |
+
- molecular dynamics
|
| 7 |
+
- extxyz
|
| 8 |
+
- potential energy surface
|
| 9 |
+
language:
|
| 10 |
+
- en
|
| 11 |
+
- zh
|
| 12 |
+
---
|
| 13 |
+
<p align="center">
|
| 14 |
+
<strong>
|
| 15 |
+
<span style="font-size: 30px;">water</span>
|
| 16 |
+
</strong>
|
| 17 |
+
</p>
|
| 18 |
+
|
| 19 |
+
## Dataset Description
|
| 20 |
+
The water dataset is an extxyz dataset for potential energy surface training and evaluation examples involving water systems. It contains atomic coordinates, unit-cell information, energies, and forces for water molecular systems in different configurations and is a standard benchmark dataset for developing and validating machine-learned interatomic potential methods such as MACE.
|
| 21 |
+
|
| 22 |
+
The original complete file `dataset_1593.xyz` contains 1,593 frames with 192 atoms per frame. To match the original MACE water configuration, this package follows the logic of the original `gene_xyz.py` to derive the first 1,393 frames from `dataset_1593.xyz` as the `water_train.xyz` training set and the final 200 frames as the `water_test.xyz` test set.
|
| 23 |
+
|
| 24 |
+
The original water training set comes from [BingqingCheng/ab-initio-thermodynamics-of-water](https://github.com/BingqingCheng/ab-initio-thermodynamics-of-water).
|
| 25 |
+
|
| 26 |
+
The current data package contains approximately 4 files totaling approximately 150 MB.
|
| 27 |
+
|
| 28 |
+
## Supported Tasks
|
| 29 |
+
This standardized data repository organizes the complete data package for the MACE water example, including the full dataset, training set, and test set, to support:
|
| 30 |
+
- Training and validation of potential energy surface models for water systems
|
| 31 |
+
- Potential energy surface fitting for molecular dynamics simulations
|
| 32 |
+
- Functional testing and benchmark evaluation of the MACE framework
|
| 33 |
+
|
| 34 |
+
## Dataset Format and Structure
|
| 35 |
+
|
| 36 |
+
The data files are located in the `data/water/` directory:
|
| 37 |
+
|
| 38 |
+
| File Path | Format | Shape / Content | Description |
|
| 39 |
+
|---|---|---|---|
|
| 40 |
+
| `water/dataset_1593.xyz` | extxyz | `[1593, 192]` | Full dataset, 1,593 frames with 192 atoms per frame |
|
| 41 |
+
| `water/water_train.xyz` | extxyz | `[1393, 192]` | Training set, the first 1,393 frames with 192 atoms per frame |
|
| 42 |
+
| `water/water_test.xyz` | extxyz | `[200, 192]` | Test set, the final 200 frames with 192 atoms per frame |
|
| 43 |
+
| `metadata/sha256_manifest.txt` | SHA256 | Checksum manifest | File integrity verification |
|
| 44 |
+
|
| 45 |
+
### extxyz Data Format
|
| 46 |
+
|
| 47 |
+
Each configuration consists of an atom-count line, a comment line, and atom lines. The comment line contains `TotEnergy`, `cutoff`, `nneightol`, `pbc`, `Lattice`, and `Properties`. Each atom line contains the element, coordinates, `force`, and `Z`.
|
| 48 |
+
|
| 49 |
+
| Field | Type | Shape | Description |
|
| 50 |
+
|---|---|---|---|
|
| 51 |
+
| `species` | str | `[N_atoms]` | Element symbols; the current set of elements is H and O |
|
| 52 |
+
| `pos` | float | `[N_atoms, 3]` | Atomic coordinates in Å |
|
| 53 |
+
| `force` | float | `[N_atoms, 3]` | Atomic forces in eV/Å |
|
| 54 |
+
| `Z` | int | `[N_atoms]` | Atomic numbers |
|
| 55 |
+
| `TotEnergy` | float | `[1]` | Total configuration energy in eV |
|
| 56 |
+
| `Lattice` | float | `[3, 3]` | Periodic cell matrix |
|
| 57 |
+
| `pbc` | bool | `[3]` | Periodic boundary conditions |
|
| 58 |
+
|
| 59 |
+
## How to Use the Dataset
|
| 60 |
+
|
| 61 |
+
Download the dataset:
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
hf download --dataset OneScience-Sugon/water --local-dir ./data
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
## Official OneScience Information
|
| 69 |
+
|
| 70 |
+
| Platform | OneScience Main Repository | Skills Repository |
|
| 71 |
+
|---|---|---|
|
| 72 |
+
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
|
| 73 |
+
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
|
| 74 |
+
|
| 75 |
+
## Limitations and License
|
| 76 |
+
|
| 77 |
+
This dataset contains MACE water example data. The train/test split was derived from the full dataset using the logic of the original `gene_xyz.py`; no new samples were generated, and the original full dataset content was not altered. Refer to the original water data source and the information provided by the OneScience repository and ModelScope page for licensing terms.
|
| 78 |
+
|
| 79 |
+
When using the original water dataset, cite:
|
| 80 |
+
|
| 81 |
+
- Cheng, B.; Engel, E. A.; Behler, J.; Dellago, C.; Ceriotti, M. Ab Initio Thermodynamics of Liquid Water and Ice. *arXiv preprint* **2018**. https://arxiv.org/abs/1811.08630
|
README_zh.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: Apache License 2.0
|
| 3 |
+
tags:
|
| 4 |
+
- water
|
| 5 |
+
- MACE
|
| 6 |
+
- molecular dynamics
|
| 7 |
+
- extxyz
|
| 8 |
+
- potential energy surface
|
| 9 |
+
language:
|
| 10 |
+
- en
|
| 11 |
+
- zh
|
| 12 |
+
---
|
| 13 |
+
<p align="center">
|
| 14 |
+
<strong>
|
| 15 |
+
<span style="font-size: 30px;">water</span>
|
| 16 |
+
</strong>
|
| 17 |
+
</p>
|
| 18 |
+
|
| 19 |
+
## 数据集描述
|
| 20 |
+
water 数据集是水体系势能面训练和评测示例的 extxyz 数据集。数据包含水分子体系在不同构型下的原子坐标、晶胞信息、能量和受力数据,是学习和验证机器学习原子间势(MACE)方法的标准基准数据集。
|
| 21 |
+
|
| 22 |
+
原始全量文件 `dataset_1593.xyz` 包含 1593 帧,每帧 192 个原子。为匹配 MACE 原始 water 配置,本包按原始 `gene_xyz.py` 的逻辑从 `dataset_1593.xyz` 派生出前 1393 帧训练集 `water_train.xyz` 和后 200 帧测试集 `water_test.xyz`。
|
| 23 |
+
|
| 24 |
+
原始 water 训练集来自 [BingqingCheng/ab-initio-thermodynamics-of-water](https://github.com/BingqingCheng/ab-initio-thermodynamics-of-water)。
|
| 25 |
+
|
| 26 |
+
当前数据包包含约 4 个文件,约 150 MB。
|
| 27 |
+
|
| 28 |
+
## 数据集支持的任务
|
| 29 |
+
本标准化数据仓库整理了 MACE water 示例的完整数据包,包含全量数据集、训练集和测试集,可用于:
|
| 30 |
+
- 水体系势能面模型的训练与验证
|
| 31 |
+
- 分子动力学模拟的势能面拟合
|
| 32 |
+
- MACE 框架的功能测试与基准评测
|
| 33 |
+
|
| 34 |
+
## 数据集的格式和结构
|
| 35 |
+
|
| 36 |
+
数据文件位于 `data/water/` 目录下:
|
| 37 |
+
|
| 38 |
+
| 文件路径 | 格式 | shape / 内容 | 说明 |
|
| 39 |
+
|---|---|---|---|
|
| 40 |
+
| `water/dataset_1593.xyz` | extxyz | `[1593, 192]` | 全量数据集,1593 帧,每帧 192 个原子 |
|
| 41 |
+
| `water/water_train.xyz` | extxyz | `[1393, 192]` | 训练集,前 1393 帧,每帧 192 个原子 |
|
| 42 |
+
| `water/water_test.xyz` | extxyz | `[200, 192]` | 测试集,后 200 帧,每帧 192 个原子 |
|
| 43 |
+
| `metadata/sha256_manifest.txt` | SHA256 | 校验清单 | 文件完整性校验 |
|
| 44 |
+
|
| 45 |
+
### extxyz 数据格式
|
| 46 |
+
|
| 47 |
+
每个构型由原子数行、comment 行和原子行组成。comment 行包含 `TotEnergy`、`cutoff`、`nneightol`、`pbc`、`Lattice` 和 `Properties`。原子行包含元素、坐标、`force` 和 `Z`。
|
| 48 |
+
|
| 49 |
+
| 字段 | 类型 | shape | 说明 |
|
| 50 |
+
|---|---|---|---|
|
| 51 |
+
| `species` | str | `[N_atoms]` | 元素符号,当前元素集合为 H、O |
|
| 52 |
+
| `pos` | float | `[N_atoms, 3]` | 原子坐标,单位 Å |
|
| 53 |
+
| `force` | float | `[N_atoms, 3]` | 原子受力,单位 eV/Å |
|
| 54 |
+
| `Z` | int | `[N_atoms]` | 原子序数 |
|
| 55 |
+
| `TotEnergy` | float | `[1]` | 构型总能量,单位 eV |
|
| 56 |
+
| `Lattice` | float | `[3, 3]` | 周期盒矩阵 |
|
| 57 |
+
| `pbc` | bool | `[3]` | 周期边界条件 |
|
| 58 |
+
|
| 59 |
+
## 数据集使用方式
|
| 60 |
+
|
| 61 |
+
下载数据集:
|
| 62 |
+
|
| 63 |
+
```bash
|
| 64 |
+
hf download --dataset OneScience-Sugon/water --local-dir ./data
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
## OneScience 官方信息
|
| 69 |
+
|
| 70 |
+
| 平台 | OneScience 主仓库 | Skills 仓库 |
|
| 71 |
+
|---|---|---|
|
| 72 |
+
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
|
| 73 |
+
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
|
| 74 |
+
|
| 75 |
+
## 限制与许可证
|
| 76 |
+
|
| 77 |
+
本数据集为 MACE water 示例数据,按原始 `gene_xyz.py` 逻辑从全量数据派生 train/test split,未生成新样本或改变原始全量数据内容。许可证同原始 water 数据来源、OneScience 仓库和 ModelScope 页面说明为准。
|
| 78 |
+
|
| 79 |
+
使用原始 water 数据集时请引用:
|
| 80 |
+
|
| 81 |
+
- Cheng, B.; Engel, E. A.; Behler, J.; Dellago, C.; Ceriotti, M. Ab Initio Thermodynamics of Liquid Water and Ice. *arXiv preprint* **2018**. https://arxiv.org/abs/1811.08630
|
data/water/dataset_1593.xyz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5e2ec3b4b1334e012daa6a2e2dbd138108c41c7b6f692ff89b8747b81cadfdbc
|
| 3 |
+
size 35629038
|
data/water/gene_xyz.py
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from ase.io import read, write
|
| 2 |
+
water_db = "./dataset_1593.xyz"
|
| 3 |
+
db = read(water_db,':')
|
| 4 |
+
#print(len(db))
|
| 5 |
+
write('./water_train.xyz', db[:1393]) #first 4000 configs for train
|
| 6 |
+
write('./water_test.xyz', db[1393:]) #last 1000 configs for test
|
data/water/water_test.xyz
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data/water/water_train.xyz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0e332b783e7c41ad84f476224a17b0946bbe4556d7fdd7b0c7fe3842fea6828
|
| 3 |
+
size 31155838
|
manifest.yaml
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
onescience_manifest_version: "0.1"
|
| 2 |
+
resource_type: dataset
|
| 3 |
+
resource:
|
| 4 |
+
id: OneScience/water
|
| 5 |
+
name: water
|
| 6 |
+
domain: matchem
|
| 7 |
+
domain_tags:
|
| 8 |
+
- matchem
|
| 9 |
+
- water
|
| 10 |
+
- atomistic_dataset
|
| 11 |
+
task: mlip_training_data
|
| 12 |
+
task_tags:
|
| 13 |
+
- mlip
|
| 14 |
+
- energy_prediction
|
| 15 |
+
- force_prediction
|
| 16 |
+
- extxyz_training
|
| 17 |
+
modalities:
|
| 18 |
+
- atomistic_structure
|
| 19 |
+
input_formats:
|
| 20 |
+
- extxyz
|
| 21 |
+
output_formats: []
|
| 22 |
+
summary: 面向 MACE 水体系势能面训练和评测示例的 extxyz 数据集。
|
| 23 |
+
|
| 24 |
+
platform_resource:
|
| 25 |
+
primary:
|
| 26 |
+
platform: modelscope
|
| 27 |
+
repo_id: OneScience/water
|
| 28 |
+
repo_type: dataset
|
| 29 |
+
url: https://modelscope.cn/datasets/OneScience/water
|
| 30 |
+
revision: main
|
| 31 |
+
readme_path: README.md
|
| 32 |
+
manifest_path: manifest.yaml
|
| 33 |
+
mirrors: []
|
| 34 |
+
access:
|
| 35 |
+
visibility: public
|
| 36 |
+
license: null
|
| 37 |
+
|
| 38 |
+
website_integration:
|
| 39 |
+
enabled: true
|
| 40 |
+
click_target:
|
| 41 |
+
platform: modelscope
|
| 42 |
+
resource_url: https://modelscope.cn/datasets/OneScience/water
|
| 43 |
+
llm_handoff:
|
| 44 |
+
readme_required: true
|
| 45 |
+
manifest_required: true
|
| 46 |
+
download_readme_first: true
|
| 47 |
+
resolve_related_models: true
|
| 48 |
+
default_run_goal: minimal_validation
|
| 49 |
+
|
| 50 |
+
runtime:
|
| 51 |
+
enabled: true
|
| 52 |
+
onescience_domain: matchem
|
| 53 |
+
min_onescience_version: null
|
| 54 |
+
supported_execution:
|
| 55 |
+
- local
|
| 56 |
+
- local_slurm
|
| 57 |
+
- remote_slurm
|
| 58 |
+
- scnet_mcp
|
| 59 |
+
|
| 60 |
+
onescience:
|
| 61 |
+
repo: https://gitee.com/onescience-ai/onescience
|
| 62 |
+
official_links:
|
| 63 |
+
gitee:
|
| 64 |
+
doc: https://gitee.com/onescience-ai/onescience-doc
|
| 65 |
+
onescience: https://gitee.com/onescience-ai/onescience
|
| 66 |
+
skills: https://gitee.com/onescience-ai/oneskills
|
| 67 |
+
github:
|
| 68 |
+
doc: https://github.com/onescience-ai/OneScience-doc
|
| 69 |
+
onescience: https://github.com/onescience-ai/OneScience
|
| 70 |
+
skills: https://github.com/onescience-ai/oneskills
|
| 71 |
+
install:
|
| 72 |
+
required_by_default: false
|
| 73 |
+
command: bash install.sh matchem
|
| 74 |
+
source_paths:
|
| 75 |
+
- matchem/mace/water
|
| 76 |
+
compatibility:
|
| 77 |
+
examples_path: examples/matchem/mace
|
| 78 |
+
status: examples_compatible
|
| 79 |
+
|
| 80 |
+
runtime_package:
|
| 81 |
+
kind: standard_runtime_package
|
| 82 |
+
package_root: .
|
| 83 |
+
standard_layout:
|
| 84 |
+
workdir: .
|
| 85 |
+
config_dir: metadata
|
| 86 |
+
checkpoint_dir: null
|
| 87 |
+
data_dir: data
|
| 88 |
+
output_dir: outputs
|
| 89 |
+
apply_policy:
|
| 90 |
+
mode: direct_use
|
| 91 |
+
target: session_workdir
|
| 92 |
+
overwrite: true
|
| 93 |
+
protect_installed_onescience: true
|
| 94 |
+
entry_files:
|
| 95 |
+
- scripts/validate_water.py
|
| 96 |
+
- metadata/schema.yaml
|
| 97 |
+
- metadata/sha256_manifest.txt
|
| 98 |
+
entrypoints:
|
| 99 |
+
preflight: scripts/validate_water.py
|
| 100 |
+
inference: null
|
| 101 |
+
train: null
|
| 102 |
+
finetune: null
|
| 103 |
+
evaluate: null
|
| 104 |
+
visualize: null
|
| 105 |
+
deploy: null
|
| 106 |
+
|
| 107 |
+
derivation:
|
| 108 |
+
source_file: data/water/dataset_1593.xyz
|
| 109 |
+
generated_files:
|
| 110 |
+
- path: data/water/water_train.xyz
|
| 111 |
+
method: frames[0:1393]
|
| 112 |
+
reason: MACE water 配置读取 water_train.xyz;原始目录只有 dataset_1593.xyz,因此按 gene_xyz.py 逻辑派生。
|
| 113 |
+
- path: data/water/water_test.xyz
|
| 114 |
+
method: frames[1393:1593]
|
| 115 |
+
reason: MACE water 配置读取 water_test.xyz;原始目录只有 dataset_1593.xyz,因此按 gene_xyz.py 逻辑派生。
|
| 116 |
+
verification: water_train.xyz 与 water_test.xyz 字节级拼接后等于 dataset_1593.xyz。
|
| 117 |
+
|
| 118 |
+
files:
|
| 119 |
+
model_files: []
|
| 120 |
+
dataset_files:
|
| 121 |
+
- id: water_full_extxyz
|
| 122 |
+
path: data/water/dataset_1593.xyz
|
| 123 |
+
role: metadata
|
| 124 |
+
description_zh: 原始 water extxyz 全量文件,包含 1593 帧,每帧 192 个原子。
|
| 125 |
+
required: true
|
| 126 |
+
required_for: [preflight]
|
| 127 |
+
format: extxyz
|
| 128 |
+
source:
|
| 129 |
+
platform: modelscope
|
| 130 |
+
repo_id: OneScience/water
|
| 131 |
+
repo_type: dataset
|
| 132 |
+
path: data/water/dataset_1593.xyz
|
| 133 |
+
revision: main
|
| 134 |
+
url: null
|
| 135 |
+
download_method: command_ref
|
| 136 |
+
command_ref: commands.download.download_dataset_package
|
| 137 |
+
mirrors: []
|
| 138 |
+
local_path: session_workdir/data/water/dataset_1593.xyz
|
| 139 |
+
size: 34M
|
| 140 |
+
checksum: metadata/sha256_manifest.txt
|
| 141 |
+
large_file: false
|
| 142 |
+
- id: water_train_extxyz
|
| 143 |
+
path: data/water/water_train.xyz
|
| 144 |
+
role: train_split
|
| 145 |
+
description_zh: 从 dataset_1593.xyz 前 1393 帧派生的 MACE 训练文件。
|
| 146 |
+
required: true
|
| 147 |
+
required_for: [preflight, train]
|
| 148 |
+
format: extxyz
|
| 149 |
+
source:
|
| 150 |
+
platform: modelscope
|
| 151 |
+
repo_id: OneScience/water
|
| 152 |
+
repo_type: dataset
|
| 153 |
+
path: data/water/water_train.xyz
|
| 154 |
+
revision: main
|
| 155 |
+
url: null
|
| 156 |
+
download_method: command_ref
|
| 157 |
+
command_ref: commands.download.download_dataset_package
|
| 158 |
+
mirrors: []
|
| 159 |
+
local_path: session_workdir/data/water/water_train.xyz
|
| 160 |
+
size: 30M
|
| 161 |
+
checksum: metadata/sha256_manifest.txt
|
| 162 |
+
large_file: false
|
| 163 |
+
- id: water_test_extxyz
|
| 164 |
+
path: data/water/water_test.xyz
|
| 165 |
+
role: test_split
|
| 166 |
+
description_zh: 从 dataset_1593.xyz 后 200 帧派生的 MACE 测试文件。
|
| 167 |
+
required: true
|
| 168 |
+
required_for: [preflight, evaluate]
|
| 169 |
+
format: extxyz
|
| 170 |
+
source:
|
| 171 |
+
platform: modelscope
|
| 172 |
+
repo_id: OneScience/water
|
| 173 |
+
repo_type: dataset
|
| 174 |
+
path: data/water/water_test.xyz
|
| 175 |
+
revision: main
|
| 176 |
+
url: null
|
| 177 |
+
download_method: command_ref
|
| 178 |
+
command_ref: commands.download.download_dataset_package
|
| 179 |
+
mirrors: []
|
| 180 |
+
local_path: session_workdir/data/water/water_test.xyz
|
| 181 |
+
size: 4.3M
|
| 182 |
+
checksum: metadata/sha256_manifest.txt
|
| 183 |
+
large_file: false
|
| 184 |
+
- id: water_generation_script
|
| 185 |
+
path: data/water/gene_xyz.py
|
| 186 |
+
role: metadata
|
| 187 |
+
description_zh: 原始目录提供的 split 生成脚本,说明 train/test 的切分方式。
|
| 188 |
+
required: false
|
| 189 |
+
required_for: [preflight]
|
| 190 |
+
format: py
|
| 191 |
+
source:
|
| 192 |
+
platform: modelscope
|
| 193 |
+
repo_id: OneScience/water
|
| 194 |
+
repo_type: dataset
|
| 195 |
+
path: data/water/gene_xyz.py
|
| 196 |
+
revision: main
|
| 197 |
+
url: null
|
| 198 |
+
download_method: command_ref
|
| 199 |
+
command_ref: commands.download.download_dataset_package
|
| 200 |
+
mirrors: []
|
| 201 |
+
local_path: session_workdir/data/water/gene_xyz.py
|
| 202 |
+
size: 236B
|
| 203 |
+
checksum: metadata/sha256_manifest.txt
|
| 204 |
+
large_file: false
|
| 205 |
+
config_files:
|
| 206 |
+
- id: schema
|
| 207 |
+
path: metadata/schema.yaml
|
| 208 |
+
role: schema
|
| 209 |
+
description_zh: water extxyz 数据结构、字段名、shape、单位、split 和 MACE 配置键说明。
|
| 210 |
+
required: true
|
| 211 |
+
required_for: [preflight, train, evaluate]
|
| 212 |
+
format: yaml
|
| 213 |
+
source:
|
| 214 |
+
platform: modelscope
|
| 215 |
+
repo_id: OneScience/water
|
| 216 |
+
repo_type: dataset
|
| 217 |
+
path: metadata/schema.yaml
|
| 218 |
+
revision: main
|
| 219 |
+
url: null
|
| 220 |
+
download_method: command_ref
|
| 221 |
+
command_ref: commands.download.download_dataset_package
|
| 222 |
+
mirrors: []
|
| 223 |
+
local_path: session_workdir/metadata/schema.yaml
|
| 224 |
+
size: null
|
| 225 |
+
checksum: null
|
| 226 |
+
large_file: false
|
| 227 |
+
- id: sha256_manifest
|
| 228 |
+
path: metadata/sha256_manifest.txt
|
| 229 |
+
role: checksum
|
| 230 |
+
description_zh: water 数据文件 SHA256 清单,用于校验整理后数据与原始数据及派生 split 一致。
|
| 231 |
+
required: true
|
| 232 |
+
required_for: [preflight]
|
| 233 |
+
format: txt
|
| 234 |
+
source:
|
| 235 |
+
platform: modelscope
|
| 236 |
+
repo_id: OneScience/water
|
| 237 |
+
repo_type: dataset
|
| 238 |
+
path: metadata/sha256_manifest.txt
|
| 239 |
+
revision: main
|
| 240 |
+
url: null
|
| 241 |
+
download_method: command_ref
|
| 242 |
+
command_ref: commands.download.download_dataset_package
|
| 243 |
+
mirrors: []
|
| 244 |
+
local_path: session_workdir/metadata/sha256_manifest.txt
|
| 245 |
+
size: null
|
| 246 |
+
checksum: null
|
| 247 |
+
large_file: false
|
| 248 |
+
sample_files:
|
| 249 |
+
- id: validate_script
|
| 250 |
+
path: scripts/validate_water.py
|
| 251 |
+
role: script
|
| 252 |
+
description_zh: water 数据读取验证脚本,检查 extxyz 字段、shape、帧数、元素集合、SHA256 和 split 还原。
|
| 253 |
+
required: true
|
| 254 |
+
required_for: [preflight]
|
| 255 |
+
format: py
|
| 256 |
+
source:
|
| 257 |
+
platform: modelscope
|
| 258 |
+
repo_id: OneScience/water
|
| 259 |
+
repo_type: dataset
|
| 260 |
+
path: scripts/validate_water.py
|
| 261 |
+
revision: main
|
| 262 |
+
url: null
|
| 263 |
+
download_method: command_ref
|
| 264 |
+
command_ref: commands.download.download_dataset_package
|
| 265 |
+
mirrors: []
|
| 266 |
+
local_path: session_workdir/scripts/validate_water.py
|
| 267 |
+
size: null
|
| 268 |
+
checksum: null
|
| 269 |
+
large_file: false
|
| 270 |
+
|
| 271 |
+
dataset:
|
| 272 |
+
format:
|
| 273 |
+
- extxyz
|
| 274 |
+
sample_unit: 单个水体系构型,包含元素、坐标、TotEnergy、force 和 Z。
|
| 275 |
+
schema:
|
| 276 |
+
path: metadata/schema.yaml
|
| 277 |
+
splits:
|
| 278 |
+
full:
|
| 279 |
+
path: data/water/dataset_1593.xyz
|
| 280 |
+
frames: 1593
|
| 281 |
+
atoms_per_frame: 192
|
| 282 |
+
train:
|
| 283 |
+
path: data/water/water_train.xyz
|
| 284 |
+
frames: 1393
|
| 285 |
+
atoms_per_frame: 192
|
| 286 |
+
validation:
|
| 287 |
+
path: null
|
| 288 |
+
note_zh: "MACE water 示例通过 valid_fraction: 0.05 从训练文件划分验证集。"
|
| 289 |
+
test:
|
| 290 |
+
path: data/water/water_test.xyz
|
| 291 |
+
frames: 200
|
| 292 |
+
atoms_per_frame: 192
|
| 293 |
+
|
| 294 |
+
relations:
|
| 295 |
+
required_datasets: []
|
| 296 |
+
optional_datasets: []
|
| 297 |
+
compatible_models:
|
| 298 |
+
- id: OneScience/MACE
|
| 299 |
+
role: train_data
|
| 300 |
+
required_for: [preflight, train, evaluate]
|
| 301 |
+
resource_ref:
|
| 302 |
+
platform: modelscope
|
| 303 |
+
repo_id: OneScience/MACE
|
| 304 |
+
repo_type: model
|
| 305 |
+
url: https://modelscope.cn/models/OneScience/MACE
|
| 306 |
+
revision: main
|
| 307 |
+
readme_path: README.md
|
| 308 |
+
manifest_path: manifest.yaml
|
| 309 |
+
expected_local_path: session_workdir/data/water
|
| 310 |
+
adapter: null
|
| 311 |
+
|
| 312 |
+
run_matrix:
|
| 313 |
+
scenarios:
|
| 314 |
+
- name: validate_dataset
|
| 315 |
+
default: true
|
| 316 |
+
capability: preflight
|
| 317 |
+
required_datasets:
|
| 318 |
+
- id: OneScience/water
|
| 319 |
+
role: train_data
|
| 320 |
+
local_path: data/water
|
| 321 |
+
required_model_files: []
|
| 322 |
+
required_data_files:
|
| 323 |
+
- data/water/dataset_1593.xyz
|
| 324 |
+
- data/water/water_train.xyz
|
| 325 |
+
- data/water/water_test.xyz
|
| 326 |
+
- metadata/sha256_manifest.txt
|
| 327 |
+
preconditions:
|
| 328 |
+
- 已下载数据集仓库 OneScience/water。
|
| 329 |
+
command_refs:
|
| 330 |
+
- commands.preflight.validate_dataset
|
| 331 |
+
outputs:
|
| 332 |
+
- path: stdout
|
| 333 |
+
description_zh: 数据字段、帧数、split 还原和 SHA256 检查结果。
|
| 334 |
+
|
| 335 |
+
capabilities:
|
| 336 |
+
inference: false
|
| 337 |
+
train: false
|
| 338 |
+
finetune: false
|
| 339 |
+
evaluate: false
|
| 340 |
+
visualize: false
|
| 341 |
+
deploy: false
|
| 342 |
+
|
| 343 |
+
commands:
|
| 344 |
+
download:
|
| 345 |
+
- name: download_dataset_package
|
| 346 |
+
target: dataset
|
| 347 |
+
repo_id: OneScience/water
|
| 348 |
+
source: .
|
| 349 |
+
local_path: session_workdir/
|
| 350 |
+
required: true
|
| 351 |
+
required_for: [preflight, train, evaluate]
|
| 352 |
+
cwd: .
|
| 353 |
+
command: modelscope download --dataset OneScience/water --local_dir session_workdir
|
| 354 |
+
expected_outputs:
|
| 355 |
+
- path: session_workdir/data/water/water_train.xyz
|
| 356 |
+
type: file
|
| 357 |
+
success_criteria:
|
| 358 |
+
- exit_code == 0
|
| 359 |
+
- output_path_exists
|
| 360 |
+
preflight:
|
| 361 |
+
- name: validate_dataset
|
| 362 |
+
description: 验证 water extxyz 文件结构、字段名、帧数、split 还原和 SHA256。
|
| 363 |
+
cwd: .
|
| 364 |
+
command: python scripts/validate_water.py --dataset-root data/water --checksum-manifest metadata/sha256_manifest.txt
|
| 365 |
+
required_files:
|
| 366 |
+
- data/water/dataset_1593.xyz
|
| 367 |
+
- data/water/water_train.xyz
|
| 368 |
+
- data/water/water_test.xyz
|
| 369 |
+
- metadata/sha256_manifest.txt
|
| 370 |
+
- scripts/validate_water.py
|
| 371 |
+
required_env:
|
| 372 |
+
- python
|
| 373 |
+
expected_outputs:
|
| 374 |
+
- path: stdout
|
| 375 |
+
type: text
|
| 376 |
+
success_criteria:
|
| 377 |
+
- exit_code == 0
|
| 378 |
+
prepare: []
|
| 379 |
+
inference: []
|
| 380 |
+
train: []
|
| 381 |
+
finetune: []
|
| 382 |
+
evaluate: []
|
| 383 |
+
visualize: []
|
| 384 |
+
deploy: []
|
| 385 |
+
|
| 386 |
+
expected_outputs:
|
| 387 |
+
- path: stdout
|
| 388 |
+
type: text
|
| 389 |
+
description_zh: 验证脚本输出每个 split、字段、split 还原和 SHA256 的 OK 结果。
|
| 390 |
+
|
| 391 |
+
diagnostics:
|
| 392 |
+
- error_pattern: "缺少文件"
|
| 393 |
+
likely_cause: 数据集下载不完整或运行 cwd 不在数据集仓库根目录。
|
| 394 |
+
action: 重新执行 modelscope download --dataset OneScience/water,并在下载后的数据集根目录运行验证命令。
|
| 395 |
+
- error_pattern: "SHA256 不一致"
|
| 396 |
+
likely_cause: 文件被截断、损坏或被替换。
|
| 397 |
+
action: 删除损坏文件后重新下载数据集。
|
| 398 |
+
- error_pattern: "TotEnergy"
|
| 399 |
+
likely_cause: extxyz comment 中缺少 MACE water 配置要求的能量字段。
|
| 400 |
+
action: 检查数据是否为本仓库 water 数据,或同步修改模型配置 energy_key。
|
| 401 |
+
- error_pattern: "force"
|
| 402 |
+
likely_cause: extxyz Properties 中缺少 MACE water 配置要求的力字段。
|
| 403 |
+
action: 检查数据是否为本仓库 water 数据,或同步修改模型配置 forces_key。
|
| 404 |
+
- error_pattern: "不能字节级还原"
|
| 405 |
+
likely_cause: 派生的 water_train.xyz 或 water_test.xyz 与 dataset_1593.xyz 的切分方式不一致。
|
| 406 |
+
action: 按 gene_xyz.py 重新从 dataset_1593.xyz 生成前 1393 帧训练和后 200 帧测试。
|
| 407 |
+
|
| 408 |
+
domain_extension:
|
| 409 |
+
matchem:
|
| 410 |
+
chemical_system:
|
| 411 |
+
elements:
|
| 412 |
+
- H
|
| 413 |
+
- O
|
| 414 |
+
properties:
|
| 415 |
+
- energy
|
| 416 |
+
- forces
|
| 417 |
+
units:
|
| 418 |
+
energy: eV
|
| 419 |
+
forces: eV/Angstrom
|
| 420 |
+
structure_format:
|
| 421 |
+
- extxyz
|
| 422 |
+
|
| 423 |
+
large_resource:
|
| 424 |
+
enabled: false
|
| 425 |
+
total_size: 68M
|
| 426 |
+
file_count: 4
|
| 427 |
+
download_policy: full
|
| 428 |
+
default_download: full
|
| 429 |
+
minimal_files:
|
| 430 |
+
- data/water/water_train.xyz
|
| 431 |
+
- data/water/water_test.xyz
|
| 432 |
+
- data/water/dataset_1593.xyz
|
| 433 |
+
|
| 434 |
+
reproducibility:
|
| 435 |
+
level: minimal
|
| 436 |
+
goal: 完成一次 water extxyz 数据读取、split 还原和 SHA256 校验。
|
| 437 |
+
command_ref: commands.preflight.validate_dataset
|
| 438 |
+
expected_runtime: 1-2 minutes
|
| 439 |
+
expected_outputs:
|
| 440 |
+
- stdout
|
metadata/schema.yaml
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
dataset: water
|
| 2 |
+
standardized_repo_id: OneScience/water
|
| 3 |
+
domain: matchem
|
| 4 |
+
format:
|
| 5 |
+
- extxyz
|
| 6 |
+
splits:
|
| 7 |
+
full:
|
| 8 |
+
path: data/water/dataset_1593.xyz
|
| 9 |
+
frames: 1593
|
| 10 |
+
atoms_per_frame: 192
|
| 11 |
+
train:
|
| 12 |
+
path: data/water/water_train.xyz
|
| 13 |
+
frames: 1393
|
| 14 |
+
atoms_per_frame: 192
|
| 15 |
+
derived_from: data/water/dataset_1593.xyz
|
| 16 |
+
derivation: frames[0:1393]
|
| 17 |
+
test:
|
| 18 |
+
path: data/water/water_test.xyz
|
| 19 |
+
frames: 200
|
| 20 |
+
atoms_per_frame: 192
|
| 21 |
+
derived_from: data/water/dataset_1593.xyz
|
| 22 |
+
derivation: frames[1393:1593]
|
| 23 |
+
sample_schema:
|
| 24 |
+
extxyz_comment_fields:
|
| 25 |
+
- TotEnergy
|
| 26 |
+
- cutoff
|
| 27 |
+
- nneightol
|
| 28 |
+
- pbc
|
| 29 |
+
- Lattice
|
| 30 |
+
- Properties
|
| 31 |
+
properties:
|
| 32 |
+
species:
|
| 33 |
+
dtype: string
|
| 34 |
+
shape: [num_atoms]
|
| 35 |
+
description_zh: 元素符号。
|
| 36 |
+
pos:
|
| 37 |
+
dtype: float
|
| 38 |
+
shape: [num_atoms, 3]
|
| 39 |
+
unit: Angstrom
|
| 40 |
+
description_zh: 原子坐标。
|
| 41 |
+
force:
|
| 42 |
+
dtype: float
|
| 43 |
+
shape: [num_atoms, 3]
|
| 44 |
+
unit: eV/Angstrom
|
| 45 |
+
description_zh: 原子受力。
|
| 46 |
+
Z:
|
| 47 |
+
dtype: int
|
| 48 |
+
shape: [num_atoms]
|
| 49 |
+
description_zh: 原子序数。
|
| 50 |
+
config_fields:
|
| 51 |
+
TotEnergy:
|
| 52 |
+
dtype: float
|
| 53 |
+
unit: eV
|
| 54 |
+
description_zh: 构型总能量。
|
| 55 |
+
model_expected_keys:
|
| 56 |
+
energy_key: TotEnergy
|
| 57 |
+
forces_key: force
|
| 58 |
+
train_file: data/water/water_train.xyz
|
| 59 |
+
test_file: data/water/water_test.xyz
|
| 60 |
+
elements:
|
| 61 |
+
- H
|
| 62 |
+
- O
|
metadata/sha256_manifest.txt
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
5e2ec3b4b1334e012daa6a2e2dbd138108c41c7b6f692ff89b8747b81cadfdbc dataset_1593.xyz
|
| 2 |
+
ab67f9beae43e3d2903b1b7231d029409821c03dff996e19e6c0f750714b8d72 gene_xyz.py
|
| 3 |
+
1faafb64ae7cf039e3322a0f4b2366fecb9600d8771218a7ce579bcc29f398a3 water_test.xyz
|
| 4 |
+
f0e332b783e7c41ad84f476224a17b0946bbe4556d7fdd7b0c7fe3842fea6828 water_train.xyz
|
onescience_relations.yaml
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
required_datasets: []
|
| 2 |
+
optional_datasets: []
|
| 3 |
+
compatible_models:
|
| 4 |
+
- id: OneScience/MACE
|
| 5 |
+
role: train_data
|
| 6 |
+
required_for:
|
| 7 |
+
- preflight
|
| 8 |
+
- train
|
| 9 |
+
- evaluate
|
| 10 |
+
resource_ref:
|
| 11 |
+
platform: modelscope
|
| 12 |
+
repo_id: OneScience/MACE
|
| 13 |
+
repo_type: model
|
| 14 |
+
url: https://modelscope.cn/models/OneScience/MACE
|
| 15 |
+
revision: main
|
| 16 |
+
readme_path: README.md
|
| 17 |
+
manifest_path: manifest.yaml
|
| 18 |
+
expected_local_path: session_workdir/data/water
|
| 19 |
+
adapter: null
|
onescience_run_manifest.yaml
ADDED
|
@@ -0,0 +1,440 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
onescience_manifest_version: "0.1"
|
| 2 |
+
resource_type: dataset
|
| 3 |
+
resource:
|
| 4 |
+
id: OneScience/water
|
| 5 |
+
name: water
|
| 6 |
+
domain: matchem
|
| 7 |
+
domain_tags:
|
| 8 |
+
- matchem
|
| 9 |
+
- water
|
| 10 |
+
- atomistic_dataset
|
| 11 |
+
task: mlip_training_data
|
| 12 |
+
task_tags:
|
| 13 |
+
- mlip
|
| 14 |
+
- energy_prediction
|
| 15 |
+
- force_prediction
|
| 16 |
+
- extxyz_training
|
| 17 |
+
modalities:
|
| 18 |
+
- atomistic_structure
|
| 19 |
+
input_formats:
|
| 20 |
+
- extxyz
|
| 21 |
+
output_formats: []
|
| 22 |
+
summary: 面向 MACE 水体系势能面训练和评测示例的 extxyz 数据集。
|
| 23 |
+
|
| 24 |
+
platform_resource:
|
| 25 |
+
primary:
|
| 26 |
+
platform: modelscope
|
| 27 |
+
repo_id: OneScience/water
|
| 28 |
+
repo_type: dataset
|
| 29 |
+
url: https://modelscope.cn/datasets/OneScience/water
|
| 30 |
+
revision: main
|
| 31 |
+
readme_path: README.md
|
| 32 |
+
manifest_path: manifest.yaml
|
| 33 |
+
mirrors: []
|
| 34 |
+
access:
|
| 35 |
+
visibility: public
|
| 36 |
+
license: null
|
| 37 |
+
|
| 38 |
+
website_integration:
|
| 39 |
+
enabled: true
|
| 40 |
+
click_target:
|
| 41 |
+
platform: modelscope
|
| 42 |
+
resource_url: https://modelscope.cn/datasets/OneScience/water
|
| 43 |
+
llm_handoff:
|
| 44 |
+
readme_required: true
|
| 45 |
+
manifest_required: true
|
| 46 |
+
download_readme_first: true
|
| 47 |
+
resolve_related_models: true
|
| 48 |
+
default_run_goal: minimal_validation
|
| 49 |
+
|
| 50 |
+
runtime:
|
| 51 |
+
enabled: true
|
| 52 |
+
onescience_domain: matchem
|
| 53 |
+
min_onescience_version: null
|
| 54 |
+
supported_execution:
|
| 55 |
+
- local
|
| 56 |
+
- local_slurm
|
| 57 |
+
- remote_slurm
|
| 58 |
+
- scnet_mcp
|
| 59 |
+
|
| 60 |
+
onescience:
|
| 61 |
+
repo: https://gitee.com/onescience-ai/onescience
|
| 62 |
+
official_links:
|
| 63 |
+
gitee:
|
| 64 |
+
doc: https://gitee.com/onescience-ai/onescience-doc
|
| 65 |
+
onescience: https://gitee.com/onescience-ai/onescience
|
| 66 |
+
skills: https://gitee.com/onescience-ai/oneskills
|
| 67 |
+
github:
|
| 68 |
+
doc: https://github.com/onescience-ai/OneScience-doc
|
| 69 |
+
onescience: https://github.com/onescience-ai/OneScience
|
| 70 |
+
skills: https://github.com/onescience-ai/oneskills
|
| 71 |
+
install:
|
| 72 |
+
required_by_default: false
|
| 73 |
+
command: bash install.sh matchem
|
| 74 |
+
source_paths:
|
| 75 |
+
- matchem/mace/water
|
| 76 |
+
compatibility:
|
| 77 |
+
examples_path: examples/matchem/mace
|
| 78 |
+
status: examples_compatible
|
| 79 |
+
|
| 80 |
+
runtime_package:
|
| 81 |
+
kind: standard_runtime_package
|
| 82 |
+
package_root: .
|
| 83 |
+
standard_layout:
|
| 84 |
+
workdir: .
|
| 85 |
+
config_dir: metadata
|
| 86 |
+
checkpoint_dir: null
|
| 87 |
+
data_dir: data
|
| 88 |
+
output_dir: outputs
|
| 89 |
+
apply_policy:
|
| 90 |
+
mode: direct_use
|
| 91 |
+
target: session_workdir
|
| 92 |
+
overwrite: true
|
| 93 |
+
protect_installed_onescience: true
|
| 94 |
+
entry_files:
|
| 95 |
+
- scripts/validate_water.py
|
| 96 |
+
- metadata/schema.yaml
|
| 97 |
+
- metadata/sha256_manifest.txt
|
| 98 |
+
entrypoints:
|
| 99 |
+
preflight: scripts/validate_water.py
|
| 100 |
+
inference: null
|
| 101 |
+
train: null
|
| 102 |
+
finetune: null
|
| 103 |
+
evaluate: null
|
| 104 |
+
visualize: null
|
| 105 |
+
deploy: null
|
| 106 |
+
|
| 107 |
+
derivation:
|
| 108 |
+
source_file: data/water/dataset_1593.xyz
|
| 109 |
+
generated_files:
|
| 110 |
+
- path: data/water/water_train.xyz
|
| 111 |
+
method: frames[0:1393]
|
| 112 |
+
reason: MACE water 配置读取 water_train.xyz;原始目录只有 dataset_1593.xyz,因此按 gene_xyz.py 逻辑派生。
|
| 113 |
+
- path: data/water/water_test.xyz
|
| 114 |
+
method: frames[1393:1593]
|
| 115 |
+
reason: MACE water 配置读取 water_test.xyz;原始目录只有 dataset_1593.xyz,因此按 gene_xyz.py 逻辑派生。
|
| 116 |
+
verification: water_train.xyz 与 water_test.xyz 字节级拼接后等于 dataset_1593.xyz。
|
| 117 |
+
|
| 118 |
+
files:
|
| 119 |
+
model_files: []
|
| 120 |
+
dataset_files:
|
| 121 |
+
- id: water_full_extxyz
|
| 122 |
+
path: data/water/dataset_1593.xyz
|
| 123 |
+
role: metadata
|
| 124 |
+
description_zh: 原始 water extxyz 全量文件,包含 1593 帧,每帧 192 个原子。
|
| 125 |
+
required: true
|
| 126 |
+
required_for: [preflight]
|
| 127 |
+
format: extxyz
|
| 128 |
+
source:
|
| 129 |
+
platform: modelscope
|
| 130 |
+
repo_id: OneScience/water
|
| 131 |
+
repo_type: dataset
|
| 132 |
+
path: data/water/dataset_1593.xyz
|
| 133 |
+
revision: main
|
| 134 |
+
url: null
|
| 135 |
+
download_method: command_ref
|
| 136 |
+
command_ref: commands.download.download_dataset_package
|
| 137 |
+
mirrors: []
|
| 138 |
+
local_path: session_workdir/data/water/dataset_1593.xyz
|
| 139 |
+
size: 34M
|
| 140 |
+
checksum: metadata/sha256_manifest.txt
|
| 141 |
+
large_file: false
|
| 142 |
+
- id: water_train_extxyz
|
| 143 |
+
path: data/water/water_train.xyz
|
| 144 |
+
role: train_split
|
| 145 |
+
description_zh: 从 dataset_1593.xyz 前 1393 帧派生的 MACE 训练文件。
|
| 146 |
+
required: true
|
| 147 |
+
required_for: [preflight, train]
|
| 148 |
+
format: extxyz
|
| 149 |
+
source:
|
| 150 |
+
platform: modelscope
|
| 151 |
+
repo_id: OneScience/water
|
| 152 |
+
repo_type: dataset
|
| 153 |
+
path: data/water/water_train.xyz
|
| 154 |
+
revision: main
|
| 155 |
+
url: null
|
| 156 |
+
download_method: command_ref
|
| 157 |
+
command_ref: commands.download.download_dataset_package
|
| 158 |
+
mirrors: []
|
| 159 |
+
local_path: session_workdir/data/water/water_train.xyz
|
| 160 |
+
size: 30M
|
| 161 |
+
checksum: metadata/sha256_manifest.txt
|
| 162 |
+
large_file: false
|
| 163 |
+
- id: water_test_extxyz
|
| 164 |
+
path: data/water/water_test.xyz
|
| 165 |
+
role: test_split
|
| 166 |
+
description_zh: 从 dataset_1593.xyz 后 200 帧派生的 MACE 测试文件。
|
| 167 |
+
required: true
|
| 168 |
+
required_for: [preflight, evaluate]
|
| 169 |
+
format: extxyz
|
| 170 |
+
source:
|
| 171 |
+
platform: modelscope
|
| 172 |
+
repo_id: OneScience/water
|
| 173 |
+
repo_type: dataset
|
| 174 |
+
path: data/water/water_test.xyz
|
| 175 |
+
revision: main
|
| 176 |
+
url: null
|
| 177 |
+
download_method: command_ref
|
| 178 |
+
command_ref: commands.download.download_dataset_package
|
| 179 |
+
mirrors: []
|
| 180 |
+
local_path: session_workdir/data/water/water_test.xyz
|
| 181 |
+
size: 4.3M
|
| 182 |
+
checksum: metadata/sha256_manifest.txt
|
| 183 |
+
large_file: false
|
| 184 |
+
- id: water_generation_script
|
| 185 |
+
path: data/water/gene_xyz.py
|
| 186 |
+
role: metadata
|
| 187 |
+
description_zh: 原始目录提供的 split 生成脚本,说明 train/test 的切分方式。
|
| 188 |
+
required: false
|
| 189 |
+
required_for: [preflight]
|
| 190 |
+
format: py
|
| 191 |
+
source:
|
| 192 |
+
platform: modelscope
|
| 193 |
+
repo_id: OneScience/water
|
| 194 |
+
repo_type: dataset
|
| 195 |
+
path: data/water/gene_xyz.py
|
| 196 |
+
revision: main
|
| 197 |
+
url: null
|
| 198 |
+
download_method: command_ref
|
| 199 |
+
command_ref: commands.download.download_dataset_package
|
| 200 |
+
mirrors: []
|
| 201 |
+
local_path: session_workdir/data/water/gene_xyz.py
|
| 202 |
+
size: 236B
|
| 203 |
+
checksum: metadata/sha256_manifest.txt
|
| 204 |
+
large_file: false
|
| 205 |
+
config_files:
|
| 206 |
+
- id: schema
|
| 207 |
+
path: metadata/schema.yaml
|
| 208 |
+
role: schema
|
| 209 |
+
description_zh: water extxyz 数据结构、字段名、shape、单位、split 和 MACE 配置键说明。
|
| 210 |
+
required: true
|
| 211 |
+
required_for: [preflight, train, evaluate]
|
| 212 |
+
format: yaml
|
| 213 |
+
source:
|
| 214 |
+
platform: modelscope
|
| 215 |
+
repo_id: OneScience/water
|
| 216 |
+
repo_type: dataset
|
| 217 |
+
path: metadata/schema.yaml
|
| 218 |
+
revision: main
|
| 219 |
+
url: null
|
| 220 |
+
download_method: command_ref
|
| 221 |
+
command_ref: commands.download.download_dataset_package
|
| 222 |
+
mirrors: []
|
| 223 |
+
local_path: session_workdir/metadata/schema.yaml
|
| 224 |
+
size: null
|
| 225 |
+
checksum: null
|
| 226 |
+
large_file: false
|
| 227 |
+
- id: sha256_manifest
|
| 228 |
+
path: metadata/sha256_manifest.txt
|
| 229 |
+
role: checksum
|
| 230 |
+
description_zh: water 数据文件 SHA256 清单,用于校验整理后数据与原始数据及派生 split 一致。
|
| 231 |
+
required: true
|
| 232 |
+
required_for: [preflight]
|
| 233 |
+
format: txt
|
| 234 |
+
source:
|
| 235 |
+
platform: modelscope
|
| 236 |
+
repo_id: OneScience/water
|
| 237 |
+
repo_type: dataset
|
| 238 |
+
path: metadata/sha256_manifest.txt
|
| 239 |
+
revision: main
|
| 240 |
+
url: null
|
| 241 |
+
download_method: command_ref
|
| 242 |
+
command_ref: commands.download.download_dataset_package
|
| 243 |
+
mirrors: []
|
| 244 |
+
local_path: session_workdir/metadata/sha256_manifest.txt
|
| 245 |
+
size: null
|
| 246 |
+
checksum: null
|
| 247 |
+
large_file: false
|
| 248 |
+
sample_files:
|
| 249 |
+
- id: validate_script
|
| 250 |
+
path: scripts/validate_water.py
|
| 251 |
+
role: script
|
| 252 |
+
description_zh: water 数据读取验证脚本,检查 extxyz 字段、shape、帧数、元素集合、SHA256 和 split 还原。
|
| 253 |
+
required: true
|
| 254 |
+
required_for: [preflight]
|
| 255 |
+
format: py
|
| 256 |
+
source:
|
| 257 |
+
platform: modelscope
|
| 258 |
+
repo_id: OneScience/water
|
| 259 |
+
repo_type: dataset
|
| 260 |
+
path: scripts/validate_water.py
|
| 261 |
+
revision: main
|
| 262 |
+
url: null
|
| 263 |
+
download_method: command_ref
|
| 264 |
+
command_ref: commands.download.download_dataset_package
|
| 265 |
+
mirrors: []
|
| 266 |
+
local_path: session_workdir/scripts/validate_water.py
|
| 267 |
+
size: null
|
| 268 |
+
checksum: null
|
| 269 |
+
large_file: false
|
| 270 |
+
|
| 271 |
+
dataset:
|
| 272 |
+
format:
|
| 273 |
+
- extxyz
|
| 274 |
+
sample_unit: 单个水体系构型,包含元素、坐标、TotEnergy、force 和 Z。
|
| 275 |
+
schema:
|
| 276 |
+
path: metadata/schema.yaml
|
| 277 |
+
splits:
|
| 278 |
+
full:
|
| 279 |
+
path: data/water/dataset_1593.xyz
|
| 280 |
+
frames: 1593
|
| 281 |
+
atoms_per_frame: 192
|
| 282 |
+
train:
|
| 283 |
+
path: data/water/water_train.xyz
|
| 284 |
+
frames: 1393
|
| 285 |
+
atoms_per_frame: 192
|
| 286 |
+
validation:
|
| 287 |
+
path: null
|
| 288 |
+
note_zh: "MACE water 示例通过 valid_fraction: 0.05 从训练文件划分验证集。"
|
| 289 |
+
test:
|
| 290 |
+
path: data/water/water_test.xyz
|
| 291 |
+
frames: 200
|
| 292 |
+
atoms_per_frame: 192
|
| 293 |
+
|
| 294 |
+
relations:
|
| 295 |
+
required_datasets: []
|
| 296 |
+
optional_datasets: []
|
| 297 |
+
compatible_models:
|
| 298 |
+
- id: OneScience/MACE
|
| 299 |
+
role: train_data
|
| 300 |
+
required_for: [preflight, train, evaluate]
|
| 301 |
+
resource_ref:
|
| 302 |
+
platform: modelscope
|
| 303 |
+
repo_id: OneScience/MACE
|
| 304 |
+
repo_type: model
|
| 305 |
+
url: https://modelscope.cn/models/OneScience/MACE
|
| 306 |
+
revision: main
|
| 307 |
+
readme_path: README.md
|
| 308 |
+
manifest_path: manifest.yaml
|
| 309 |
+
expected_local_path: session_workdir/data/water
|
| 310 |
+
adapter: null
|
| 311 |
+
|
| 312 |
+
run_matrix:
|
| 313 |
+
scenarios:
|
| 314 |
+
- name: validate_dataset
|
| 315 |
+
default: true
|
| 316 |
+
capability: preflight
|
| 317 |
+
required_datasets:
|
| 318 |
+
- id: OneScience/water
|
| 319 |
+
role: train_data
|
| 320 |
+
local_path: data/water
|
| 321 |
+
required_model_files: []
|
| 322 |
+
required_data_files:
|
| 323 |
+
- data/water/dataset_1593.xyz
|
| 324 |
+
- data/water/water_train.xyz
|
| 325 |
+
- data/water/water_test.xyz
|
| 326 |
+
- metadata/sha256_manifest.txt
|
| 327 |
+
preconditions:
|
| 328 |
+
- 已下载数据集仓库 OneScience/water。
|
| 329 |
+
command_refs:
|
| 330 |
+
- commands.preflight.validate_dataset
|
| 331 |
+
outputs:
|
| 332 |
+
- path: stdout
|
| 333 |
+
description_zh: 数据字段、帧数、split 还原和 SHA256 检查结果。
|
| 334 |
+
|
| 335 |
+
capabilities:
|
| 336 |
+
inference: false
|
| 337 |
+
train: false
|
| 338 |
+
finetune: false
|
| 339 |
+
evaluate: false
|
| 340 |
+
visualize: false
|
| 341 |
+
deploy: false
|
| 342 |
+
|
| 343 |
+
commands:
|
| 344 |
+
download:
|
| 345 |
+
- name: download_dataset_package
|
| 346 |
+
target: dataset
|
| 347 |
+
repo_id: OneScience/water
|
| 348 |
+
source: .
|
| 349 |
+
local_path: session_workdir/
|
| 350 |
+
required: true
|
| 351 |
+
required_for: [preflight, train, evaluate]
|
| 352 |
+
cwd: .
|
| 353 |
+
command: modelscope download --dataset OneScience/water --local_dir session_workdir
|
| 354 |
+
expected_outputs:
|
| 355 |
+
- path: session_workdir/data/water/water_train.xyz
|
| 356 |
+
type: file
|
| 357 |
+
success_criteria:
|
| 358 |
+
- exit_code == 0
|
| 359 |
+
- output_path_exists
|
| 360 |
+
preflight:
|
| 361 |
+
- name: validate_dataset
|
| 362 |
+
description: 验证 water extxyz 文件结构、字段名、帧数、split 还原和 SHA256。
|
| 363 |
+
cwd: .
|
| 364 |
+
command: python scripts/validate_water.py --dataset-root data/water --checksum-manifest metadata/sha256_manifest.txt
|
| 365 |
+
required_files:
|
| 366 |
+
- data/water/dataset_1593.xyz
|
| 367 |
+
- data/water/water_train.xyz
|
| 368 |
+
- data/water/water_test.xyz
|
| 369 |
+
- metadata/sha256_manifest.txt
|
| 370 |
+
- scripts/validate_water.py
|
| 371 |
+
required_env:
|
| 372 |
+
- python
|
| 373 |
+
expected_outputs:
|
| 374 |
+
- path: stdout
|
| 375 |
+
type: text
|
| 376 |
+
success_criteria:
|
| 377 |
+
- exit_code == 0
|
| 378 |
+
prepare: []
|
| 379 |
+
inference: []
|
| 380 |
+
train: []
|
| 381 |
+
finetune: []
|
| 382 |
+
evaluate: []
|
| 383 |
+
visualize: []
|
| 384 |
+
deploy: []
|
| 385 |
+
|
| 386 |
+
expected_outputs:
|
| 387 |
+
- path: stdout
|
| 388 |
+
type: text
|
| 389 |
+
description_zh: 验证脚本输出每个 split、字段、split 还原和 SHA256 的 OK 结果。
|
| 390 |
+
|
| 391 |
+
diagnostics:
|
| 392 |
+
- error_pattern: "缺少文件"
|
| 393 |
+
likely_cause: 数据集下载不完整或运行 cwd 不在数据集仓库根目录。
|
| 394 |
+
action: 重新执行 modelscope download --dataset OneScience/water,并在下载后的数据集根目录运行验证命令。
|
| 395 |
+
- error_pattern: "SHA256 不一致"
|
| 396 |
+
likely_cause: 文件被截断、损坏或被替换。
|
| 397 |
+
action: 删除损坏文件后重新下载数据集。
|
| 398 |
+
- error_pattern: "TotEnergy"
|
| 399 |
+
likely_cause: extxyz comment 中缺少 MACE water 配置要求的能量字段。
|
| 400 |
+
action: 检查数据是否为本仓库 water 数据,或同步修改模型配置 energy_key。
|
| 401 |
+
- error_pattern: "force"
|
| 402 |
+
likely_cause: extxyz Properties 中缺少 MACE water 配置要求的力字段。
|
| 403 |
+
action: 检查数据是否为本仓库 water 数据,或同步修改模型配置 forces_key。
|
| 404 |
+
- error_pattern: "不能字节级还原"
|
| 405 |
+
likely_cause: 派生的 water_train.xyz 或 water_test.xyz 与 dataset_1593.xyz 的切分方式不一致。
|
| 406 |
+
action: 按 gene_xyz.py 重新从 dataset_1593.xyz 生成前 1393 帧训练和后 200 帧测试。
|
| 407 |
+
|
| 408 |
+
domain_extension:
|
| 409 |
+
matchem:
|
| 410 |
+
chemical_system:
|
| 411 |
+
elements:
|
| 412 |
+
- H
|
| 413 |
+
- O
|
| 414 |
+
properties:
|
| 415 |
+
- energy
|
| 416 |
+
- forces
|
| 417 |
+
units:
|
| 418 |
+
energy: eV
|
| 419 |
+
forces: eV/Angstrom
|
| 420 |
+
structure_format:
|
| 421 |
+
- extxyz
|
| 422 |
+
|
| 423 |
+
large_resource:
|
| 424 |
+
enabled: false
|
| 425 |
+
total_size: 68M
|
| 426 |
+
file_count: 4
|
| 427 |
+
download_policy: full
|
| 428 |
+
default_download: full
|
| 429 |
+
minimal_files:
|
| 430 |
+
- data/water/water_train.xyz
|
| 431 |
+
- data/water/water_test.xyz
|
| 432 |
+
- data/water/dataset_1593.xyz
|
| 433 |
+
|
| 434 |
+
reproducibility:
|
| 435 |
+
level: minimal
|
| 436 |
+
goal: 完成一次 water extxyz 数据读取、split 还原和 SHA256 校验。
|
| 437 |
+
command_ref: commands.preflight.validate_dataset
|
| 438 |
+
expected_runtime: 1-2 minutes
|
| 439 |
+
expected_outputs:
|
| 440 |
+
- stdout
|
scripts/validate_water.py
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Validate the standardized water 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_FILES = {
|
| 13 |
+
"dataset_1593.xyz": 1593,
|
| 14 |
+
"water_train.xyz": 1393,
|
| 15 |
+
"water_test.xyz": 200,
|
| 16 |
+
}
|
| 17 |
+
EXPECTED_ATOMS_PER_FRAME = 192
|
| 18 |
+
EXPECTED_ELEMENTS = {"H", "O"}
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
def sha256_file(path: Path) -> str:
|
| 22 |
+
h = hashlib.sha256()
|
| 23 |
+
with path.open("rb") as f:
|
| 24 |
+
for chunk in iter(lambda: f.read(1024 * 1024), b""):
|
| 25 |
+
h.update(chunk)
|
| 26 |
+
return h.hexdigest()
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def validate_checksum_manifest(dataset_root: Path, manifest_path: Path) -> None:
|
| 30 |
+
checked = 0
|
| 31 |
+
with manifest_path.open("r", encoding="utf-8") as f:
|
| 32 |
+
for line in f:
|
| 33 |
+
line = line.strip()
|
| 34 |
+
if not line or line.startswith("#"):
|
| 35 |
+
continue
|
| 36 |
+
digest, rel = line.split(maxsplit=1)
|
| 37 |
+
path = dataset_root / rel
|
| 38 |
+
if not path.exists():
|
| 39 |
+
raise SystemExit(f"[FAIL] 清单文件不存在: {path}")
|
| 40 |
+
actual = sha256_file(path)
|
| 41 |
+
if actual != digest:
|
| 42 |
+
raise SystemExit(f"[FAIL] SHA256 不一致: {rel}")
|
| 43 |
+
checked += 1
|
| 44 |
+
expected_manifest_files = len(EXPECTED_FILES) + 1
|
| 45 |
+
if checked != expected_manifest_files:
|
| 46 |
+
raise SystemExit(f"[FAIL] SHA256 清单文件数异常: {checked}")
|
| 47 |
+
print(f"[OK] SHA256 清单验证通过: {checked} 个文件")
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
def parse_properties(comment: str) -> list[tuple[str, str, int]]:
|
| 51 |
+
match = re.search(r'Properties=("[^"]+"|\S+)', comment)
|
| 52 |
+
if not match:
|
| 53 |
+
raise SystemExit("[FAIL] extxyz comment 缺少 Properties")
|
| 54 |
+
raw = match.group(1).strip('"')
|
| 55 |
+
parts = raw.split(":")
|
| 56 |
+
if len(parts) % 3:
|
| 57 |
+
raise SystemExit(f"[FAIL] Properties 格式异常: {raw}")
|
| 58 |
+
parsed = []
|
| 59 |
+
for i in range(0, len(parts), 3):
|
| 60 |
+
name, kind, width = parts[i], parts[i + 1], int(parts[i + 2])
|
| 61 |
+
parsed.append((name, kind, width))
|
| 62 |
+
return parsed
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def validate_xyz(path: Path, expected_frames: int) -> None:
|
| 66 |
+
frames = 0
|
| 67 |
+
elements: set[str] = set()
|
| 68 |
+
|
| 69 |
+
with path.open("r", encoding="utf-8") as f:
|
| 70 |
+
while True:
|
| 71 |
+
first = f.readline()
|
| 72 |
+
if not first:
|
| 73 |
+
break
|
| 74 |
+
if not first.strip():
|
| 75 |
+
continue
|
| 76 |
+
try:
|
| 77 |
+
atom_count = int(first.strip())
|
| 78 |
+
except ValueError as exc:
|
| 79 |
+
raise SystemExit(f"[FAIL] 原子数行不是整数: {path}:{frames + 1}") from exc
|
| 80 |
+
if atom_count != EXPECTED_ATOMS_PER_FRAME:
|
| 81 |
+
raise SystemExit(
|
| 82 |
+
f"[FAIL] 原子数异常: {path.name} frame {frames}: "
|
| 83 |
+
f"{atom_count} != {EXPECTED_ATOMS_PER_FRAME}"
|
| 84 |
+
)
|
| 85 |
+
comment = f.readline().rstrip("\n")
|
| 86 |
+
for key in ("TotEnergy=", "pbc=", "Lattice=", "Properties="):
|
| 87 |
+
if key not in comment:
|
| 88 |
+
raise SystemExit(f"[FAIL] comment 缺少 {key}: {path} frame {frames}")
|
| 89 |
+
props = parse_properties(comment)
|
| 90 |
+
prop_names = [p[0] for p in props]
|
| 91 |
+
if prop_names != ["species", "pos", "force", "Z"]:
|
| 92 |
+
raise SystemExit(f"[FAIL] Properties 必须是 species,pos,force,Z: {path} frame {frames}")
|
| 93 |
+
expected_cols = sum(width for _, _, width in props)
|
| 94 |
+
if expected_cols != 8:
|
| 95 |
+
raise SystemExit(f"[FAIL] 原子列数 schema 异常: {path} frame {frames}")
|
| 96 |
+
|
| 97 |
+
for atom_index in range(atom_count):
|
| 98 |
+
atom_line = f.readline()
|
| 99 |
+
if not atom_line:
|
| 100 |
+
raise SystemExit(f"[FAIL] 文件提前结束: {path} frame {frames}")
|
| 101 |
+
cols = atom_line.split()
|
| 102 |
+
if len(cols) != expected_cols:
|
| 103 |
+
raise SystemExit(
|
| 104 |
+
f"[FAIL] 原子列数异常: {path} frame {frames} atom {atom_index}: "
|
| 105 |
+
f"{len(cols)} != {expected_cols}"
|
| 106 |
+
)
|
| 107 |
+
elements.add(cols[0])
|
| 108 |
+
for value in cols[1:7]:
|
| 109 |
+
float(value)
|
| 110 |
+
int(cols[7])
|
| 111 |
+
frames += 1
|
| 112 |
+
|
| 113 |
+
if frames != expected_frames:
|
| 114 |
+
raise SystemExit(f"[FAIL] 帧数异常: {path.name}: {frames} != {expected_frames}")
|
| 115 |
+
if not elements.issubset(EXPECTED_ELEMENTS):
|
| 116 |
+
raise SystemExit(f"[FAIL] 元素集合异常: {sorted(elements)}")
|
| 117 |
+
print(f"[OK] {path.name}: frames={frames}, atoms_per_frame=192, elements={sorted(elements)}")
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
def validate_split_reconstruction(dataset_root: Path) -> None:
|
| 121 |
+
full = (dataset_root / "dataset_1593.xyz").read_bytes()
|
| 122 |
+
train = (dataset_root / "water_train.xyz").read_bytes()
|
| 123 |
+
test = (dataset_root / "water_test.xyz").read_bytes()
|
| 124 |
+
if train + test != full:
|
| 125 |
+
raise SystemExit("[FAIL] water_train.xyz + water_test.xyz 不能字节级还原 dataset_1593.xyz")
|
| 126 |
+
print("[OK] train/test split 可字节级还原原始 dataset_1593.xyz")
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
def main() -> int:
|
| 130 |
+
parser = argparse.ArgumentParser()
|
| 131 |
+
parser.add_argument("--dataset-root", default="data/water")
|
| 132 |
+
parser.add_argument("--checksum-manifest", default="metadata/sha256_manifest.txt")
|
| 133 |
+
args = parser.parse_args()
|
| 134 |
+
|
| 135 |
+
repo_root = Path.cwd()
|
| 136 |
+
dataset_root = Path(args.dataset_root)
|
| 137 |
+
if not dataset_root.is_absolute():
|
| 138 |
+
dataset_root = repo_root / dataset_root
|
| 139 |
+
checksum_manifest = Path(args.checksum_manifest)
|
| 140 |
+
if not checksum_manifest.is_absolute():
|
| 141 |
+
checksum_manifest = repo_root / checksum_manifest
|
| 142 |
+
|
| 143 |
+
if not dataset_root.exists():
|
| 144 |
+
raise SystemExit(f"[FAIL] 数据目录不存在: {dataset_root}")
|
| 145 |
+
for name, expected_frames in EXPECTED_FILES.items():
|
| 146 |
+
path = dataset_root / name
|
| 147 |
+
if not path.exists():
|
| 148 |
+
raise SystemExit(f"[FAIL] 缺少文件: {path}")
|
| 149 |
+
if path.stat().st_size <= 0:
|
| 150 |
+
raise SystemExit(f"[FAIL] 文件为空: {path}")
|
| 151 |
+
validate_xyz(path, expected_frames)
|
| 152 |
+
validate_split_reconstruction(dataset_root)
|
| 153 |
+
validate_checksum_manifest(dataset_root, checksum_manifest)
|
| 154 |
+
print("[OK] water 数据集读取验证通过")
|
| 155 |
+
return 0
|
| 156 |
+
|
| 157 |
+
|
| 158 |
+
if __name__ == "__main__":
|
| 159 |
+
raise SystemExit(main())
|