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
When trying to parse the vasprun.xml file generated from calculations using MLFF with the Vasprun class, an IndexError: list index out of range is raised at line 625 of pymatgen.io.vasp.outputs.py when accessing self.ionic_steps[-1]["electronic_steps"]. This seems to occur because, in MLFF calculations, data is stored in md_data instead of ionic_steps, leaving ionic_steps empty. Additionally, when ionic_step_offset or ionic_step_skip is specified during the creation of a Vasprun object, parsing fails because the vasprun.xml generated by MLFF calculations does not contain the <calculation> tag, which prevents parsing from working as expected.
Expected Behavior
Parsing the vasprun.xml file generated from MD calculations using MLFF should not result in an error. While I am not entirely familiar with the code, changing the condition at line 348 in outputs.py from
allowed me to parse the file successfully for now. However, errors still occur when ionic_step_offset or ionic_step_skip are used, and it is possible that there are other parts of the code where ionic_steps are referenced when md_data should be used instead.
Python version
Python 3.10.14
Pymatgen version
Version: 2024.11.13
Operating system version
Red Hat Enterprise Linux Ver 8.6
Current behavior
When trying to parse the
vasprun.xml
file generated from calculations using MLFF with theVasprun
class, anIndexError: list index out of range
is raised at line 625 ofpymatgen.io.vasp.outputs.py
when accessingself.ionic_steps[-1]["electronic_steps"]
. This seems to occur because, in MLFF calculations, data is stored inmd_data
instead ofionic_steps
, leavingionic_steps
empty. Additionally, whenionic_step_offset
orionic_step_skip
is specified during the creation of a Vasprun object, parsing fails because thevasprun.xml
generated by MLFF calculations does not contain the<calculation>
tag, which prevents parsing from working as expected.Expected Behavior
Parsing the
vasprun.xml
file generated from MD calculations using MLFF should not result in an error. While I am not entirely familiar with the code, changing the condition at line 348 inoutputs.py
fromto
allowed me to parse the file successfully for now. However, errors still occur when
ionic_step_offset
orionic_step_skip
are used, and it is possible that there are other parts of the code whereionic_steps
are referenced whenmd_data
should be used instead.Minimal example
Relevant files to reproduce this bug
I am attaching a sample vasprun.xml file created for the purpose of reproducing this issue.
vasprun.zip
The text was updated successfully, but these errors were encountered: