Commit 4e5ab18
fix: add optional force check (#780)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Enhanced error handling when processing forces in various data
formats.
- Added conditional checks to prevent potential runtime errors when
force data is missing.
- Improved robustness of data conversion methods across multiple
plugins.
- **Refactor**
- Streamlined data handling for optional force and virial information.
- Implemented safer data extraction methods in ASE, PWmat, and VASP
plugins.
- Corrected a typographical error in the documentation of the driver
methods.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent b826633 commit 4e5ab18
File tree
5 files changed
+19
-7
lines changed- dpdata
- plugins
5 files changed
+19
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
| 65 | + | |
| 66 | + | |
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
| 170 | + | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| |||
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
299 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
300 | 305 | | |
301 | 306 | | |
302 | 307 | | |
| |||
305 | 310 | | |
306 | 311 | | |
307 | 312 | | |
308 | | - | |
| 313 | + | |
| 314 | + | |
309 | 315 | | |
310 | 316 | | |
311 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
107 | 109 | | |
108 | 110 | | |
109 | 111 | | |
| |||
0 commit comments