Skip to content

Commit 0e8497f

Browse files
author
esoteric-ephemera
committed
Improve reason str fmt, add further check for missing potcar spec
1 parent 8d8e671 commit 0e8497f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pymatgen/io/validation/check_incar.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,8 @@ def _check_parameter(
872872
if not valid_value:
873873
error_list.append(
874874
f"INPUT SETTINGS --> {input_tag}: is {current_value}, but should be "
875-
f"{operation} {reference_value}. {append_comments}"
875+
f"{'' if operation == 'auto fail' else operation + ' '}{reference_value}."
876+
f"{' ' if len(append_comments) > 0 else ''}{append_comments}"
876877
)
877878

878879
def check_parameter(

pymatgen/io/validation/check_potcar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def check(self, reasons: list[str], valid_input_set: VaspInputSet, structure: St
5050
if not self.potcar_summary_stats:
5151
return
5252

53-
if potcars is None:
53+
if potcars is None or any(potcar.get("summary_stats") is None for potcar in potcars):
5454
reasons.append(
5555
"PSEUDOPOTENTIALS --> Missing POTCAR files. "
5656
"Alternatively, our potcar checker may have an issue--please create a GitHub issue if you "

0 commit comments

Comments
 (0)