Code, analysis plan and result tables for Free Alignment: What Determines Similarity Between Untrained Geometric Networks of Protein-Ligand Complexes. The study measures the representational similarity of untrained geometric networks of protein-ligand complexes (random-network sweep, input-feature kernels, input ablations, probe panel). A version of this work is under review at the UniReps workshop at NeurIPS.
| Path | Content |
|---|---|
findings/ |
analysis scripts (a1 sweep, a3 regression on setting-level scores, a4 ablations, a5_a7 real untrained networks, b0/b_probe_panel probes, c3 output agreement) and shared helpers |
findings/plan/ |
analysis plan (findings_plan.yaml) |
findings/tests/ |
tests and an end-to-end run on synthetic data |
findings_out/ |
result tables (res_*.tsv), targets_meta.json |
results/ |
residualization_r2.json, the output of the subspace projection |
logs/ |
stdout of the run stages |
paper_analysis/ |
analysis.py and analysis2.py recompute every number, table and figure of the paper from findings_out/ |
src/, config/, gpu_runs/, notebooks/, docking/, data/ |
reference-model pipeline, docking and supporting inputs (below) |
findings/lock_freeze.py records checksums of the analysis plan and of the analysis code, and the result-producing
scripts check them before they run. Run order:
python3 findings/lock_freeze.py lock
python3 findings/build_graphs.py && python3 findings/input_kernels.py && python3 findings/b0_make_targets.py
python3 findings/lock_freeze.py freeze
for s in a1_floor_sweep a4_ablation a3_floor_model a5_a7_real_untrained b_probe_panel c3_output_agreement; do
python3 findings/$s.py; done
All scripts read PROJECT_ROOT (default: current directory).
- PDBbind v2020 structures (
PDBbind_2020/) and the LP-PDBBind split, obtained from their original sources under their own terms of use. No structure files are redistributed (targets.tsvandkernels.npzare regenerated byb0_make_targets.pyandinput_kernels.py). - Embeddings and checkpoints of the trained and untrained reference models (
data/embeddings/,data/checkpoints/) and the split, cluster and covariate tables (data/). They are produced by the pipeline below and are large, so they are not included.data/docking_results.tsvholds the raw per-complex docking output (identifiers and numeric results only), and itspidcolumn is the list of docked test complexes.
src/holds the similarity library (alignlib.py), the configuration checksum helper (prereg.py), seeds and embedding helpers.config/holds the reference-model configuration and its checksum file. Paths inconfig.yamlfollow a Colab and Google Drive layout and should be set to your project root.gpu_runs/builds clusters, covariates and input kernels and runs the second-seed and untrained-initialisation extractions.notebooks/trains and extracts the reference models:notebook_2a_egnn_distancegnn.ipynb(EGNN and Distance-GNN, model classes insrc/embed_utils.py) and the voxel-CNN notebooks 2b and 2c (.pyand.ipynb).docking/holds the docking preparation (dockprep.py,prepladder.py) and runner (dockrun.py).
docking/dockrun.py is the docking runner (fixed preparation ladder, AutoDock Vina 1.2.7, crystal-referenced RMSD,
one result file per complex). It imports dockprep.py, prepladder.py and src/prereg.py, and reads a queue table
listing the complexes to dock.
docking/make_vina_results.pyturnsdata/docking_results.tsvintologs/vina_results.json, anddocking/docking_agreement.pycomputes the partial Spearman correlation of each model's predicted affinity with the negated Vina score given ligand heavy-atom count (protein-cluster bootstrap), together with the correlation of the Vina score with measured affinity and size, intologs/docking_agreement.json.gpu_runs/run_residualization_r2.pyprojects the ligand-fingerprint and pocket amino-acid-composition reference directions out of each embedding and records the CKA change and the variance share. Its output isresults/residualization_r2.json, which holds the numbers reported in the paper.
python3 findings/b0_make_targets.py # needs PDBbind, writes findings_out/targets.tsv
REFERENCE_LOGS=<dir with h1_results.json, performance_table.json, embedding_health_2a.json> \
python3 -I paper_analysis/analysis.py
python3 -I paper_analysis/analysis2.py
Outputs go to paper_analysis/generated/ (override with PAPER_OUT). With the result tables in findings_out/
these scripts reproduce the paper's numbers.json, numbers2.json and tables.
See requirements.txt. The sweep forward passes are NumPy float32 re-implementations, so the exact random
weights can depend on the NumPy version.
PDBbind and LP-PDBBind are used under their own terms of use. Only per-complex identifiers and numeric results are included in this repository.