Skip to Content
APIAPI Overview

API Overview

Generated automatically at build time by scripts/generate_api_docs.py (2026-04-30 12:19:47 UTC).

This page is intentionally high-level and reflects the current runtime API surface.

CLI

The CLI metadata is collected from hedgehog.main:app via Typer/Click introspection.

uv run hedgehog --help

Commands

CommandKindDescription
infocommandDisplay pipeline information and available stages.
reportcommandRegenerate the HTML report from an existing pipeline run directory.
runcommandRun the molecular analysis pipeline as an explicit subcommand.
setupgroupInstall optional external tools and assets.
setup aizynthfindercommandInstall AiZynthFinder into the project env and modules/aizynthfinder/.
setup fsscorecommandDownload FSScore source checkout into modules/fsscore.
setup gasacommandInstall optional GASA scorer checkout + isolated worker environment.
setup nonpher-checkcommandValidate optional Nonpher runtime without modifying the main uv env.
setup nvmolkit-workercommandInstall isolated nvMolKit worker environment in .venv-nvmolkit-worker.
setup shepherd-workercommandInstall isolated Shepherd-Score worker environment in .venv-shepherd-worker.
setup synccommandDownload the SYNC 3D synthesizability classifier checkpoint.
tuicommandLaunch the interactive TUI (Text User Interface).
versioncommandDisplay version information.

hedgehog info

Display pipeline information and available stages.

No parameters.

hedgehog report

Regenerate the HTML report from an existing pipeline run directory.

ParameterKindFlagsTypeRequiredDefaultDescription
results_dirargument-STRINGyesNonePath to existing pipeline results directory (e.g., results/run_10)

hedgehog run

Run the molecular analysis pipeline as an explicit subcommand.

ParameterKindFlagsTypeRequiredDefaultDescription
config_pathoption--config, -cSTRINGnosrc/hedgehog/configs/config.ymlMaster YAML config path (default: src/hedgehog/configs/config.yml).
generated_mols_pathoption--mols, -mSTRINGnoNoneSMILES file path or glob (overrides config).
out_diroption--out, -oSTRINGnoNoneOutput directory (overrides config folder_to_save).
stageoption--stage, -sChoice(['mol_prep', 'descriptors', 'struct_filters', 'synthesis', 'docking', 'docking_filters', 'final_descriptors'])noNoneRun one or more stages only; repeat —stage. See hedgehog info.
reuse_folderoption--reuseBOOLnoFalseReuse existing results folder.
force_new_folderoption--force-newBOOLnoFalseAlways create a new results folder.
auto_installoption--auto-installBOOLnoFalseInstall missing optional tools automatically.
show_progressoption--progressBOOLnoFalseShow live progress bar.
large_datasetoption--large-datasetBOOLnoFalseStream large libraries in chunks and write row-level shard outputs.

hedgehog setup

Install optional external tools and assets.

No parameters.

hedgehog setup aizynthfinder

Install AiZynthFinder into the project env and modules/aizynthfinder/.

ParameterKindFlagsTypeRequiredDefaultDescription
yesoption--yes, -y, --no-yes, -nBOOLnoTrueAuto-accept downloads (default: yes). Use —no-yes to prompt.

hedgehog setup fsscore

Download FSScore source checkout into modules/fsscore.

ParameterKindFlagsTypeRequiredDefaultDescription
yesoption--yes, -yBOOLnoFalseAuto-accept checkout prompt.

hedgehog setup gasa

Install optional GASA scorer checkout + isolated worker environment.

ParameterKindFlagsTypeRequiredDefaultDescription
yesoption--yes, -yBOOLnoFalseAuto-accept checkout/dependency installs.
python_binoption--pythonSTRINGnoNonePython interpreter for worker venv (default: python3.10 -> 3.11).

hedgehog setup nonpher-check

Validate optional Nonpher runtime without modifying the main uv env.

ParameterKindFlagsTypeRequiredDefaultDescription
python_binoption--pythonSTRINGnoNoneOptional Python interpreter for an isolated Nonpher environment (for example, ~/work/hedgehog_optional_envs/nonpher/bin/python).
probe_smilesoption--probe-smilesSTRINGnoCCOSMILES used for runtime probe.

hedgehog setup nvmolkit-worker

Install isolated nvMolKit worker environment in .venv-nvmolkit-worker.

ParameterKindFlagsTypeRequiredDefaultDescription
yesoption--yes, -y, --no-yesBOOLnoTrueAuto-accept downloads (no prompt).
python_binoption--pythonSTRINGnoNonePython interpreter for worker venv (default: python3.12 -> 3.11 -> 3.10).

hedgehog setup shepherd-worker

Install isolated Shepherd-Score worker environment in .venv-shepherd-worker.

ParameterKindFlagsTypeRequiredDefaultDescription
yesoption--yes, -yBOOLnoFalseAuto-accept downloads (no prompt).
python_binoption--pythonSTRINGnoNonePython interpreter for worker venv (default: python3.12 -> 3.11 -> 3.10).

hedgehog setup sync

Download the SYNC 3D synthesizability classifier checkpoint.

ParameterKindFlagsTypeRequiredDefaultDescription
yesoption--yes, -y, --no-yes, -nBOOLnoTrueAuto-accept downloads (default: yes). Use —no-yes to prompt.

hedgehog tui

Launch the interactive TUI (Text User Interface).

ParameterKindFlagsTypeRequiredDefaultDescription
sessionoption--session, -sSTRINGnoNoneResume TUI session by job id.

hedgehog version

Display version information.

No parameters.

TUI JSON-RPC

The TUI backend API is read from JsonRpcServer.handlers in hedgehog.tui_backend.server.

{"jsonrpc":"2.0","id":1,"method":"preflight_pipeline","params":{"stages":["descriptors"]}}

Methods

MethodSignatureHandler
add_job(job_id: str, name: str | None = None, input_path: str = '', output_path: str = '', stages: list[str] | None = None) -> dicthedgehog.tui_backend.handlers.history.HistoryHandler.add_job
cancel_pipeline(job_id: str) -> boolhedgehog.tui_backend.handlers.pipeline.PipelineHandler.cancel_pipeline
count_molecules(path: str) -> dict[str, typing.Any]hedgehog.tui_backend.handlers.files.FilesHandler.count_molecules
delete_job(job_id: str) -> boolhedgehog.tui_backend.handlers.history.HistoryHandler.delete_job
get_job_history(limit: int = 50) -> list[dict]hedgehog.tui_backend.handlers.history.HistoryHandler.get_job_history
get_progress(job_id: str) -> dict[str, typing.Any]hedgehog.tui_backend.handlers.pipeline.PipelineHandler.get_progress
list_directory(path: str, extensions: list[str] | None = None) -> list[dict[str, typing.Any]]hedgehog.tui_backend.handlers.files.FilesHandler.list_directory
list_files(path: str, extensions: list[str] | None = None) -> list[str]hedgehog.tui_backend.handlers.files.FilesHandler.list_files
load_config(config_type: str) -> dict[str, typing.Any]hedgehog.tui_backend.handlers.config.ConfigHandler.load_config
preflight_pipeline(stages: list[str], config_overrides: dict[str, typing.Any] | None = None) -> dict[str, typing.Any]hedgehog.tui_backend.handlers.pipeline.PipelineHandler.preflight_pipeline
save_config(config_type: str, data: dict[str, typing.Any]) -> boolhedgehog.tui_backend.handlers.config.ConfigHandler.save_config
start_pipeline(stages: list[str], config_overrides: dict[str, typing.Any] | None = None) -> strhedgehog.tui_backend.handlers.pipeline.PipelineHandler.start_pipeline
update_job(job_id: str, status: str | None = None, results: dict | None = None, error: str | None = None) -> dict | Nonehedgehog.tui_backend.handlers.history.HistoryHandler.update_job
validate_config(config_type: str, data: dict[str, typing.Any]) -> dict[str, typing.Any]hedgehog.tui_backend.handlers.config.ConfigHandler.validate_config
validate_input_file(path: str) -> dict[str, typing.Any]hedgehog.tui_backend.handlers.validation.ValidationHandler.validate_input_file
validate_output_directory(path: str) -> dict[str, typing.Any]hedgehog.tui_backend.handlers.validation.ValidationHandler.validate_output_directory
validate_receptor_pdb(path: str) -> dict[str, typing.Any]hedgehog.tui_backend.handlers.validation.ValidationHandler.validate_receptor_pdb

Standard Error Codes

CodeNameMeaning
-32601Method not foundUnknown RPC method name.
-32602Invalid paramsValidation/value error in method parameters.
-32000Server errorUnhandled internal exception.
-32001File not foundRequested file/path does not exist.
-32002Permission deniedInsufficient permissions for operation.
-32003Not a directoryPath expected to be a directory is not one.

Python Public API

Public Python API entries are discovered from __all__ in src/hedgehog/**/__init__.py.

from hedgehog.reporting import ReportGenerator from hedgehog.setup import ensure_aizynthfinder

Modules under hedgehog.vendor.* and hedgehog.workers.* are intentionally excluded.

ModuleSymbolKindNotes
hedgehog.descriptorsrunfunction-
hedgehog.descriptors.wavesregisterfunction-
hedgehog.descriptors.wavesrun_wavesfunction-
hedgehog.dockingrunfunction-
hedgehog.docking_filtersapply_conformer_deviation_filterfunction-
hedgehog.docking_filtersapply_interaction_filterfunction-
hedgehog.docking_filtersapply_pose_quality_filterfunction-
hedgehog.docking_filtersapply_shepherd_score_filterfunction-
hedgehog.docking_filtersdocking_filters_mainfunction-
hedgehog.molpreprunfunction-
hedgehog.reportingReportGeneratorclass-
hedgehog.setupFSScoreRuntimeclass-
hedgehog.setupGasaSetupResultclass-
hedgehog.setupNONPHER_PYTHON_ENV_VARother-
hedgehog.setupNonpherCheckResultclass-
hedgehog.setupNonpherEnsureResultclass-
hedgehog.setupcheck_nonpher_runtimefunction-
hedgehog.setupcreate_nonpher_complexity_filterfunction-
hedgehog.setupensure_aizynthfinderfunction-
hedgehog.setupensure_fsscore_checkoutfunction-
hedgehog.setupensure_fsscore_runtimefunction-
hedgehog.setupensure_gasa_workerfunction-
hedgehog.setupensure_gninafunction-
hedgehog.setupensure_matcha_checkoutfunction-
hedgehog.setupensure_nonpher_external_runtimefunction-
hedgehog.setupensure_nonpher_uv_runtimefunction-
hedgehog.setupensure_nvmolkit_workerfunction-
hedgehog.setupensure_rascore_modelfunction-
hedgehog.setupensure_scscore_modelfunction-
hedgehog.setupensure_shepherd_workerfunction-
hedgehog.setupensure_sync_modelfunction-
hedgehog.setupnonpher_lobachevsky_setup_commandsfunction-
hedgehog.setupresolve_nonpher_pythonfunction-
hedgehog.setuprun_nonpher_batch_externalfunction-
hedgehog.utilsassign_mol_idxfunction-
hedgehog.utilsprepare_input_datafunction-
Last updated on