-
Notifications
You must be signed in to change notification settings - Fork 0
Add cryo-EM density rendering, showcase, and release-check #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,18 @@ | ||
| .PHONY: test | ||
| .PHONY: test release-check | ||
|
|
||
| test: | ||
| python3 -m unittest -v | ||
|
|
||
| # Pre-publish hygiene sweep: no tracked structures/maps/media/secrets, no large | ||
| # files, no obvious secret strings. Run before pushing public changes. | ||
| release-check: | ||
| @echo "Checking for tracked data/media/secret files..." | ||
| @! git ls-files | grep -iE '\.(pdb|cif|mmcif|bcif|ent|map|mrc|mrcs|ccp4|mp4|mov|gif|webm|fasta|fa|fastq|pt|pth|npy|npz|pem|key)$$' | grep -vE '^tests/fixtures/' \ | ||
| || { echo "ERROR: forbidden files tracked (see above)"; exit 1; } | ||
| @echo "Checking for large files (>25MB)..." | ||
| @! find . -path ./.git -prune -o -type f -size +25M -print | grep . \ | ||
| || { echo "ERROR: large files present (see above)"; exit 1; } | ||
| @echo "Scanning for secret-like strings..." | ||
| @! git grep -nIE '(AKIA[0-9A-Z]{16}|ghp_[A-Za-z0-9]{36}|sk-[A-Za-z0-9]{20,}|xox[baprs]-|BEGIN (RSA|OPENSSH|EC|PGP) PRIVATE KEY)' -- . ':(exclude)Makefile' \ | ||
| || { echo "ERROR: possible secrets (see above)"; exit 1; } | ||
| @echo "release-check passed." |
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| # Proteus Showcase | ||
|
|
||
| Reproducible figures and analyses you can generate with Proteus, using only | ||
| public structures. Each entry lists the exact commands and what you should see. | ||
|
|
||
| Outputs (`.pdb`, `.png`, `.mp4`) are git-ignored, so running these from the repo | ||
| root never dirties the repository. Every command here is a real code path in the | ||
| helper scripts, so this doubles as a set of living examples. | ||
|
|
||
| > Requires Python 3.10+. Rendering entries need PyMOL (or ChimeraX for the GPU | ||
| > path); analysis entries are stdlib-only. Run `python3 scripts/proteus_doctor.py` | ||
| > to see what's available on your machine. Turntable movies additionally need | ||
| > `ffmpeg`. | ||
|
|
||
| ## 1. Binding pocket — HIV-1 protease + indinavir (1HSG) | ||
|
|
||
| ```bash | ||
| python3 scripts/fetch_pdb.py 1HSG --format pdb | ||
| python3 scripts/pymol_agent.py pocket 1HSG.pdb hiv_protease_pocket.png --label | ||
| ``` | ||
|
|
||
| **Shows:** the indinavir inhibitor nested in the protease active site, with the | ||
| surrounding pocket residues as labeled sticks and polar contacts dashed. The | ||
| JSON reports the ligand atom count and number of pocket residues. | ||
|
|
||
| ## 2. Protein–protein interface — SARS-CoV-2 RBD + ACE2 (6M0J) | ||
|
|
||
| ```bash | ||
| python3 scripts/fetch_pdb.py 6M0J --format pdb | ||
| python3 scripts/interface_report.py 6M0J.pdb --chains A,E --cutoff 4.5 --json | ||
| python3 scripts/pymol_agent.py render 6M0J.pdb ace2_rbd.png --color chain | ||
| ``` | ||
|
|
||
| **Shows:** the interface residues on each side of the ACE2 (A) / spike RBD (E) | ||
| contact — the hotspot of SARS-CoV-2 recognition — plus a chain-colored render of | ||
| the complex. | ||
|
|
||
| ## 3. Quaternary structure — hemoglobin tetramer (4HHB) | ||
|
|
||
| ```bash | ||
| python3 scripts/fetch_pdb.py 4HHB --format pdb | ||
| python3 scripts/pymol_agent.py render 4HHB.pdb hemoglobin.png --color chain | ||
| python3 scripts/pymol_agent.py spin 4HHB.pdb hemoglobin_spin.mp4 --frames 60 --color chain | ||
| ``` | ||
|
|
||
| **Shows:** the four globin subunits in distinct colors, and a 360° turntable | ||
| movie of the assembly. | ||
|
|
||
| ## 4. Protein–DNA assembly — nucleosome core particle (1AOI) | ||
|
|
||
| ```bash | ||
| python3 scripts/fetch_pdb.py 1AOI --format pdb | ||
| python3 scripts/pymol_agent.py render 1AOI.pdb nucleosome.png --color chain | ||
| ``` | ||
|
|
||
| **Shows:** the histone octamer wrapped by duplex DNA, each chain colored | ||
| separately. | ||
|
|
||
| ## 5. AlphaFold confidence — human p53 (P04637) | ||
|
|
||
| ```bash | ||
| python3 scripts/uniprot_lookup.py TP53 --gene-exact --json | ||
| python3 scripts/fetch_alphafold.py P04637 --pae --json | ||
| python3 scripts/pae_report.py AF-P04637-F1_pae.json --json | ||
| python3 scripts/pymol_agent.py render AF-P04637-F1.pdb p53_confidence.png --color plddt | ||
| ``` | ||
|
|
||
| **Shows:** the prediction colored by the official AlphaFold pLDDT scheme (blue | ||
| high-confidence core, orange low-confidence disordered regions), with the PAE | ||
| report flagging the inter-domain uncertainty. | ||
|
|
||
| ## 6. Predicted vs experimental / conformational change — adenylate kinase | ||
|
|
||
| ```bash | ||
| python3 scripts/fetch_pdb.py 4AKE --format pdb # open conformation | ||
| python3 scripts/fetch_pdb.py 1AKE --format pdb # closed conformation | ||
| python3 scripts/compare_structures.py 4AKE.pdb 1AKE.pdb --per-residue --json | ||
| ``` | ||
|
|
||
| **Shows:** the CE-alignment RMSD plus per-residue deviations that pinpoint the | ||
| LID and NMP domain motions between the open and closed states. | ||
|
|
||
| ## 7. Cryo-EM density fit — sidechain in density | ||
|
|
||
| ```bash | ||
| # Simulated density (no map download): does this sidechain sit in its density? | ||
| python3 scripts/pymol_agent.py density 1HSG.pdb asp25_density.png \ | ||
| --simulate --residue "chain A and resi 25" | ||
|
|
||
| # With a real map, the contour level is chosen from the map's sigma: | ||
| python3 scripts/map_info.py your_map.mrc --json | ||
| python3 scripts/pymol_agent.py density model.pdb fit.png --map your_map.mrc --residue "chain A and resi 25" | ||
| ``` | ||
|
|
||
| **Shows:** the selected residue as sticks carved inside its density mesh, with | ||
| the rest of the model as transparent cartoon for context. | ||
|
|
||
| ## 8. Publication presets and illustration style | ||
|
|
||
| ```bash | ||
| python3 scripts/pymol_agent.py render 4HHB.pdb hb_soft.png --preset soft --color chain | ||
| python3 scripts/pymol_agent.py render 1HSG.pdb hiv_illustration.png --preset illustration | ||
| ``` | ||
|
|
||
| **Shows:** the same structures in the neutral-background `soft` preset and the | ||
| outlined `illustration` (molecular-illustration) style. | ||
|
|
||
| --- | ||
|
|
||
| For the full command surface, see [`SKILL.md`](SKILL.md). For tool-specific | ||
| recipes and gotchas, see [`references/`](references/). |
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
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
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
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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 verifiedpython3 -m unittest -vfails here on a no-PyMOL checkout; mockpymol_agent.PYMOLor move/assert these validation branches before the tool-availability guard.Useful? React with 👍 / 👎.