Skip to content

Commit

Permalink
do not log before raising error
Browse files Browse the repository at this point in the history
  • Loading branch information
rwxayheee committed Oct 19, 2024
1 parent b602112 commit 37a8358
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions meeko/chemtempgen.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,6 @@ def fetch_from_pdb(resname: str, max_retries = 5, backoff_factor = 2) -> str:
time.sleep(wait_time)
else:
err = f"Max retries reached. Could not download CIF file for {resname}. Error: {e}"
logging.error(err)
raise ChemTempCreationError(err)

# Constants for deprotonate
Expand Down Expand Up @@ -567,7 +566,6 @@ def build_noncovalent_CC(basename: str) -> ChemicalComponent:
cc = cc.make_canonical(acidic_proton_loc = acidic_proton_loc_canonical)
if len(rdmolops.GetMolFrags(cc.rdkit_mol))>1:
err = f"Template Generation failed for {cc.resname}. Error: Molecule breaks into fragments during the deleterious editing. "
logging.error(err)
raise ChemTempCreationError(err)

cc = cc.make_pretty_smiles()
Expand All @@ -577,7 +575,6 @@ def build_noncovalent_CC(basename: str) -> ChemicalComponent:
cc.ResidueTemplate_check()
except Exception as e:
err = f"Template {cc.resname} Failed to pass ResidueTemplate check. Error: {e}"
logging.error(err)
raise ChemTempCreationError(err)

logger.info(f"*** finish making {cc.resname} ***")
Expand Down

0 comments on commit 37a8358

Please sign in to comment.