Skip to content

Commit 8f8c2b9

Browse files
committed
Make sure there is data for SOMD2 too.
1 parent 78bd7d0 commit 8f8c2b9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

python/BioSimSpace/FreeEnergy/_relative.py

+8
Original file line numberDiff line numberDiff line change
@@ -1435,6 +1435,7 @@ def _analyse_amber(work_dir=None, estimator="MBAR", method="alchemlyb", **kwargs
14351435
for part in file.parts:
14361436
if "lambda" in part:
14371437
lambdas.append(float(part.split("_")[-1]))
1438+
14381439
if len(lambdas) == 0:
14391440
raise ValueError(
14401441
"No lambda windows were detected from the output directory names! "
@@ -1903,6 +1904,13 @@ def _analyse_somd2(work_dir=None, estimator="MBAR", method="alchemlyb", **kwargs
19031904
temperatures = [x for _, x in sorted(zip(lambdas, temperatures))]
19041905
lambdas = sorted(lambdas)
19051906

1907+
if len(lambdas) == 0:
1908+
raise ValueError(
1909+
"No lambda windows were detected from the output directory names! "
1910+
"Ensure that the directory being analysed contains sub-directories"
1911+
"name e.g `lambda_0`, `lambda_1` containing the output files."
1912+
)
1913+
19061914
# Check that the temperatures at the end states match.
19071915
if temperatures[0] != temperatures[-1]:
19081916
raise ValueError("The temperatures at the endstates don't match!")

0 commit comments

Comments
 (0)