Skip to content

Commit

Permalink
Fix alchemical ion logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
lohedges committed Sep 2, 2024
1 parent 6c23071 commit 49e9f99
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/somd2/runner/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,18 @@ def __init__(self, system, config):
f"The charge difference of {charge_diff} between the end states "
f"does not match the specified value of {self._config.charge_difference}"
)
else:
# The user value takes precedence.
charge_diff = self._config.charge_difference
_logger.info(
f"There is a charge difference of {charge_diff} between the end states. "
f"Adding alchemical ions to keep the charge constant."
f"Using user-specified value of {self._config.charge_difference}"
)

# The user value takes precedence.
if self._config.charge_difference is not None:
charge_diff = self._config.charge_difference
else:
# Report that the charge will automatically be held constant.
if charge_diff != 0 and self._config.charge_difference is None:
_logger.info(
f"There is a charge difference of {charge_diff} between the end states. "
f"Adding alchemical ions to keep the charge constant."
)

# Create alchemical ions.
if charge_diff != 0:
Expand Down

0 comments on commit 49e9f99

Please sign in to comment.