From cf61f1790c7423a0cc4379307ce5a317f426857b Mon Sep 17 00:00:00 2001 From: Paul Saxe Date: Tue, 15 Oct 2024 17:09:48 -0400 Subject: [PATCH] Bugfix: error if used in a loop and previous directories deleted. * The code crashed if called with a loop in the flowchart, and the last directory of a previous loop iteration was deleted before running the next iteration. --- HISTORY.rst | 4 ++++ torchani_step/torchani.py | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/HISTORY.rst b/HISTORY.rst index 00aba3a..2067a99 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,6 +1,10 @@ ======= History ======= +2024.10.15 -- Bugfix: error if used in a loop and previous directories deleted. + * The code crashed if called with a loop in the flowchart, and the last directory of + a previous loop iteration was deleted before running the next iteration. + 2024.5.12.1 -- Fixed problem with commandline in Docker * There was a problem in the commandline for running TorchANI in a Docker container. diff --git a/torchani_step/torchani.py b/torchani_step/torchani.py index 03ac5bf..7beff5b 100644 --- a/torchani_step/torchani.py +++ b/torchani_step/torchani.py @@ -209,6 +209,8 @@ def run(self): directory = Path(self.directory) directory.mkdir(parents=True, exist_ok=True) + next_node = super().run(printer) + # Print our header to the main output printer.important(self.header) printer.important("") @@ -216,8 +218,6 @@ def run(self): # Access the options and find the executable seamm_options = self.global_options - next_node = super().run(printer) - # Get the first real node node1 = self.subflowchart.get_node("1").next()