Add cryo-EM density rendering, showcase, and release-check - #3
Conversation
- pymol_agent.py: density subcommand renders a model in real or simulated density, mesh carved around the model or a residue selection, level from map sigma - SHOWCASE.md: reproducible figures/analyses on canonical public structures - make release-check: pre-publish hygiene sweep for tracked data/media/secrets Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3a7c096 to
00d2aa8
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3a7c09631e
ℹ️ 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".
| result = pymol_agent.render_density("tests/fixtures/tiny.pdb", "out.png") | ||
| self.assertEqual(result["status"], "error") | ||
| self.assertIn("simulate", result["error"]) |
There was a problem hiding this comment.
Avoid requiring PyMOL for validation-path tests
In environments without PyMOL installed, this call returns the early "PyMOL not found" error before reaching the intended “missing --map/--simulate” validation, so the new unit test fails even though the rest of the suite is designed to run without heavy visualization tools. I verified python3 -m unittest -v fails here on a no-PyMOL checkout; mock pymol_agent.PYMOL or move/assert these validation branches before the tool-availability guard.
Useful? React with 👍 / 👎.
Summary
Cryo-EM density rendering, a reproducible showcase, and a privacy gate.
pymol_agent.py density— render a model in cryo-EM density. The mesh is carved around the model (or a--residueselection), which avoids the whole-map contour stall in headless PyMOL; the contour level defaults to the map's sigma viamap_info.py.--simulategenerates gaussian density when there is no experimental map, so the path also works for predicted/designed structures.SHOWCASE.md— copy-pasteable, reproducible figures and analyses on canonical public structures (HIV protease, ACE2–RBD, hemoglobin, nucleosome, AlphaFold p53, adenylate kinase, density fit, presets). Every command is a real, tested code path.make release-check— pre-publish hygiene sweep: no tracked structures/maps/media/secret files, no large files, no obvious secret strings.Test
make test— 21 tests pass (1 new: density validation paths).make release-check— passes.--simulate,--residue) verified end-to-end on real PyMOL; everySHOWCASE.mdcommand type verified on real structures (the ACE2–RBD interface resolves to the known ~20-residue hotspot).Note
Found and fixed a real gotcha along the way:
modelis a reserved word in PyMOL's selection language, so the density object loads asstruct. Documented inreferences/pymol.md.