You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/dpdata_plugin.md
+23-4Lines changed: 23 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,12 @@
1
-
# CP2KData Plugin for dpdata
1
+
# CP2KData plugin for dpdata
2
2
3
3
`CP2KData` supports a plugin for `dpdata`. When you install `CP2KData` using `pip`, the plugin for `dpdata` is automatically installed as well.
4
4
5
5
For instructions on how to use `dpdata`, please refer to the official repository: https://github.com/deepmodeling/dpdata.
6
6
7
7
In the following, we provide two exmples that demonstrate how to use `Cp2kData` with `dpdata` to parse data from CP2K simulations in specified formats.
8
8
9
+
## Parse Energy_Force
9
10
Currently, `CP2KData` supports two formats for use with `dpdata`:
10
11
11
12
1.`cp2kdata/e_f` format for parsing `ENERGY_FORCE` outputs.
@@ -70,7 +71,9 @@ Currently, `CP2KData` supports two formats for use with `dpdata`:
70
71
71
72
```
72
73
73
-
2.`cp2kdata/md` format for parsing `MD` outputs.
74
+
## Parse MD
75
+
### MD including CP2K output/log files
76
+
`cp2kdata/md` format for parsing `MD` outputs.
74
77
75
78
Example for parsing `MD` outputs:
76
79
```python
@@ -87,7 +90,7 @@ Currently, `CP2KData` supports two formats for use with `dpdata`:
87
90
@SET frequency 100
88
91
&FORCE_EVAL
89
92
# if stress tensor is not need to computed, comment out the below line.
90
-
STRESS_TENSOR ANALYTICAL
93
+
STRESS_TENSOR ANALYTICAL
91
94
&PRINT
92
95
# if stress tensor is not need to computed, comment out the below line
93
96
&STRESS_TENSOR ON
@@ -131,8 +134,24 @@ Currently, `CP2KData` supports two formats for use with `dpdata`:
131
134
&END MOTION
132
135
```
133
136
137
+
### MD without CP2K output/log files
138
+
In some cases, users only keep `*-pos-*.xyz` and `*-frc-*.xyz` files. To convert the CP2K files into dpdata, users must explicitly tells dpdata the cell and ensemble information.
In some cases, cp2k md simulations are restarted from `-1.restart` file in which the initial structure will not be evaluated again.
153
+
### MD missing restart information in header
154
+
In some cases, CP2K md simulations are restarted from `-1.restart` file in which the initial structure will not be evaluated again.
136
155
Therefore, the initial cell information should not be parsed again. Otherwise, the number of frames for cells is inconsistent with those for `poses`, `forces`, and `energies`.
137
156
Cp2kdata can automatically check whether the simulations are restarted or not through the header information of output:
0 commit comments