This issue is from a Codex global scan of the repository.
VASP database collection silently drops all but one frame from multi-frame OUTCAR files.
Evidence:
|
comp = vi["POSCAR"].structure.composition |
|
ls = LabeledSystem(f_outcar) |
|
lss = ls.to_list() |
|
for ls in lss: |
|
if id_prefix: |
|
eid = id_prefix + "_" + str(icount) |
|
else: |
|
eid = str(uuid4()) |
|
entry = Entry( |
|
comp, "vasp", vi.as_dict(), ls.as_dict(), attribute=attrib, entry_id=eid |
|
) |
|
entries.append(entry) |
|
icount += 1 |
_parsing_vasp() converts the LabeledSystem into lss = ls.to_list() and loops over for ls in lss, but the Entry(...) creation and entries.append(entry) are outside the loop. Only the last ls from the loop is used, so earlier frames are lost without any warning.
Expected behavior: create and append an Entry for every frame in lss, and increment the entry counter per frame.
This issue is from a Codex global scan of the repository.
VASP database collection silently drops all but one frame from multi-frame OUTCAR files.
Evidence:
dpgen/dpgen/database/run.py
Lines 130 to 142 in 7af5246
_parsing_vasp()converts theLabeledSystemintolss = ls.to_list()and loops overfor ls in lss, but theEntry(...)creation andentries.append(entry)are outside the loop. Only the lastlsfrom the loop is used, so earlier frames are lost without any warning.Expected behavior: create and append an
Entryfor every frame inlss, and increment the entry counter per frame.