From b2ba8b8c66f481292e2f43fa324eb9eebe79661a Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 28 Jul 2020 12:19:48 +0200 Subject: [PATCH] skip wham if already exists --- adaptiveumbrella/__init__.py | 2 +- adaptiveumbrella/wham2d.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/adaptiveumbrella/__init__.py b/adaptiveumbrella/__init__.py index 5fcecad..71da874 100644 --- a/adaptiveumbrella/__init__.py +++ b/adaptiveumbrella/__init__.py @@ -3,4 +3,4 @@ from .runner import UmbrellaRunner from .wham2d import WHAM2DRunner __all__ = ['AdaptiveUmbrella'] -__version__ = "0.3.11" +__version__ = "0.3.12" diff --git a/adaptiveumbrella/wham2d.py b/adaptiveumbrella/wham2d.py index 8afe2d8..045a8ed 100644 --- a/adaptiveumbrella/wham2d.py +++ b/adaptiveumbrella/wham2d.py @@ -67,7 +67,9 @@ class WHAM2DRunner(UmbrellaRunner): def run_wham2d(self, metafile_path, output_path): """ Runs wham-2d with the given parameters. See http://membrane.urmc.rochester.edu/sites/default/files/wham/doc.html """ - + if os.path.exists(output_path): + print(f"skipping wham, {output_path} already exists.") + return borders = self.get_wham_borders() cmd = "{exec} Px={px} {min_x} {max_x} {frames_x} Py={py} {min_y} {max_y} {frames_y} {tol} {temperature} 0 {metafile} {outfile} {mask}".format(