deepretro.utils.az
AiZynthFinder integration helpers for template-based retrosynthesis.
What This Module Does
Runs AiZynthFinder search for a target SMILES.
Returns route dictionaries with metadata/scores.
Provides optional image outputs for generated routes.
Short-circuits simple molecules to avoid unnecessary search overhead.
Configuration
The module resolves configuration in this order:
AZ_MODELS_PATH/<az_model>/config.yml(model-variant specific)AZ_MODEL_CONFIG_PATH(fallback global config)
Both are interpreted relative to project root when loaded by this module.
Basic Molecule Shortcut
run_az and run_az_with_img bypass tree search if:
The molecule is in
BASIC_MOLECULES, oris_basic_molecule(smiles)isTrue
In these cases, the function returns a solved status and an in-stock molecule route object immediately.