Repository navigation
Conversation
Completes #14. Two of the three things M4 needs can be produced exactly with nothing installed, and the third cannot. - The receptor: our entity's polymer chains, no waters, no ligands, no hydrogens. The collected structure file is never modified, so the bound components are not lost; docking into a site that still holds its ligand finds the ligand. - The search box, per pocket, drawn round the site's own atoms rather than as a fixed cube at its centre, which either clips an elongated site or spends the search on empty volume. A Vina config beside it. - The PDBQT is the part that cannot be faked. Adding polar hydrogens and assigning atom types is what Meeko, OpenBabel and PDB2PQR exist for, and a homemade substitute that merely parses is a receptor that docks and lies about it. A tool on PATH is used and recorded as fidelity 'full'; with none, the default writes the receptor PDB and no PDBQT rather than approximating one. --pdbqt-fallback turns on the built-in converter adapted from Ping Hu's bacteria_structure_docking.py, which is recorded as 'reduced' with its own caveat in every record: it is a smoke test, not a reported result. Receptors are prepared only for structures that passed the quality gate; preparing one M3 already called unusable would hand M4 something to dock that M3 said not to. Path.with_suffix would have eaten the .463 of fig|243273.25.peg.463, so the filename helper appends instead. A test pins it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Completes #14. Part A (pockets) is #114, merged.
Two of the three things M4 needs can be produced exactly with nothing installed. The third cannot, and this PR's main decision is to say so rather than paper over it.
What is written
The PDBQT, and why there is a flag
Adding the polar hydrogens Vina needs and assigning atom types is what Meeko, OpenBabel and PDB2PQR exist for. A homemade substitute that merely parses is a receptor that docks and lies about it. So
receptor.fidelityis the honesty flag M4 reads:fidelityfullPATH(mk_prepare_receptor.py, thenobabel)pdb_onlyreduced--pdbqt-fallbackwas passednoneThe fallback converter is adapted from Ping Hu's
bacteria_structure_docking.py(AutoDock atom types, no added hydrogens, zero charges) and is credited in the module. Every record it writes carries that caveat in its ownreason.Receptors are prepared only for structures that passed the quality gate — preparing one M3 has already called unusable would hand M4 something to dock that M3 said not to.
--no-receptorsskips the step.A bug worth noting
Path.with_suffix(".pdb")onfig_243273.25.peg.463eats the.463: it reads as an extension. Every receptor for every protein in a run would have collided on one filename. There is a test pinning it.Verification
510 tests pass.
tests/test_m3_receptor.pyinjects tool discovery, so the suite behaves identically on a node with OpenBabel and on CI without it — including the case where a tool runs but writes nothing, which must not be reported as success.python -m s2f.m3_fold --run <dir> --dry-runwritesreceptors/fig_243273.25.peg.463.pdband a box of 22.4 × 22.3 × 27.7 Å around the ribose-5-phosphate site. CI exercises thepdb_onlypath, since no preparation tool is installed there; I verifiedfulllocally against OpenBabel andreducedvia the flag.Still open, and deliberately not here
Protonation (PDB2PQR), pockets for apo structures (P2Rank) and prediction for proteins with no reusable structure (#54). Each is stated as a gap in the record rather than as an absence.
Worth a look from the author of the script the fallback is adapted from, and from M4's consumer — particularly whether
pdb_onlyis the right default, or whether the fallback should be on by default for a node with no toolchain.🤖 Generated with Claude Code