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
Problem regulate_poscar() and sort_poscar() infer each coordinate line's element from the last token of the coordinate line. Normal POSCAR coordinate lines usually do not include element labels, because species and counts are already in the header. For those standard files, the utilities can drop all positions while still writing a header.
Reproduction
Use a POSCAR with species O H O, counts 1 2 1, and four unlabeled Direct coordinate lines. The output should retain four positions, but the current filtering expects the last coordinate token to be an element name.
Expected result
The utilities should derive element ownership from the header counts, or clearly require and validate labeled coordinate lines.
Source: Codex global repository scan of deepmodeling/dpti at commit b719828.
Project: DeepModeling Agent Code Scan
Problem
regulate_poscar()andsort_poscar()infer each coordinate line's element from the last token of the coordinate line. Normal POSCAR coordinate lines usually do not include element labels, because species and counts are already in the header. For those standard files, the utilities can drop all positions while still writing a header.Code references
dpti/dpti/lib/vasp.py
Line 20 in b719828
dpti/dpti/lib/vasp.py
Line 25 in b719828
dpti/dpti/lib/vasp.py
Line 47 in b719828
dpti/dpti/lib/vasp.py
Line 52 in b719828
Reproduction
Use a POSCAR with species
O H O, counts1 2 1, and four unlabeledDirectcoordinate lines. The output should retain four positions, but the current filtering expects the last coordinate token to be an element name.Expected result
The utilities should derive element ownership from the header counts, or clearly require and validate labeled coordinate lines.