This issue is from a Codex global scan of the repository.
dpgen.tools.relabel has multiple argument mismatches in first-principles input generation paths.
Evidence:
|
def make_vasp_incar(tdir, fp_incar): |
|
cwd = os.getcwd() |
|
os.chdir(tdir) |
|
shutil.copyfile(fp_incar, "INCAR") |
|
os.chdir(cwd) |
|
os.makedirs(output, exist_ok=True) |
|
if fp_style == "vasp": |
|
copy_pp_files(output, fp_pp_path, fp_pp_files) |
|
make_vasp_incar(fp_params, output) |
|
elif fp_style == "pwscf": |
|
try: |
|
fp_params = fp_jdata["user_fp_params"] |
|
user_input = True |
|
except Exception: |
|
fp_params = fp_jdata["fp_params"] |
|
user_input = False |
|
make_pwscf( |
|
".", fp_params, mass_map, fp_pp_files, fp_pp_files, user_input |
|
) |
|
elif fp_style == "siesta": |
|
make_siesta(".", fp_params, mass_map, fp_pp_files, fp_pp_files) |
make_vasp_incar(tdir, fp_incar) expects a task/output directory first and an INCAR path second, but create_tasks() calls make_vasp_incar(fp_params, output), reversing the concepts. The Siesta branch also calls make_siesta(".", fp_params, mass_map, fp_pp_files, fp_pp_files) even though make_siesta() accepts four arguments and fp_params is not assigned in that branch.
Expected behavior: relabel should pass the correct directory/file arguments for VASP and initialize/pass the correct parameters for Siesta, with tests covering each fp_style branch.
This issue is from a Codex global scan of the repository.
dpgen.tools.relabelhas multiple argument mismatches in first-principles input generation paths.Evidence:
dpgen/dpgen/tools/relabel.py
Lines 67 to 71 in 7af5246
dpgen/dpgen/tools/relabel.py
Lines 237 to 240 in 7af5246
dpgen/dpgen/tools/relabel.py
Lines 276 to 287 in 7af5246
make_vasp_incar(tdir, fp_incar)expects a task/output directory first and an INCAR path second, butcreate_tasks()callsmake_vasp_incar(fp_params, output), reversing the concepts. The Siesta branch also callsmake_siesta(".", fp_params, mass_map, fp_pp_files, fp_pp_files)even thoughmake_siesta()accepts four arguments andfp_paramsis not assigned in that branch.Expected behavior: relabel should pass the correct directory/file arguments for VASP and initialize/pass the correct parameters for Siesta, with tests covering each
fp_stylebranch.