diff --git a/CHANGES b/CHANGES index 6fc89148..5d23ae39 100644 --- a/CHANGES +++ b/CHANGES @@ -13,6 +13,8 @@ Fixes * restrict alchemlyb to <0.5.0 for Python 2 (otherwise the installation fails due to an unsatisfiable pandas dependency) (#180) +* fix failure of mdpow-solvation script "AttributeError: 'AttributeDict' object + has no attribute 'Gibbs'" (#180) 2021-08-02 0.7.0 diff --git a/mdpow/fep.py b/mdpow/fep.py index 00e37627..f001b939 100644 --- a/mdpow/fep.py +++ b/mdpow/fep.py @@ -1400,7 +1400,7 @@ def p_transfer(G1, G2, **kwargs): logger.error(errmsg) raise ValueError(errmsg) - if kwargs['force'] or (not hasattr(G.results.DeltaA, 'Gibbs')): + if kwargs['force'] or 'Gibbs' not in G.results.DeltaA: # write out the settings when the analysis is performed logger.info("The solvent is %s .", G.solvent_type) logger.info("Estimator is %s.", estimator) diff --git a/scripts/mdpow-solvationenergy b/scripts/mdpow-solvationenergy index d06d9a60..59fefb55 100755 --- a/scripts/mdpow-solvationenergy +++ b/scripts/mdpow-solvationenergy @@ -132,7 +132,7 @@ def run_gsolv(solvent, directory, **kwargs): kwargs.setdefault('SI', gsolv.SI) # make sure that we have data - if kwargs['force'] or (not hasattr(gsolv.results.DeltaA, 'Gibbs')): + if kwargs['force'] or 'Gibbs' not in gsolv.results.DeltaA: logger.info("[%(directory)s] Forcing (re)analysis of hydration free energy data", vars()) # write out the settings when the analysis is performed logger.info("Estimator is %s.", estimator)