From b09c347f2f4d6ce40057e00d3b828e5d030e8b1b Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Wed, 22 Oct 2025 12:09:43 +0100 Subject: [PATCH] Backport fixes from PR #463. [ci skip] --- python/BioSimSpace/Align/_align.py | 2 +- python/BioSimSpace/Node/_node.py | 8 ++++++-- python/BioSimSpace/Sandpit/Exscientia/Node/_node.py | 8 ++++++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/python/BioSimSpace/Align/_align.py b/python/BioSimSpace/Align/_align.py index a2fe17ad..8dec1cac 100644 --- a/python/BioSimSpace/Align/_align.py +++ b/python/BioSimSpace/Align/_align.py @@ -2450,7 +2450,7 @@ def _draw_molecules( # standard settings for visualization d2d.drawOptions().useBWAtomPalette() - d2d.drawOptions().continousHighlight = False + d2d.drawOptions().continuousHighlight = False d2d.drawOptions().setHighlightColour(highlight_color) d2d.drawOptions().addAtomIndices = True d2d.DrawMolecules( diff --git a/python/BioSimSpace/Node/_node.py b/python/BioSimSpace/Node/_node.py index 3d63cfda..ef26b2c5 100644 --- a/python/BioSimSpace/Node/_node.py +++ b/python/BioSimSpace/Node/_node.py @@ -105,7 +105,8 @@ def run(name, args={}, work_dir=None): work_dir : str, optional The working directory in which to run the node. If not specified, - the current working directory is used. + the current working directory is used. Note that inputs should + use absolute paths if this is set. Returns ------- @@ -142,7 +143,7 @@ def run(name, args={}, work_dir=None): else: full_name += ".py" - with _Utils.chdir(work_dir): + with _Utils.cd(work_dir): # Write a YAML configuration file for the BioSimSpace node. if len(args) > 0: with open("input.yaml", "w") as file: @@ -196,6 +197,9 @@ def setNodeDirectory(dir): if not _os.path.isdir(dir): raise IOError("Node directory '%s' doesn't exist!" % dir) + # Use the absolute path. + dir = _os.path.abspath(dir) + global _node_dir _node_dir = dir diff --git a/python/BioSimSpace/Sandpit/Exscientia/Node/_node.py b/python/BioSimSpace/Sandpit/Exscientia/Node/_node.py index 3d63cfda..ef26b2c5 100644 --- a/python/BioSimSpace/Sandpit/Exscientia/Node/_node.py +++ b/python/BioSimSpace/Sandpit/Exscientia/Node/_node.py @@ -105,7 +105,8 @@ def run(name, args={}, work_dir=None): work_dir : str, optional The working directory in which to run the node. If not specified, - the current working directory is used. + the current working directory is used. Note that inputs should + use absolute paths if this is set. Returns ------- @@ -142,7 +143,7 @@ def run(name, args={}, work_dir=None): else: full_name += ".py" - with _Utils.chdir(work_dir): + with _Utils.cd(work_dir): # Write a YAML configuration file for the BioSimSpace node. if len(args) > 0: with open("input.yaml", "w") as file: @@ -196,6 +197,9 @@ def setNodeDirectory(dir): if not _os.path.isdir(dir): raise IOError("Node directory '%s' doesn't exist!" % dir) + # Use the absolute path. + dir = _os.path.abspath(dir) + global _node_dir _node_dir = dir