pocketscribe 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pocketscribe-0.1.0/LICENSE +21 -0
- pocketscribe-0.1.0/PKG-INFO +524 -0
- pocketscribe-0.1.0/README.md +490 -0
- pocketscribe-0.1.0/pocketscribe/__init__.py +23 -0
- pocketscribe-0.1.0/pocketscribe/citations.py +251 -0
- pocketscribe-0.1.0/pocketscribe/cli.py +315 -0
- pocketscribe-0.1.0/pocketscribe/confidence.py +296 -0
- pocketscribe-0.1.0/pocketscribe/config.py +111 -0
- pocketscribe-0.1.0/pocketscribe/consensus.py +767 -0
- pocketscribe-0.1.0/pocketscribe/data/__init__.py +68 -0
- pocketscribe-0.1.0/pocketscribe/errors.py +63 -0
- pocketscribe-0.1.0/pocketscribe/md_setup.py +731 -0
- pocketscribe-0.1.0/pocketscribe/models.py +461 -0
- pocketscribe-0.1.0/pocketscribe/narrative.py +269 -0
- pocketscribe-0.1.0/pocketscribe/parsing.py +349 -0
- pocketscribe-0.1.0/pocketscribe/pipeline.py +238 -0
- pocketscribe-0.1.0/pocketscribe/pockets.py +679 -0
- pocketscribe-0.1.0/pocketscribe/report/__init__.py +5 -0
- pocketscribe-0.1.0/pocketscribe/report/plots.py +245 -0
- pocketscribe-0.1.0/pocketscribe/report/render.py +145 -0
- pocketscribe-0.1.0/pocketscribe/report/structure_image.py +178 -0
- pocketscribe-0.1.0/pocketscribe/report/templates/base.html +35 -0
- pocketscribe-0.1.0/pocketscribe/report/templates/report.html +669 -0
- pocketscribe-0.1.0/pocketscribe/report/templates/style.css +405 -0
- pocketscribe-0.1.0/pocketscribe/sources.py +733 -0
- pocketscribe-0.1.0/pocketscribe.egg-info/PKG-INFO +524 -0
- pocketscribe-0.1.0/pocketscribe.egg-info/SOURCES.txt +41 -0
- pocketscribe-0.1.0/pocketscribe.egg-info/dependency_links.txt +1 -0
- pocketscribe-0.1.0/pocketscribe.egg-info/entry_points.txt +2 -0
- pocketscribe-0.1.0/pocketscribe.egg-info/requires.txt +7 -0
- pocketscribe-0.1.0/pocketscribe.egg-info/top_level.txt +1 -0
- pocketscribe-0.1.0/pyproject.toml +76 -0
- pocketscribe-0.1.0/setup.cfg +4 -0
- pocketscribe-0.1.0/tests/test_cli.py +333 -0
- pocketscribe-0.1.0/tests/test_confidence.py +177 -0
- pocketscribe-0.1.0/tests/test_consensus.py +476 -0
- pocketscribe-0.1.0/tests/test_md_setup.py +281 -0
- pocketscribe-0.1.0/tests/test_narrative.py +292 -0
- pocketscribe-0.1.0/tests/test_parsing.py +103 -0
- pocketscribe-0.1.0/tests/test_pockets.py +197 -0
- pocketscribe-0.1.0/tests/test_project_integrity.py +318 -0
- pocketscribe-0.1.0/tests/test_report.py +426 -0
- pocketscribe-0.1.0/tests/test_sources.py +252 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 John Adeyemo Adedeji
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pocketscribe
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Confidence-aware binding-pocket triage for predicted protein structures
|
|
5
|
+
Author-email: John Adeyemo Adedeji <johnnaadedeji2018@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/Jonahnki/Pocketscribe
|
|
8
|
+
Project-URL: Documentation, https://github.com/Jonahnki/Pocketscribe#readme
|
|
9
|
+
Project-URL: Repository, https://github.com/Jonahnki/Pocketscribe
|
|
10
|
+
Project-URL: Issues, https://github.com/Jonahnki/Pocketscribe/issues
|
|
11
|
+
Project-URL: Zenodo, https://doi.org/10.5281/zenodo.22967237
|
|
12
|
+
Project-URL: Demo, https://pocketscribe.vercel.app
|
|
13
|
+
Keywords: structural bioinformatics,binding pocket,druggability,AlphaFold,pLDDT,fpocket,molecular dynamics,GROMACS,drug discovery,predicted protein structures
|
|
14
|
+
Classifier: Development Status :: 4 - Beta
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: biopython>=1.80
|
|
28
|
+
Requires-Dist: numpy>=1.24
|
|
29
|
+
Provides-Extra: dev
|
|
30
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
31
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
32
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
# Pocketscribe
|
|
36
|
+
|
|
37
|
+
**Confidence-aware binding-pocket triage and molecular dynamics setup for predicted
|
|
38
|
+
protein structures.**
|
|
39
|
+
|
|
40
|
+
Pocketscribe takes a structure predicted by AlphaFold2, OpenFold, ColabFold, ESMFold or
|
|
41
|
+
Boltz and produces one self-contained report covering structure quality control,
|
|
42
|
+
binding-pocket detection, druggability scoring that is caveated by the prediction's own
|
|
43
|
+
per-residue confidence, optional cross-model consensus, and ready-to-run GROMACS input
|
|
44
|
+
files.
|
|
45
|
+
|
|
46
|
+
Research use only. It is a first-pass triage tool, not a substitute for expert
|
|
47
|
+
structural biology judgement, experimental validation, or a real docking or MD study.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Statement of need
|
|
52
|
+
|
|
53
|
+
An academic drug-discovery group with a predicted structure and no crystallographic
|
|
54
|
+
data faces a practical problem: deciding whether any site on that model is worth the
|
|
55
|
+
cost of a docking campaign, a simulation, or a wet-lab experiment. The existing tools
|
|
56
|
+
each solve one piece of it and leave the group to join them up.
|
|
57
|
+
|
|
58
|
+
**Pocket detection tools are bare scoring engines.** fpocket, DoGSiteScorer and P2Rank
|
|
59
|
+
find cavities and score them well, but they were designed for experimental structures
|
|
60
|
+
and treat every input the same way. Handed an AlphaFold model, they will score a cavity
|
|
61
|
+
formed by a disordered loop with pLDDT of 35 exactly as confidently as one in a
|
|
62
|
+
well-resolved core. The per-residue confidence that the prediction came with — the
|
|
63
|
+
single most important piece of context for interpreting a predicted structure — is
|
|
64
|
+
simply not part of their output.
|
|
65
|
+
|
|
66
|
+
**Web platforms require uploading unpublished structures to a third party.** For a
|
|
67
|
+
group working on an unpublished target, that is often not an option, and it rules out
|
|
68
|
+
the interactive tools that would otherwise be the easiest route.
|
|
69
|
+
|
|
70
|
+
**Family-specific druggability profilers do not generalise.** Tools trained on kinases
|
|
71
|
+
or GPCRs give sharp answers inside their family and little outside it, which is
|
|
72
|
+
precisely the situation a group exploring a novel or poorly-characterised target is in.
|
|
73
|
+
|
|
74
|
+
**Nothing carries the analysis through to simulation.** Even after a promising pocket is
|
|
75
|
+
identified, the step from "we found a pocket" to "we are simulating it" means assembling
|
|
76
|
+
a GROMACS setup by hand from tutorials — a reliable source of quiet errors, of which
|
|
77
|
+
running CHARMM36m on GROMACS' default non-bonded settings is only the most common.
|
|
78
|
+
|
|
79
|
+
Pocketscribe addresses these together. It treats per-residue confidence as a first-class
|
|
80
|
+
signal that caveats every downstream claim; it reads output from the prediction tools
|
|
81
|
+
academic groups actually use rather than assuming one source; it runs entirely locally,
|
|
82
|
+
so no unpublished structure leaves the machine; and it carries a run through to
|
|
83
|
+
ready-to-use MD input files and a written protocol in a single pass, ending in one
|
|
84
|
+
static report file rather than scattered outputs or a live web session.
|
|
85
|
+
|
|
86
|
+
### Cross-model pocket consensus
|
|
87
|
+
|
|
88
|
+
One component goes beyond integration. When a user supplies structures for the same
|
|
89
|
+
protein from more than one prediction tool, Pocketscribe superposes them, establishes
|
|
90
|
+
which pockets in one model correspond to which in another, and scores the agreement in
|
|
91
|
+
an **architecture-family-aware** way: agreement between an MSA-based model
|
|
92
|
+
(AlphaFold2, OpenFold, ColabFold, Boltz) and a single-sequence language model (ESMFold)
|
|
93
|
+
is reported separately from, and as stronger evidence than, agreement between two models
|
|
94
|
+
of the same family, which can reproduce each other's systematic errors. The two are
|
|
95
|
+
never pooled into one undifferentiated consensus score.
|
|
96
|
+
|
|
97
|
+
The underlying principle — that agreement between independent methods is stronger
|
|
98
|
+
evidence than agreement between close relatives — is not new to science; structural
|
|
99
|
+
biologists already reason this way about independent crystal forms. The contribution
|
|
100
|
+
here is packaging it as an automatic pipeline step for predicted-structure pocket
|
|
101
|
+
triage: sequence-identity gating, cross-model residue mapping, Kabsch superposition,
|
|
102
|
+
two-criteria pocket correspondence matching, and confidence-weighted family-aware
|
|
103
|
+
agreement scoring. As far as we could determine at the time of writing, no existing
|
|
104
|
+
open pocket-detection tool does this.
|
|
105
|
+
|
|
106
|
+
### What Pocketscribe is not
|
|
107
|
+
|
|
108
|
+
Pocketscribe is a **workflow and integration contribution**: research software whose
|
|
109
|
+
value is in removing real friction for a community, independently of whether any single
|
|
110
|
+
algorithm inside it is new.
|
|
111
|
+
|
|
112
|
+
It introduces **no new pocket-detection algorithm, no new druggability model and no new
|
|
113
|
+
force field**. fpocket does the cavity geometry and the druggability scoring, GROMACS and
|
|
114
|
+
CHARMM36m do the simulation physics, and the structure-prediction models do the folding.
|
|
115
|
+
Every one of them is cited in [Built on](#built-on--cite-these-too) and in every
|
|
116
|
+
generated report. If a report contributed to your work, cite those tools, not only this
|
|
117
|
+
one.
|
|
118
|
+
|
|
119
|
+
If you know of a tool that already combines these capabilities, please open an issue —
|
|
120
|
+
this section will be corrected.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Install
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
pip install pocketscribe
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
> Not yet published to PyPI. Until it is, install from source — see
|
|
131
|
+
> [From source](#from-source) below.
|
|
132
|
+
|
|
133
|
+
### fpocket (external dependency)
|
|
134
|
+
|
|
135
|
+
Pocket detection is done by **fpocket**, which is a C program and is not installed by
|
|
136
|
+
pip:
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# conda (recommended, works everywhere)
|
|
140
|
+
conda install -c conda-forge fpocket
|
|
141
|
+
|
|
142
|
+
# Debian / Ubuntu
|
|
143
|
+
sudo apt-get install fpocket
|
|
144
|
+
|
|
145
|
+
# macOS
|
|
146
|
+
brew install fpocket
|
|
147
|
+
|
|
148
|
+
# from source
|
|
149
|
+
# https://github.com/Discngine/fpocket
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Check it is visible:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
fpocket --version
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**If fpocket is not installed**, `pocketscribe demo` and the test suite fall back to a
|
|
159
|
+
built-in grid-based cavity scan so that the pipeline can still be tried offline. That
|
|
160
|
+
fallback is clearly labelled everywhere it appears, and its scores are a documented
|
|
161
|
+
heuristic — **not** fpocket's trained and validated druggability score. A real analysis
|
|
162
|
+
run (`pocketscribe run`) never falls back silently: it stops and tells you to install
|
|
163
|
+
fpocket.
|
|
164
|
+
|
|
165
|
+
### Optional: narrative synthesis
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
pip install 'pocketscribe[narrative]'
|
|
169
|
+
export ANTHROPIC_API_KEY=...
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
This enables one optional report section, described under
|
|
173
|
+
[The optional narrative layer](#the-optional-narrative-layer). Everything else runs
|
|
174
|
+
offline, and the report is complete without it.
|
|
175
|
+
|
|
176
|
+
### From source
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
git clone https://github.com/jonahnki/pocketscribe.git
|
|
180
|
+
cd pocketscribe
|
|
181
|
+
python -m venv .venv && source .venv/bin/activate
|
|
182
|
+
pip install -e '.[dev]'
|
|
183
|
+
pytest
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Quick start
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
# Try it on a bundled synthetic example -- no network, no fpocket needed
|
|
192
|
+
pocketscribe demo --output demo_report.html
|
|
193
|
+
|
|
194
|
+
# The cross-model consensus path, on three bundled models of one protein
|
|
195
|
+
pocketscribe demo --consensus --output demo_consensus_report.html
|
|
196
|
+
|
|
197
|
+
# A real run
|
|
198
|
+
pocketscribe run --pdb model.pdb --source alphafold2 --output report.html
|
|
199
|
+
|
|
200
|
+
# Let Pocketscribe work out where the model came from (it always says what it found)
|
|
201
|
+
pocketscribe run --pdb model.pdb --source auto --output report.html
|
|
202
|
+
|
|
203
|
+
# Add MD setup for the top-ranked pocket
|
|
204
|
+
pocketscribe run --pdb model.pdb --source colabfold --md-setup --output report.html
|
|
205
|
+
|
|
206
|
+
# Cross-model consensus: 2+ predictions of the SAME protein, each tagged with its source
|
|
207
|
+
pocketscribe run \
|
|
208
|
+
--pdb af2_model.pdb:alphafold2 \
|
|
209
|
+
--pdb esm_model.pdb:esmfold \
|
|
210
|
+
--pdb boltz_model.pdb:boltz \
|
|
211
|
+
--output consensus_report.html
|
|
212
|
+
|
|
213
|
+
# What can Pocketscribe read?
|
|
214
|
+
pocketscribe sources
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
## Supported structure sources
|
|
220
|
+
|
|
221
|
+
Confidence is encoded differently by every prediction tool, so each has its own adapter.
|
|
222
|
+
If a source's confidence cannot be found or parsed, Pocketscribe **fails with a specific
|
|
223
|
+
error** rather than guessing — a silently wrong confidence value would poison every
|
|
224
|
+
pocket caveat downstream.
|
|
225
|
+
|
|
226
|
+
| Source | Tier | Confidence | Method family | Status |
|
|
227
|
+
| --- | --- | --- | --- | --- |
|
|
228
|
+
| **AlphaFold2** | Tier 1 | pLDDT in B-factor column (0–100) | MSA / co-evolution | Fully supported |
|
|
229
|
+
| **OpenFold** | Tier 1 | pLDDT in B-factor column (0–100) | MSA / co-evolution | Fully supported |
|
|
230
|
+
| **ColabFold** | Tier 1 | pLDDT in B-factor column (0–100) | MSA / co-evolution | Fully supported |
|
|
231
|
+
| **ESMFold** | Tier 1 | pLDDT in B-factor column (0–100) | Single-sequence LM | Fully supported |
|
|
232
|
+
| **Boltz-1 / Boltz-2** | Tier 2 | per-residue pLDDT in sidecar JSON (0–1) | MSA / co-evolution | Reference adapter, implemented |
|
|
233
|
+
| **Protenix** | Tier 2 | atom-level pLDDT in sidecar JSON | MSA / co-evolution | Declared, not implemented |
|
|
234
|
+
| **AlphaFold3** | Tier 2 | per-atom pLDDT + AF3 mmCIF conventions | MSA / co-evolution | Declared, not implemented |
|
|
235
|
+
| **RoseTTAFold** | Tier 2 | predicted LDDT in sidecar `.npz` | MSA / co-evolution | Declared, not implemented |
|
|
236
|
+
|
|
237
|
+
**Tier 1** means parsed, auto-detected, individually unit tested with that source's own
|
|
238
|
+
header and filename conventions.
|
|
239
|
+
|
|
240
|
+
**Tier 2 "reference adapter"** means implemented and tested. Boltz is here because it is
|
|
241
|
+
the working example of a source that does *not* use the legacy B-factor convention.
|
|
242
|
+
|
|
243
|
+
**Tier 2 "declared, not implemented"** means the adapter exists and raises a clear,
|
|
244
|
+
source-specific error naming what is missing and why the AlphaFold2 parser cannot simply
|
|
245
|
+
be reused. It will never attempt a parse that would be wrong.
|
|
246
|
+
|
|
247
|
+
Adding a source is the most useful contribution you can make, and the architecture is
|
|
248
|
+
designed for it — see [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
249
|
+
|
|
250
|
+
### Two things Pocketscribe refuses to do
|
|
251
|
+
|
|
252
|
+
**It will not read an experimental structure as a prediction.** Crystallographic B-factors
|
|
253
|
+
sit comfortably inside the 0–100 pLDDT range, so a range check is not enough. Pocketscribe
|
|
254
|
+
instead checks whether B-factors vary *within* a residue: pLDDT is a per-residue quantity
|
|
255
|
+
written identically to every atom of a residue, while a refined temperature factor is
|
|
256
|
+
not. A file that fails this check is rejected with an explanation.
|
|
257
|
+
|
|
258
|
+
**It will not guess a source.** `--source auto` prints the evidence behind its guess so
|
|
259
|
+
you can correct it, and raises if nothing matches rather than defaulting to AlphaFold2.
|
|
260
|
+
|
|
261
|
+
---
|
|
262
|
+
|
|
263
|
+
## What the report contains
|
|
264
|
+
|
|
265
|
+
1. **Executive summary** — pocket count, confidence headline, what the run was.
|
|
266
|
+
2. **Input structure** — detected source and its support tier, chains, residue counts,
|
|
267
|
+
how the source was established.
|
|
268
|
+
3. **Structure quality and prediction confidence** — per-residue confidence plot, band
|
|
269
|
+
counts as a table, flagged low-confidence regions, geometry checks.
|
|
270
|
+
4. **Ranked pockets** — volume, druggability, hydrophobicity, polarity, lining residues,
|
|
271
|
+
and a confidence caveat on every pocket.
|
|
272
|
+
5. **Cross-model consensus** — only when 2+ structures are supplied.
|
|
273
|
+
6. **Pocket locations** — Cα trace with lining residues coloured by their own confidence.
|
|
274
|
+
7. **MD setup summary** — only with `--md-setup`.
|
|
275
|
+
8. **Interpretation** — only when the optional narrative layer is enabled.
|
|
276
|
+
9. **Methods and parameters** — everything needed to reproduce the run.
|
|
277
|
+
10. **Scope and limitations** — the disclaimer, in full.
|
|
278
|
+
11. **How to cite** — Pocketscribe and, more importantly, the tools it wrapped.
|
|
279
|
+
|
|
280
|
+
The report is a **single HTML file** with the CSS inlined and every figure as inline SVG.
|
|
281
|
+
No scripts, no CDN, no external assets: it opens offline, prints cleanly, and will still
|
|
282
|
+
render years from now on a machine that no longer has Pocketscribe installed.
|
|
283
|
+
|
|
284
|
+
---
|
|
285
|
+
|
|
286
|
+
## How confidence is used
|
|
287
|
+
|
|
288
|
+
Pocket claims are caveated, not merely annotated. Each pocket's lining residues are
|
|
289
|
+
cross-referenced against the confidence map, and the pocket is assigned a caveat level:
|
|
290
|
+
|
|
291
|
+
| Level | Roughly when | What it means |
|
|
292
|
+
| --- | --- | --- |
|
|
293
|
+
| `none` | Confidently predicted lining residues | Normal predicted-structure caveats apply |
|
|
294
|
+
| `low` | Some less certain residues at the periphery | Side-chain placement may shift |
|
|
295
|
+
| `moderate` | A meaningful minority below 70, or mean below 70 | Cavity may be real; shape and volume uncertain |
|
|
296
|
+
| `severe` | ≥25% below 50, or mean below 50 | Do not commit resources without independent evidence |
|
|
297
|
+
|
|
298
|
+
Escalation is deliberately conservative: a pocket is escalated on *either* a poor
|
|
299
|
+
average *or* a substantial minority of untrustworthy residues, because a binding site
|
|
300
|
+
needs only a few badly-placed lining residues to be geometrically wrong.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
## Cross-model consensus
|
|
305
|
+
|
|
306
|
+
Supply two or more predictions of the same protein and Pocketscribe adds a consensus
|
|
307
|
+
stage. It is skipped entirely for a single structure, and single-structure reports are
|
|
308
|
+
unaffected by its existence.
|
|
309
|
+
|
|
310
|
+
**Method.**
|
|
311
|
+
|
|
312
|
+
1. **Identity gate.** Sequences are aligned and required to be near-identical (≥95% by
|
|
313
|
+
default, `--min-identity`). Different proteins are rejected outright — a
|
|
314
|
+
plausible-looking consensus table for two unrelated proteins is worse than an error.
|
|
315
|
+
2. **Residue mapping.** A residue-to-residue map is built from the alignment, so models
|
|
316
|
+
differing in numbering, missing residues or construct boundaries can still be compared.
|
|
317
|
+
3. **Superposition.** Corresponding Cα atoms are Kabsch-superposed onto the first model.
|
|
318
|
+
4. **Pocket correspondence.** Two pockets from different models are the same pocket only
|
|
319
|
+
if **both** hold: lining-residue Jaccard overlap (mapped through the alignment) above
|
|
320
|
+
a threshold, **and** post-superposition centroid separation within tolerance.
|
|
321
|
+
Requiring both avoids matching distant cavities that share a few residues, and nearby
|
|
322
|
+
cavities that share none.
|
|
323
|
+
5. **Family-aware agreement.** Each model is tagged with an architecture family.
|
|
324
|
+
Cross-family and same-family agreement are computed and reported separately, each
|
|
325
|
+
normalised by how many pairs of that kind the input set could have produced, and
|
|
326
|
+
optionally weighted by each model's own confidence in the pocket's lining residues.
|
|
327
|
+
|
|
328
|
+
**Reading the output.** A pocket labelled `cross-family` was found independently by
|
|
329
|
+
methods that do not share an inference pathway — the strongest robustness signal this
|
|
330
|
+
pipeline can offer short of experimental validation. A pocket labelled `same-family-only`
|
|
331
|
+
was found by models that may share systematic errors, and is explicitly *not* independent
|
|
332
|
+
confirmation. `single-model` means no consensus support at all.
|
|
333
|
+
|
|
334
|
+
To get anything out of this stage you need models from different families. Three
|
|
335
|
+
AlphaFold2-lineage models will tell you very little; adding one ESMFold prediction
|
|
336
|
+
changes that, and the report says so when you have not.
|
|
337
|
+
|
|
338
|
+
---
|
|
339
|
+
|
|
340
|
+
## MD simulation setup
|
|
341
|
+
|
|
342
|
+
`--md-setup` generates, but never runs, a complete GROMACS setup:
|
|
343
|
+
|
|
344
|
+
| File | Purpose |
|
|
345
|
+
| --- | --- |
|
|
346
|
+
| `protein_clean.pdb` | Protein-only coordinates, heteroatoms and hydrogens stripped |
|
|
347
|
+
| `run_setup.sh` | pdb2gmx → editconf → solvate → genion → minimisation → NVT → NPT → production |
|
|
348
|
+
| `minim.mdp` | Steepest-descent energy minimisation |
|
|
349
|
+
| `ions.mdp` | Parameters for building the `genion` `.tpr` |
|
|
350
|
+
| `nvt.mdp` | 100 ps constant-volume equilibration, protein restrained |
|
|
351
|
+
| `npt.mdp` | 100 ps constant-pressure equilibration, protein restrained |
|
|
352
|
+
| `md.mdp` | Unrestrained production run |
|
|
353
|
+
| `pocket_selection.txt` | `gmx make_ndx` selection for the target pocket's residues |
|
|
354
|
+
| `PROTOCOL.md` | Step-by-step protocol explaining every choice and when to change it |
|
|
355
|
+
|
|
356
|
+
Defaults are CHARMM36m with TIP3P water, a rhombic dodecahedron box with 1.0 nm padding,
|
|
357
|
+
neutralising ions plus 0.15 M NaCl, 310 K, 2 fs timestep with h-bond constraints. The
|
|
358
|
+
non-bonded settings follow the CHARMM36 recommendation (force-switched van der Waals
|
|
359
|
+
from 1.0 to 1.2 nm, PME at a matching 1.2 nm cut-off) and are stated explicitly in every
|
|
360
|
+
`.mdp` file, because running CHARMM36m on GROMACS' defaults is a common and consequential
|
|
361
|
+
error that survives copy-and-paste.
|
|
362
|
+
|
|
363
|
+
Everything a user should reconsider for their own system is commented in place.
|
|
364
|
+
|
|
365
|
+
---
|
|
366
|
+
|
|
367
|
+
## The optional narrative layer
|
|
368
|
+
|
|
369
|
+
One report section is written by a language model: a short scientific interpretation of
|
|
370
|
+
which pockets look most promising, what the confidence caveats mean for reading them, and
|
|
371
|
+
a recommended next step.
|
|
372
|
+
|
|
373
|
+
It is **genuinely optional and structurally isolated**:
|
|
374
|
+
|
|
375
|
+
- If `ANTHROPIC_API_KEY` is unset, or the `anthropic` package is not installed, or the
|
|
376
|
+
call fails for any reason, the section is skipped and the report is complete without it.
|
|
377
|
+
- It runs last and receives only the finished analysis as JSON — pocket scores, confidence
|
|
378
|
+
statistics, consensus results. **No coordinates, no file contents, no structure.** What
|
|
379
|
+
leaves your machine is a table of numbers about pockets, not your unpublished structure.
|
|
380
|
+
- The prompt instructs the model to reinforce the report's caveats rather than smooth
|
|
381
|
+
them over, and the rendered section is labelled as model-written.
|
|
382
|
+
- `--no-narrative` disables it outright.
|
|
383
|
+
|
|
384
|
+
No part of the deterministic pipeline imports it.
|
|
385
|
+
|
|
386
|
+
---
|
|
387
|
+
|
|
388
|
+
## Configuration
|
|
389
|
+
|
|
390
|
+
```yaml
|
|
391
|
+
# config.yaml
|
|
392
|
+
pockets:
|
|
393
|
+
backend: fpocket # fpocket | builtin
|
|
394
|
+
top_pockets: 5
|
|
395
|
+
consensus:
|
|
396
|
+
min_sequence_identity: 0.95
|
|
397
|
+
centroid_tolerance: 8.0 # Angstrom
|
|
398
|
+
min_residue_jaccard: 0.25
|
|
399
|
+
confidence_weighting: true
|
|
400
|
+
md:
|
|
401
|
+
enabled: true
|
|
402
|
+
force_field: charmm36m
|
|
403
|
+
temperature_K: 310.0
|
|
404
|
+
production_ns: 100.0
|
|
405
|
+
narrative:
|
|
406
|
+
enabled: true
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
```bash
|
|
410
|
+
pocketscribe run --pdb model.pdb --config config.yaml --output report.html
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
CLI options override the file. Every parameter ends up in the report's methods appendix.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## Built on — cite these too
|
|
418
|
+
|
|
419
|
+
Pocketscribe is an integration layer. The science in any report it produces was done by
|
|
420
|
+
the tools below. **Citing Pocketscribe without them misattributes the work.**
|
|
421
|
+
|
|
422
|
+
**Pocket detection and druggability**
|
|
423
|
+
|
|
424
|
+
- Le Guilloux, V., Schmidtke, P. & Tuffery, P. Fpocket: an open source platform for
|
|
425
|
+
ligand pocket detection. *BMC Bioinformatics* **10**, 168 (2009).
|
|
426
|
+
doi:[10.1186/1471-2105-10-168](https://doi.org/10.1186/1471-2105-10-168)
|
|
427
|
+
- Schmidtke, P. & Barril, X. Understanding and predicting druggability. A
|
|
428
|
+
high-throughput method for detection of drug binding sites. *Journal of Medicinal
|
|
429
|
+
Chemistry* **53**, 5858–5867 (2010).
|
|
430
|
+
doi:[10.1021/jm100574m](https://doi.org/10.1021/jm100574m)
|
|
431
|
+
|
|
432
|
+
**Molecular dynamics**
|
|
433
|
+
|
|
434
|
+
- Abraham, M. J. *et al.* GROMACS: High performance molecular simulations through
|
|
435
|
+
multi-level parallelism from laptops to supercomputers. *SoftwareX* **1–2**, 19–25
|
|
436
|
+
(2015). doi:[10.1016/j.softx.2015.06.001](https://doi.org/10.1016/j.softx.2015.06.001)
|
|
437
|
+
- Huang, J. *et al.* CHARMM36m: an improved force field for folded and intrinsically
|
|
438
|
+
disordered proteins. *Nature Methods* **14**, 71–73 (2017).
|
|
439
|
+
doi:[10.1038/nmeth.4067](https://doi.org/10.1038/nmeth.4067)
|
|
440
|
+
|
|
441
|
+
**Structure prediction sources**
|
|
442
|
+
|
|
443
|
+
- **AlphaFold2** — Jumper, J. *et al.* Highly accurate protein structure prediction with
|
|
444
|
+
AlphaFold. *Nature* **596**, 583–589 (2021).
|
|
445
|
+
doi:[10.1038/s41586-021-03819-2](https://doi.org/10.1038/s41586-021-03819-2)
|
|
446
|
+
- **AlphaFold DB** — Varadi, M. *et al.* AlphaFold Protein Structure Database in 2024.
|
|
447
|
+
*Nucleic Acids Research* **52**, D368–D375 (2024).
|
|
448
|
+
doi:[10.1093/nar/gkad1011](https://doi.org/10.1093/nar/gkad1011)
|
|
449
|
+
- **OpenFold** — Ahdritz, G. *et al.* OpenFold: retraining AlphaFold2 yields new insights
|
|
450
|
+
into its learning mechanisms and capacity for generalization. *Nature Methods* **21**,
|
|
451
|
+
1514–1524 (2024). doi:[10.1038/s41592-024-02272-z](https://doi.org/10.1038/s41592-024-02272-z)
|
|
452
|
+
- **ColabFold** — Mirdita, M. *et al.* ColabFold: making protein folding accessible to
|
|
453
|
+
all. *Nature Methods* **19**, 679–682 (2022).
|
|
454
|
+
doi:[10.1038/s41592-022-01488-1](https://doi.org/10.1038/s41592-022-01488-1)
|
|
455
|
+
- **ESMFold / ESM-2** — Lin, Z. *et al.* Evolutionary-scale prediction of atomic-level
|
|
456
|
+
protein structure with a language model. *Science* **379**, 1123–1130 (2023).
|
|
457
|
+
doi:[10.1126/science.ade2574](https://doi.org/10.1126/science.ade2574)
|
|
458
|
+
- **Boltz-1** — Wohlwend, J. *et al.* Boltz-1: democratizing biomolecular interaction
|
|
459
|
+
modeling. *bioRxiv* (2024).
|
|
460
|
+
doi:[10.1101/2024.11.19.624167](https://doi.org/10.1101/2024.11.19.624167)
|
|
461
|
+
|
|
462
|
+
Declared but not yet implemented (cited here so the adapter stubs point somewhere):
|
|
463
|
+
**Protenix** (doi:[10.1101/2025.01.08.631967](https://doi.org/10.1101/2025.01.08.631967)),
|
|
464
|
+
**AlphaFold3** (Abramson, J. *et al. Nature* **630**, 493–500, 2024,
|
|
465
|
+
doi:[10.1038/s41586-024-07487-w](https://doi.org/10.1038/s41586-024-07487-w)),
|
|
466
|
+
**RoseTTAFold** (Baek, M. *et al. Science* **373**, 871–876, 2021,
|
|
467
|
+
doi:[10.1126/science.abj8754](https://doi.org/10.1126/science.abj8754)).
|
|
468
|
+
|
|
469
|
+
**Supporting libraries and methods**
|
|
470
|
+
|
|
471
|
+
- Cock, P. J. A. *et al.* Biopython. *Bioinformatics* **25**, 1422–1423 (2009).
|
|
472
|
+
doi:[10.1093/bioinformatics/btp163](https://doi.org/10.1093/bioinformatics/btp163)
|
|
473
|
+
- Kabsch, W. A solution for the best rotation to relate two sets of vectors. *Acta
|
|
474
|
+
Crystallographica A* **32**, 922–923 (1976).
|
|
475
|
+
doi:[10.1107/S0567739476001873](https://doi.org/10.1107/S0567739476001873)
|
|
476
|
+
- Hendlich, M., Rippmann, F. & Barnickel, G. LIGSITE. *Journal of Molecular Graphics and
|
|
477
|
+
Modelling* **15**, 359–363 (1997) — the grid buriedness scan the offline fallback
|
|
478
|
+
backend follows. Relevant only when fpocket is unavailable.
|
|
479
|
+
|
|
480
|
+
Please verify each reference against its source before it goes into a manuscript.
|
|
481
|
+
|
|
482
|
+
---
|
|
483
|
+
|
|
484
|
+
## Limitations
|
|
485
|
+
|
|
486
|
+
- **Predicted structures are models.** They place side chains wrongly, close cavities
|
|
487
|
+
that are open in reality, and open cavities that are not. Apo predictions in particular
|
|
488
|
+
often miss the conformational change that accompanies binding.
|
|
489
|
+
- **Druggability scores are heuristics.** A high score means a cavity has the geometry
|
|
490
|
+
and chemistry that tend to accompany ligandable sites. It is not evidence that anything
|
|
491
|
+
binds, and says nothing about affinity or selectivity.
|
|
492
|
+
- **Consensus is not truth.** Independent methods can be independently wrong, especially
|
|
493
|
+
for proteins with few homologues or unusual folds.
|
|
494
|
+
- **No simulation is run.** The MD stage generates inputs with reasonable defaults, not a
|
|
495
|
+
protocol validated for your system.
|
|
496
|
+
- **Multi-chain consensus pairs chains in sorted order.** Structures whose chains are
|
|
497
|
+
named or ordered differently may need renaming first.
|
|
498
|
+
- **The offline fallback backend is not fpocket** and its scores are not comparable to
|
|
499
|
+
fpocket's. Install fpocket for anything you intend to act on.
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
## How to cite
|
|
504
|
+
|
|
505
|
+
If Pocketscribe contributed to published work, please cite it **together with** the tools
|
|
506
|
+
above. A machine-readable [`CITATION.cff`](CITATION.cff) ships with the repository.
|
|
507
|
+
|
|
508
|
+
> Adedeji, J. A. Pocketscribe: confidence-aware binding-pocket triage and molecular
|
|
509
|
+
> dynamics setup for predicted protein structures (version 0.1.0).
|
|
510
|
+
> doi:[10.5281/zenodo.22967237](https://doi.org/10.5281/zenodo.22967237).
|
|
511
|
+
> https://github.com/jonahnki/pocketscribe
|
|
512
|
+
|
|
513
|
+
---
|
|
514
|
+
|
|
515
|
+
## Contributing
|
|
516
|
+
|
|
517
|
+
Contributions are welcome, and the structure-source adapter architecture exists
|
|
518
|
+
specifically to make one kind of contribution easy. See
|
|
519
|
+
[CONTRIBUTING.md](CONTRIBUTING.md) for a walkthrough that adds a working adapter
|
|
520
|
+
step by step, and [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).
|
|
521
|
+
|
|
522
|
+
## License
|
|
523
|
+
|
|
524
|
+
MIT — see [LICENSE](LICENSE).
|