Commit 18eab9c
committed
Parse only POTCAR metadata from OUTCAR when supplementing vasprun.xml
When vasprun.xml is the mainfile, OUTCAR now only supplements pseudopotential
metadata (SHA256, LPAW, LULTRA, ENMAX, etc.) instead of parsing all data.
This avoids redundant parsing since vasprun.xml already contains eigenvalues,
energies, and forces.
Changes:
- Create minimal `outcar_supplement_parser` with only pseudopotential quantity
- Fix POTCAR regex to require VRHFIN within matched content, not just ahead:
`POTCAR:([\s\S]+?VRHFIN[\s\S]+?)(?=\s*POTCAR:|\s*local pseudopotential:|\Z)`
This prevents matching header-only POTCAR lines that lack detailed metadata
- Simplify `_find_outcar()` to use generator expression with `next()`
- Update comments to reflect POTCAR-specific scope
Fixes issue where 4 pseudopotentials were parsed instead of 2 due to regex
matching both header-only lines and detailed sections.1 parent b059c6b commit 18eab9c
File tree
2 files changed
+32
-19
lines changed- src/nomad_simulation_parsers/parsers/vasp
2 files changed
+32
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
| 339 | + | |
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
103 | 107 | | |
104 | 108 | | |
105 | | - | |
106 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
107 | 121 | | |
108 | 122 | | |
109 | | - | |
110 | | - | |
111 | | - | |
| 123 | + | |
| 124 | + | |
112 | 125 | | |
113 | 126 | | |
114 | 127 | | |
| |||
124 | 137 | | |
125 | 138 | | |
126 | 139 | | |
127 | | - | |
128 | | - | |
| 140 | + | |
129 | 141 | | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
0 commit comments