dyno-phi 0.1.1__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.
- dyno_phi-0.1.1/.claude/skills/phi/SKILL.md +372 -0
- dyno_phi-0.1.1/.github/workflows/ci.yml +34 -0
- dyno_phi-0.1.1/.github/workflows/publish.yml +72 -0
- dyno_phi-0.1.1/.gitignore +49 -0
- dyno_phi-0.1.1/.pre-commit-config.yaml +27 -0
- dyno_phi-0.1.1/CHANGELOG.md +34 -0
- dyno_phi-0.1.1/CLI-REFERENCE.md +941 -0
- dyno_phi-0.1.1/LICENSE +21 -0
- dyno_phi-0.1.1/PKG-INFO +322 -0
- dyno_phi-0.1.1/README.md +284 -0
- dyno_phi-0.1.1/biomodals/TEMPLATE_NEW_BIOMODAL.py +391 -0
- dyno_phi-0.1.1/biomodals/__init__.py +13 -0
- dyno_phi-0.1.1/biomodals/base.py +400 -0
- dyno_phi-0.1.1/biomodals/modal_af2rank.py +639 -0
- dyno_phi-0.1.1/biomodals/modal_align_structures.py +676 -0
- dyno_phi-0.1.1/biomodals/modal_alphafold.py +683 -0
- dyno_phi-0.1.1/biomodals/modal_bindcraft.py +1191 -0
- dyno_phi-0.1.1/biomodals/modal_boltz.py +484 -0
- dyno_phi-0.1.1/biomodals/modal_boltzgen.py +862 -0
- dyno_phi-0.1.1/biomodals/modal_chai1.py +361 -0
- dyno_phi-0.1.1/biomodals/modal_esm2_predict_masked.py +289 -0
- dyno_phi-0.1.1/biomodals/modal_esmfold.py +663 -0
- dyno_phi-0.1.1/biomodals/modal_ligandmpnn.py +362 -0
- dyno_phi-0.1.1/biomodals/modal_proteinmpnn.py +783 -0
- dyno_phi-0.1.1/biomodals/modal_rf3.py +673 -0
- dyno_phi-0.1.1/biomodals/modal_rfdiffusion3.py +1919 -0
- dyno_phi-0.1.1/biomodals/modal_rso.py +432 -0
- dyno_phi-0.1.1/biomodals/modal_tm_score.py +417 -0
- dyno_phi-0.1.1/biomodals/utils/__init__.py +1 -0
- dyno_phi-0.1.1/biomodals/utils/extract_chain_as_mol2.py +73 -0
- dyno_phi-0.1.1/biomodals/utils/extract_ligands.py +240 -0
- dyno_phi-0.1.1/examples/README.md +80 -0
- dyno_phi-0.1.1/examples/binders/pdl1/binder_009.pdb +1343 -0
- dyno_phi-0.1.1/examples/binders/pdl1/binder_047.pdb +1309 -0
- dyno_phi-0.1.1/examples/binders/pdl1/binder_106.pdb +1532 -0
- dyno_phi-0.1.1/examples/binders/pdl1/binder_188.pdb +1194 -0
- dyno_phi-0.1.1/examples/binders/pdl1/binder_246.pdb +1438 -0
- dyno_phi-0.1.1/examples/fixtures/pdl1/5O45.pdb +5146 -0
- dyno_phi-0.1.1/examples/fixtures/pdl1/pdl1_pdb_19_132.pdb +3094 -0
- dyno_phi-0.1.1/pyproject.toml +125 -0
- dyno_phi-0.1.1/src/phi/__init__.py +4 -0
- dyno_phi-0.1.1/src/phi/_version.py +1 -0
- dyno_phi-0.1.1/src/phi/api.py +152 -0
- dyno_phi-0.1.1/src/phi/cli.py +84 -0
- dyno_phi-0.1.1/src/phi/commands/__init__.py +1 -0
- dyno_phi-0.1.1/src/phi/commands/auth.py +92 -0
- dyno_phi-0.1.1/src/phi/commands/datasets.py +142 -0
- dyno_phi-0.1.1/src/phi/commands/filter.py +84 -0
- dyno_phi-0.1.1/src/phi/commands/jobs.py +152 -0
- dyno_phi-0.1.1/src/phi/commands/models.py +165 -0
- dyno_phi-0.1.1/src/phi/commands/research.py +143 -0
- dyno_phi-0.1.1/src/phi/commands/structure.py +197 -0
- dyno_phi-0.1.1/src/phi/config.py +156 -0
- dyno_phi-0.1.1/src/phi/display.py +409 -0
- dyno_phi-0.1.1/src/phi/download.py +251 -0
- dyno_phi-0.1.1/src/phi/parser.py +643 -0
- dyno_phi-0.1.1/src/phi/polling.py +96 -0
- dyno_phi-0.1.1/src/phi/research.py +213 -0
- dyno_phi-0.1.1/src/phi/structure.py +106 -0
- dyno_phi-0.1.1/src/phi/types.py +33 -0
- dyno_phi-0.1.1/src/phi/upload.py +146 -0
- dyno_phi-0.1.1/tests/__init__.py +1 -0
- dyno_phi-0.1.1/tests/test_api.py +125 -0
- dyno_phi-0.1.1/tests/test_config.py +109 -0
- dyno_phi-0.1.1/tests/test_display.py +47 -0
- dyno_phi-0.1.1/tests/test_download.py +75 -0
- dyno_phi-0.1.1/tests/test_research.py +91 -0
- dyno_phi-0.1.1/tests/test_structure.py +149 -0
- dyno_phi-0.1.1/tests/test_upload.py +73 -0
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: phi
|
|
3
|
+
description: "Run phi CLI commands for the dyno protein design platform: fetch structures, design binders (RFDiffusion3, BoltzGen), run folding/inverse-folding pipelines (ESMFold, AlphaFold2, ProteinMPNN), filter and score candidates, download results, and run research queries. Use when the user asks about phi commands, binder design, uploading PDB/CIF files, or scoring designs."
|
|
4
|
+
argument-hint: "[command] [options]"
|
|
5
|
+
allowed-tools: Bash(phi *)
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# phi CLI skill
|
|
9
|
+
|
|
10
|
+
`phi` is the command-line interface for **dyno-phi**, a protein design platform.
|
|
11
|
+
Install it from PyPI:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
pip install dyno-phi
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Configure with a single environment variable (or a `.env` file at the repo root):
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
export DYNO_API_KEY=sk-...
|
|
21
|
+
# Optional — defaults to the hosted API
|
|
22
|
+
export DYNO_API_BASE_URL=https://api.dynotx.com
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Verify connectivity:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
phi login
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## End-to-end workflow
|
|
34
|
+
|
|
35
|
+
```
|
|
36
|
+
research → fetch → design → filter → download
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Each step is optional depending on your starting point.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## 1. Research a target
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Biological research query with literature citations
|
|
47
|
+
phi research \
|
|
48
|
+
--question "What are the key binding hotspots on PD-L1?" \
|
|
49
|
+
--target PD-L1 \
|
|
50
|
+
--structures \
|
|
51
|
+
--dataset-id <ID>
|
|
52
|
+
|
|
53
|
+
# Stream results live
|
|
54
|
+
phi research --question "..." --stream
|
|
55
|
+
|
|
56
|
+
# Append notes to a local file and cloud storage
|
|
57
|
+
phi research --question "..." --notes-file ./research.md --dataset-id <ID>
|
|
58
|
+
|
|
59
|
+
# View accumulated notes for a dataset
|
|
60
|
+
phi notes <DATASET_ID>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 2. Fetch and prepare structures
|
|
66
|
+
|
|
67
|
+
`phi fetch` downloads a structure from RCSB PDB or the AlphaFold DB, optionally crops
|
|
68
|
+
it by chain or residue range, and uploads it to a new dataset ready for design.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Fetch a PDB entry (all chains)
|
|
72
|
+
phi fetch --pdb 6M0J
|
|
73
|
+
|
|
74
|
+
# Fetch a specific chain and residue range
|
|
75
|
+
phi fetch --pdb 6M0J --chain A --start 1 --end 200
|
|
76
|
+
|
|
77
|
+
# Fetch an AlphaFold DB prediction and trim low-confidence regions (pLDDT < 70)
|
|
78
|
+
phi fetch --uniprot P12345 --plddt-cutoff 70
|
|
79
|
+
|
|
80
|
+
# Upload the prepared structure to a new dataset for use with phi design
|
|
81
|
+
phi fetch --pdb 6M0J --chain A --upload
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
After `--upload`, a new `dataset_id` is cached. The output prints the full `phi design`
|
|
85
|
+
command ready to run.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## 3. Design binders
|
|
90
|
+
|
|
91
|
+
### RFDiffusion3 (backbone diffusion — recommended default)
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
# Alias: phi design
|
|
95
|
+
phi design --fasta target.fasta --hotspots A25,A30,A35 --num-designs 50 --wait
|
|
96
|
+
|
|
97
|
+
# Specify binder length range
|
|
98
|
+
phi design --fasta target.fasta --binder-min-length 60 --binder-max-length 100 --num-designs 50 --wait
|
|
99
|
+
|
|
100
|
+
# Use a structure file from a cached dataset
|
|
101
|
+
phi design --dataset-id <ID> --hotspots A25,A30 --num-designs 50 --wait
|
|
102
|
+
|
|
103
|
+
# Specify partial diffusion steps (for motif scaffolding)
|
|
104
|
+
phi rfdiffusion3 --fasta target.fasta --hotspots A25,A30 --partial-diffusion-steps 10 --num-designs 50 --wait
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### BoltzGen (all-atom diffusion — for high-quality production runs)
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# Full pipeline from a design YAML
|
|
111
|
+
phi boltzgen --yaml design.yaml --protocol protein-anything --num-designs 50 --wait
|
|
112
|
+
|
|
113
|
+
# Specify a budget (final diversity-filtered set size)
|
|
114
|
+
phi boltzgen --yaml design.yaml --num-designs 1000 --budget 50 --wait
|
|
115
|
+
|
|
116
|
+
# Run only specific pipeline steps
|
|
117
|
+
phi boltzgen --yaml design.yaml --boltzgen-steps "design inverse_folding" --num-designs 50 --wait
|
|
118
|
+
|
|
119
|
+
# Inverse folding only (resequence an existing backbone from a YAML spec)
|
|
120
|
+
phi boltzgen --yaml backbone.yaml --only-inverse-fold --inverse-fold-num-sequences 10 --wait
|
|
121
|
+
|
|
122
|
+
# Use a structure already uploaded to cloud storage
|
|
123
|
+
phi boltzgen --yaml design.yaml --yaml-gcs gs://bucket/design.yaml --structure-gcs gs://bucket/target.cif --wait
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**BoltzGen protocols:**
|
|
127
|
+
|
|
128
|
+
| Protocol | Use |
|
|
129
|
+
|---|---|
|
|
130
|
+
| `protein-anything` | Design proteins to bind proteins or peptides (default) |
|
|
131
|
+
| `peptide-anything` | Design (cyclic) peptides to bind proteins |
|
|
132
|
+
| `protein-small_molecule` | Design proteins to bind small molecules |
|
|
133
|
+
| `antibody-anything` | Design antibody CDRs |
|
|
134
|
+
| `nanobody-anything` | Design nanobody CDRs |
|
|
135
|
+
| `protein-redesign` | Redesign or optimize existing proteins |
|
|
136
|
+
|
|
137
|
+
**BoltzGen pipeline steps** (pass to `--boltzgen-steps`):
|
|
138
|
+
`design`, `inverse_folding`, `folding`, `design_folding`, `affinity`, `analysis`, `filtering`
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## 4. Upload an existing design set
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# Upload a directory of PDB / CIF files (auto-expands directories)
|
|
146
|
+
phi upload ./designs/
|
|
147
|
+
|
|
148
|
+
# Upload specific files
|
|
149
|
+
phi upload binder_001.cif binder_002.pdb
|
|
150
|
+
|
|
151
|
+
# Cache the dataset ID for subsequent commands
|
|
152
|
+
phi use <DATASET_ID>
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## 5. Run the filter pipeline
|
|
158
|
+
|
|
159
|
+
`phi filter` scores binder candidates end-to-end:
|
|
160
|
+
inverse folding (ProteinMPNN) → folding (ESMFold) → complex folding (AlphaFold2) → score.
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
# Run with the default filter preset and wait for completion
|
|
164
|
+
phi filter --dataset-id <DATASET_ID> --preset default --wait
|
|
165
|
+
|
|
166
|
+
# Or, if a dataset is cached:
|
|
167
|
+
phi filter --preset default --wait
|
|
168
|
+
|
|
169
|
+
# Download results immediately after completion:
|
|
170
|
+
phi filter --preset default --wait --out ./results
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
**Filter presets:**
|
|
174
|
+
|
|
175
|
+
| Preset | pLDDT | pTM | ipTM | iPAE | RMSD |
|
|
176
|
+
|--------|-------|-----|------|------|------|
|
|
177
|
+
| `default` | ≥0.80 | ≥0.55 | ≥0.50 | ≤0.35 | ≤3.5 Å |
|
|
178
|
+
| `relaxed` | ≥0.80 | ≥0.45 | ≥0.50 | ≤0.40 | ≤4.5 Å |
|
|
179
|
+
|
|
180
|
+
Override any threshold individually:
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
phi filter --preset default --plddt-threshold 0.75 --rmsd-threshold 4.0 --wait
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**MSA tool for complex folding:**
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Default: mmseqs2 (uses sequence homologs — best for natural-like designs)
|
|
190
|
+
phi filter --preset default --msa-tool mmseqs2 --wait
|
|
191
|
+
|
|
192
|
+
# single_sequence: skip MSA — best for truly novel de novo binders
|
|
193
|
+
phi filter --preset relaxed --msa-tool single_sequence --wait
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## 6. Run individual tools
|
|
199
|
+
|
|
200
|
+
All tool commands accept `--dataset-id ID` or use the cached dataset. Add `--wait` to
|
|
201
|
+
poll until completion.
|
|
202
|
+
|
|
203
|
+
#### Inverse folding (ProteinMPNN)
|
|
204
|
+
```bash
|
|
205
|
+
phi inverse_folding --dataset-id <ID> --wait
|
|
206
|
+
phi proteinmpnn --dataset-id <ID> --num-sequences 10 --temperature 0.1 --wait
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
#### Folding (ESMFold)
|
|
210
|
+
```bash
|
|
211
|
+
phi folding --dataset-id <ID> --wait
|
|
212
|
+
phi esmfold --dataset-id <ID> --recycles 3 --wait
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
#### Complex folding (AlphaFold2 multimer)
|
|
216
|
+
```bash
|
|
217
|
+
phi complex_folding --dataset-id <ID> --wait
|
|
218
|
+
phi alphafold --dataset-id <ID> \
|
|
219
|
+
--models 1,2 \
|
|
220
|
+
--model-type multimer_v3 \
|
|
221
|
+
--msa-tool mmseqs2 \
|
|
222
|
+
--wait
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
#### ESM2 language model scoring
|
|
226
|
+
```bash
|
|
227
|
+
phi esm2 --dataset-id <ID> --wait
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
#### Boltz complex prediction
|
|
231
|
+
```bash
|
|
232
|
+
phi boltz --dataset-id <ID> --recycles 3 --wait
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## 7. Download results
|
|
238
|
+
|
|
239
|
+
```bash
|
|
240
|
+
# Download to ./results (default) — key files: structures/, scores/
|
|
241
|
+
phi download
|
|
242
|
+
|
|
243
|
+
# Download a specific job
|
|
244
|
+
phi download <JOB_ID> --out ./my-results
|
|
245
|
+
|
|
246
|
+
# Download everything including MSA files and archives
|
|
247
|
+
phi download --all
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
`phi download` organizes output into:
|
|
251
|
+
- `structures/` — PDB files
|
|
252
|
+
- `scores/` — scores.csv and raw JSON sidecars
|
|
253
|
+
- `scores.csv` — merged scores table
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## 8. View scores
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
# Display scores table for the last job
|
|
261
|
+
phi scores
|
|
262
|
+
|
|
263
|
+
# Display top-20 candidates for a specific job
|
|
264
|
+
phi scores <JOB_ID> --top 20
|
|
265
|
+
|
|
266
|
+
# Save scores CSV locally
|
|
267
|
+
phi scores --out ./scores.csv
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Job management
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
phi jobs # List recent jobs
|
|
276
|
+
phi jobs --status completed
|
|
277
|
+
phi status <JOB_ID> # Check a specific job
|
|
278
|
+
phi cancel <JOB_ID>
|
|
279
|
+
phi logs <JOB_ID> # Print the log stream URL
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Dataset management
|
|
285
|
+
|
|
286
|
+
```bash
|
|
287
|
+
phi datasets # List all datasets
|
|
288
|
+
phi dataset <DATASET_ID> # Show details
|
|
289
|
+
phi use <DATASET_ID> # Cache as the current working dataset
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Tips
|
|
295
|
+
|
|
296
|
+
### State caching
|
|
297
|
+
`phi use <DATASET_ID>` writes to `.phi-state.json` in the current directory.
|
|
298
|
+
`phi filter` also caches `last_job_id`, so `phi download` and `phi scores` work
|
|
299
|
+
without arguments after a filter run.
|
|
300
|
+
|
|
301
|
+
### Polling interval
|
|
302
|
+
```bash
|
|
303
|
+
phi filter --preset default --wait --poll-interval 10
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Key scoring metrics
|
|
307
|
+
|
|
308
|
+
| Metric | Source | Good threshold |
|
|
309
|
+
|--------|--------|----------------|
|
|
310
|
+
| `plddt` | ESMFold | ≥ 0.80 |
|
|
311
|
+
| `ptm` | AlphaFold2 | ≥ 0.55 |
|
|
312
|
+
| `af2_iptm` | AlphaFold2 multimer | ≥ 0.50 |
|
|
313
|
+
| `af2_ipae` | AlphaFold2 multimer | ≤ 0.35 |
|
|
314
|
+
| `rmsd` | Binder vs design backbone | ≤ 3.5 Å |
|
|
315
|
+
|
|
316
|
+
### Tool name aliases
|
|
317
|
+
|
|
318
|
+
| Generic name | Tool | Notes |
|
|
319
|
+
|---|---|---|
|
|
320
|
+
| `folding` | ESMFold | Fast single-sequence folding |
|
|
321
|
+
| `complex_folding` | AlphaFold2 multimer | Binder–target complex |
|
|
322
|
+
| `inverse_folding` | ProteinMPNN | Sequence design from backbone |
|
|
323
|
+
| `design` | RFDiffusion3 | Backbone diffusion (default) |
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Common workflows
|
|
328
|
+
|
|
329
|
+
### Research-guided design
|
|
330
|
+
```bash
|
|
331
|
+
phi research \
|
|
332
|
+
--question "Which residues on EGFR domain III are critical for antibody binding?" \
|
|
333
|
+
--target EGFR --structures --notes-file ./research.md
|
|
334
|
+
|
|
335
|
+
phi fetch --pdb 1IVO --chain A --start 300 --end 500 --upload
|
|
336
|
+
|
|
337
|
+
phi design --hotspots A310,A315,A320 --num-designs 100 --wait
|
|
338
|
+
|
|
339
|
+
phi filter --preset relaxed --msa-tool single_sequence --wait --out ./results
|
|
340
|
+
phi scores
|
|
341
|
+
```
|
|
342
|
+
|
|
343
|
+
### Upload existing designs and score
|
|
344
|
+
```bash
|
|
345
|
+
phi upload ./designs/
|
|
346
|
+
phi filter --preset default --wait --out ./results
|
|
347
|
+
phi scores
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### Relax thresholds for novel de novo binders
|
|
351
|
+
```bash
|
|
352
|
+
phi filter --preset relaxed --msa-tool single_sequence --wait
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
### BoltzGen inverse folding only (resequence a backbone)
|
|
356
|
+
```bash
|
|
357
|
+
phi boltzgen \
|
|
358
|
+
--yaml backbone_spec.yaml \
|
|
359
|
+
--only-inverse-fold \
|
|
360
|
+
--inverse-fold-num-sequences 10 \
|
|
361
|
+
--wait
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Full BoltzGen production run
|
|
365
|
+
```bash
|
|
366
|
+
phi boltzgen \
|
|
367
|
+
--yaml design_spec.yaml \
|
|
368
|
+
--protocol protein-anything \
|
|
369
|
+
--num-designs 10000 \
|
|
370
|
+
--budget 100 \
|
|
371
|
+
--wait
|
|
372
|
+
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
lint-and-test:
|
|
11
|
+
name: Lint, type-check & test
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: actions/setup-python@v5
|
|
18
|
+
with:
|
|
19
|
+
python-version: "3.11"
|
|
20
|
+
|
|
21
|
+
- name: Install dev dependencies
|
|
22
|
+
run: pip install -e ".[dev]"
|
|
23
|
+
|
|
24
|
+
- name: ruff format (check)
|
|
25
|
+
run: ruff format --check src/ tests/
|
|
26
|
+
|
|
27
|
+
- name: ruff lint
|
|
28
|
+
run: ruff check src/ tests/
|
|
29
|
+
|
|
30
|
+
- name: mypy
|
|
31
|
+
run: mypy src/phi/
|
|
32
|
+
|
|
33
|
+
- name: pytest
|
|
34
|
+
run: pytest --tb=short
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*.*.*"
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write # required for OIDC trusted publishing
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
# ── 1. Build ──────────────────────────────────────────────────────────────────
|
|
14
|
+
build:
|
|
15
|
+
name: Build distribution
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
|
|
20
|
+
- uses: actions/setup-python@v5
|
|
21
|
+
with:
|
|
22
|
+
python-version: "3.11"
|
|
23
|
+
|
|
24
|
+
- name: Install Hatch
|
|
25
|
+
run: pip install hatch
|
|
26
|
+
|
|
27
|
+
- name: Build wheel and sdist
|
|
28
|
+
run: hatch build
|
|
29
|
+
|
|
30
|
+
- name: Upload build artifacts
|
|
31
|
+
uses: actions/upload-artifact@v4
|
|
32
|
+
with:
|
|
33
|
+
name: dist
|
|
34
|
+
path: dist/
|
|
35
|
+
|
|
36
|
+
# ── 2. Publish to TestPyPI (automatic) ────────────────────────────────────────
|
|
37
|
+
publish-testpypi:
|
|
38
|
+
name: Publish to TestPyPI
|
|
39
|
+
needs: build
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
environment:
|
|
42
|
+
name: testpypi
|
|
43
|
+
url: https://test.pypi.org/p/dyno-phi
|
|
44
|
+
steps:
|
|
45
|
+
- name: Download build artifacts
|
|
46
|
+
uses: actions/download-artifact@v4
|
|
47
|
+
with:
|
|
48
|
+
name: dist
|
|
49
|
+
path: dist/
|
|
50
|
+
|
|
51
|
+
- name: Publish to TestPyPI
|
|
52
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
53
|
+
with:
|
|
54
|
+
repository-url: https://test.pypi.org/legacy/
|
|
55
|
+
|
|
56
|
+
# ── 3. Publish to PyPI (requires manual approval) ─────────────────────────────
|
|
57
|
+
publish-pypi:
|
|
58
|
+
name: Publish to PyPI
|
|
59
|
+
needs: publish-testpypi
|
|
60
|
+
runs-on: ubuntu-latest
|
|
61
|
+
environment:
|
|
62
|
+
name: pypi
|
|
63
|
+
url: https://pypi.org/p/dyno-phi
|
|
64
|
+
steps:
|
|
65
|
+
- name: Download build artifacts
|
|
66
|
+
uses: actions/download-artifact@v4
|
|
67
|
+
with:
|
|
68
|
+
name: dist
|
|
69
|
+
path: dist/
|
|
70
|
+
|
|
71
|
+
- name: Publish to PyPI
|
|
72
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Python
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*.pyo
|
|
5
|
+
*.pyd
|
|
6
|
+
.Python
|
|
7
|
+
*.egg
|
|
8
|
+
*.egg-info/
|
|
9
|
+
dist/
|
|
10
|
+
build/
|
|
11
|
+
.eggs/
|
|
12
|
+
*.whl
|
|
13
|
+
.venv/
|
|
14
|
+
venv/
|
|
15
|
+
env/
|
|
16
|
+
|
|
17
|
+
# Type checking
|
|
18
|
+
.mypy_cache/
|
|
19
|
+
|
|
20
|
+
# Testing
|
|
21
|
+
.pytest_cache/
|
|
22
|
+
.coverage
|
|
23
|
+
htmlcov/
|
|
24
|
+
|
|
25
|
+
# Phi runtime state
|
|
26
|
+
.phi/
|
|
27
|
+
.phi-state.json
|
|
28
|
+
results/
|
|
29
|
+
research.md
|
|
30
|
+
|
|
31
|
+
# Credentials
|
|
32
|
+
service-account.json
|
|
33
|
+
*.json.key
|
|
34
|
+
.env
|
|
35
|
+
.env.*
|
|
36
|
+
!.env.example
|
|
37
|
+
|
|
38
|
+
# Modal
|
|
39
|
+
.modal/
|
|
40
|
+
|
|
41
|
+
# Cursor docs (local only)
|
|
42
|
+
docs/
|
|
43
|
+
|
|
44
|
+
# IDE
|
|
45
|
+
.idea/
|
|
46
|
+
.vscode/
|
|
47
|
+
*.swp
|
|
48
|
+
*.swo
|
|
49
|
+
.DS_Store
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.8.6
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
types_or: [python, pyi]
|
|
8
|
+
- id: ruff-format
|
|
9
|
+
types_or: [python, pyi]
|
|
10
|
+
|
|
11
|
+
- repo: https://github.com/pre-commit/mirrors-mypy
|
|
12
|
+
rev: v1.13.0
|
|
13
|
+
hooks:
|
|
14
|
+
- id: mypy
|
|
15
|
+
args: [src/phi/]
|
|
16
|
+
pass_filenames: false
|
|
17
|
+
additional_dependencies: []
|
|
18
|
+
stages: [pre-push]
|
|
19
|
+
|
|
20
|
+
- repo: local
|
|
21
|
+
hooks:
|
|
22
|
+
- id: pytest
|
|
23
|
+
name: pytest
|
|
24
|
+
entry: pytest --tb=short -q
|
|
25
|
+
language: system
|
|
26
|
+
pass_filenames: false
|
|
27
|
+
stages: [pre-push]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [Unreleased]
|
|
9
|
+
|
|
10
|
+
## [0.1.0] - 2024-03-01
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- Initial public release of the `phi` CLI
|
|
14
|
+
- `phi upload` — upload PDB/CIF files or a directory as a dataset
|
|
15
|
+
- `phi fetch` — fetch a structure from RCSB PDB or AlphaFold DB
|
|
16
|
+
- `phi datasets` / `phi dataset` — list and inspect datasets
|
|
17
|
+
- `phi use` — set the active dataset (cached to `.phi-state.json`)
|
|
18
|
+
- `phi design` (`rfdiffusion3`) — backbone diffusion via RFDiffusion3
|
|
19
|
+
- `phi boltzgen` — all-atom binder design via BoltzGen
|
|
20
|
+
- `phi folding` (`esmfold`) — single-sequence structure prediction
|
|
21
|
+
- `phi complex_folding` (`alphafold`) — multi-chain complex prediction
|
|
22
|
+
- `phi inverse_folding` (`proteinmpnn`) — sequence design via inverse folding
|
|
23
|
+
- `phi esm2` — ESM2 sequence embeddings and scoring
|
|
24
|
+
- `phi boltz` — Boltz-1 structure prediction
|
|
25
|
+
- `phi filter` — full quality-control pipeline with configurable thresholds
|
|
26
|
+
- `phi status` / `phi jobs` / `phi logs` / `phi cancel` — job management
|
|
27
|
+
- `phi scores` — display scored results table
|
|
28
|
+
- `phi download` — download job artifacts (structures, scores, raw JSONs)
|
|
29
|
+
- `phi research` — research query against the platform
|
|
30
|
+
- `phi notes` — manage dataset research notes
|
|
31
|
+
- `biomodals/` — Modal GPU apps for AlphaFold2, ESMFold, ProteinMPNN, Boltz,
|
|
32
|
+
BoltzGen, BindCraft, Chai-1, RFdiffusion3, RF3, LigandMPNN, AF2Rank, RSO,
|
|
33
|
+
TM-score, structure alignment
|
|
34
|
+
- Claude Code skill (`skills/phi/SKILL.md`)
|