Skip to content

Commit

Permalink
Simplify changes to energy_ratio.py
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead authored Mar 14, 2024
1 parent 9dabc53 commit e0325f9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions posebusters/modules/energy_ratio.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ def check_energy_ratio(
threshold_energy_ratio: float = 7.0,
ensemble_number_conformations: int = 100,
inchi_strict: bool = False,
ratio_passes_on_exception: bool = True,
):
"""Check whether the energy of the docked ligand is within user defined range.
Expand All @@ -46,8 +45,6 @@ def check_energy_ratio(
ensemble_number_conformations: Number of conformations to generate for the ensemble over which to
average. Defaults to 100.
inchi_strict: Whether to treat warnings in the InChI generation as errors. Defaults to False.
ratio_passes_on_exception: Whether the energy ratio test will pass upon an energy calculation
exception. Defaults to True.
Returns:
PoseBusters results dictionary.
Expand Down Expand Up @@ -89,7 +86,7 @@ def check_energy_ratio(
except Exception as e:
logger.warning("Failed to calculate prediction conformation energy for %s: %s", inchi, e)
pred_factor = np.nan
ratio_passes = ratio_passes_on_exception if ratio_passes_on_exception else np.nan
ratio_passes = np.nan

results = {
"ensemble_avg_energy": avg_energy,
Expand Down

0 comments on commit e0325f9

Please sign in to comment.