pyiron / pyiron_atomistics

pyiron_atomistics - an integrated development environment (IDE) for atomistic simulation in computational materials science.
https://pyiron-atomistics.readthedocs.io
BSD 3-Clause "New" or "Revised" License
42 stars 15 forks source link

VASP parser Outcar.get_steps broken with VASP 6.4.3 #1515

Closed dhoulek closed 1 month ago

dhoulek commented 1 month ago

Summary

VASP 6.4.3 (and earlier?) prints in the OUTCAR also the INCAR file. If INCAR contains NBLOCK tag, as is the case of automatically happening with calc_md, the parser breaks at (lines 716-719 in the current version, lines 683-686 in the pyiron_atomistics version 0.5.3)

 if nblock is None and "NBLOCK" in line:
                line = line.strip()
                line = _clean_line(line)
                nblock = int(nblock_regex.findall(line)[0])

since the first line containing NBLOCK does not end with:

$ grep "NBLOCK" OUTCAR 
   NBLOCK = 1
   NBLOCK =      1;   KBLOCK =   2000    inner block; outer block 

Either change the if condition to: if nblock is None and "NBLOCK" in line and "KBLOCK" in line: or remove the semicolon from nblock_regex = re.compile(r"NBLOCK =\s+(\d+);").

pyiron Version and Platform

0.5.3 Linux, but should also apply to the current stable version on github

Expected Behavior

OUTCAR is parsed :-)

Actual Behavior

Parsing is broken with the message "run out of index" (or so...) at line nblock = int(nblock_regex.findall(line)[0])

Steps to Reproduce

Add NBLOCK tag into Incar and run with VASP 6.4.3

pmrv commented 1 month ago

Can reproduce the issue.

pmrv commented 1 month ago

Should be fixed in the next release, but I can't see a workaround quickly, short of deleting the offending line from OUTCAR and then manually recollecting the job as

job.status.collect = True
job.run()
jan-janssen commented 1 month ago

@dhoulek The new version is now available on conda https://anaconda.org/conda-forge/pyiron_atomistics you can install it using:

conda install -c conda-forge pyiron_atomistics=0.6.10