Skip to content

Commit

Permalink
feat: skip property calc due to mismatch relaxed structure
Browse files Browse the repository at this point in the history
  • Loading branch information
ZLI-afk committed Nov 20, 2024
1 parent 9f6a341 commit 893b7e2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion apex/core/common_prop.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ def make_property(confs, inter_param, property_list):
for ii in conf_dirs:
sepline(ch=ii, screen=True)
path_to_equi = os.path.join(ii, "relaxation", "relax_task")
structure_dict = loadfn(os.path.join(path_to_equi, "structure.json"))
try:
structure_dict = loadfn(os.path.join(path_to_equi, "structure.json"))
except FileNotFoundError:
structure_dict = {}
mismatch = structure_dict.get("mismatch", False)
for jj in property_list:
do_refine, suffix = handle_prop_suffix(jj)
Expand Down
5 changes: 4 additions & 1 deletion apex/op/property_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ def execute(

# break subworkflow if mismatch stop is set
path_to_equi = conf_path / "relaxation" / "relax_task"
structure_dict = loadfn(os.path.join(path_to_equi, "structure.json"))
try:
structure_dict = loadfn(os.path.join(path_to_equi, "structure.json"))
except FileNotFoundError:
structure_dict = {}
mismatch = structure_dict.get("mismatch", False)
skip_mismatch = prop_param.get("skip_mismatch", False)
if mismatch and skip_mismatch:
Expand Down

0 comments on commit 893b7e2

Please sign in to comment.