Skip to content

Add interface analysis and binding-pocket figure#2

Merged
jvogan merged 1 commit into
mainfrom
interface-and-pocket
Jun 8, 2026
Merged

Add interface analysis and binding-pocket figure#2
jvogan merged 1 commit into
mainfrom
interface-and-pocket

Conversation

@jvogan

@jvogan jvogan commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Summary

Phase 2 of the structural-analysis additions — the broadly-useful, stdlib-or-PyMOL set.

  • interface_report.py — zero-dependency protein-protein interface residues between chains (the chain-chain analog of pocket_report.py). Reports per-chain interface residues, contact-pair counts, and closest contacts; works on a local PDB or a PDB ID.
  • pymol_agent.py pocket — one-command annotated binding-pocket figure: ligand + pocket residues as sticks, polar contacts dashed, rest of the protein as transparent cartoon for context, framed on the pocket. Optional --label.
  • Non-empty-PNG guard — renders now fail loudly instead of returning a blank success.
  • No-clip turntable framing — orthoscopic + bounding-sphere fit + widened depth slab so the structure never clips mid-rotation.

Test

  • make test — 20 tests pass (4 new: interface detection, single-chain note, _verify_png, pocket error path).
  • interface_report verified on a synthetic two-chain complex; pocket figure and no-clip spin verified end-to-end on real PyMOL.

- interface_report.py: zero-dependency protein-protein interface residues between chains
- pymol_agent.py: pocket figure subcommand, non-empty-PNG guard, no-clip spin framing

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@jvogan jvogan merged commit a956b0b into main Jun 8, 2026
6 checks passed
@jvogan jvogan deleted the interface-and-pocket branch June 8, 2026 17:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b563f56c66

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +41 to +43

def _parse_chain_atoms(path: str) -> dict:
"""Return {chain: [atom, ...]} for polymer ATOM records."""

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Limit interface parsing to a single PDB model

For multi-model PDB/NMR files, this parser accepts every ATOM record and never stops at ENDMDL or separates MODEL blocks. That merges coordinates from all models under the same chain, so contacts can be calculated between chain A in one model and chain B in another, over-reporting interface residues for valid PDB inputs; consider parsing only the first model or reporting per-model interfaces.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant