Skip to content

Commit

Permalink
work around bug in gromacs.utilities.AttributeDict
Browse files Browse the repository at this point in the history
- fix #1840
- fix failure of mdpow-solvation script "AttributeError: 'AttributeDict' object
  has no attribute 'Gibbs'"
- update CHANGES
- only manually/locally tested
  • Loading branch information
orbeckst committed Aug 5, 2021
1 parent a31003c commit 66dad79
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion mdpow/fep.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion scripts/mdpow-solvationenergy
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 66dad79

Please sign in to comment.