Commit bd42e6a
Refactor the reading and writing of abacus/stru format (#793)
Refactor the codes to read and write ABACUS/STRU, and move the functions
in a single file abaucs/stru.py
Now, now using dpdata.system to read an ABACUS STRU will also return
below informations in data dict:
```
{
"masses": list of atomic masses,
"pp_files", list of pseudo potential files,
"orb_files", list of orbital files,
"dpks_descriptor": the deepks descriptor file,
}
```
And, these information can also be written to a new STRU file
automatically.
Later, I will based on this commit to fix the bug in dpgen
deepmodeling/dpgen#1711
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **New Features**
- Introduced a dedicated module for structure file handling, enhancing
the parsing and conversion of lattice, species, and coordinate data.
- **Refactor**
- Streamlined data extraction processes for simulation and relaxation
workflows, reducing redundant operations and improving error clarity.
- Updated plugin methods to leverage the enhanced structure processing
functions for improved efficiency.
- **Tests**
- Improved test setups and cleanups, ensuring consistent handling of
structure files and robust validation of the new parsing logic.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: root <pxlxingliang>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 0af5e66 commit bd42e6a
File tree
8 files changed
+881
-768
lines changed- dpdata
- abacus
- plugins
- tests
- abacus.relax
8 files changed
+881
-768
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | 12 | | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
| 16 | + | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
| |||
164 | 163 | | |
165 | 164 | | |
166 | 165 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
173 | 172 | | |
174 | 173 | | |
175 | 174 | | |
| |||
203 | 202 | | |
204 | 203 | | |
205 | 204 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | 205 | | |
211 | 206 | | |
212 | 207 | | |
| |||
221 | 216 | | |
222 | 217 | | |
223 | 218 | | |
224 | | - | |
225 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
226 | 223 | | |
227 | 224 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | 13 | | |
16 | 14 | | |
17 | 15 | | |
18 | 16 | | |
| 17 | + | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
50 | | - | |
| 49 | + | |
51 | 50 | | |
52 | 51 | | |
53 | 52 | | |
| |||
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
189 | 188 | | |
190 | 189 | | |
191 | 190 | | |
192 | 191 | | |
193 | 192 | | |
194 | 193 | | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
| 194 | + | |
201 | 195 | | |
202 | 196 | | |
203 | 197 | | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | 198 | | |
209 | 199 | | |
210 | 200 | | |
| |||
218 | 208 | | |
219 | 209 | | |
220 | 210 | | |
221 | | - | |
222 | | - | |
| 211 | + | |
| 212 | + | |
223 | 213 | | |
224 | 214 | | |
0 commit comments