OkayBoboLi commited on
Commit
06cc59e
Β·
verified Β·
1 Parent(s): 1154823

Move the PDC release into CupOFMoCA-PDC/

Browse files

Reorganise the repository into one folder per conjugate modality so the PROTAC release can sit beside the PDC one under the same citation URL.

Checkpoints are copied server-side rather than re-uploaded. .gitattributes stays at the root so its LFS rules apply to both trees.

This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. .gitattributes +1 -0
  2. CITATION.cff β†’ CupOFMoCA-PDC/CITATION.cff +0 -0
  3. LICENSE β†’ CupOFMoCA-PDC/LICENSE +0 -0
  4. NOTICE β†’ CupOFMoCA-PDC/NOTICE +0 -0
  5. CupOFMoCA-PDC/README.md +228 -0
  6. {assets β†’ CupOFMoCA-PDC/assets}/CupOFMoCA.gif +0 -0
  7. {checkpoints β†’ CupOFMoCA-PDC/checkpoints}/PepReDi_base.pt +0 -0
  8. {checkpoints β†’ CupOFMoCA-PDC/checkpoints}/SMILESReDi_base.ckpt +0 -0
  9. {checkpoints β†’ CupOFMoCA-PDC/checkpoints}/UAAReDi_base.pt +0 -0
  10. {configs β†’ CupOFMoCA-PDC/configs}/paper.json +0 -0
  11. {configs β†’ CupOFMoCA-PDC/configs}/targets.fasta +0 -0
  12. {docs β†’ CupOFMoCA-PDC/docs}/ARTIFACTS.md +0 -0
  13. {docs β†’ CupOFMoCA-PDC/docs}/artifacts.json +0 -0
  14. environment.yml β†’ CupOFMoCA-PDC/environment.yml +0 -0
  15. requirements.txt β†’ CupOFMoCA-PDC/requirements.txt +0 -0
  16. {scripts β†’ CupOFMoCA-PDC/scripts}/run_experiment.py +0 -0
  17. {scripts β†’ CupOFMoCA-PDC/scripts}/verify_release.py +0 -0
  18. {smiles β†’ CupOFMoCA-PDC/smiles}/__init__.py +0 -0
  19. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/AoaDau.py +0 -0
  20. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/CptFactory.py +0 -0
  21. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSEBSN38.py +0 -0
  22. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSECCpt.py +0 -0
  23. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSEPSN38.py +0 -0
  24. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSPACpt.py +0 -0
  25. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSPASN38.py +0 -0
  26. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DauFactory.py +0 -0
  27. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/GlutarylDau.py +0 -0
  28. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/MalHexCpt.py +0 -0
  29. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/SN38Factory.py +0 -0
  30. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/SSCpt.py +0 -0
  31. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/ValAlaDau.py +0 -0
  32. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/ValCitDau.py +0 -0
  33. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/VcMMAE.py +0 -0
  34. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/__init__.py +0 -0
  35. {smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/pdc_builder.py +0 -0
  36. {smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/__init__.py +0 -0
  37. {smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/metrics.py +0 -0
  38. {smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/pdc_analyzer.py +0 -0
  39. {smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/peptide_analyzer.py +0 -0
  40. {smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/run_metrics.py +0 -0
  41. {smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/run_metrics_uaa.py +0 -0
  42. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/__init__.py +0 -0
  43. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_guided.py +0 -0
  44. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_guided_aa.py +0 -0
  45. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_guided_uaa.py +0 -0
  46. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_staged.py +0 -0
  47. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_staged_aa.py +0 -0
  48. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_staged_uaa.py +0 -0
  49. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/guided.py +0 -0
  50. {smiles β†’ CupOFMoCA-PDC/smiles}/generation/guided_aa.py +0 -0
.gitattributes CHANGED
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  assets/CupOFMoCA.gif filter=lfs diff=lfs merge=lfs -text
 
 
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
  assets/CupOFMoCA.gif filter=lfs diff=lfs merge=lfs -text
37
+ CupOFMoCA-PDC/assets/CupOFMoCA.gif filter=lfs diff=lfs merge=lfs -text
CITATION.cff β†’ CupOFMoCA-PDC/CITATION.cff RENAMED
File without changes
LICENSE β†’ CupOFMoCA-PDC/LICENSE RENAMED
File without changes
NOTICE β†’ CupOFMoCA-PDC/NOTICE RENAMED
File without changes
CupOFMoCA-PDC/README.md ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: pytorch
4
+ tags:
5
+ - chemistry
6
+ - drug-discovery
7
+ - molecular-generation
8
+ - peptide
9
+ - discrete-flow
10
+ - peptide-drug-conjugate
11
+ ---
12
+
13
+ # CupOFMoCA
14
+
15
+ Code and PDC model artifacts for **CupOFMoCA: Coupled Objective-Guided Discrete Flows for
16
+ Molecular Conjugate Assembly** (NeurIPS 2026).
17
+
18
+ CupOFMoCA performs coupled, objective-guided discrete-flow generation while enforcing chemical
19
+ assembly constraints. This release supports the paper's peptide-drug conjugate (PDC) experiments
20
+ across SMILES, natural amino-acid (AA), and unnatural amino-acid (UAA) representations.
21
+
22
+ ## Model overview
23
+
24
+ ![CupOFMoCA overview](assets/CupOFMoCA.gif)
25
+
26
+ CupOFMoCA is a research pipeline for generating peptide-drug conjugate candidates. It couples a
27
+ pretrained discrete-flow generator with property guidance and conjugation-validity checks during
28
+ sampling. This repository contains three generator checkpoints and the property scorers used by the
29
+ released PDC pipeline:
30
+
31
+ | Checkpoint | Representation | Role |
32
+ |---|---|---|
33
+ | `SMILESReDi_base.ckpt` | peptide SMILES | pretrained SMILES discrete-flow generator |
34
+ | `PepReDi_base.pt` | canonical amino acids | pretrained AA discrete-flow generator |
35
+ | `UAAReDi_base.pt` | extended amino-acid vocabulary | pretrained UAA discrete-flow generator |
36
+
37
+ The checkpoints are loaded by the repository's custom PyTorch code; this is not a Transformers
38
+ pipeline and does not provide a hosted-inference widget.
39
+
40
+ ### Intended uses
41
+
42
+ - Reproduce and inspect the paper's PDC generation experiments.
43
+ - Generate computational PDC candidates for research and method development.
44
+ - Extend or compare constrained, multi-objective molecular-generation methods.
45
+
46
+ The release is not intended for clinical decisions, direct therapeutic use, or as a substitute for
47
+ chemical synthesis, experimental validation, toxicology, or safety assessment.
48
+
49
+ ### Training data
50
+
51
+ - **AA-PepReDi:** peptides from PepNN and BioLip2, together with 6--49-residue sequences from
52
+ PPIRef, using an 80:10:10 train/validation/test split.
53
+ - **UAA-PepReDi:** 150,000 synthetic sequences constructed with `p2smi` across combinations of
54
+ non-canonical and D-amino-acid composition, using an 80:10:10 split.
55
+ - **SMILESReDi:** the released pretrained SMILESReDi weights are used without additional
56
+ CupOFMoCA fine-tuning.
57
+
58
+ Architecture, optimization, data construction, and scorer details are reported in Appendix E of
59
+ the paper. Training datasets are not redistributed in this repository.
60
+
61
+ ### Evaluation
62
+
63
+ The paper evaluates generated PDCs for assembly validity and predicted functional properties across
64
+ ERBB2, GNRHR, and NRP1, using SMILES, AA, and UAA representations. The reported results and
65
+ experimental protocol are in the paper; the submitted evaluation routines are included under
66
+ `smiles/evaluation/`.
67
+
68
+ ### Limitations
69
+
70
+ - Outputs and objective values are computational predictions, not experimentally validated
71
+ compounds or guarantees of efficacy, synthesizability, toxicity, or safety.
72
+ - The released configurations cover three receptor targets and fixed target-specific conjugation
73
+ chemistries; performance outside this scope has not been established.
74
+ - The release contains the paper's PDC stack only. Its PROTAC experiments require separate code and
75
+ artifacts.
76
+ - Results can vary with hardware, CUDA/PyTorch versions, and revisions of models downloaded at
77
+ runtime.
78
+
79
+ ## Repository layout
80
+
81
+ ```text
82
+ checkpoints/ generator weights
83
+ configs/ paper settings and target sequences
84
+ docs/ model-artifact details and checksums
85
+ scripts/run_experiment.py unified experiment runner
86
+ scripts/verify_release.py release integrity checker
87
+ smiles/
88
+ generation/ generation entry points
89
+ evaluation/ metrics and analyzers
90
+ models/ ReDi model and data code
91
+ conjugation/ PDC assembly builders
92
+ scoring/ property scorers
93
+ smiles_tokenizer/ tokenizer code and vocabulary
94
+ third_party/ peptide-to-SMILES conversion helper
95
+ ```
96
+
97
+ The release currently covers the PDC implementation. The PROTAC experiments described in the paper
98
+ use a separate code and artifact stack that is not included here.
99
+
100
+ ## 1. Environment
101
+
102
+ A CUDA GPU is strongly recommended. The tested environment used Python 3.9, PyTorch 2.5.1, and
103
+ CUDA 12.1.
104
+
105
+ ```bash
106
+ conda env create -f environment.yml
107
+ conda activate cupofmoca
108
+ ```
109
+
110
+ Alternatively, install a PyTorch build appropriate for your CUDA driver and then install the pinned
111
+ packages:
112
+
113
+ ```bash
114
+ pip install -r requirements.txt
115
+ ```
116
+
117
+ On first use, Transformers downloads `facebook/esm2_t33_650M_UR50D` and
118
+ `aaronfeller/PeptideCLM-23M-all` from Hugging Face. Set `HF_HOME` to a persistent cache if needed.
119
+
120
+ Verify the bundled artifacts and source paths before running an experiment:
121
+
122
+ ```bash
123
+ python scripts/verify_release.py
124
+ ```
125
+
126
+ ## 2. Run PDC generation
127
+
128
+ Run commands from the repository root. Preview a configured command without loading models:
129
+
130
+ ```bash
131
+ python scripts/run_experiment.py \
132
+ --representation uaa \
133
+ --variant cupofmoca \
134
+ --method guided \
135
+ --target NRP1 \
136
+ --dry-run
137
+ ```
138
+
139
+ Run the experiment:
140
+
141
+ ```bash
142
+ python scripts/run_experiment.py \
143
+ --representation uaa \
144
+ --variant cupofmoca \
145
+ --method guided \
146
+ --target NRP1
147
+ ```
148
+
149
+ Run a small smoke test:
150
+
151
+ ```bash
152
+ python scripts/run_experiment.py \
153
+ --representation aa --variant baseline --method staged --target ERBB2 \
154
+ --num-candidates 1
155
+ ```
156
+
157
+ Outputs are written under `outputs/` in separate run directories. Existing outputs are protected
158
+ unless `--force` is supplied. Arguments after `--` are passed to the underlying generator:
159
+
160
+ ```bash
161
+ python scripts/run_experiment.py \
162
+ --representation smiles --variant cupofmoca --method guided --target GNRHR \
163
+ -- --top_k 100
164
+ ```
165
+
166
+ ### Configurations
167
+
168
+ | Target | Protein | Conjugation builder | Default SMILES length |
169
+ |---|---|---|---:|
170
+ | ERBB2 | receptor tyrosine-protein kinase erbB-2 | `SSCpt` | 80 |
171
+ | GNRHR | gonadotropin-releasing hormone receptor | `AoaDau` | 80 |
172
+ | NRP1 | neuropilin-1 | `DSPASN38` | 100 |
173
+
174
+ AA and UAA runs use length 10. Shared settings include 128 optimization steps, top-p 1.0,
175
+ objective weights `[1, 1]`, and acceptance sampling with beta 50 for CupOFMoCA. The machine-readable
176
+ configuration is in `configs/paper.json`; target sequences are in `configs/targets.fasta`.
177
+
178
+ ### Direct entry points
179
+
180
+ The full argument surfaces remain available under `smiles/generation/`:
181
+
182
+ ```text
183
+ guided.py cupofmoca_guided.py
184
+ guided_aa.py cupofmoca_guided_aa.py
185
+ guided_uaa.py cupofmoca_guided_uaa.py
186
+ staged.py cupofmoca_staged.py
187
+ staged_aa.py cupofmoca_staged_aa.py
188
+ staged_uaa.py cupofmoca_staged_uaa.py
189
+ ```
190
+
191
+ Run one directly as a module, for example:
192
+
193
+ ```bash
194
+ python -m smiles.generation.cupofmoca_guided_uaa --help
195
+ ```
196
+
197
+ `smiles/evaluation/run_metrics.py` and `smiles/evaluation/run_metrics_uaa.py` contain the submitted evaluation routines.
198
+ Use `python <file> --help` to inspect their arguments.
199
+
200
+ ## 3. Included checkpoints
201
+
202
+ The release includes the SMILES, AA, and UAA generator weights together with the binding,
203
+ hemolysis, non-fouling, and solubility scorers needed by the PDC pipeline. Artifact roles, sizes, and
204
+ SHA-256 values are listed in [docs/ARTIFACTS.md](docs/ARTIFACTS.md).
205
+
206
+ The AA-input affinity predictor is not included because the PDC generation configuration uses the
207
+ bundled SMILES-input scorer (`--affinity_type smiles`).
208
+
209
+ Large `*.pt` and `*.ckpt` files are configured for Git LFS. The repository is approximately 1.9 GB
210
+ before environment and model-cache downloads.
211
+
212
+ The checkpoint formats are loaded through PyTorch. As with any pickle-backed PyTorch artifact,
213
+ only load weights obtained from a source you trust.
214
+
215
+ ## 4. Notes
216
+
217
+ - The paper reports NVIDIA RTX A6000 48 GB GPUs. Lower-memory devices may require smaller batches.
218
+ - Exact bitwise output can vary across CUDA, PyTorch, GPU, and downloaded model revisions.
219
+ - Generated structures are computational hypotheses that require experimental validation. Property
220
+ models are predictors, not clinical or safety guarantees.
221
+ - The peptide-to-SMILES helper used by the experiments is vendored under `third_party/` with its
222
+ upstream license notice.
223
+
224
+ ## 5. Citation and license
225
+
226
+ Citation metadata is provided in `CITATION.cff`. The repository code is released under Apache-2.0;
227
+ see `LICENSE` and `NOTICE`. Third-party components and downloaded model artifacts retain their
228
+ respective terms.
{assets β†’ CupOFMoCA-PDC/assets}/CupOFMoCA.gif RENAMED
File without changes
{checkpoints β†’ CupOFMoCA-PDC/checkpoints}/PepReDi_base.pt RENAMED
File without changes
{checkpoints β†’ CupOFMoCA-PDC/checkpoints}/SMILESReDi_base.ckpt RENAMED
File without changes
{checkpoints β†’ CupOFMoCA-PDC/checkpoints}/UAAReDi_base.pt RENAMED
File without changes
{configs β†’ CupOFMoCA-PDC/configs}/paper.json RENAMED
File without changes
{configs β†’ CupOFMoCA-PDC/configs}/targets.fasta RENAMED
File without changes
{docs β†’ CupOFMoCA-PDC/docs}/ARTIFACTS.md RENAMED
File without changes
{docs β†’ CupOFMoCA-PDC/docs}/artifacts.json RENAMED
File without changes
environment.yml β†’ CupOFMoCA-PDC/environment.yml RENAMED
File without changes
requirements.txt β†’ CupOFMoCA-PDC/requirements.txt RENAMED
File without changes
{scripts β†’ CupOFMoCA-PDC/scripts}/run_experiment.py RENAMED
File without changes
{scripts β†’ CupOFMoCA-PDC/scripts}/verify_release.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/__init__.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/AoaDau.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/CptFactory.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSEBSN38.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSECCpt.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSEPSN38.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSPACpt.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DSPASN38.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/DauFactory.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/GlutarylDau.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/MalHexCpt.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/SN38Factory.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/SSCpt.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/ValAlaDau.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/ValCitDau.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/VcMMAE.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/__init__.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/conjugation/pdc_builder.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/__init__.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/metrics.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/pdc_analyzer.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/peptide_analyzer.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/run_metrics.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/evaluation/run_metrics_uaa.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/__init__.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_guided.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_guided_aa.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_guided_uaa.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_staged.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_staged_aa.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/cupofmoca_staged_uaa.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/guided.py RENAMED
File without changes
{smiles β†’ CupOFMoCA-PDC/smiles}/generation/guided_aa.py RENAMED
File without changes