Skip to content

Commit

Permalink
Merge pull request #1492 from pyiron/backwards
Browse files Browse the repository at this point in the history
calculate() function: Fix backwards compatibility
  • Loading branch information
jan-janssen authored Jun 21, 2024
2 parents 86bd024 + 7546e0a commit 32956d8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions pyiron_base/jobs/job/runfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,8 +317,14 @@ def run_job_with_status_collect(job):
Args:
job (GenericJob): pyiron job object
"""
job.collect_output()
job.collect_logfiles()
if job._job_with_calculate_function and job._collect_output_funct is not None:
parsed_output = job._collect_output_funct(
working_directory=job.working_directory, **job.get_output_parameter_dict()
)
job.save_output(output_dict=parsed_output)
else:
job.collect_output()
job.collect_logfiles()
job.run_time_to_db()
if job.status.collect:
if not job.convergence_check():
Expand Down Expand Up @@ -372,6 +378,12 @@ def run_job_with_runmode_manually(job, _manually_print=True):
job (GenericJob): pyiron job object
_manually_print (bool): [True/False] print command for execution - default=True
"""
if job._job_with_calculate_function:
job.project_hdf5.create_working_directory()
write_input_files_from_input_dict(
input_dict=job.get_input_parameter_dict(),
working_directory=job.working_directory,
)
if _manually_print:
abs_working = posixpath.abspath(job.project_hdf5.working_directory)
if not state.database.database_is_disabled:
Expand Down

0 comments on commit 32956d8

Please sign in to comment.