Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
f6bcf9b
[CODE] Fix dependency
MarkAStevens04 May 12, 2026
7afd7f1
Add docking pre-processing pipeline, inference, and run scripts
MarkAStevens04 Jun 18, 2026
106a4e6
Add 6TD3/CR8 glue docking oracle + 5HXB cross-system comparison
MarkAStevens04 Jun 18, 2026
468fcc6
Clean up pre-processing into a concise, documented pipeline
MarkAStevens04 Jun 18, 2026
2fbdfb4
Remove Vina-GPU build cruft and Miniconda installer
MarkAStevens04 Jun 18, 2026
010aeba
Merge pull request #1 from MarkAStevens04/docking-6td3-cross-system
MarkAStevens04 Jun 18, 2026
14d4878
Create settings.local.json
MarkAStevens04 Jun 23, 2026
e0a0de1
Merge branch 'main' of https://github.com/MarkAStevens04/RGFN-Fork-v1
MarkAStevens04 Jun 23, 2026
c173972
Migrate experiment logs 001-004 to two-layer format
MarkAStevens04 Jun 23, 2026
0c3f154
Add Tier 2 Vina ROC/PR discrimination curves (entry 005)
MarkAStevens04 Jun 23, 2026
5d1712e
Fill commit hash in experiment log 005
MarkAStevens04 Jun 23, 2026
9ce2bc7
[CODE] Add template, modify experiment 005
MarkAStevens04 Jun 23, 2026
7ebcc62
[REFACTOR] Separate upstream RGFN from our work via glue/ package
MarkAStevens04 Jun 24, 2026
34ef45d
Merge pull request #2 from MarkAStevens04/refactor/glue-package-struc…
MarkAStevens04 Jun 24, 2026
dee8532
[DOCS] Project structure & pubs
MarkAStevens04 Jun 24, 2026
4c2a289
[DOCS] Rewrite Research context & README in references
MarkAStevens04 Jun 24, 2026
a7c672a
[DOCS] Faithfully reconstruct loop
MarkAStevens04 Jun 24, 2026
5ed2265
[DOCS] Correct goal misunderstandings
MarkAStevens04 Jun 24, 2026
1c54a01
[DOCS] Remove template
MarkAStevens04 Jun 24, 2026
a3d21c1
[DOCS] Remove 000 Template
MarkAStevens04 Jun 24, 2026
f418de8
[CODE] Mock Active Learning Loop (no balam)
MarkAStevens04 Jun 25, 2026
c723fcb
[CODE] Little determination of CNN vs Vina scoring on Tier 1 vs Tier …
MarkAStevens04 Jun 25, 2026
5633939
[docs] update commit in logs
MarkAStevens04 Jun 25, 2026
13cf8b6
[CODE] MW Matched Decoys and corrected active learning oracle
MarkAStevens04 Jun 25, 2026
57efb27
[DOCS] Update research context w/ objectives
MarkAStevens04 Jun 25, 2026
ca6253d
[DOCS] Merge redundant README into RESEARCH_CONTEXT.md
MarkAStevens04 Jun 25, 2026
492b2d1
[CODE] Active Learning & prepare cnn re-pose experiment
MarkAStevens04 Jun 25, 2026
4d9d038
[CODE] Submitted pose selection ablation job
MarkAStevens04 Jun 26, 2026
556a466
prep for validation workflows
MarkAStevens04 Jun 26, 2026
4f1386d
prep for validation workflows
MarkAStevens04 Jun 26, 2026
c447490
Refactor & timing
MarkAStevens04 Jun 26, 2026
e07d953
small AL loop logs
MarkAStevens04 Jun 28, 2026
d1d77f9
Active learning & GPU dock
MarkAStevens04 Jun 29, 2026
2bb720b
updated logs with correct commit numbers
MarkAStevens04 Jun 29, 2026
cdf3f78
GPU loop + FGFN loop
MarkAStevens04 Jun 30, 2026
ded1c0d
checkpoint for FGFN, RxnFlow, SCENT, AiZynthFinder, sEH
MarkAStevens04 Jun 30, 2026
08da97c
Working GPU Oracle RGFN, FGFN, RxnFlow, SCENT, AiZynthFinder
MarkAStevens04 Jul 1, 2026
d63fcc2
Working GPU Oracle RGFN, FGFN, RxnFlow, SCENT, AiZynthFinder
MarkAStevens04 Jul 1, 2026
0e5c1eb
update logs
MarkAStevens04 Jul 1, 2026
a5bca9a
Fixed reward generator
MarkAStevens04 Jul 2, 2026
ae3b087
Fin fixed-reward (pre FGFN rerun), mostly done SMALL library (RGFN st…
MarkAStevens04 Jul 3, 2026
9dd7b37
Big standard lib run w/ 400-iters, pareto front pipeline
MarkAStevens04 Jul 3, 2026
8c7c62d
traj-balance flow calculation for pareto front
MarkAStevens04 Jul 3, 2026
1b78e51
Four way standard library comparison (waiting on RGFN to finish 2 rew…
MarkAStevens04 Jul 6, 2026
133c788
many benchmarks
MarkAStevens04 Jul 7, 2026
a5a7312
SCENT Rerun code
MarkAStevens04 Jul 7, 2026
464c3a3
Initial SCENT retrain
MarkAStevens04 Jul 8, 2026
b421577
Merge pull request #3 from MarkAStevens04/GPU-Dock
MarkAStevens04 Jul 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
271 changes: 271 additions & 0 deletions .claude/settings.local.json

Large diffs are not rendered by default.

210 changes: 210 additions & 0 deletions .claude/skills/experiment-log/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,210 @@
---
name: experiment-log
description: Write structured experiment logs for research projects. Use at the START of any computational experiment (docking runs, MD simulations, oracle validation, pipeline tests, discrimination checks, compute benchmarks) to create a log stub capturing the goal and context. Use at the END of an experiment to write up the full results, file inventory, and connection to the publication. Also trigger when the user says "start a log", "log this experiment", "write up the results", "document what we did", "wrap this up", or "create an experiment entry". If you are at the conclusion of an experimental session and have results, files, and commands to document — write the log without waiting to be asked.
---

# Experiment Log Skill

Each log has two layers that serve different readers:

**Story layer** — Question, Context & Summary, Answer, Relevance to our Publication, Next Experiments. Written for a smart person who isn't an expert on this specific project. Prioritize being understandable and engaging over being technically precise. Tell the story of what happened and why it matters.

**Audit layer** — everything from `# Re-creation` onwards (Relevant Files, Relevant Versions, Relevant Resources, Method, Results). Written for reproducibility. Technical accuracy matters here. Scientific terms, file paths, and exact commands belong in this layer.

If you're unsure which layer a detail belongs in: if it helps a reader understand the experiment's purpose and outcome → Story. If it helps someone reproduce or audit the experiment → Audit.

In the story layer: stick to facts stated explicitly in the conversation or in `RESEARCH_CONTEXT.md`. Don't infer technical explanations for *why* something works or fails — just state what happened and what it means. If you're uncertain about a technical detail, leave it out rather than guessing.

---

## Step 0: Orient yourself

Read two files before writing anything:

1. **`Logs/RESEARCH_CONTEXT.md`** — the paper's central claim, current project status, what journals will want, and key terminology. This tells you what the experiment is *for*. If it doesn't exist, ask the user to describe the research context.

2. **`Logs/README.md`** — the index of past experiments. Reading it tells you what's established so you can say things like "as shown in entry 002" accurately.

---

## Step 1: Determine mode

**START mode** — experiment hasn't run yet. Create a stub.
**END mode** — experiment is complete. Fill everything in, or find a stub and complete it.

To find an existing stub: `grep -rl "\[TODO" Logs/ HistoricLogs/ 2>/dev/null`

---

## Step 2: Find the next log number

```bash
ls Logs/*.md 2>/dev/null | grep -Eo '/[0-9]+_' | grep -Eo '[0-9]+' | sort -n | tail -1
```

Increment by 1, zero-pad to 3 digits: `005`, `006`, etc. If the user specifies a different output directory (e.g., "write to HistoricLogs"), use that directory but the same numbering.

---

## Step 3: Write the log

**Filename:** `NNN_kebab-case-description.md` (3-6 words, e.g., `006_brd4-vhl-generalization-test`)

### Header

```
# [System] — [brief description]
**Date:** YYYY-MM-DD, ~[rough time, e.g., "10am"]
```

Do NOT include the log number in the title — it's already in the filename.

---

### Question

*(Story layer. Write this last if needed — it's the hardest to get right.)*

One sentence. The test: can someone skim this and immediately understand what we were trying to find out? No acronyms, no method names. Just the question.

Don't add implications or "could this also mean X?" — those belong in Context. Keep it clean.

> **Good:** "Can our scoring method tell real molecular glues apart from randomly generated molecules across multiple protein systems?"
> **Good:** "Can we use the stability of the protein complex over a short simulation to score molecular glue candidates better than a static docking score can?"
> **Avoid:** "Does the DDB1 neosubstrate differential discriminate in the 7ABC system with exhaustiveness 16, and could this replace or improve on our current oracle pipeline?"

---

### Context & Summary

*(Story layer. Explain numbers in plain terms. Name specific venues. Don't pre-explain failure scenarios.)*

Two parts:

**Context** — Why is this experiment necessary? What earlier result or open question makes this the next logical step? Reference prior log entries by number. When citing numbers from prior entries, explain what they mean in plain terms — don't assume the reader remembers. Example: "Entry 002 showed we can tell real glues from randomly generated molecules with about 78% accuracy for the CDK12-DDB1 system." Keep to 3-5 sentences.

**Summary** — What are we going to do? One short paragraph in plain English. If introducing a new control or comparison group, describe its PURPOSE ("randomly generated molecules that act as our negative control") before using a shorthand term for it. Don't explain what we'll do if things go wrong — focus on what we're trying to achieve.

---

### Answer

*(Story layer. Write this before writing Results — it forces clarity. Focus on meaning, not numbers.)*

2-3 sentences on what the results *mean*. What can we now say with confidence? What did this experiment add to our understanding? Numbers belong in Results; the interpretation belongs here.

---

### Relevance to our Publication

*(Story layer. Be specific about which venue and which reviewer concern this addresses.)*

How does this experiment help us publish? Name the specific venue (NeurIPS, Nature, etc.) and the specific thing reviewers will look for. Example: "NeurIPS reviewers will ask whether our method works beyond a single protein system — this entry answers that directly with a second validated system." One short paragraph.

---

### Next Experiments

*(Story layer. Fit everything into the publication goal. Avoid jargon — describe purpose, not method.)*

Two subsections:

**Refining for publication** — What will reviewers still want? Things that make the existing result more airtight: additional trials, cleaner figures, ablations showing a design choice is necessary. Ablation experiments belong here, not in Next Steps.

**Next steps in project** — What experiments come next in the project pipeline? Frame in terms of the publication goal: "Run RGFN with each validated oracle to show the model can generate good candidates for multiple systems."

---

### `# Re-creation`

This heading is **required** — it marks where the audit layer begins. Everything below this line is for reproducibility and auditing, not for storytelling.

---

### Relevant Files

*(Audit layer. Focus on role and narrative context — WHY this file, not just WHAT it is.)*

State the root directory once if most files share a prefix. Use these path conventions:
- `./path` — relative to the project repository root
- `/path` — absolute path outside the repository (scratch dirs, SLURM logs)
- `path` — relative to the stated root

For **scripts**: path + one-line description of what it does.

For **non-script files** (models, datasets, results): path + description that explains its role in the pipeline. Focus on WHY this file is used and what it represents in context — e.g., "CDK12 receptor alone (Tier 1), used to isolate E3-pocket binding from neosubstrate cooperativity." You don't need to hedge ("believed to contain") — just describe what the file is.

Categories (only include what applies, ordered by pipeline stage):
- **Scripts**
- **Models**
- **Datasets**
- **Results**
- **Job Logs**

---

### Relevant Versions

*(Audit layer.)*

Run:
```bash
git log --oneline -5
git status --short
```

**If relevant files are committed:** paste the most recent relevant commit hash and message.

**If relevant files are NOT yet committed:** tell the user exactly which files need to be committed, leave a `[TODO — add commit hash after pushing]` placeholder, and explicitly ask: "Can you commit the experiment files? Once you do, let me know and I'll update this section with the commit hash." Then wait — if the user confirms, update the log.

---

### Relevant Resources

*(Audit layer.)*

Sources consulted when designing or running the experiment. Two subsections:

**Sources** — papers, databases, PDB entries (with DOIs or URLs where available)

**Packages** — tools and libraries used, with the specific file(s) in this project that use them

---

### Method

*(Audit layer. Big commands only — not debugging steps or package installs.)*

Numbered steps: what was run, what it operated on, what it produced.

---

### Results

*(Audit layer. Numbers that support the Answer section. Use tables for comparisons.)*

Label clearly: n counts, metric names, units. If pulling numbers from a prior log entry (not generated in this experiment), note which entry they came from — e.g., "(from entry 002, job 69271)" — so future readers know not to re-derive them here.

---

## Step 4: Update the README index

Add one row to `Logs/README.md` (or the equivalent in the output directory):

```
| [NNN](NNN_filename.md) | YYYY-MM-DD | Brief title | One-sentence verdict |
```

The verdict should be punchy: someone skimming the index should immediately know the key finding.

---

## Quality check

- [ ] Title has no log number (it's in the filename)
- [ ] Date includes a rough time
- [ ] Question is one clean sentence, no jargon, no implications clause
- [ ] Context explains what numbers *mean*, not just what they are
- [ ] `# Re-creation` heading present
- [ ] No `[TODO]` markers in completed END-mode sections (except intentional commit-hash placeholder)
- [ ] README row added
23 changes: 23 additions & 0 deletions .claude/skills/experiment-log/evals/evals.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"skill_name": "experiment-log",
"evals": [
{
"id": 1,
"prompt": "The working directory is /Users/mark/Documents/GitHub/RGFN-Fork.\n\nWe're about to start a new experiment. We want to test whether Molecular Dynamics (MD) simulations can serve as a better oracle than docking for the CDK12-DDB1 system. The hypothesis: the *stability* of the ternary complex over a short MD trajectory (measured by interface RMSD) will correlate better with being a real glue than a single static docking score. If so, MD stability could replace or augment docking as the RGFN reward signal — potentially fixing the ceiling we hit with the CRBN system.\n\nPlease start an experiment log for this upcoming experiment. Write the log to HistoricLogs/ (not Logs/) since we're testing the skill. Reference RESEARCH_CONTEXT.md and README.md in Logs/ for project context and log numbering.",
"expected_output": "A new .md file in HistoricLogs/ with the correct header, Question section (plain-language, no jargon), and Context & Summary filled in. All post-experiment sections (Answer, Results, etc.) should have [TODO] markers. The HistoricLogs/README.md index table should be updated.",
"files": []
},
{
"id": 2,
"prompt": "The working directory is /Users/mark/Documents/GitHub/RGFN-Fork.\n\nWe just wrapped up a generalization experiment. We tested our docking oracle on two new molecular glue systems to see if it works beyond CDK12-DDB1.\n\nSystem 1: IKZF1-CRBN — CRBN E3 ligase + IKZF1 neosubstrate + IMiD-class glue lenalidomide (PDB 6H0F). IKZF1 is a zinc-finger transcription factor recruited to CRBN by IMiD drugs.\nSystem 2: BRD4-VHL — VHL E3 ligase + BRD4 BD1 domain + a small molecule glue (PDB 7Q2J).\n\nProtocol: same Tier 1/Tier 2 neosubstrate differential pipeline as entry 002. Decoys: 200 random molecules with the correct warhead for each system (glutarimide for IKZF1-CRBN, VHL-binder hydroxamate for BRD4-VHL). Scripts: pre-processing/dock_cluster_multi.py on Balam (jobs 70142 for IKZF1-CRBN, 70143 for BRD4-VHL, ~18 min each).\n\nResults:\n- IKZF1-CRBN: known (n=180) median neosubstrate differential = −1.8 kcal/mol, decoys (n=200) median = −1.6 kcal/mol. Frac < −1.5: 71% known vs 68% decoy. Near-zero discrimination. Same ceiling pattern as 5HXB/CRBN in entry 001.\n- BRD4-VHL: known (n=95) median differential = −2.4 kcal/mol, decoys (n=200) median = −0.5 kcal/mol. Frac < −1.5: 82% known vs 9% decoy. Strong 73-point discrimination gap.\n\nKey files:\n- Script: pre-processing/dock_cluster_multi.py\n- Datasets: pre-processing/test-data/IKZF1_Glues.csv, pre-processing/test-data/BRD4_VHL_Glues.csv\n- Results: pre-processing/multi_system_results_ikzf1.csv, pre-processing/multi_system_results_brd4.csv\n- SLURM logs: /scratch/markymoo/rgfn_runs/dock_multi_70142/, /scratch/markymoo/rgfn_runs/dock_multi_70143/\n\nPlease write a complete experiment log. Write to HistoricLogs/ (not Logs/). Reference RESEARCH_CONTEXT.md and README.md in Logs/ for context and numbering.",
"expected_output": "A complete .md file in HistoricLogs/ with all sections filled in: Question (plain language), Context & Summary, Answer (meaning not just numbers), Relevance to Publication (explicit connection to paper), Next Experiments (two subsections), Relevant Files (categorized), Relevant Versions (git output or placeholder), Method (numbered steps), Results (table with numbers). No [TODO] markers. README.md updated.",
"files": []
},
{
"id": 3,
"prompt": "The working directory is /Users/mark/Documents/GitHub/RGFN-Fork.\n\nThere's an in-progress experiment log at HistoricLogs/007_ablation-tier2-vs-differential.md. Please complete it with the following results.\n\nWe ran the same 160 known glues and 248 decoys from entry 002 through the existing pipeline, comparing two discrimination metrics:\n- Metric A (ablation): Tier 2 absolute Vina score only\n- Metric B (our oracle): neosubstrate differential (Tier 2 − Tier 1, same pose)\n\nResults:\n| metric | known | decoy | gap |\n|---|---|---|---|\n| Tier 2 Vina (absolute) | median −10.15 | median −7.96 | 2.19 kcal/mol |\n| frac Tier2 < −10 | 55.6% | 3.6% | 52 pts |\n| neosubstrate differential | median −2.20 | median −0.60 | 1.60 kcal/mol |\n| frac diff < −1.5 | 85.6% | 7.3% | 78 pts |\n\nBoth metrics discriminate. The differential wins on the frac < −1.5 criterion (78 pts vs 52 pts) and has a cleaner biological interpretation (it isolates glue-specific arm contact rather than total E3-pocket binding).\n\nNo new experiments were run — this analysis reused the data from entry 002 job 69271. We added a --ablation flag to pre-processing/compare_systems.py to pull both metrics from the existing results CSVs (pre-processing/docking_6td3/known_results.csv and decoy_cdk_results.csv).\n\nReference RESEARCH_CONTEXT.md and README.md in Logs/ for project context.",
"expected_output": "The existing HistoricLogs/007_ablation-tier2-vs-differential.md file is updated in place with all [TODO] sections replaced. All sections complete: Answer, Relevance to Publication, Next Experiments, Files, Versions, Method, Results. No [TODO] markers remain. README.md updated with a verdict row for entry 007.",
"files": ["HistoricLogs/007_ablation-tier2-vs-differential.md"]
}
]
}
74 changes: 72 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
scripts/
configs/grid_search/

# Reference paper PDFs — local-only (copyrighted + binary; keep repo lean).
# Cite papers via Logs/references/README.md + references.bib instead.
Logs/references/pdfs/*
!Logs/references/pdfs/.gitkeep

# Cloned upstream baseline code — installed by external/setup_*.sh, NOT vendored
# (e.g. external/gflownet for FragGFN). Keeps the setup scripts tracked, the heavy
# upstream trees out. See docs/ARCHITECTURE.md + validation/generators/README.md.
external/*/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down Expand Up @@ -160,5 +169,66 @@ cython_debug/
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/
experiments/
ignored/

# Vina-GPU-2.1 build artifacts (compiled docking oracle)
vina_workspace/
quickvina_dir

# Large installers / binaries (do not commit to git)
Miniconda3-latest-Linux-x86_64.sh
*.run

# Docking / structure data artifacts (regenerable from pre-processing scripts)
*.pdb
*.pdbqt
*.cif
*.sdf
*.csv

# superseded scaffold library (large; not part of the curated pipeline)
data/validation-molecules/Enamine_CRBN_Molecular_Glue_Library_*.smiles

# Docking run outputs (regenerable; written by the experiments/ docking scripts)
cluster_out/
cluster_out_crbn/
experiments/**/cluster_out*/

# Model checkpoints / weights (large; document provenance in data/models/README.md)
data/models/**/*.ckpt
data/models/**/*.pt
data/models/**/*.pth

# AiZynthFinder public dataset (templates/policy/stock; large, fetched by
# external/setup_aizynthfinder.sh via download_public_data — never commit)
data/models/aizynthfinder/

# RxnFlow building-block environment (fingerprints/masks/descriptors + block list;
# large, generated/fetched by external/setup_rxnflow.sh — never commit)
data/models/rxnflow_env/

# Weights & Biases run output (generated locally; includes broken latest-run symlink)
wandb/

# Generated synthetic datasets (keep the dir + docs, ignore the generated outputs)
data/synthetic/*
!data/synthetic/README.md
!data/synthetic/.gitkeep

# Curated validation-molecule inputs (override the global *.csv ignore above)
!data/validation-molecules/*.csv

# violin plots (regenerable)
experiments/ablations/sixway/violins_known_vs_decoy.png

# --- experiments/: one committed dir per run/experiment (code + seeds + small
# results), grouped by type {active_learning, oracle_validation, ablations}. Run
# OUTPUTS — timestamped run dirs (YYYY-MM-DD_*) and everything under them
# (checkpoints, logs, modes, per-round CSVs) — are regenerable and ignored by
# pattern; all committed code/seeds/results outside them stay tracked. ---
experiments/**/[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]_*/
# committed seed + result CSVs sit directly in a run dir (override the global *.csv ignore)
!experiments/**/seed_*.csv
!experiments/**/*_results.csv

oracle/drd2_current.pkl
Loading