Update README.md
Browse files
README.md
CHANGED
|
@@ -3,26 +3,99 @@ license: mit
|
|
| 3 |
pipeline_tag: graph-ml
|
| 4 |
---
|
| 5 |
|
| 6 |
-
# Shift Current Prediction (DPA3
|
| 7 |
|
| 8 |
This model is based on the DPA3 architecture for predicting shift current in materials.
|
| 9 |
|
|
|
|
|
|
|
| 10 |
## Dependency
|
| 11 |
|
| 12 |
Install DeepMD:
|
| 13 |
|
| 14 |
```bash
|
| 15 |
pip install deepmd-kit
|
| 16 |
-
|
| 17 |
|
| 18 |
## Usage
|
| 19 |
|
|
|
|
|
|
|
| 20 |
```bash
|
| 21 |
dp --pt test \
|
| 22 |
-m model.weights.pt \
|
| 23 |
-f [INPUT_FILE] \
|
| 24 |
-n 0 \
|
| 25 |
-
-d [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
```
|
| 27 |
|
| 28 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
pipeline_tag: graph-ml
|
| 4 |
---
|
| 5 |
|
| 6 |
+
# Shift Current Prediction (DPA3-$\sigma$)
|
| 7 |
|
| 8 |
This model is based on the DPA3 architecture for predicting shift current in materials.
|
| 9 |
|
| 10 |
+
The training data follow a **long-tail distribution**, thus the model is trained in **log1p space** using `log1p(x) = log(1 + x)`. Predictions are also in log1p space.
|
| 11 |
+
|
| 12 |
## Dependency
|
| 13 |
|
| 14 |
Install DeepMD:
|
| 15 |
|
| 16 |
```bash
|
| 17 |
pip install deepmd-kit
|
| 18 |
+
````
|
| 19 |
|
| 20 |
## Usage
|
| 21 |
|
| 22 |
+
Basic command:
|
| 23 |
+
|
| 24 |
```bash
|
| 25 |
dp --pt test \
|
| 26 |
-m model.weights.pt \
|
| 27 |
-f [INPUT_FILE] \
|
| 28 |
-n 0 \
|
| 29 |
+
-d [OUTPUT_PREFIX]
|
| 30 |
+
```
|
| 31 |
+
|
| 32 |
+
* `-m model.weights.pt`: path to the trained model.
|
| 33 |
+
* `-f [INPUT_FILE]`: a text file listing all systems to be evaluated.
|
| 34 |
+
* `-d [OUTPUT_PREFIX]`: prefix of the output result files.
|
| 35 |
+
|
| 36 |
+
Example:
|
| 37 |
+
|
| 38 |
+
```bash
|
| 39 |
+
dp --pt test \
|
| 40 |
+
-m model.weights.pt \
|
| 41 |
+
-f sys_test.txt \
|
| 42 |
+
-n 0 \
|
| 43 |
+
-d test_result
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
## Input format
|
| 47 |
+
|
| 48 |
+
### 1. System list file (`[INPUT_FILE]`)
|
| 49 |
+
|
| 50 |
+
`[INPUT_FILE]` is a plain text file.
|
| 51 |
+
Each line contains the path to a DeepMD-format system directory, for example:
|
| 52 |
+
|
| 53 |
+
```text
|
| 54 |
+
.../mp-14_Se_32_spg152_gap0.88eV/
|
| 55 |
+
.../mp-19_Te_32_spg152_gap0.19eV/
|
| 56 |
+
.../mp-154_N2_23_spg198_gap7.34eV/
|
| 57 |
+
.../mp-181_KGa3_spg119_gap0.22eV/
|
| 58 |
+
.../mp-189_SiRu_23_spg198_gap0.23eV/
|
| 59 |
+
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
### 2. System directory layout (DeepMD npy format)
|
| 63 |
+
|
| 64 |
+
Each system directory must follow the standard DeepMD **npy** structure, such as:
|
| 65 |
+
|
| 66 |
+
```text
|
| 67 |
+
system_X/
|
| 68 |
+
βββ set.000/
|
| 69 |
+
βββ box.npy
|
| 70 |
+
βββ coord.npy
|
| 71 |
+
βββ v.npy
|
| 72 |
+
βββ type_map.raw
|
| 73 |
+
βββ type.raw
|
| 74 |
+
```
|
| 75 |
+
|
| 76 |
+
Notes:
|
| 77 |
+
|
| 78 |
+
* The `.npy` dataset can be converted from VASP using official DeepMD tools.
|
| 79 |
+
* A placeholder `v.npy` file is required; writing zeros in it is sufficient.
|
| 80 |
+
|
| 81 |
+
## Output
|
| 82 |
+
|
| 83 |
+
Running inference produces a file like:
|
| 84 |
+
|
| 85 |
+
```text
|
| 86 |
+
test_result_property.out.0
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
A typical block looks like:
|
| 90 |
+
|
| 91 |
+
```text
|
| 92 |
+
# /path/to/system_X/: data_property pred_property
|
| 93 |
+
0.0000000000000000e+00 2.04...
|
| 94 |
+
# /path/to/system_Y/: data_property pred_property
|
| 95 |
+
0.0000000000000000e+00 2.35...
|
| 96 |
```
|
| 97 |
|
| 98 |
+
* Lines starting with `#` indicate the system being evaluated.
|
| 99 |
+
* Each numeric line contains the reference value (if available) and the model prediction.
|
| 100 |
+
|
| 101 |
+
|