feat: metabolism tool - #615
Open
sg-s wants to merge 5 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Drug Discovery SDK wrapper (Metabolism) for the platform tool deeporigin.metabolism, including mock-server support, tests, and documentation so users can run sync site-of-metabolism predictions and retrieve both site- and molecule-level outputs.
Changes:
- Introduces
deeporigin.drug_discovery.metabolism.Metabolism(sync-only) with ligand normalization, enzyme filtering, and result parsing. - Extends the local mock server to support
deeporigin.metabolismexecutions and tool definition lookup. - Adds unit + local integration tests and wires the tool into docs/navigation and the public
deeporigin.drug_discoverynamespace.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| zensical.toml | Adds Metabolism entries to docs + notebook navigation. |
| tests/test_metabolism_unit.py | Unit coverage for Metabolism helper validation/parsing utilities. |
| tests/test_metabolism_local.py | Mock-server integration tests for Metabolism end-to-end behavior. |
| tests/mock_server/routers/tools.py | Adds mock tool definition + execution synthesis for deeporigin.metabolism. |
| src/utils/constants.py | Introduces Metabolism constants (enzymes, ligand cap, execution timeout). |
| src/platform/constants.py | Registers metabolism tool key/version; also changes PocketFinder version. |
| src/drug_discovery/metabolism.py | New Metabolism execution wrapper implementation. |
| src/drug_discovery/class-design.md | Documents Metabolism as sync-only run() pattern. |
| src/drug_discovery/init.py | Exposes Metabolism in public API + lazy import map. |
| docs/notebooks/clean/metabolism.ipynb | Adds a demo notebook for Metabolism usage. |
| docs/dd/tools/metabolism.md | Adds user docs for reconnecting to existing Metabolism runs. |
| docs/dd/ref/metabolism.md | Adds API reference page for the metabolism module/class. |
| docs/dd/how-to/ligands.md | Adds a how-to section describing Metabolism usage and constraints. |
| CONTEXT.md | Adds repo-wide context/terminology guidance for the Metabolism feature. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Preserve the enzymes tuple/list invariant across a re-run on an already-executed Metabolism instance instead of silently unfreezing it to a list. - Fix an undefined `ligands` variable in the ligands how-to docs example. - Revert an out-of-scope tool_version bump for pocket_finder (1 -> latest) that had nothing to do with this PR. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Metabolism now always returns every CYP isoform the tool scores; the client no longer exposes an `enzymes` attribute to select/filter a subset. Simplifies the API surface and removes the tuple/list frozen- enzymes invariant entirely (superseding the earlier re-run fix in this PR). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://deeporigin.atlassian.net/browse/DDOS-7477
Merge-ready status
Auto-updated — cycle 2 (final), last updated: 2026-08-27T19:52:00Z
main682838fef683ce7Recent activity
metabolism.py: preserved the enzymes tuple/list invariant across a re-run.docs/dd/how-to/ligands.md: fixed an undefinedligandsvariable in an example.constants.py: reverted an out-of-scopepocket_findertool_version bump (1→latest).ef683ce7; Copilot re-reviewed and raised no new comments.merge-readylabel applied.