Skip to content

Add cryo-EM density rendering, showcase, and release-check - #3

Merged
jvogan merged 1 commit into
mainfrom
density-and-showcase
Jun 8, 2026
Merged

Add cryo-EM density rendering, showcase, and release-check#3
jvogan merged 1 commit into
mainfrom
density-and-showcase

Conversation

@jvogan

@jvogan jvogan commented Jun 8, 2026

Copy link
Copy Markdown
Owner

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 --residue selection), which avoids the whole-map contour stall in headless PyMOL; the contour level defaults to the map's sigma via map_info.py. --simulate generates 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.
  • Density (overview, --simulate, --residue) verified end-to-end on real PyMOL; every SHOWCASE.md command 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: model is a reserved word in PyMOL's selection language, so the density object loads as struct. Documented in references/pymol.md.

- 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>
@jvogan
jvogan force-pushed the density-and-showcase branch from 3a7c096 to 00d2aa8 Compare June 8, 2026 17:58

@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: 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".

Comment thread tests/test_scripts.py
Comment on lines +180 to +182
result = pymol_agent.render_density("tests/fixtures/tiny.pdb", "out.png")
self.assertEqual(result["status"], "error")
self.assertIn("simulate", result["error"])

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 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 👍 / 👎.

@jvogan
jvogan merged commit 63e4118 into main Jun 8, 2026
6 checks passed
@jvogan
jvogan deleted the density-and-showcase branch June 8, 2026 18:00
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