Add interface analysis and binding-pocket figure#2
Conversation
- 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>
There was a problem hiding this comment.
💡 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".
|
|
||
| def _parse_chain_atoms(path: str) -> dict: | ||
| """Return {chain: [atom, ...]} for polymer ATOM records.""" |
There was a problem hiding this comment.
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 👍 / 👎.
Summary
Phase 2 of the structural-analysis additions — the broadly-useful, stdlib-or-PyMOL set.
pocket_report.py). Reports per-chain interface residues, contact-pair counts, and closest contacts; works on a local PDB or a PDB ID.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.Test
make test— 20 tests pass (4 new: interface detection, single-chain note,_verify_png, pocket error path).