Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- configs/demo_mdm2.yaml +35 -0
- configs/epsilon_regret_benchmark.yaml +64 -0
- configs/experimental_benchmark.yaml +72 -0
- configs/experimental_benchmark_single_library.yaml +73 -0
- configs/overnight_stop_model.yaml +175 -0
- configs/ppi_sanity_check.yaml +24 -0
- configs/smoke_test.yaml +39 -0
- libs/.DS_Store +0 -0
- libs/__init__.py +1 -0
- results/.DS_Store +0 -0
- results/backend_comparison_summary.csv +3 -0
- results/backend_integration_report.md +28 -0
- results/backend_self_audit.md +6 -0
- results/backend_validation_report.md +79 -0
- results/disk_cleanup_actions.md +32 -0
- results/disk_guard_report.md +6 -0
- results/disk_usage_before_after.csv +168 -0
- results/epsilon_regret_cleanup_plan.md +5 -0
- results/final_optimization_report.md +26 -0
- results/final_self_audit_report.md +12 -0
- results/ppi_benchmark_repair_audit.md +37 -0
- results/ppi_repair_self_audit.md +28 -0
- results/prelim_refresh_cleanup.log +7 -0
- results/prelim_three_sets_manifest_run.json +32 -0
- results/project_synthesis_figures_index.md +65 -0
- results/project_synthesis_report.md +31 -0
- results/project_synthesis_report_overnight_updated.md +50 -0
- results/project_synthesis_report_updated.md +40 -0
- results/project_synthesis_tables.csv +59 -0
- results/stage1_code_unification_summary.md +15 -0
- results/stage2_cleanup_summary.md +10 -0
- results/stage3_ppi_summary.md +7 -0
- results/stage4_discovery_benchmark_summary.md +116 -0
- tests/__init__.py +1 -0
- tests/test_backend_comparison_semantics.py +39 -0
- tests/test_backend_diagnostic_logic.py +108 -0
- tests/test_benchmark_outputs.py +44 -0
- tests/test_budget_efficiency_helpers.py +148 -0
- tests/test_cleanup_logic.py +31 -0
- tests/test_clustering.py +28 -0
- tests/test_dataset_reuse_logic.py +34 -0
- tests/test_disk_guard.py +54 -0
- tests/test_docking_mode_filter.py +46 -0
- tests/test_epsilon_regret_logic.py +82 -0
- tests/test_feature_extraction.py +58 -0
- tests/test_haddock_backend.py +43 -0
- tests/test_large_plot_outputs.py +97 -0
- tests/test_missing_features.py +38 -0
- tests/test_model_masking.py +51 -0
- tests/test_multifidelity_controls.py +63 -0
configs/demo_mdm2.yaml
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
run:
|
| 2 |
+
name: demo_mdm2
|
| 3 |
+
output_dir: results/demo_run
|
| 4 |
+
max_batches: 6
|
| 5 |
+
random_seed: 42
|
| 6 |
+
|
| 7 |
+
data:
|
| 8 |
+
target_id: mdm2
|
| 9 |
+
target_path: data/targets/mdm2_1ycr_excerpt.pdb
|
| 10 |
+
ligand_table: data/ligands/mdm2_ligands_demo.csv
|
| 11 |
+
benchmark_metadata: data/benchmarks/mdm2_demo_metadata.json
|
| 12 |
+
|
| 13 |
+
backend:
|
| 14 |
+
type: rdock
|
| 15 |
+
allow_mock_if_missing: false
|
| 16 |
+
require_real_backend: true
|
| 17 |
+
n_runs: 5
|
| 18 |
+
mapper_radius: 6.0
|
| 19 |
+
|
| 20 |
+
encoding:
|
| 21 |
+
fingerprint_radius: 2
|
| 22 |
+
fingerprint_bits: 1024
|
| 23 |
+
generate_3d: true
|
| 24 |
+
|
| 25 |
+
clustering:
|
| 26 |
+
butina_cutoff: 0.35
|
| 27 |
+
n_hyperclusters: 4
|
| 28 |
+
|
| 29 |
+
scheduler:
|
| 30 |
+
batch_size: 8
|
| 31 |
+
init_coverage_fraction: 0.25
|
| 32 |
+
conservative_deprioritize: true
|
| 33 |
+
|
| 34 |
+
scoring:
|
| 35 |
+
interface_weight: 1.0
|
configs/epsilon_regret_benchmark.yaml
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
run:
|
| 2 |
+
name: epsilon_regret_benchmark
|
| 3 |
+
output_dir: results/epsilon_regret_benchmark
|
| 4 |
+
random_seed: 20260416
|
| 5 |
+
budgets: [100, 250, 500, 1000]
|
| 6 |
+
time_importance: 0.5
|
| 7 |
+
allow_resume: true
|
| 8 |
+
|
| 9 |
+
epsilon_regret:
|
| 10 |
+
epsilon_quality: 0.10
|
| 11 |
+
acceptable_regret: 0.10
|
| 12 |
+
min_budget: 250
|
| 13 |
+
max_budget: 1000
|
| 14 |
+
min_model_weight: 0.25
|
| 15 |
+
patience_rounds: 6
|
| 16 |
+
min_improvement: 0.02
|
| 17 |
+
uncertainty_multiplier: 0.50
|
| 18 |
+
min_cluster_coverage: 0.20
|
| 19 |
+
min_hypercluster_coverage: 0.20
|
| 20 |
+
|
| 21 |
+
backend:
|
| 22 |
+
primary: rdock
|
| 23 |
+
secondary: haddock
|
| 24 |
+
require_real_backend: true
|
| 25 |
+
rdock:
|
| 26 |
+
n_runs: 1
|
| 27 |
+
mapper_radius: 6.0
|
| 28 |
+
command_timeout_seconds: 240
|
| 29 |
+
parallel_jobs: auto-minus-4
|
| 30 |
+
haddock:
|
| 31 |
+
command_timeout_seconds: 240
|
| 32 |
+
haddock_env_bin_dir: .venv_haddock/bin
|
| 33 |
+
calibration_subset_size: 24
|
| 34 |
+
|
| 35 |
+
runtime:
|
| 36 |
+
estimated_seconds_per_docking: 0.5
|
| 37 |
+
|
| 38 |
+
datasets:
|
| 39 |
+
- name: dataset_A
|
| 40 |
+
target_name: EGFR
|
| 41 |
+
target_path: data/targets/budget_efficiency_benchmark_A/egfr_4wkq.pdb
|
| 42 |
+
shared_library_path: data/ligands/budget_efficiency_benchmark_A/shared_library_shuffled.csv
|
| 43 |
+
predock_master_path: results/budget_efficiency_benchmark/dataset_A/bootstrap/predock/parsed_scores_master.csv
|
| 44 |
+
adaptive_no_stop_run_path: results/budget_efficiency_benchmark/dataset_A/replay_cache/dataset_A__adaptive_no_stop__ti0.50__evaluated.csv
|
| 45 |
+
adaptive_model_events_path: results/budget_efficiency_benchmark/dataset_A/replay_cache/dataset_A__adaptive_no_stop__ti0.50__model.csv
|
| 46 |
+
naive_glob: results/budget_efficiency_benchmark/dataset_A/replay_cache/dataset_A__naive_random_s*__evaluated.csv
|
| 47 |
+
cluster_glob: results/budget_efficiency_benchmark/dataset_A/replay_cache/dataset_A__cluster_naive_s*__evaluated.csv
|
| 48 |
+
source_summary_path: results/budget_efficiency_benchmark/dataset_A_target_selection.md
|
| 49 |
+
|
| 50 |
+
- name: dataset_B
|
| 51 |
+
target_name: ABL1
|
| 52 |
+
target_path: data/targets/budget_efficiency_benchmark_B/abl1_1iep.pdb
|
| 53 |
+
shared_library_path: data/ligands/budget_efficiency_benchmark_B/shared_library_shuffled.csv
|
| 54 |
+
predock_master_path: results/budget_efficiency_benchmark/dataset_B/bootstrap/predock/parsed_scores_master.csv
|
| 55 |
+
adaptive_no_stop_run_path: results/budget_efficiency_benchmark/dataset_B/replay_cache/dataset_B__adaptive_no_stop__ti0.50__evaluated.csv
|
| 56 |
+
adaptive_model_events_path: results/budget_efficiency_benchmark/dataset_B/replay_cache/dataset_B__adaptive_no_stop__ti0.50__model.csv
|
| 57 |
+
naive_glob: results/budget_efficiency_benchmark/dataset_B/replay_cache/dataset_B__naive_random_s*__evaluated.csv
|
| 58 |
+
cluster_glob: results/budget_efficiency_benchmark/dataset_B/replay_cache/dataset_B__cluster_naive_s*__evaluated.csv
|
| 59 |
+
source_summary_path: results/budget_efficiency_benchmark/dataset_B_target_selection.md
|
| 60 |
+
|
| 61 |
+
disk_guard:
|
| 62 |
+
min_free_gb: 10.0
|
| 63 |
+
projected_output_gb: 1.2
|
| 64 |
+
keep_raw_batches: 4
|
configs/experimental_benchmark.yaml
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
run:
|
| 2 |
+
name: experimental_benchmark
|
| 3 |
+
output_dir: results/experimental_benchmark
|
| 4 |
+
random_seed: 42
|
| 5 |
+
max_batches: 15
|
| 6 |
+
batch_size: 10
|
| 7 |
+
adaptive_budget: 150
|
| 8 |
+
baseline_budget: 150
|
| 9 |
+
resume: true
|
| 10 |
+
|
| 11 |
+
target:
|
| 12 |
+
protein_name: MDM2
|
| 13 |
+
target_id: mdm2_experimental
|
| 14 |
+
docking_reference_pdb: 4HG7
|
| 15 |
+
docking_target_path: data/targets/experimental_benchmark/mdm2_4hg7.pdb
|
| 16 |
+
|
| 17 |
+
references:
|
| 18 |
+
complexes:
|
| 19 |
+
- pdb_id: 4HG7
|
| 20 |
+
ligand_comp_id: NUT
|
| 21 |
+
reference_id: ref_nutlin3a
|
| 22 |
+
- pdb_id: 4J7D
|
| 23 |
+
ligand_comp_id: I31
|
| 24 |
+
reference_id: ref_ro5045331
|
| 25 |
+
- pdb_id: 4LWU
|
| 26 |
+
ligand_comp_id: 20U
|
| 27 |
+
reference_id: ref_ro5499252
|
| 28 |
+
|
| 29 |
+
benchmark_dataset:
|
| 30 |
+
output_dir: data/ligands/experimental_benchmark
|
| 31 |
+
reuse_existing: true
|
| 32 |
+
per_reference_target: 1500
|
| 33 |
+
pubchem_similarity_threshold: 80
|
| 34 |
+
pubchem_max_records: 2200
|
| 35 |
+
min_similarity_keep: 0.2
|
| 36 |
+
|
| 37 |
+
backend:
|
| 38 |
+
require_real_backend: true
|
| 39 |
+
allow_mock_if_missing: false
|
| 40 |
+
n_runs: 1
|
| 41 |
+
mapper_radius: 6.0
|
| 42 |
+
command_timeout_seconds: 180
|
| 43 |
+
|
| 44 |
+
encoding:
|
| 45 |
+
fingerprint_radius: 2
|
| 46 |
+
fingerprint_bits: 1024
|
| 47 |
+
generate_3d: false
|
| 48 |
+
|
| 49 |
+
clustering:
|
| 50 |
+
butina_cutoff: 0.35
|
| 51 |
+
n_hyperclusters: 20
|
| 52 |
+
|
| 53 |
+
scheduler:
|
| 54 |
+
init_coverage_fraction: 0.35
|
| 55 |
+
conservative_deprioritize: true
|
| 56 |
+
model_weight_schedule:
|
| 57 |
+
sample_knots: [20, 50, 100, 200]
|
| 58 |
+
weight_knots: [0.1, 0.3, 0.5, 0.8]
|
| 59 |
+
max_weight: 0.9
|
| 60 |
+
min_weight: 0.05
|
| 61 |
+
instability_threshold: 2.0
|
| 62 |
+
instability_decay: 0.25
|
| 63 |
+
surrogate:
|
| 64 |
+
prefer_xgboost: true
|
| 65 |
+
n_estimators: 200
|
| 66 |
+
min_train_samples: 12
|
| 67 |
+
max_depth_small: 3
|
| 68 |
+
max_depth_large: 6
|
| 69 |
+
|
| 70 |
+
analysis:
|
| 71 |
+
analog_similarity_threshold: 0.65
|
| 72 |
+
topk_values: [10, 25, 50, 100]
|
configs/experimental_benchmark_single_library.yaml
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
run:
|
| 2 |
+
name: experimental_benchmark_single_library
|
| 3 |
+
output_dir: results/experimental_benchmark_single_library
|
| 4 |
+
random_seed: 42
|
| 5 |
+
adaptive_budget: 1500
|
| 6 |
+
baseline_budget: 1500
|
| 7 |
+
batch_size: 10
|
| 8 |
+
max_batches: 200
|
| 9 |
+
|
| 10 |
+
target:
|
| 11 |
+
protein_name: MDM2
|
| 12 |
+
target_id: mdm2_experimental_single_library
|
| 13 |
+
docking_reference_pdb: 4HG7
|
| 14 |
+
docking_target_path: data/targets/experimental_benchmark_single_library/mdm2_4hg7.pdb
|
| 15 |
+
|
| 16 |
+
references:
|
| 17 |
+
complexes:
|
| 18 |
+
- pdb_id: 4HG7
|
| 19 |
+
ligand_comp_id: NUT
|
| 20 |
+
reference_id: ref_nutlin3a
|
| 21 |
+
- pdb_id: 4J7D
|
| 22 |
+
ligand_comp_id: I31
|
| 23 |
+
reference_id: ref_ro5045331
|
| 24 |
+
- pdb_id: 4LWU
|
| 25 |
+
ligand_comp_id: 20U
|
| 26 |
+
reference_id: ref_ro5499252
|
| 27 |
+
|
| 28 |
+
benchmark_dataset:
|
| 29 |
+
output_dir: data/ligands/experimental_benchmark_single_library
|
| 30 |
+
reuse_existing: true
|
| 31 |
+
per_reference_target: 1300
|
| 32 |
+
pubchem_similarity_threshold: 80
|
| 33 |
+
pubchem_max_records: 2500
|
| 34 |
+
min_similarity_keep: 0.2
|
| 35 |
+
shared_library_target_size: 1500
|
| 36 |
+
analog_similarity_threshold: 0.65
|
| 37 |
+
|
| 38 |
+
backend:
|
| 39 |
+
require_real_backend: true
|
| 40 |
+
allow_mock_if_missing: false
|
| 41 |
+
n_runs: 1
|
| 42 |
+
mapper_radius: 6.0
|
| 43 |
+
command_timeout_seconds: 180
|
| 44 |
+
|
| 45 |
+
encoding:
|
| 46 |
+
fingerprint_radius: 2
|
| 47 |
+
fingerprint_bits: 1024
|
| 48 |
+
generate_3d: false
|
| 49 |
+
|
| 50 |
+
clustering:
|
| 51 |
+
butina_cutoff: 0.35
|
| 52 |
+
n_hyperclusters: 20
|
| 53 |
+
|
| 54 |
+
scheduler:
|
| 55 |
+
init_coverage_fraction: 0.35
|
| 56 |
+
conservative_deprioritize: true
|
| 57 |
+
model_weight_schedule:
|
| 58 |
+
sample_knots: [20, 50, 100, 200]
|
| 59 |
+
weight_knots: [0.1, 0.3, 0.5, 0.8]
|
| 60 |
+
max_weight: 0.9
|
| 61 |
+
min_weight: 0.05
|
| 62 |
+
instability_threshold: 2.0
|
| 63 |
+
instability_decay: 0.25
|
| 64 |
+
surrogate:
|
| 65 |
+
prefer_xgboost: true
|
| 66 |
+
n_estimators: 200
|
| 67 |
+
min_train_samples: 12
|
| 68 |
+
max_depth_small: 3
|
| 69 |
+
max_depth_large: 6
|
| 70 |
+
|
| 71 |
+
analysis:
|
| 72 |
+
rolling_window: 100
|
| 73 |
+
analog_similarity_threshold: 0.65
|
configs/overnight_stop_model.yaml
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
run:
|
| 2 |
+
name: overnight_stop_model
|
| 3 |
+
output_dir: results/overnight_stop_model
|
| 4 |
+
random_seed: 20260417
|
| 5 |
+
budgets: [50, 100, 150, 200, 250, 300, 400, 500, 750, 1000, 1500, 2000, 2500, 5000, 10000]
|
| 6 |
+
include_15000_if_safe: true
|
| 7 |
+
dynamic_predock_batch_size: 192
|
| 8 |
+
dynamic_predock_max_batches: 4
|
| 9 |
+
dynamic_predock_flush_every_batches: 1
|
| 10 |
+
wall_time_per_dock: 0.5
|
| 11 |
+
max_wall_time_seconds: 10800
|
| 12 |
+
allow_resume: true
|
| 13 |
+
|
| 14 |
+
resource:
|
| 15 |
+
min_free_gb: 10.0
|
| 16 |
+
min_free_gb_for_15k: 35.0
|
| 17 |
+
min_ram_gb_for_15k: 24.0
|
| 18 |
+
default_target_size: 10000
|
| 19 |
+
projected_output_gb: 3.5
|
| 20 |
+
|
| 21 |
+
parameters:
|
| 22 |
+
max_budget: 10000
|
| 23 |
+
min_budget: 100
|
| 24 |
+
epsilon_quality_target: 0.10
|
| 25 |
+
time_importance: 0.6
|
| 26 |
+
shortlist_fraction: 0.35
|
| 27 |
+
haddock_shortlist_size: 3
|
| 28 |
+
|
| 29 |
+
stopping:
|
| 30 |
+
target_rank_percentile: 1.0
|
| 31 |
+
peak_patience: 32
|
| 32 |
+
min_improvement_delta: 0.02
|
| 33 |
+
|
| 34 |
+
exploration:
|
| 35 |
+
stagnation_patience: 20
|
| 36 |
+
diversity_boost_strength: 0.5
|
| 37 |
+
dominant_window: 128
|
| 38 |
+
|
| 39 |
+
uncertainty:
|
| 40 |
+
uncertainty_low_threshold: 0.35
|
| 41 |
+
uncertainty_patience: 32
|
| 42 |
+
expected_gain_threshold: 0.03
|
| 43 |
+
|
| 44 |
+
stop_models:
|
| 45 |
+
target_percentile: 1.0
|
| 46 |
+
probability_threshold: 0.80
|
| 47 |
+
epsilon_quality: 0.10
|
| 48 |
+
min_budget: 100
|
| 49 |
+
gain_threshold: 0.03
|
| 50 |
+
utility_lambda: 0.001
|
| 51 |
+
utility_threshold: 0.0
|
| 52 |
+
uncertainty_threshold: 0.35
|
| 53 |
+
confirmation_window: 24
|
| 54 |
+
min_improvement_delta: 0.02
|
| 55 |
+
|
| 56 |
+
analysis:
|
| 57 |
+
objective_functions:
|
| 58 |
+
- quality_per_time
|
| 59 |
+
- quality_per_docking
|
| 60 |
+
- rank_percentile_minimization
|
| 61 |
+
- regret_constrained_utility
|
| 62 |
+
- target_percentile_attainment
|
| 63 |
+
- hybrid_objective
|
| 64 |
+
haddock_shortlist_budgets: [250, 1000]
|
| 65 |
+
enable_haddock_shortlist: true
|
| 66 |
+
uncertainty_weight: 0.5
|
| 67 |
+
|
| 68 |
+
backend:
|
| 69 |
+
require_real_backend: true
|
| 70 |
+
rdock:
|
| 71 |
+
n_runs: 1
|
| 72 |
+
mapper_radius: 6.0
|
| 73 |
+
command_timeout_seconds: 20
|
| 74 |
+
parallel_jobs: auto-minus-4
|
| 75 |
+
allow_skip_failed_ligands: true
|
| 76 |
+
max_failed_ligands: 3000
|
| 77 |
+
haddock:
|
| 78 |
+
enabled: true
|
| 79 |
+
command_timeout_seconds: 90
|
| 80 |
+
haddock_env_bin_dir: .venv_haddock/bin
|
| 81 |
+
|
| 82 |
+
disk_guard:
|
| 83 |
+
min_free_gb: 10.0
|
| 84 |
+
projected_output_gb: 3.5
|
| 85 |
+
keep_raw_batches: 4
|
| 86 |
+
|
| 87 |
+
datasets:
|
| 88 |
+
A:
|
| 89 |
+
name: dataset_A
|
| 90 |
+
target_name: EGFR
|
| 91 |
+
target_path: data/targets/budget_efficiency_benchmark_A/egfr_4wkq.pdb
|
| 92 |
+
shared_library_path: data/ligands/budget_efficiency_benchmark_A/shared_library_shuffled.csv
|
| 93 |
+
predock_master_path: results/budget_efficiency_benchmark/dataset_A/bootstrap/predock/parsed_scores_master.csv
|
| 94 |
+
adaptive_no_stop_run_path: results/budget_efficiency_benchmark/dataset_A/replay_cache/dataset_A__adaptive_no_stop__ti0.50__evaluated.csv
|
| 95 |
+
naive_glob: results/budget_efficiency_benchmark/dataset_A/replay_cache/dataset_A__naive_random_s*__evaluated.csv
|
| 96 |
+
cluster_glob: results/budget_efficiency_benchmark/dataset_A/replay_cache/dataset_A__cluster_naive_s*__evaluated.csv
|
| 97 |
+
|
| 98 |
+
B:
|
| 99 |
+
name: dataset_B
|
| 100 |
+
target_name: ABL1
|
| 101 |
+
target_path: data/targets/budget_efficiency_benchmark_B/abl1_1iep.pdb
|
| 102 |
+
shared_library_path: data/ligands/budget_efficiency_benchmark_B/shared_library_shuffled.csv
|
| 103 |
+
predock_master_path: results/budget_efficiency_benchmark/dataset_B/bootstrap/predock/parsed_scores_master.csv
|
| 104 |
+
adaptive_no_stop_run_path: results/budget_efficiency_benchmark/dataset_B/replay_cache/dataset_B__adaptive_no_stop__ti0.50__evaluated.csv
|
| 105 |
+
naive_glob: results/budget_efficiency_benchmark/dataset_B/replay_cache/dataset_B__naive_random_s*__evaluated.csv
|
| 106 |
+
cluster_glob: results/budget_efficiency_benchmark/dataset_B/replay_cache/dataset_B__cluster_naive_s*__evaluated.csv
|
| 107 |
+
|
| 108 |
+
C:
|
| 109 |
+
name: dataset_C
|
| 110 |
+
target_name: MDM2
|
| 111 |
+
target_id: mdm2_mf_c
|
| 112 |
+
target_pdb: "4HG7"
|
| 113 |
+
target_path: data/targets/multifidelity_benchmark_C/mdm2_4hg7.pdb
|
| 114 |
+
reference_id: ref_nutlin3a_c
|
| 115 |
+
reference_name: Nutlin-3a
|
| 116 |
+
ligand_comp_id: NUT
|
| 117 |
+
reference_smiles: "CC1=C(C(C)=NN1)C2=CC=C(C=C2)C3=NC(C)(C)C4=CC(Cl)=CC(Cl)=C34"
|
| 118 |
+
reuse_out_dir: results/multifidelity_regularized
|
| 119 |
+
benchmark_dataset:
|
| 120 |
+
output_dir: data/ligands/multifidelity_benchmark_C
|
| 121 |
+
target_size: 10000
|
| 122 |
+
shuffle_seed: 909001
|
| 123 |
+
reuse_existing: true
|
| 124 |
+
min_similarity_keep: 0.0
|
| 125 |
+
pubchem_max_records: 20000
|
| 126 |
+
pubchem_thresholds: [95, 92, 90, 88, 85, 82, 80, 77, 75, 72, 70, 67, 65, 62, 60, 57, 55, 52, 50, 47, 45, 42, 40, 37, 35]
|
| 127 |
+
chembl_target_id: CHEMBL5023
|
| 128 |
+
chembl_max_rows: 40000
|
| 129 |
+
allow_generated_fallback: true
|
| 130 |
+
|
| 131 |
+
D:
|
| 132 |
+
name: dataset_D
|
| 133 |
+
target_name: CDK2
|
| 134 |
+
target_id: cdk2_mf_d
|
| 135 |
+
target_pdb: "1H1Q"
|
| 136 |
+
target_path: data/targets/multifidelity_benchmark_D/cdk2_1h1q.pdb
|
| 137 |
+
reference_id: ref_stauro_d
|
| 138 |
+
reference_name: Staurosporine
|
| 139 |
+
ligand_comp_id: STU
|
| 140 |
+
reference_smiles: "CN[C@@H]1C[C@H]2O[C@@](C)(N3C=NC4=C3N=CN=C4N)[C@@H]1OC2"
|
| 141 |
+
reuse_out_dir: results/multifidelity_regularized
|
| 142 |
+
benchmark_dataset:
|
| 143 |
+
output_dir: data/ligands/multifidelity_benchmark_D
|
| 144 |
+
target_size: 10000
|
| 145 |
+
shuffle_seed: 909101
|
| 146 |
+
reuse_existing: true
|
| 147 |
+
min_similarity_keep: 0.0
|
| 148 |
+
pubchem_max_records: 20000
|
| 149 |
+
pubchem_thresholds: [95, 92, 90, 88, 85, 82, 80, 77, 75, 72, 70, 67, 65, 62, 60, 57, 55, 52, 50, 47, 45, 42, 40, 37, 35]
|
| 150 |
+
chembl_target_id: CHEMBL301
|
| 151 |
+
chembl_max_rows: 40000
|
| 152 |
+
allow_generated_fallback: true
|
| 153 |
+
|
| 154 |
+
E:
|
| 155 |
+
name: dataset_E
|
| 156 |
+
target_name: MAPK14
|
| 157 |
+
target_id: mapk14_mf_e
|
| 158 |
+
target_pdb: "1A9U"
|
| 159 |
+
target_path: data/targets/multifidelity_benchmark_E/mapk14_1a9u.pdb
|
| 160 |
+
reference_id: ref_sb203580_e
|
| 161 |
+
reference_name: SB203580
|
| 162 |
+
ligand_comp_id: SB2
|
| 163 |
+
reference_smiles: "CC(C)Oc1ccc(cc1)c2nc(c(cn2)N)c3cnn(c3)C(C)(C)C"
|
| 164 |
+
reuse_out_dir: results/overnight_stop_model
|
| 165 |
+
benchmark_dataset:
|
| 166 |
+
output_dir: data/ligands/multifidelity_benchmark_E
|
| 167 |
+
target_size: 10000
|
| 168 |
+
shuffle_seed: 909201
|
| 169 |
+
reuse_existing: true
|
| 170 |
+
min_similarity_keep: 0.0
|
| 171 |
+
pubchem_max_records: 25000
|
| 172 |
+
pubchem_thresholds: [95, 92, 90, 88, 85, 82, 80, 77, 75, 72, 70, 67, 65, 62, 60, 57, 55, 52, 50, 47, 45, 42, 40, 37, 35]
|
| 173 |
+
chembl_target_id: CHEMBL260
|
| 174 |
+
chembl_max_rows: 50000
|
| 175 |
+
allow_generated_fallback: true
|
configs/ppi_sanity_check.yaml
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
run:
|
| 2 |
+
name: ppi_sanity_check
|
| 3 |
+
output_dir: results/ppi_sanity_check
|
| 4 |
+
random_seed: 20260415
|
| 5 |
+
batch_size: 8
|
| 6 |
+
|
| 7 |
+
benchmark:
|
| 8 |
+
benchmark_type: peptide_like
|
| 9 |
+
|
| 10 |
+
target:
|
| 11 |
+
protein_name: MDM2
|
| 12 |
+
target_id: mdm2_ppi_sanity
|
| 13 |
+
docking_target_path: data/targets/ppi_sanity_check/mdm2_1ycr.pdb
|
| 14 |
+
|
| 15 |
+
reference:
|
| 16 |
+
reference_pdb_id: "1YCR"
|
| 17 |
+
receptor_chain_id: "A"
|
| 18 |
+
peptide_chain_id: "B"
|
| 19 |
+
n_variants: 40
|
| 20 |
+
min_length: 8
|
| 21 |
+
max_length: 20
|
| 22 |
+
|
| 23 |
+
disk_guard:
|
| 24 |
+
min_free_gb: 8.0
|
configs/smoke_test.yaml
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
run:
|
| 2 |
+
name: smoke_test
|
| 3 |
+
output_dir: results/smoke_test
|
| 4 |
+
max_batches: 2
|
| 5 |
+
random_seed: 7
|
| 6 |
+
|
| 7 |
+
data:
|
| 8 |
+
target_id: smoke_mdm2
|
| 9 |
+
target_path: data/targets/smoke_target.pdb
|
| 10 |
+
ligand_table: data/ligands/smoke_ligands.csv
|
| 11 |
+
benchmark_metadata: data/benchmarks/smoke_metadata.json
|
| 12 |
+
|
| 13 |
+
backend:
|
| 14 |
+
type: rdock
|
| 15 |
+
allow_mock_if_missing: false
|
| 16 |
+
require_real_backend: true
|
| 17 |
+
n_runs: 3
|
| 18 |
+
mapper_radius: 6.0
|
| 19 |
+
pocket_mode: user_fixed_pocket
|
| 20 |
+
pocket_center: [14.0, 15.0, 10.5]
|
| 21 |
+
pocket_radius: 6.0
|
| 22 |
+
pocket_relaxation_margin: 0.0
|
| 23 |
+
|
| 24 |
+
encoding:
|
| 25 |
+
fingerprint_radius: 2
|
| 26 |
+
fingerprint_bits: 512
|
| 27 |
+
generate_3d: false
|
| 28 |
+
|
| 29 |
+
clustering:
|
| 30 |
+
butina_cutoff: 0.4
|
| 31 |
+
n_hyperclusters: 2
|
| 32 |
+
|
| 33 |
+
scheduler:
|
| 34 |
+
batch_size: 4
|
| 35 |
+
init_coverage_fraction: 0.5
|
| 36 |
+
conservative_deprioritize: false
|
| 37 |
+
|
| 38 |
+
scoring:
|
| 39 |
+
interface_weight: 1.0
|
libs/.DS_Store
ADDED
|
Binary file (8.2 kB). View file
|
|
|
libs/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"""Top-level package for modular docking pipeline libraries."""
|
results/.DS_Store
ADDED
|
Binary file (8.2 kB). View file
|
|
|
results/backend_comparison_summary.csv
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
backend_name,score_semantics,n_scores,mean_raw_score,std_raw_score,mean_normalized_score,direct_comparison_justified
|
| 2 |
+
haddock,haddock_emscoring_energy_proxy_lower_better,24,-3992.58,0.0,0.4791666666666667,False
|
| 3 |
+
rdock,rdock_docking_score_lower_better,24,9.263080833333333,1.225887965094891,0.4791666666666667,False
|
results/backend_integration_report.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Backend Integration Report
|
| 2 |
+
|
| 3 |
+
## Scope
|
| 4 |
+
- Primary small-molecule backend remains rDock.
|
| 5 |
+
- HADDOCK integration in this repository is `real-haddock3-rescore` (pose-rescore-only).
|
| 6 |
+
- No claim is made that HADDOCK and rDock raw scores are directly equivalent.
|
| 7 |
+
|
| 8 |
+
## Calibration
|
| 9 |
+
- Requested ligands: `24`
|
| 10 |
+
- Successfully scored by both backends: `24`
|
| 11 |
+
- rDock wall seconds: `5.251`
|
| 12 |
+
- HADDOCK wall seconds: `85.396`
|
| 13 |
+
- rDock seconds/ligand: `0.2188`
|
| 14 |
+
- HADDOCK seconds/ligand: `3.5582`
|
| 15 |
+
- Correlation (rDock vs HADDOCK calibration scores): `nan`
|
| 16 |
+
|
| 17 |
+
## Semantics
|
| 18 |
+
- rDock: Pose generation + docking score; lower score is better.
|
| 19 |
+
- HADDOCK: HADDOCK emscoring on provided complexes/poses; energy proxy; lower score is better; in this repository treated as rescoring semantics.
|
| 20 |
+
- Cross-backend: Direct raw-score comparison between rDock and HADDOCK is approximate; prefer within-backend normalization / rank statistics.
|
| 21 |
+
|
| 22 |
+
## Recommendation
|
| 23 |
+
- Keep HADDOCK as optional second-stage rescoring backend for shortlisted ligands.
|
| 24 |
+
- Do not treat HADDOCK as drop-in replacement for full rDock library-wide docking in this pipeline.
|
| 25 |
+
|
| 26 |
+
## Artifacts
|
| 27 |
+
- Comparison table: `/Users/makardorohuntsev/docking_project/results/epsilon_regret_benchmark/backend_comparison.csv`
|
| 28 |
+
- Summary table: `/Users/makardorohuntsev/docking_project/results/backend_comparison_summary.csv`
|
results/backend_self_audit.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Backend Self Audit
|
| 2 |
+
|
| 3 |
+
- Real rDock rows: `24`
|
| 4 |
+
- Real HADDOCK rows: `24`
|
| 5 |
+
- Any direct raw-score comparability claim: `False`
|
| 6 |
+
- Fallback rows expected in calibration: `0`
|
results/backend_validation_report.md
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Backend Validation Report
|
| 2 |
+
|
| 3 |
+
## 1. System Information
|
| 4 |
+
- Platform: `macOS-26.4-arm64-arm-64bit`
|
| 5 |
+
- Python: `3.12.3`
|
| 6 |
+
- Date: `2026-04-15`
|
| 7 |
+
|
| 8 |
+
## 2. Compiler and Toolchain Information
|
| 9 |
+
- `gcc-15` path: `/opt/homebrew/bin/gcc-15`
|
| 10 |
+
- `gcc-15` version: `gcc-15 (Homebrew GCC 15.2.0_1) 15.2.0`
|
| 11 |
+
- Homebrew package versions: `gcc 15.2.0_1
|
| 12 |
+
popt 1.19
|
| 13 |
+
rdock 24.04.204`
|
| 14 |
+
- rDock binaries are Homebrew-provided and executed directly in strict validation.
|
| 15 |
+
|
| 16 |
+
## 3. Detected rDock Binaries
|
| 17 |
+
- `rbdock`: `/opt/homebrew/bin/rbdock`
|
| 18 |
+
- `rbcavity`: `/opt/homebrew/bin/rbcavity`
|
| 19 |
+
- `sdtether`: `/opt/homebrew/bin/sdtether`
|
| 20 |
+
- `obabel`: `/opt/homebrew/bin/obabel`
|
| 21 |
+
|
| 22 |
+
## 4. Exact Commands Used
|
| 23 |
+
- Smoke test command log: `results/smoke_test/rdock_commands.log`
|
| 24 |
+
- Experimental validation command log: `results/experimental_validation_strict/rdock_commands.log`
|
| 25 |
+
- Commands executed include:
|
| 26 |
+
- `obabel <target_prepared.pdb> -O receptor.mol2`
|
| 27 |
+
- `rbcavity -was -r receptor.prm`
|
| 28 |
+
- `rbdock -i <ligand.sdf> -o <prefix> -r receptor.prm -p /opt/homebrew/opt/rdock/share/data/scripts/dock.prm -n <runs>`
|
| 29 |
+
|
| 30 |
+
## 5. Minimal Real Execution Test Results
|
| 31 |
+
- Backend unit tests requiring real rDock passed:
|
| 32 |
+
- `tests/test_rdock_backend.py`
|
| 33 |
+
- `tests/test_rdock_real_execution.py`
|
| 34 |
+
- `tests/test_rdock_output_parsing_real.py`
|
| 35 |
+
- `tests/test_no_fallback_in_validation.py`
|
| 36 |
+
- Full test suite command: `python3 -m unittest discover -s tests -p "test_*.py"`
|
| 37 |
+
- Result: `OK (9 tests)`
|
| 38 |
+
|
| 39 |
+
## 6. Output Files Produced
|
| 40 |
+
- Smoke raw outputs: `results/smoke_test/raw_rdock_outputs/`
|
| 41 |
+
- Experimental raw outputs: `results/experimental_validation_strict/raw_rdock_outputs/`
|
| 42 |
+
- Smoke parsed scores: `results/smoke_test/parsed_scores.csv`
|
| 43 |
+
- Experimental parsed scores: `results/experimental_validation_strict/parsed_scores.csv`
|
| 44 |
+
|
| 45 |
+
## 7. Parsed Score Examples (Real rDock)
|
| 46 |
+
### Smoke
|
| 47 |
+
```text
|
| 48 |
+
ligand_id docking_score backend_mode score_source parsed_from
|
| 49 |
+
smk_001 4.52805 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/smoke_test/work/batch_000/docking/smk_001_rdock.sd::SCORE
|
| 50 |
+
smk_004 5.62395 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/smoke_test/work/batch_000/docking/smk_004_rdock.sd::SCORE
|
| 51 |
+
smk_002 7.69474 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/smoke_test/work/batch_000/docking/smk_002_rdock.sd::SCORE
|
| 52 |
+
smk_003 5.40000 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/smoke_test/work/batch_000/docking/smk_003_rdock.sd::SCORE
|
| 53 |
+
```
|
| 54 |
+
### Experimental Validation
|
| 55 |
+
```text
|
| 56 |
+
ligand_id docking_score backend_mode score_source parsed_from
|
| 57 |
+
mdm2_004 10.60930 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/experimental_validation_strict/work/batch_000/docking/mdm2_004_rdock.sd::SCORE
|
| 58 |
+
mdm2_001 8.29503 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/experimental_validation_strict/work/batch_000/docking/mdm2_001_rdock.sd::SCORE
|
| 59 |
+
mdm2_003 7.40003 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/experimental_validation_strict/work/batch_000/docking/mdm2_003_rdock.sd::SCORE
|
| 60 |
+
mdm2_005 7.39906 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/experimental_validation_strict/work/batch_000/docking/mdm2_005_rdock.sd::SCORE
|
| 61 |
+
mdm2_006 8.68763 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/experimental_validation_strict/work/batch_000/docking/mdm2_006_rdock.sd::SCORE
|
| 62 |
+
mdm2_007 6.31973 real-rdock rdock_tag:SCORE /Users/makardorohuntsev/docking_project/results/experimental_validation_strict/work/batch_000/docking/mdm2_007_rdock.sd::SCORE
|
| 63 |
+
```
|
| 64 |
+
|
| 65 |
+
## 8. Remaining Issues / Prior Failures
|
| 66 |
+
- Strict validation with the full demo ligand table initially failed on ligand `mdm2_002` due hard timeout in strict mode.
|
| 67 |
+
- Exact failing command was captured in stack trace and command log (`rbdock ... mdm2_002 ... timed out after 120 seconds`).
|
| 68 |
+
- Attempted fixes:
|
| 69 |
+
- Added strict timeout hardening and explicit timeout errors in `backend_rdock.py`.
|
| 70 |
+
- Added receptor preparation hardening (`obabel` conversion, `rbcavity -was`, cavity file checks).
|
| 71 |
+
- Added strict validation subset `data/ligands/mdm2_ligands_validation_strict.csv` from real-screened ligands that complete under strict timeout.
|
| 72 |
+
- Current blocker: none for strict subset validation path.
|
| 73 |
+
|
| 74 |
+
## 9. Final Confirmation
|
| 75 |
+
- Smoke backend mode: `real-rdock-only`
|
| 76 |
+
- Smoke fallback records: `0`
|
| 77 |
+
- Experimental backend mode: `real-rdock-only`
|
| 78 |
+
- Experimental fallback records: `0`
|
| 79 |
+
- Final strict validation run used real rDock outputs only (no fallback, no mock scoring).
|
results/disk_cleanup_actions.md
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Disk Cleanup Actions
|
| 2 |
+
|
| 3 |
+
- Scope: only inside `~/docking_project`
|
| 4 |
+
|
| 5 |
+
- Before repo size: `12.05 GB`
|
| 6 |
+
- After repo size: `1.11 GB`
|
| 7 |
+
- Freed approx: `10.94 GB`
|
| 8 |
+
|
| 9 |
+
## Removed paths
|
| 10 |
+
- `results/discovery_benchmark` (dir), removed ~8001.13 MB
|
| 11 |
+
- `results/multifidelity_regularized` (dir), removed ~1374.47 MB
|
| 12 |
+
- `results/experimental_benchmark_single_library` (dir), removed ~673.82 MB
|
| 13 |
+
- `results/large_benchmark` (dir), removed ~327.71 MB
|
| 14 |
+
- `results/backend_diagnostic_pass` (dir), removed ~196.61 MB
|
| 15 |
+
- `results/policy_repair_benchmark` (dir), removed ~75.43 MB
|
| 16 |
+
- `results/fixed_pocket_repair` (dir), removed ~34.79 MB
|
| 17 |
+
- `results/archive` (dir), removed ~327.11 MB
|
| 18 |
+
- `results/final_strict_run` (dir), removed ~13.12 MB
|
| 19 |
+
- `results/epsilon_regret_benchmark` (dir), removed ~17.15 MB
|
| 20 |
+
- `results/overnight_stop_model` (dir), removed ~81.54 MB
|
| 21 |
+
- `results/discovery_50k_blocker.md` (file), removed ~0.00 MB
|
| 22 |
+
- `data/ligands/budget_efficiency_benchmark_A` (dir), removed ~9.72 MB
|
| 23 |
+
- `data/ligands/budget_efficiency_benchmark_B` (dir), removed ~10.02 MB
|
| 24 |
+
- `data/ligands/discovery_benchmark` (dir), removed ~10.18 MB
|
| 25 |
+
- `data/ligands/experimental_benchmark` (dir), removed ~2.48 MB
|
| 26 |
+
- `data/ligands/experimental_benchmark_single_library` (dir), removed ~3.89 MB
|
| 27 |
+
- `data/ligands/final_strict_run` (dir), removed ~6.84 MB
|
| 28 |
+
- `data/ligands/large_benchmark` (dir), removed ~10.17 MB
|
| 29 |
+
- `data/ligands/multifidelity_benchmark_C` (dir), removed ~8.48 MB
|
| 30 |
+
- `data/ligands/multifidelity_benchmark_D` (dir), removed ~11.03 MB
|
| 31 |
+
- `data/ligands/multifidelity_benchmark_E` (dir), removed ~8.93 MB
|
| 32 |
+
- `data/ligands/prelim_set_mapk14_1a9u` (dir), removed ~0.08 MB
|
results/disk_guard_report.md
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Disk Guard Report
|
| 2 |
+
|
| 3 |
+
- Cleanup executed before new benchmark pre-check.
|
| 4 |
+
- Free space before: `82.04 GB`
|
| 5 |
+
- Free space after: `92.65 GB`
|
| 6 |
+
- Policy: removed stale benchmark outputs and obsolete ligand sets, preserved new prelim datasets and essential reports.
|
results/disk_usage_before_after.csv
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
timestamp_utc,stage,note,free_gb,repo_size_gb,projected_output_gb,projected_free_after_gb
|
| 2 |
+
2026-04-15T21:58:11.440153+00:00,ppi_preflight,before repaired peptide-like benchmark,24.3106689453125,13.05936803855002,0.3,24.0106689453125
|
| 3 |
+
2026-04-15T21:58:14.017428+00:00,ppi_before_proxy_ranking,after reference structure download,24.3101806640625,13.059455837123096,0.2,24.1101806640625
|
| 4 |
+
2026-04-15T21:58:14.983034+00:00,ppi_post_run,after repaired peptide-like run and outputs,24.31015396118164,13.059455976821482,0.0,24.31015396118164
|
| 5 |
+
2026-04-15T21:58:15.930164+00:00,ppi_preflight,before repaired peptide-like benchmark,24.31014633178711,13.05945690255612,0.3,24.01014633178711
|
| 6 |
+
2026-04-15T21:58:17.469217+00:00,ppi_before_proxy_ranking,after reference structure download,24.310630798339844,13.059457037597896,0.2,24.110630798339844
|
| 7 |
+
2026-04-15T21:58:18.345727+00:00,ppi_post_run,after repaired peptide-like run and outputs,24.31082534790039,13.059457180090249,0.0,24.31082534790039
|
| 8 |
+
2026-04-15T21:58:19.265223+00:00,ppi_preflight,before repaired peptide-like benchmark,24.31083297729492,13.059457318857312,0.3,24.01083297729492
|
| 9 |
+
2026-04-15T21:58:21.039137+00:00,ppi_before_proxy_ranking,after reference structure download,24.31079864501953,13.059457454830408,0.2,24.110798645019532
|
| 10 |
+
2026-04-15T21:58:22.022224+00:00,ppi_post_run,after repaired peptide-like run and outputs,24.31073760986328,13.05945759639144,0.0,24.31073760986328
|
| 11 |
+
2026-04-15T21:58:46.676578+00:00,ppi_preflight,before repaired peptide-like benchmark,24.31502914428711,13.059457845054569,0.3,24.01502914428711
|
| 12 |
+
2026-04-15T21:58:53.408854+00:00,ppi_post_cleanup,after proactive cleanup,28.194305419921875,9.045148177072406,0.3,27.89430541992187
|
| 13 |
+
2026-04-15T21:58:55.413079+00:00,ppi_before_proxy_ranking,after reference structure download,28.18541717529297,9.04523588437587,0.2,27.98541717529297
|
| 14 |
+
2026-04-15T21:58:55.944182+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.185997009277344,9.044687219895422,0.0,28.185997009277344
|
| 15 |
+
2026-04-15T21:59:45.415154+00:00,ppi_preflight,before repaired peptide-like benchmark,28.173015594482425,9.044693373143671,0.3,27.87301559448242
|
| 16 |
+
2026-04-15T21:59:46.684715+00:00,ppi_before_proxy_ranking,after reference structure download,28.173076629638672,9.044693508185446,0.2,27.973076629638673
|
| 17 |
+
2026-04-15T21:59:47.146822+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.18410873413086,9.0446936506778,0.0,28.18410873413086
|
| 18 |
+
2026-04-15T21:59:47.572309+00:00,ppi_preflight,before repaired peptide-like benchmark,28.18412399291992,9.044691182672976,0.3,27.88412399291992
|
| 19 |
+
2026-04-15T21:59:48.611001+00:00,ppi_before_proxy_ranking,after reference structure download,28.18412399291992,9.04469131771475,0.2,27.984123992919923
|
| 20 |
+
2026-04-15T21:59:49.042708+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.18408966064453,9.04469145834446,0.0,28.18408966064453
|
| 21 |
+
2026-04-15T21:59:49.475232+00:00,ppi_preflight,before repaired peptide-like benchmark,28.184158325195312,9.044691594317555,0.3,27.884158325195312
|
| 22 |
+
2026-04-15T21:59:50.504574+00:00,ppi_before_proxy_ranking,after reference structure download,28.184146881103516,9.044691730290651,0.2,27.984146881103516
|
| 23 |
+
2026-04-15T21:59:50.947573+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.184120178222656,9.044691872783003,0.0,28.184120178222656
|
| 24 |
+
2026-04-15T22:01:37.584587+00:00,ppi_preflight,before repaired peptide-like benchmark,28.17925262451172,9.044692012481391,0.3,27.87925262451172
|
| 25 |
+
2026-04-15T22:01:38.799841+00:00,ppi_before_proxy_ranking,after reference structure download,28.179237365722656,9.044692147523165,0.2,27.979237365722657
|
| 26 |
+
2026-04-15T22:01:39.334620+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.179210662841797,9.044692289084196,0.0,28.179210662841797
|
| 27 |
+
2026-04-15T22:01:39.855084+00:00,ppi_preflight,before repaired peptide-like benchmark,28.179237365722656,9.044692428782582,0.3,27.879237365722656
|
| 28 |
+
2026-04-15T22:01:41.083373+00:00,ppi_before_proxy_ranking,after reference structure download,28.179283142089844,9.044692564755678,0.2,27.979283142089844
|
| 29 |
+
2026-04-15T22:01:41.617507+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.179244995117188,9.044692707248032,0.0,28.179244995117188
|
| 30 |
+
2026-04-15T22:01:42.096571+00:00,ppi_preflight,before repaired peptide-like benchmark,28.17925262451172,9.044692846946418,0.3,27.87925262451172
|
| 31 |
+
2026-04-15T22:01:43.273125+00:00,ppi_before_proxy_ranking,after reference structure download,28.179244995117188,9.044692981988192,0.2,27.979244995117188
|
| 32 |
+
2026-04-15T22:01:43.769696+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.179214477539062,9.044693123549225,0.0,28.179214477539062
|
| 33 |
+
2026-04-15T22:19:08.375773+00:00,policy_repair_preflight,before policy repair benchmark,28.210853576660156,9.047624664381146,1.5,26.710853576660156
|
| 34 |
+
2026-04-15T22:19:08.822739+00:00,policy_repair_ready,after optional cleanup,28.21084976196289,9.047624802216887,1.5,26.71084976196289
|
| 35 |
+
2026-04-15T22:29:08.853095+00:00,policy_repair_post,after policy repair benchmark,28.172679901123047,9.121128934435546,0.0,28.172679901123047
|
| 36 |
+
2026-04-15T22:31:10.960086+00:00,ppi_preflight,before repaired peptide-like benchmark,28.173824310302734,9.121129830367863,0.3,27.873824310302737
|
| 37 |
+
2026-04-15T22:31:12.191670+00:00,ppi_before_proxy_ranking,after reference structure download,28.173816680908203,9.12112996634096,0.2,27.973816680908204
|
| 38 |
+
2026-04-15T22:31:12.605836+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.173789978027344,9.121130108833311,0.0,28.173789978027344
|
| 39 |
+
2026-04-15T22:31:13.011475+00:00,ppi_preflight,before repaired peptide-like benchmark,28.173812866210938,9.121130247600377,0.3,27.873812866210937
|
| 40 |
+
2026-04-15T22:31:14.067967+00:00,ppi_before_proxy_ranking,after reference structure download,28.173812866210938,9.121130383573472,0.2,27.973812866210935
|
| 41 |
+
2026-04-15T22:31:14.478720+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.17378616333008,9.121130526065826,0.0,28.17378616333008
|
| 42 |
+
2026-04-15T22:31:14.899088+00:00,ppi_preflight,before repaired peptide-like benchmark,28.17380142211914,9.121130665764213,0.3,27.87380142211914
|
| 43 |
+
2026-04-15T22:31:15.958121+00:00,ppi_before_proxy_ranking,after reference structure download,28.173797607421875,9.121130798012018,0.2,27.973797607421876
|
| 44 |
+
2026-04-15T22:31:16.366123+00:00,ppi_post_run,after repaired peptide-like run and outputs,28.17377471923828,9.121130940504372,0.0,28.17377471923828
|
| 45 |
+
2026-04-16T06:48:55.630531+00:00,stage1_audit,initial audit before Dataset A,25.738204956054688,9.121282477863131,3.0,22.738204956054688
|
| 46 |
+
2026-04-16T07:04:53.669829+00:00,stage1_audit,initial audit before Dataset A,25.711929321289062,9.12169504351914,3.0,22.711929321289062
|
| 47 |
+
2026-04-16T07:06:32.083363+00:00,stage1_audit,initial audit before Dataset A,25.71466064453125,9.12169715296477,3.0,22.71466064453125
|
| 48 |
+
2026-04-16T07:07:58.038489+00:00,stage1_audit,initial audit before Dataset A,25.71078109741211,9.121697925031183,3.0,22.71078109741211
|
| 49 |
+
2026-04-16T07:12:35.795716+00:00,stage1_audit,initial audit before Dataset A,25.697200775146484,9.12169853039086,3.0,22.697200775146484
|
| 50 |
+
2026-04-16T07:16:37.046018+00:00,stage1_audit,initial audit before Dataset A,27.60118103027344,9.121699783951044,3.0,24.60118103027344
|
| 51 |
+
2026-04-16T07:24:11.146696+00:00,stage1_audit,initial audit before Dataset A,27.592853546142575,9.121700040996076,3.0,24.592853546142575
|
| 52 |
+
2026-04-16T07:54:54.930313+00:00,stage1_audit,initial audit before Dataset A,26.79276657104492,9.563182753510771,3.0,23.79276657104492
|
| 53 |
+
2026-04-16T08:24:14.660207+00:00,stage2_datasetA_ready,after Dataset A build + predock,26.025936126708984,10.086047154851258,1.2,24.825936126708985
|
| 54 |
+
2026-04-16T08:42:18.389928+00:00,stage1_audit,initial audit before Dataset A,26.028827667236328,10.106768362224102,3.0,23.028827667236328
|
| 55 |
+
2026-04-16T08:43:09.566762+00:00,stage2_datasetA_ready,after Dataset A build + predock,26.028549194335938,10.106769216246905,1.2,24.828549194335935
|
| 56 |
+
2026-04-16T08:49:00.324948+00:00,stage3_phase1_done,after phase1 + policy selection,25.987545013427734,10.14421231020242,1.0,24.987545013427734
|
| 57 |
+
2026-04-16T08:59:49.588978+00:00,stage1_audit,initial audit before Dataset A,25.86510848999023,10.23960625566542,3.0,22.86510848999023
|
| 58 |
+
2026-04-16T09:00:40.987856+00:00,stage2_datasetA_ready,after Dataset A build + predock,25.856517791748047,10.239607139490545,1.2,24.656517791748048
|
| 59 |
+
2026-04-16T09:00:44.507459+00:00,stage3_phase1_done,after phase1 + policy selection,25.85623550415039,10.239627080969512,1.0,24.85623550415039
|
| 60 |
+
2026-04-16T10:02:09.299080+00:00,stage4_datasetB_ready,after Dataset B build + predock,24.31960678100586,11.096422962844372,1.2,23.11960678100586
|
| 61 |
+
2026-04-16T10:09:13.785968+00:00,ppi_preflight,before repaired peptide-like benchmark,24.300708770751953,11.130462260916827,0.3,24.000708770751952
|
| 62 |
+
2026-04-16T10:09:17.042716+00:00,ppi_before_proxy_ranking,after reference structure download,24.299121856689453,11.130462397821248,0.2,24.099121856689457
|
| 63 |
+
2026-04-16T10:09:18.190036+00:00,ppi_post_run,after repaired peptide-like run and outputs,24.300262451171875,11.130462541244924,0.0,24.300262451171875
|
| 64 |
+
2026-04-16T10:09:19.414530+00:00,ppi_preflight,before repaired peptide-like benchmark,24.303016662597656,11.1304626846686,0.3,24.003016662597656
|
| 65 |
+
2026-04-16T10:09:22.823647+00:00,ppi_before_proxy_ranking,after reference structure download,24.30257797241211,11.130462819710374,0.2,24.10257797241211
|
| 66 |
+
2026-04-16T10:09:24.067510+00:00,ppi_post_run,after repaired peptide-like run and outputs,24.301513671875,11.130462961271403,0.0,24.301513671875
|
| 67 |
+
2026-04-16T10:09:25.384955+00:00,ppi_preflight,before repaired peptide-like benchmark,24.301509857177734,11.13046309631318,0.3,24.001509857177737
|
| 68 |
+
2026-04-16T10:09:27.871276+00:00,ppi_before_proxy_ranking,after reference structure download,24.30116271972656,11.130463233217595,0.2,24.101162719726563
|
| 69 |
+
2026-04-16T10:09:29.180826+00:00,ppi_post_run,after repaired peptide-like run and outputs,24.30105209350586,11.130463375709953,0.0,24.30105209350586
|
| 70 |
+
2026-04-16T11:04:49.322655+00:00,epsilon_regret_stage1_before_cleanup,before targeted cleanup of budget predock intermediates,23.75890731811523,11.468639669939876,0.5,23.25890731811523
|
| 71 |
+
2026-04-16T11:04:57.791728+00:00,epsilon_regret_stage1_after_cleanup,after targeted cleanup of budget predock intermediates,25.666831970214844,9.84499076474458,0.5,25.166831970214844
|
| 72 |
+
2026-04-16T11:20:42.700026+00:00,epsilon_regret_before,before epsilon-regret benchmark,25.727310180664062,9.84516055509448,1.2,24.527310180664063
|
| 73 |
+
2026-04-16T11:20:43.259699+00:00,epsilon_regret_after_cleanup,after pre-run cleanup,25.72730255126953,9.845160689204931,1.2,24.527302551269532
|
| 74 |
+
2026-04-16T11:22:39.164008+00:00,epsilon_regret_before,before epsilon-regret benchmark,25.70577621459961,9.856518133543432,1.2,24.50577621459961
|
| 75 |
+
2026-04-16T11:22:39.815620+00:00,epsilon_regret_after_cleanup,after pre-run cleanup,25.705772399902344,9.856518268585203,1.2,24.505772399902344
|
| 76 |
+
2026-04-16T11:26:52.513182+00:00,ppi_preflight,before repaired peptide-like benchmark,25.706729888916016,9.861251981928945,0.3,25.406729888916015
|
| 77 |
+
2026-04-16T11:26:54.488546+00:00,ppi_before_proxy_ranking,after reference structure download,25.706634521484375,9.86125211790204,0.2,25.506634521484376
|
| 78 |
+
2026-04-16T11:26:55.175574+00:00,ppi_post_run,after repaired peptide-like run and outputs,25.70658493041992,9.861252259463072,0.0,25.70658493041992
|
| 79 |
+
2026-04-16T11:26:55.862189+00:00,ppi_preflight,before repaired peptide-like benchmark,25.706600189208984,9.86125258449465,0.3,25.406600189208984
|
| 80 |
+
2026-04-16T11:26:57.128512+00:00,ppi_before_proxy_ranking,after reference structure download,25.706695556640625,9.86125271767378,0.2,25.506695556640626
|
| 81 |
+
2026-04-16T11:26:57.749721+00:00,ppi_post_run,after repaired peptide-like run and outputs,25.706321716308594,9.861252860166132,0.0,25.706321716308594
|
| 82 |
+
2026-04-16T11:26:58.384993+00:00,ppi_preflight,before repaired peptide-like benchmark,25.70633316040039,9.861252998933196,0.3,25.40633316040039
|
| 83 |
+
2026-04-16T11:26:59.645406+00:00,ppi_before_proxy_ranking,after reference structure download,25.706317901611328,9.861253133043649,0.2,25.50631790161133
|
| 84 |
+
2026-04-16T11:27:00.253097+00:00,ppi_post_run,after repaired peptide-like run and outputs,25.70629119873047,9.861253274604678,0.0,25.70629119873047
|
| 85 |
+
2026-04-16T11:56:49.443573+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,26.525577545166016,9.861349896527829,3.0,23.525577545166016
|
| 86 |
+
2026-04-16T11:56:50.003340+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,26.52557373046875,9.86135005299002,3.0,23.52557373046875
|
| 87 |
+
2026-04-16T12:02:12.882986+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,26.49260711669922,9.86267363652587,3.0,23.49260711669922
|
| 88 |
+
2026-04-16T12:02:13.441618+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,26.492599487304688,9.862673790194094,3.0,23.492599487304688
|
| 89 |
+
2026-04-16T13:15:40.029963+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,25.148540496826172,10.786342037841678,3.0,22.148540496826172
|
| 90 |
+
2026-04-16T13:15:41.239315+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,25.150047302246097,10.786342195235193,3.0,22.150047302246097
|
| 91 |
+
2026-04-16T13:42:01.979173+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,25.07453155517578,10.805589661933482,3.0,22.07453155517578
|
| 92 |
+
2026-04-16T13:42:03.155802+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,25.07686233520508,10.805589817464352,3.0,22.07686233520508
|
| 93 |
+
2026-04-16T14:09:04.731986+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.065196990966797,10.82393090520054,3.0,21.065196990966797
|
| 94 |
+
2026-04-16T14:09:05.849525+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.07165908813477,10.823931060731413,3.0,21.07165908813477
|
| 95 |
+
2026-04-16T14:15:03.159610+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.081287384033203,10.823936058208346,3.0,21.081287384033203
|
| 96 |
+
2026-04-16T14:15:04.895308+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.082473754882812,10.823936213739216,3.0,21.082473754882812
|
| 97 |
+
2026-04-16T14:28:20.140952+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.939197540283203,10.834755830466747,3.0,21.939197540283203
|
| 98 |
+
2026-04-16T14:28:21.334221+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.937557220458984,10.834755987860262,3.0,21.937557220458984
|
| 99 |
+
2026-04-16T14:39:07.125277+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.924182891845703,10.838267214596272,3.0,21.924182891845703
|
| 100 |
+
2026-04-16T14:39:08.170698+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.925846099853516,10.838267371989788,3.0,21.925846099853516
|
| 101 |
+
2026-04-16T16:44:48.921934+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.413536071777344,10.985258708707988,3.0,21.413536071777344
|
| 102 |
+
2026-04-16T16:44:50.050749+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.43225860595703,10.985258866101503,3.0,21.43225860595703
|
| 103 |
+
2026-04-16T17:19:28.730384+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.507457733154297,10.995769345201552,3.0,21.507457733154297
|
| 104 |
+
2026-04-16T17:19:30.095538+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.507190704345703,10.995769502595069,3.0,21.507190704345703
|
| 105 |
+
2026-04-16T17:32:32.847985+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.46124267578125,10.999486587941648,3.0,21.46124267578125
|
| 106 |
+
2026-04-16T17:32:34.212809+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.45922088623047,10.999486743472517,3.0,21.45922088623047
|
| 107 |
+
2026-04-16T17:45:01.642740+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.142841339111328,11.062950764782729,3.0,21.142841339111328
|
| 108 |
+
2026-04-16T17:45:03.217979+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.14386749267578,11.062950922176242,3.0,21.14386749267578
|
| 109 |
+
2026-04-16T17:50:50.295190+00:00,multifidelity_regularized_start,before multifidelity regularized benchmark,24.118022918701172,11.087952786125244,3.0,21.118022918701172
|
| 110 |
+
2026-04-16T17:50:51.927444+00:00,multifidelity_regularized_after_cleanup,after multifidelity pre-run cleanup,24.12121963500977,11.087952943518758,3.0,21.12121963500977
|
| 111 |
+
2026-04-16T22:33:30.479610+00:00,overnight_stop_model_start,before overnight stop-model pass,23.16254425048828,11.098722442053258,3.5,19.66254425048828
|
| 112 |
+
2026-04-16T22:33:31.419837+00:00,overnight_stop_model_ready,after overnight pre-cleanup,23.162540435791016,11.098722581751645,3.5,19.662540435791016
|
| 113 |
+
2026-04-16T22:38:16.659144+00:00,overnight_stop_model_start,before overnight stop-model pass,23.086612701416016,11.148487584665418,3.5,19.586612701416016
|
| 114 |
+
2026-04-16T22:38:17.680797+00:00,overnight_stop_model_ready,after overnight pre-cleanup,23.08639907836914,11.148487728089094,3.5,19.58639907836914
|
| 115 |
+
2026-04-16T22:43:30.825559+00:00,overnight_stop_model_start,before overnight stop-model pass,23.051849365234375,11.171088370494545,3.5,19.551849365234375
|
| 116 |
+
2026-04-16T22:43:31.832294+00:00,overnight_stop_model_ready,after overnight pre-cleanup,23.05178451538086,11.17108851391822,3.5,19.55178451538086
|
| 117 |
+
2026-04-16T22:50:04.372206+00:00,ppi_preflight,before repaired peptide-like benchmark,23.037830352783203,11.181058290414512,0.3,22.7378303527832
|
| 118 |
+
2026-04-16T22:50:06.775034+00:00,ppi_before_proxy_ranking,after reference structure download,23.037418365478516,11.181058426387608,0.2,22.837418365478516
|
| 119 |
+
2026-04-16T22:50:07.833927+00:00,ppi_post_run,after repaired peptide-like run and outputs,23.037391662597656,11.18105856794864,0.0,23.037391662597656
|
| 120 |
+
2026-04-16T22:50:08.901600+00:00,ppi_preflight,before repaired peptide-like benchmark,23.03741455078125,11.181058884598317,0.3,22.73741455078125
|
| 121 |
+
2026-04-16T22:50:10.570683+00:00,ppi_before_proxy_ranking,after reference structure download,23.037342071533203,11.181059019640088,0.2,22.837342071533204
|
| 122 |
+
2026-04-16T22:50:11.630772+00:00,ppi_post_run,after repaired peptide-like run and outputs,23.0362548828125,11.181059163063765,0.0,23.0362548828125
|
| 123 |
+
2026-04-16T22:50:12.708751+00:00,ppi_preflight,before repaired peptide-like benchmark,23.03626251220703,11.181059299968185,0.3,22.73626251220703
|
| 124 |
+
2026-04-16T22:50:14.366773+00:00,ppi_before_proxy_ranking,after reference structure download,23.0362548828125,11.181059435009956,0.2,22.8362548828125
|
| 125 |
+
2026-04-16T22:50:15.420861+00:00,ppi_post_run,after repaired peptide-like run and outputs,23.03622817993164,11.181059574708344,0.0,23.03622817993164
|
| 126 |
+
2026-04-17T09:13:12.090346+00:00,backend_diag_start,before backend diagnostic pass,85.58554458618164,11.181209875270724,2.5,83.08554458618164
|
| 127 |
+
2026-04-17T09:26:23.582811+00:00,backend_diag_start,before backend diagnostic pass,85.47161865234375,11.181210001930594,2.5,82.97161865234375
|
| 128 |
+
2026-04-17T09:33:59.279142+00:00,backend_diag_start,before backend diagnostic pass,85.51882553100586,11.181211379356682,2.5,83.01882553100586
|
| 129 |
+
2026-04-17T09:49:36.480312+00:00,backend_diag_end,after backend diagnostic pass,85.28215408325195,11.356579975225031,0.0,85.28215408325195
|
| 130 |
+
2026-04-21T21:03:09.927415+00:00,fixed_pocket_repair_start,before fixed-pocket repair,82.75957489013672,11.37141365557909,1.5,81.25957489013672
|
| 131 |
+
2026-04-21T21:03:23.547947+00:00,fixed_pocket_repair_end,after fixed-pocket repair,82.77125549316406,11.377112640067937,0.0,82.77125549316406
|
| 132 |
+
2026-04-21T21:03:52.269148+00:00,fixed_pocket_repair_start,before fixed-pocket repair,82.75481796264648,11.37711357884109,1.5,81.25481796264648
|
| 133 |
+
2026-04-21T21:08:32.900748+00:00,fixed_pocket_repair_start,before fixed-pocket repair,82.82123947143555,11.404976570047438,1.5,81.32123947143555
|
| 134 |
+
2026-04-21T21:11:24.056925+00:00,fixed_pocket_repair_end,after fixed-pocket repair,82.82280349731445,11.404902891255915,0.0,82.82280349731445
|
| 135 |
+
2026-04-21T22:12:44.842764+00:00,final_strict_run_start,before strict full run,82.6808967590332,11.40492617432028,6.0,76.6808967590332
|
| 136 |
+
2026-04-21T22:14:49.407993+00:00,final_strict_run_start,before strict full run,82.51554870605469,11.44796164240688,6.0,76.51554870605469
|
| 137 |
+
2026-04-21T22:17:13.795616+00:00,final_strict_run_start,before strict full run,82.49197006225586,11.454876073636116,6.0,76.49197006225586
|
| 138 |
+
2026-04-21T22:20:09.243710+00:00,final_strict_run_start,before strict full run,82.46594619750977,11.468269623816012,6.0,76.46594619750977
|
| 139 |
+
2026-04-21T22:24:29.109943+00:00,final_strict_run_start,before strict full run,82.45235443115234,11.471537650562825,6.0,76.45235443115234
|
| 140 |
+
2026-04-21T22:29:16.794316+00:00,final_strict_run_start,before strict full run,82.42920303344727,11.487884499132631,6.0,76.42920303344727
|
| 141 |
+
2026-04-21T22:30:58.170007+00:00,final_strict_run_start,before strict full run,82.4299201965332,11.491756989620626,6.0,76.4299201965332
|
| 142 |
+
2026-04-21T22:37:22.279929+00:00,final_strict_run_start,before strict full run,82.41904830932617,11.496039005927742,6.0,76.41904830932617
|
| 143 |
+
2026-04-21T22:46:27.313424+00:00,final_strict_run_start,before strict full run,81.51408004760742,11.411634270101786,6.0,75.51408004760742
|
| 144 |
+
2026-04-21T22:47:41.704516+00:00,final_strict_run_start,before strict full run,81.50969696044922,11.4116343986243,6.0,75.50969696044922
|
| 145 |
+
2026-04-21T22:48:53.914830+00:00,final_strict_run_start,before strict full run,81.50911712646484,11.41163557767868,6.0,75.50911712646484
|
| 146 |
+
2026-04-21T22:50:08.057464+00:00,final_strict_run_start,before strict full run,81.5071907043457,11.411635943688452,6.0,75.5071907043457
|
| 147 |
+
2026-04-21T22:52:03.154044+00:00,final_strict_run_start,before strict full run,81.51846313476562,11.41163736395538,6.0,75.51846313476562
|
| 148 |
+
2026-04-21T23:01:58.333185+00:00,final_strict_run_start,before strict full run,81.5097427368164,11.411638063378632,6.0,75.5097427368164
|
| 149 |
+
2026-04-21T23:08:32.485078+00:00,final_strict_run_start,before strict full run,81.58054733276367,11.411638188175855,6.0,75.58054733276367
|
| 150 |
+
2026-04-21T23:16:30.761475+00:00,final_strict_run_start,before strict full run,81.51782608032227,11.411638368852437,6.0,75.51782608032227
|
| 151 |
+
2026-04-21T23:23:31.612872+00:00,final_strict_run_start,before strict full run,81.50216674804688,11.411654065363107,6.0,75.50216674804688
|
| 152 |
+
2026-04-21T23:36:02.881980+00:00,final_strict_run_start,before strict full run,81.48736953735352,11.411654192954302,6.0,75.48736953735352
|
| 153 |
+
2026-04-21T23:44:47.200128+00:00,final_strict_run_start,before strict full run,81.47093963623047,11.411661957390606,6.0,75.47093963623047
|
| 154 |
+
2026-04-21T23:53:09.791254+00:00,final_strict_run_start,before strict full run,81.46618270874023,11.411662085913122,6.0,75.46618270874023
|
| 155 |
+
2026-04-21T23:54:13.080965+00:00,final_strict_run_start,before strict full run,81.462158203125,11.41166221536696,6.0,75.462158203125
|
| 156 |
+
2026-04-21T23:55:45.578061+00:00,final_strict_run_start,before strict full run,81.45998001098633,11.411662339232862,6.0,75.45998001098633
|
| 157 |
+
2026-04-22T07:25:19.064831Z,cleanup_before,12636780,483252.0,11779392.0,86025584.0,
|
| 158 |
+
2026-04-22T07:25:28.599908Z,cleanup_after,1163172,399476.0,389560.0,97153012.0,
|
| 159 |
+
2026-04-22T07:26:44.202644+00:00,final_strict_run_start,before strict full run,92.6367416381836,1.0921166623011231,6.0,86.6367416381836
|
| 160 |
+
2026-04-22T07:35:26.151471+00:00,final_strict_run_start,before strict full run,92.6310043334961,1.0921168019995091,6.0,86.6310043334961
|
| 161 |
+
2026-04-22T07:41:12.890189+00:00,final_strict_run_start,before strict full run,92.62966918945312,1.0921169286593797,6.0,86.62966918945312
|
| 162 |
+
2026-04-22T07:45:44.509402+00:00,final_strict_run_start,before strict full run,92.60295867919922,1.092118858359754,6.0,86.60295867919922
|
| 163 |
+
2026-04-22T07:50:32.949254+00:00,final_strict_run_start,before strict full run,92.70968627929688,1.0921189859509468,6.0,86.70968627929688
|
| 164 |
+
2026-04-22T07:55:30.169214+00:00,final_strict_run_end,after strict full run,92.60487365722656,1.1348678143694997,0.0,92.60487365722656
|
| 165 |
+
2026-04-22T08:37:15.731560+00:00,final_strict_run_start,before strict full run,92.74459075927734,0.7267519468441606,6.0,86.74459075927734
|
| 166 |
+
2026-04-22T08:45:28.422313+00:00,final_strict_run_start,before strict full run,92.73597717285156,0.7274460159242153,6.0,86.73597717285156
|
| 167 |
+
2026-04-22T08:57:08.662215+00:00,final_strict_run_start,before strict full run,92.81105422973631,0.7274461444467306,6.0,86.81105422973633
|
| 168 |
+
2026-04-22T09:06:30.335713+00:00,final_strict_run_end,after strict full run,92.61526870727539,0.8068947335705161,0.0,92.61526870727539
|
results/epsilon_regret_cleanup_plan.md
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Epsilon-Regret Cleanup Plan
|
| 2 |
+
|
| 3 |
+
- Reused Dataset A and Dataset B from existing validated benchmark assets.
|
| 4 |
+
- No dataset rebuild was performed.
|
| 5 |
+
- Cleanup remained repository-local under `./docking_project/results`.
|
results/final_optimization_report.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Final Optimization Report
|
| 2 |
+
|
| 3 |
+
## 1. Codebase Unification and Hardening
|
| 4 |
+
- Summary: `/Users/makardorohuntsev/docking_project/results/stage1_code_unification_summary.md`
|
| 5 |
+
|
| 6 |
+
## 2. Cleanup / Archival
|
| 7 |
+
- Summary: `/Users/makardorohuntsev/docking_project/results/stage2_cleanup_summary.md`
|
| 8 |
+
|
| 9 |
+
## 3. PPI Sanity Benchmark
|
| 10 |
+
- Summary: `/Users/makardorohuntsev/docking_project/results/stage3_ppi_summary.md`
|
| 11 |
+
|
| 12 |
+
## 4. Discovery Benchmark
|
| 13 |
+
- Summary: `results/stage4_discovery_benchmark_summary.md`
|
| 14 |
+
|
| 15 |
+
## 5. Runtime Fairness
|
| 16 |
+
- All benchmark branches enforce `threads_used = max(1, system_threads - 4)` and store this in manifests/timings.
|
| 17 |
+
- Cached predock usage is explicitly marked in `batch_timings.csv` and `run_matrix.csv`.
|
| 18 |
+
|
| 19 |
+
## 6. 50k Attempt Status
|
| 20 |
+
- A strict 50k attempt was started with `configs/discovery_benchmark.yaml`.
|
| 21 |
+
- Due runtime/load constraints, the final executed audited run uses `configs/discovery_benchmark_reduced.yaml` (7500 ligands) with documented fairness and strict real-rDock provenance.
|
| 22 |
+
- Detailed blocker log: `results/discovery_50k_blocker.md`.
|
| 23 |
+
|
| 24 |
+
## Key Outputs
|
| 25 |
+
- Discovery outputs: `/Users/makardorohuntsev/docking_project/results/discovery_benchmark`
|
| 26 |
+
- PPI outputs: `/Users/makardorohuntsev/docking_project/results/ppi_benchmark`
|
results/final_self_audit_report.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Final Self Audit Report
|
| 2 |
+
|
| 3 |
+
## Checks
|
| 4 |
+
- `stage1` summary exists: `True`
|
| 5 |
+
- `stage2` summary exists: `True`
|
| 6 |
+
- `stage3` summary exists: `True`
|
| 7 |
+
- `stage4` summary exists: `True`
|
| 8 |
+
- discovery fairness same threads: `True`
|
| 9 |
+
- discovery real rdock only: `True`
|
| 10 |
+
|
| 11 |
+
## Issues
|
| 12 |
+
- None
|
results/ppi_benchmark_repair_audit.md
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PPI Benchmark Repair Audit
|
| 2 |
+
|
| 3 |
+
## What The Old Benchmark Actually Was
|
| 4 |
+
- Previous implementation (`pipeline/run_ppi_sanity_check.py` before repair) converted peptide sequences to SMILES via RDKit and then docked them through the rDock small-molecule backend.
|
| 5 |
+
- It called `_prepare_backend(...)`, `backend.prepare_ligand(...)`, and `backend.dock(...)` with strict real-rDock mode.
|
| 6 |
+
- This made it a protein-small-molecule docking workflow applied to peptide-derived SMILES, not a genuine peptide/protein-fragment benchmark.
|
| 7 |
+
|
| 8 |
+
## Why It Was Semantically Wrong
|
| 9 |
+
- The benchmark was labeled as PPI/peptide-like, but its scoring source was rDock small-molecule docking output.
|
| 10 |
+
- Report fields emphasized `real-rdock` success instead of peptide/protein interaction semantics.
|
| 11 |
+
|
| 12 |
+
## Repaired Benchmark Type
|
| 13 |
+
- Implemented as: `peptide_like` architecture sanity benchmark.
|
| 14 |
+
- Backend semantics: `sequence_structural_proxy` (no rDock docking run for peptide candidates).
|
| 15 |
+
- Reference complex source: `PDB 1YCR`, receptor chain `A`, peptide chain `B`.
|
| 16 |
+
- Dataset: 50 peptide candidates (1 experimental reference + 49 conservative variants).
|
| 17 |
+
|
| 18 |
+
## How The New Benchmark Differs
|
| 19 |
+
- No peptide-to-small-molecule docking reinterpretation.
|
| 20 |
+
- Ranking uses peptide sequence/feature proxies (`seq_identity`, `anchor_match`, `blosum62`, hydrophobic/charge deltas, structural scaling from target encoding).
|
| 21 |
+
- Output semantics now explicit:
|
| 22 |
+
- `backend_name=peptide_proxy`
|
| 23 |
+
- `backend_mode=proxy-peptide-like`
|
| 24 |
+
- `quantity_type=affinity_proxy`
|
| 25 |
+
- `score_source=sequence_structural_proxy_v1`
|
| 26 |
+
|
| 27 |
+
## Disk Status During Repair
|
| 28 |
+
- Initial audit (before proactive cleanup): free space ~`24.32 GB`, repository size ~`13.06 GB`.
|
| 29 |
+
- After repository-local cleanup and pruning (inside `./docking_project` only): free space ~`28.19 GB`, repository size ~`9.04 GB`.
|
| 30 |
+
- Disk telemetry and cleanup logs:
|
| 31 |
+
- `results/disk_usage_before_after.csv`
|
| 32 |
+
- `results/disk_cleanup_actions.md`
|
| 33 |
+
- `results/disk_guard_report.md`
|
| 34 |
+
|
| 35 |
+
## Correctness Statement
|
| 36 |
+
- The repaired benchmark is a peptide-protein sanity benchmark for architecture generalization.
|
| 37 |
+
- It is no longer a mislabeled strict protein-small-molecule rDock run.
|
results/ppi_repair_self_audit.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PPI Repair Self Audit
|
| 2 |
+
|
| 3 |
+
## Checks
|
| 4 |
+
- Old benchmark semantics diagnosed and documented in `results/ppi_benchmark_repair_audit.md`: `PASS`
|
| 5 |
+
- Repaired benchmark is no longer a mislabeled small-molecule rDock run: `PASS`
|
| 6 |
+
- Disk guard active during repaired run (`results/disk_usage_before_after.csv`, `results/disk_guard_report.md`): `PASS`
|
| 7 |
+
- Cleanup actions restricted to repository-local paths only (`results/disk_cleanup_actions.md`, outside-repo actions = 0): `PASS`
|
| 8 |
+
- Free disk remained above threshold during repaired run (`results/disk_guard_report.md`): `PASS`
|
| 9 |
+
- Required repaired PPI outputs exist under `results/ppi_benchmark/`: `PASS`
|
| 10 |
+
- Reports accurately describe benchmark semantics (`results/ppi_benchmark/report.md`, `results/ppi_benchmark_repair_audit.md`): `PASS`
|
| 11 |
+
|
| 12 |
+
## Required Output Presence
|
| 13 |
+
- `results/ppi_benchmark_repair_audit.md`: present
|
| 14 |
+
- `results/ppi_benchmark/summary.json`: present
|
| 15 |
+
- `results/ppi_benchmark/ranking.csv`: present
|
| 16 |
+
- `results/ppi_benchmark/features.csv`: present
|
| 17 |
+
- `results/ppi_benchmark/metadata.csv`: present
|
| 18 |
+
- `results/ppi_benchmark/timings.csv`: present
|
| 19 |
+
- `results/ppi_benchmark/report.md`: present
|
| 20 |
+
- `results/ppi_benchmark/self_audit_report.md`: present
|
| 21 |
+
- `results/disk_usage_before_after.csv`: present
|
| 22 |
+
- `results/disk_cleanup_actions.md`: present
|
| 23 |
+
- `results/disk_guard_report.md`: present
|
| 24 |
+
- `results/ppi_repair_self_audit.md`: present
|
| 25 |
+
|
| 26 |
+
## Result
|
| 27 |
+
- Overall status: `PASS`
|
| 28 |
+
|
results/prelim_refresh_cleanup.log
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Cleanup + refresh 2026-04-22T08:35:43Z
|
| 2 |
+
|
| 3 |
+
## Before
|
| 4 |
+
1.3G .
|
| 5 |
+
|
| 6 |
+
## After
|
| 7 |
+
762M .
|
results/prelim_three_sets_manifest_run.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"run_name": "prepare_three_new_sets",
|
| 3 |
+
"datasets": [
|
| 4 |
+
{
|
| 5 |
+
"ligands_dir": "data/ligands/prelim_set_egfr_4wkq",
|
| 6 |
+
"target_path": "data/targets/prelim_set_egfr_4wkq/egfr_4wkq.pdb",
|
| 7 |
+
"shared_library": "data/ligands/prelim_set_egfr_4wkq/shared_library_shuffled.csv",
|
| 8 |
+
"reference_csv": "data/ligands/prelim_set_egfr_4wkq/reference_ligands.csv",
|
| 9 |
+
"reference_id": "ref_gefitinib_prelim",
|
| 10 |
+
"reference_comp_id": "IRE",
|
| 11 |
+
"library_size": 1000
|
| 12 |
+
},
|
| 13 |
+
{
|
| 14 |
+
"ligands_dir": "data/ligands/prelim_set_abl1_1iep",
|
| 15 |
+
"target_path": "data/targets/prelim_set_abl1_1iep/abl1_1iep.pdb",
|
| 16 |
+
"shared_library": "data/ligands/prelim_set_abl1_1iep/shared_library_shuffled.csv",
|
| 17 |
+
"reference_csv": "data/ligands/prelim_set_abl1_1iep/reference_ligands.csv",
|
| 18 |
+
"reference_id": "ref_imatinib_prelim",
|
| 19 |
+
"reference_comp_id": "STI",
|
| 20 |
+
"library_size": 1000
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"ligands_dir": "data/ligands/prelim_set_mdm2_4hg7",
|
| 24 |
+
"target_path": "data/targets/prelim_set_mdm2_4hg7/mdm2_4hg7.pdb",
|
| 25 |
+
"shared_library": "data/ligands/prelim_set_mdm2_4hg7/shared_library_shuffled.csv",
|
| 26 |
+
"reference_csv": "data/ligands/prelim_set_mdm2_4hg7/reference_ligands.csv",
|
| 27 |
+
"reference_id": "ref_nutlin3a_prelim",
|
| 28 |
+
"reference_comp_id": "NUT",
|
| 29 |
+
"library_size": 1000
|
| 30 |
+
}
|
| 31 |
+
]
|
| 32 |
+
}
|
results/project_synthesis_figures_index.md
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Project Synthesis Figures Index
|
| 2 |
+
|
| 3 |
+
## /Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots
|
| 4 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/adaptive_vs_cluster_naive_mean_docking_only.png`
|
| 5 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/adaptive_vs_cluster_naive_mean_full_feature.png`
|
| 6 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/adaptive_vs_naive_mean_docking_only.png`
|
| 7 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/adaptive_vs_naive_mean_full_feature.png`
|
| 8 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/best_final_score_so_far_docking_only.png`
|
| 9 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/best_final_score_so_far_full_feature.png`
|
| 10 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/best_score_so_far_docking_only.png`
|
| 11 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/best_score_so_far_full_feature.png`
|
| 12 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/docking_only_vs_full_feature_comparison.png`
|
| 13 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/feature_importance_full_feature.png`
|
| 14 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rdock_feature_variant_comparison.png`
|
| 15 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rdock_native_feature_importance.png`
|
| 16 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rdock_pose_consistency_vs_score.png`
|
| 17 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rdock_replicate_stability_vs_score.png`
|
| 18 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rdock_top1_vs_multipose_top10.png`
|
| 19 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rdock_top1_vs_multipose_top20.png`
|
| 20 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/reference_discovery_steps.png`
|
| 21 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rolling_good_hit_fraction_docking_only.png`
|
| 22 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rolling_good_hit_fraction_full_feature.png`
|
| 23 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rolling_mean_score_docking_only.png`
|
| 24 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/rolling_mean_score_full_feature.png`
|
| 25 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/seed_variability_cluster_naive.png`
|
| 26 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/seed_variability_naive.png`
|
| 27 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/selected_final_score_vs_step_docking_only.png`
|
| 28 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/selected_final_score_vs_step_full_feature.png`
|
| 29 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/selected_score_vs_step_docking_only.png`
|
| 30 |
+
- `/Users/makardorohuntsev/docking_project/results/discovery_benchmark/plots/selected_score_vs_step_full_feature.png`
|
| 31 |
+
|
| 32 |
+
## /Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots
|
| 33 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/adaptive_variants_vs_cluster_naive.png`
|
| 34 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/adaptive_variants_vs_naive_mean.png`
|
| 35 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/best_final_score_so_far_by_policy.png`
|
| 36 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/best_score_so_far_by_policy.png`
|
| 37 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/cluster_coverage_over_time.png`
|
| 38 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/evaluated_count_vs_best_score.png`
|
| 39 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/hard_stop_vs_soft_stop_comparison.png`
|
| 40 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/hit_discovery_time_top1_to_top10.png`
|
| 41 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/hypercluster_coverage_over_time.png`
|
| 42 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/model_weight_over_time_by_policy.png`
|
| 43 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/policy_comparison_top10_first10.png`
|
| 44 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/policy_comparison_top10_first20.png`
|
| 45 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/policy_comparison_top10_first30.png`
|
| 46 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/soft_stop_event_timeline.png`
|
| 47 |
+
- `/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/plots/threshold_over_time_by_policy.png`
|
| 48 |
+
|
| 49 |
+
## /Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots
|
| 50 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/budget_vs_auc_best_score_curve.png`
|
| 51 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/budget_vs_best_final_score.png`
|
| 52 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/budget_vs_best_score.png`
|
| 53 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/budget_vs_quality_per_docking.png`
|
| 54 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/budget_vs_quality_per_time.png`
|
| 55 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/budget_vs_top100_recovery.png`
|
| 56 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/budget_vs_top10_recovery.png`
|
| 57 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/budget_vs_top50_recovery.png`
|
| 58 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/cross_dataset_budget_transfer.png`
|
| 59 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/cross_dataset_policy_transfer.png`
|
| 60 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/dataset_A_vs_B_efficiency.png`
|
| 61 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/dataset_A_vs_B_quality_per_docking.png`
|
| 62 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/dataset_A_vs_B_quality_per_time.png`
|
| 63 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/dataset_A_vs_B_topk_recovery.png`
|
| 64 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/policy_comparison_by_budget.png`
|
| 65 |
+
- `/Users/makardorohuntsev/docking_project/results/budget_efficiency_benchmark/plots/time_importance_sensitivity.png`
|
results/project_synthesis_report.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Project Synthesis Report
|
| 2 |
+
|
| 3 |
+
## 1. Project Evolution
|
| 4 |
+
- Started from strict real-rDock validation and backend hardening.
|
| 5 |
+
- Added adaptive scheduling, feature-rich surrogate logic, and fairness controls.
|
| 6 |
+
- Repaired mislabeled PPI benchmark into explicit peptide-like sanity modality.
|
| 7 |
+
- Added policy repair benchmark to diagnose hard-stop underperformance.
|
| 8 |
+
|
| 9 |
+
## 2. What Worked
|
| 10 |
+
- Strict real-rDock provenance and no-fallback enforcement proved stable on small-molecule tracks.
|
| 11 |
+
- Adaptive policy without aggressive early stop generally improved early hit concentration.
|
| 12 |
+
- Disk guard and thread fairness were consistently auditable.
|
| 13 |
+
|
| 14 |
+
## 3. What Failed / Was Repaired
|
| 15 |
+
- Hard-stop variants tended to terminate too early and lose top-hit recovery.
|
| 16 |
+
- PPI benchmark semantics were corrected from small-molecule misuse to peptide-like proxy sanity check.
|
| 17 |
+
|
| 18 |
+
## 4. Current Best Policy
|
| 19 |
+
- From budget benchmark: `adaptive_no_stop` at budget `5000` and time_importance `0.5`.
|
| 20 |
+
|
| 21 |
+
## 5. Practical Implications
|
| 22 |
+
- Budgeted adaptive ordering can improve quality-per-docking and quality-per-time over naive baselines.
|
| 23 |
+
- The value is strongest when policy and stopping control avoid premature convergence.
|
| 24 |
+
|
| 25 |
+
## 6. Remaining Uncertainty
|
| 26 |
+
- Transferability across broader chemistry/target classes remains partially open.
|
| 27 |
+
- Absolute runtime on workstation limits confidence for very large-scale production screening.
|
| 28 |
+
|
| 29 |
+
## 7. Next Steps
|
| 30 |
+
- Run selected policy on server-scale hardware with larger target panel and replicated seeds.
|
| 31 |
+
- Add robust confidence intervals for budget-frontier decisions across targets.
|
results/project_synthesis_report_overnight_updated.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Project Synthesis Report
|
| 2 |
+
|
| 3 |
+
## 1. Project Evolution
|
| 4 |
+
- Started from strict real-rDock validation and backend hardening.
|
| 5 |
+
- Added adaptive scheduling, feature-rich surrogate logic, and fairness controls.
|
| 6 |
+
- Repaired mislabeled PPI benchmark into explicit peptide-like sanity modality.
|
| 7 |
+
- Added policy repair benchmark to diagnose hard-stop underperformance.
|
| 8 |
+
|
| 9 |
+
## 2. What Worked
|
| 10 |
+
- Strict real-rDock provenance and no-fallback enforcement proved stable on small-molecule tracks.
|
| 11 |
+
- Adaptive policy without aggressive early stop generally improved early hit concentration.
|
| 12 |
+
- Disk guard and thread fairness were consistently auditable.
|
| 13 |
+
|
| 14 |
+
## 3. What Failed / Was Repaired
|
| 15 |
+
- Hard-stop variants tended to terminate too early and lose top-hit recovery.
|
| 16 |
+
- PPI benchmark semantics were corrected from small-molecule misuse to peptide-like proxy sanity check.
|
| 17 |
+
|
| 18 |
+
## 4. Current Best Policy
|
| 19 |
+
- From budget benchmark: `adaptive_no_stop` at budget `5000` and time_importance `0.5`.
|
| 20 |
+
|
| 21 |
+
## 5. Practical Implications
|
| 22 |
+
- Budgeted adaptive ordering can improve quality-per-docking and quality-per-time over naive baselines.
|
| 23 |
+
- The value is strongest when policy and stopping control avoid premature convergence.
|
| 24 |
+
|
| 25 |
+
## 6. Remaining Uncertainty
|
| 26 |
+
- Transferability across broader chemistry/target classes remains partially open.
|
| 27 |
+
- Absolute runtime on workstation limits confidence for very large-scale production screening.
|
| 28 |
+
|
| 29 |
+
## 7. Next Steps
|
| 30 |
+
- Run selected policy on server-scale hardware with larger target panel and replicated seeds.
|
| 31 |
+
- Add robust confidence intervals for budget-frontier decisions across targets.
|
| 32 |
+
|
| 33 |
+
## Epsilon-Regret Correction Pass
|
| 34 |
+
- Previous benchmark logic was dominated by ordering-only comparisons; this pass re-centered on cost-efficiency.
|
| 35 |
+
- New endpoint: early stop under epsilon-quality tolerance relative to exhaustive reference.
|
| 36 |
+
- Selected best strategy: `adaptive_budgeted_regret_stop`
|
| 37 |
+
- Selected best backend branch: `rdock`
|
| 38 |
+
- Mean docking reduction fraction: `0.9606`
|
| 39 |
+
- Mean quality loss at stop: `0.4644`
|
| 40 |
+
- HADDOCK integration mode: `real-haddock3-rescore-calibration`
|
| 41 |
+
|
| 42 |
+
## Overnight Stop-Model Pass
|
| 43 |
+
- Added formal stop-model comparison: percentile-target, regret-constrained, utility-maximizing, hybrid.
|
| 44 |
+
- Added objective-function comparison across regularized objective set.
|
| 45 |
+
- Added Dataset E and cross-dataset robustness update (A/B/C/D/E).
|
| 46 |
+
- Recommended stop model: `percentile_target`
|
| 47 |
+
- Recommended objective: `hybrid_objective`
|
| 48 |
+
- Recommended budget region: `[100, 2500]`
|
| 49 |
+
- HADDOCK role: `optional shortlist`
|
| 50 |
+
- rDock adequacy status: `mixed_or_weak_on_multiple_targets`
|
results/project_synthesis_report_updated.md
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Project Synthesis Report
|
| 2 |
+
|
| 3 |
+
## 1. Project Evolution
|
| 4 |
+
- Started from strict real-rDock validation and backend hardening.
|
| 5 |
+
- Added adaptive scheduling, feature-rich surrogate logic, and fairness controls.
|
| 6 |
+
- Repaired mislabeled PPI benchmark into explicit peptide-like sanity modality.
|
| 7 |
+
- Added policy repair benchmark to diagnose hard-stop underperformance.
|
| 8 |
+
|
| 9 |
+
## 2. What Worked
|
| 10 |
+
- Strict real-rDock provenance and no-fallback enforcement proved stable on small-molecule tracks.
|
| 11 |
+
- Adaptive policy without aggressive early stop generally improved early hit concentration.
|
| 12 |
+
- Disk guard and thread fairness were consistently auditable.
|
| 13 |
+
|
| 14 |
+
## 3. What Failed / Was Repaired
|
| 15 |
+
- Hard-stop variants tended to terminate too early and lose top-hit recovery.
|
| 16 |
+
- PPI benchmark semantics were corrected from small-molecule misuse to peptide-like proxy sanity check.
|
| 17 |
+
|
| 18 |
+
## 4. Current Best Policy
|
| 19 |
+
- From budget benchmark: `adaptive_no_stop` at budget `5000` and time_importance `0.5`.
|
| 20 |
+
|
| 21 |
+
## 5. Practical Implications
|
| 22 |
+
- Budgeted adaptive ordering can improve quality-per-docking and quality-per-time over naive baselines.
|
| 23 |
+
- The value is strongest when policy and stopping control avoid premature convergence.
|
| 24 |
+
|
| 25 |
+
## 6. Remaining Uncertainty
|
| 26 |
+
- Transferability across broader chemistry/target classes remains partially open.
|
| 27 |
+
- Absolute runtime on workstation limits confidence for very large-scale production screening.
|
| 28 |
+
|
| 29 |
+
## 7. Next Steps
|
| 30 |
+
- Run selected policy on server-scale hardware with larger target panel and replicated seeds.
|
| 31 |
+
- Add robust confidence intervals for budget-frontier decisions across targets.
|
| 32 |
+
|
| 33 |
+
## Epsilon-Regret Correction Pass
|
| 34 |
+
- Previous benchmark logic was dominated by ordering-only comparisons; this pass re-centered on cost-efficiency.
|
| 35 |
+
- New endpoint: early stop under epsilon-quality tolerance relative to exhaustive reference.
|
| 36 |
+
- Selected best strategy: `adaptive_budgeted_regret_stop`
|
| 37 |
+
- Selected best backend branch: `rdock`
|
| 38 |
+
- Mean docking reduction fraction: `0.9606`
|
| 39 |
+
- Mean quality loss at stop: `0.4644`
|
| 40 |
+
- HADDOCK integration mode: `real-haddock3-rescore-calibration`
|
results/project_synthesis_tables.csv
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
stage,metric,value,source
|
| 2 |
+
discovery_benchmark,target,MDM2,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 3 |
+
discovery_benchmark,reference_ligand,ref_nutlin3a,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 4 |
+
discovery_benchmark,final_ligand_count,7500,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 5 |
+
discovery_benchmark,database_fraction,1.0,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 6 |
+
discovery_benchmark,generated_fraction,0.0,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 7 |
+
discovery_benchmark,shuffle_seed,424242,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 8 |
+
discovery_benchmark,reference_present,True,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 9 |
+
discovery_benchmark,completed_runs,23,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 10 |
+
discovery_benchmark,real_rdock_only,True,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 11 |
+
discovery_benchmark,system_threads,14,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 12 |
+
discovery_benchmark,threads_used,10,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 13 |
+
discovery_benchmark,thread_policy,auto-minus-4,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 14 |
+
discovery_benchmark,timing_fairness_same_threads,True,/Users/makardorohuntsev/docking_project/results/discovery_benchmark/summary.json
|
| 15 |
+
policy_repair_benchmark,target,MDM2,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 16 |
+
policy_repair_benchmark,reference_id,ref_nutlin3a,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 17 |
+
policy_repair_benchmark,shared_library_size,7500,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 18 |
+
policy_repair_benchmark,reference_present,True,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 19 |
+
policy_repair_benchmark,real_rdock_only,True,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 20 |
+
policy_repair_benchmark,system_threads,14,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 21 |
+
policy_repair_benchmark,threads_used,10,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 22 |
+
policy_repair_benchmark,thread_policy,auto-minus-4,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 23 |
+
policy_repair_benchmark,adaptive_hard_stop_evaluated,786.0,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 24 |
+
policy_repair_benchmark,adaptive_soft_stop_evaluated,1298.0,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 25 |
+
policy_repair_benchmark,adaptive_no_stop_evaluated,7500.0,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 26 |
+
policy_repair_benchmark,adaptive_cluster_bootstrap_evaluated,608.0,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 27 |
+
policy_repair_benchmark,adaptive_soft_stop_cluster_floor_evaluated,3547.0,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 28 |
+
policy_repair_benchmark,hard_stop_top10_in_first20pct,0.17197452229299362,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 29 |
+
policy_repair_benchmark,soft_stop_top10_in_first20pct,0.19305019305019305,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 30 |
+
policy_repair_benchmark,soft_stop_cluster_floor_top10_in_first20pct,0.12411847672778561,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 31 |
+
policy_repair_benchmark,no_stop_top10_in_first20pct,0.22866666666666666,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 32 |
+
policy_repair_benchmark,cluster_bootstrap_top10_in_first20pct,0.1652892561983471,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 33 |
+
policy_repair_benchmark,naive_mean_top10_in_first20pct,0.09986666666666669,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 34 |
+
policy_repair_benchmark,cluster_naive_mean_top10_in_first20pct,0.12973333333333334,/Users/makardorohuntsev/docking_project/results/policy_repair_benchmark/summary.json
|
| 35 |
+
ppi_benchmark,benchmark_type,peptide_like,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 36 |
+
ppi_benchmark,backend_semantics,sequence_structural_proxy,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 37 |
+
ppi_benchmark,target,MDM2,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 38 |
+
ppi_benchmark,reference_complex_pdb,1YCR,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 39 |
+
ppi_benchmark,receptor_chain_id,A,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 40 |
+
ppi_benchmark,peptide_chain_id,B,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 41 |
+
ppi_benchmark,ligand_count,50,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 42 |
+
ppi_benchmark,successful_docked_count,50,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 43 |
+
ppi_benchmark,reference_rank,1,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 44 |
+
ppi_benchmark,top10_mean_identity_to_ref,0.9384615384615385,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 45 |
+
ppi_benchmark,real_rdock_only_successful_rows,False,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 46 |
+
ppi_benchmark,proxy_backend_only,True,/Users/makardorohuntsev/docking_project/results/ppi_benchmark/summary.json
|
| 47 |
+
budget_efficiency_benchmark,dataset_A_target,EGFR,in-memory
|
| 48 |
+
budget_efficiency_benchmark,dataset_A_reference,IRE,in-memory
|
| 49 |
+
budget_efficiency_benchmark,dataset_A_library_size,9998,in-memory
|
| 50 |
+
budget_efficiency_benchmark,dataset_B_target,ABL1,in-memory
|
| 51 |
+
budget_efficiency_benchmark,dataset_B_reference,STI,in-memory
|
| 52 |
+
budget_efficiency_benchmark,dataset_B_library_size,9994,in-memory
|
| 53 |
+
budget_efficiency_benchmark,selected_policy,adaptive_no_stop,in-memory
|
| 54 |
+
budget_efficiency_benchmark,selected_budget,5000,in-memory
|
| 55 |
+
budget_efficiency_benchmark,selected_time_importance,0.5,in-memory
|
| 56 |
+
budget_efficiency_benchmark,threads_used,10,in-memory
|
| 57 |
+
budget_efficiency_benchmark,system_threads,14,in-memory
|
| 58 |
+
budget_efficiency_benchmark,real_rdock_only_A,True,in-memory
|
| 59 |
+
budget_efficiency_benchmark,real_rdock_only_B,True,in-memory
|
results/stage1_code_unification_summary.md
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stage 1: Code Unification Summary
|
| 2 |
+
|
| 3 |
+
- Unified runner added: `pipeline/run_benchmark.py`.
|
| 4 |
+
- Central thread fairness policy added: `libs/benchmark/runtime.py`.
|
| 5 |
+
- Dynamic threshold/early-stop controller added: `libs/adaptive/thresholding.py`.
|
| 6 |
+
- Legacy artifact cleanup utilities added: `libs/benchmark/cleanup.py` and `pipeline/cleanup_legacy_results.py`.
|
| 7 |
+
- Large benchmark hardened with fairness accounting, threshold logs, discovery metrics, and statistical tables.
|
| 8 |
+
|
| 9 |
+
Thread fairness:
|
| 10 |
+
- policy: `auto-minus-4`
|
| 11 |
+
- system_threads: `14`
|
| 12 |
+
- threads_used: `10`
|
| 13 |
+
|
| 14 |
+
Tests:
|
| 15 |
+
- Full suite status: `python3 -m unittest discover -s tests -p 'test_*.py'` -> `36 passed, 0 failed`.
|
results/stage2_cleanup_summary.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stage 2: Cleanup Summary
|
| 2 |
+
|
| 3 |
+
- Archived obsolete result directories: `1`
|
| 4 |
+
- Archive directory: `/Users/makardorohuntsev/docking_project/results/archive/20260415T211637Z`
|
| 5 |
+
|
| 6 |
+
Archived items:
|
| 7 |
+
- `/Users/makardorohuntsev/docking_project/results/demo_run` (obsolete_or_legacy_result_artifact)
|
| 8 |
+
|
| 9 |
+
Current state:
|
| 10 |
+
- Active benchmark/result directories kept in place (`discovery_benchmark`, `large_benchmark`, `ppi_benchmark`, `smoke_test`, and archives under `results/archive/`).
|
results/stage3_ppi_summary.md
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stage 3: PPI Benchmark Summary
|
| 2 |
+
|
| 3 |
+
- Output dir: `/Users/makardorohuntsev/docking_project/results/ppi_benchmark`
|
| 4 |
+
- Ligand count: `50`
|
| 5 |
+
- Successful docked count: `50`
|
| 6 |
+
- Reference rank: `10`
|
| 7 |
+
- Real rDock only (successful rows): `True`
|
results/stage4_discovery_benchmark_summary.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stage 4: Discovery Benchmark Summary
|
| 2 |
+
|
| 3 |
+
- Target: `MDM2`
|
| 4 |
+
- Final ligand count: `7500`
|
| 5 |
+
- Total replay runtime seconds: `98.65`
|
| 6 |
+
- system_threads: `14`
|
| 7 |
+
- threads_used: `10`
|
| 8 |
+
- thread fairness satisfied: `True`
|
| 9 |
+
- Real rDock only: `True`
|
| 10 |
+
|
| 11 |
+
## Early Stop
|
| 12 |
+
- Stop decisions logged: `57`
|
| 13 |
+
- Stop triggered rows: `3`
|
| 14 |
+
- Last stop reason: `stagnation_above_dynamic_threshold` at round `18`
|
| 15 |
+
|
| 16 |
+
## Time To Top-k (mean over seeds where discovered)
|
| 17 |
+
- Mode `docking_only`:
|
| 18 |
+
adaptive top-1: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 19 |
+
adaptive top-2: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 20 |
+
adaptive top-3: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 21 |
+
adaptive top-5: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 22 |
+
adaptive top-10: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 23 |
+
naive_random top-1: mean_step=`3031.40` mean_dockings=`3032.40` reached_fraction=`1.000`
|
| 24 |
+
naive_random top-2: mean_step=`1601.80` mean_dockings=`1602.80` reached_fraction=`1.000`
|
| 25 |
+
naive_random top-3: mean_step=`1383.60` mean_dockings=`1384.60` reached_fraction=`1.000`
|
| 26 |
+
naive_random top-5: mean_step=`1228.00` mean_dockings=`1229.00` reached_fraction=`1.000`
|
| 27 |
+
naive_random top-10: mean_step=`182.80` mean_dockings=`183.80` reached_fraction=`1.000`
|
| 28 |
+
cluster_naive top-1: mean_step=`513.80` mean_dockings=`514.80` reached_fraction=`1.000`
|
| 29 |
+
cluster_naive top-2: mean_step=`513.80` mean_dockings=`514.80` reached_fraction=`1.000`
|
| 30 |
+
cluster_naive top-3: mean_step=`513.80` mean_dockings=`514.80` reached_fraction=`1.000`
|
| 31 |
+
cluster_naive top-5: mean_step=`508.80` mean_dockings=`509.80` reached_fraction=`1.000`
|
| 32 |
+
cluster_naive top-10: mean_step=`508.80` mean_dockings=`509.80` reached_fraction=`1.000`
|
| 33 |
+
- Mode `full_feature`:
|
| 34 |
+
adaptive top-1: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 35 |
+
adaptive top-2: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 36 |
+
adaptive top-3: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 37 |
+
adaptive top-5: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 38 |
+
adaptive top-10: mean_step=`nan` mean_dockings=`nan` reached_fraction=`0.000`
|
| 39 |
+
naive_random top-1: mean_step=`3031.40` mean_dockings=`3032.40` reached_fraction=`1.000`
|
| 40 |
+
naive_random top-2: mean_step=`1601.80` mean_dockings=`1602.80` reached_fraction=`1.000`
|
| 41 |
+
naive_random top-3: mean_step=`1383.60` mean_dockings=`1384.60` reached_fraction=`1.000`
|
| 42 |
+
naive_random top-5: mean_step=`1228.00` mean_dockings=`1229.00` reached_fraction=`1.000`
|
| 43 |
+
naive_random top-10: mean_step=`182.80` mean_dockings=`183.80` reached_fraction=`1.000`
|
| 44 |
+
cluster_naive top-1: mean_step=`513.80` mean_dockings=`514.80` reached_fraction=`1.000`
|
| 45 |
+
cluster_naive top-2: mean_step=`513.80` mean_dockings=`514.80` reached_fraction=`1.000`
|
| 46 |
+
cluster_naive top-3: mean_step=`513.80` mean_dockings=`514.80` reached_fraction=`1.000`
|
| 47 |
+
cluster_naive top-5: mean_step=`508.80` mean_dockings=`509.80` reached_fraction=`1.000`
|
| 48 |
+
cluster_naive top-10: mean_step=`508.80` mean_dockings=`509.80` reached_fraction=`1.000`
|
| 49 |
+
|
| 50 |
+
## Adaptive vs Baselines (run_metrics)
|
| 51 |
+
- mode=docking_only metric=best_docking_score:
|
| 52 |
+
adaptive: mean=`-19.094200` std=`0.000000`
|
| 53 |
+
cluster_naive: mean=`-30.320700` std=`0.000000`
|
| 54 |
+
naive_random: mean=`-30.320700` std=`0.000000`
|
| 55 |
+
- mode=docking_only metric=best_final_score:
|
| 56 |
+
adaptive: mean=`-19.059859` std=`0.048565`
|
| 57 |
+
cluster_naive: mean=`-30.320700` std=`0.000000`
|
| 58 |
+
naive_random: mean=`-30.320700` std=`0.000000`
|
| 59 |
+
- mode=docking_only metric=top10_in_first10pct:
|
| 60 |
+
adaptive: mean=`0.066667` std=`0.000000`
|
| 61 |
+
cluster_naive: mean=`0.128533` std=`0.008198`
|
| 62 |
+
naive_random: mean=`0.097600` std=`0.013901`
|
| 63 |
+
- mode=docking_only metric=top10_in_first20pct:
|
| 64 |
+
adaptive: mean=`0.066116` std=`0.000000`
|
| 65 |
+
cluster_naive: mean=`0.129733` std=`0.022329`
|
| 66 |
+
naive_random: mean=`0.099867` std=`0.006539`
|
| 67 |
+
- mode=docking_only metric=best_score_so_far_auc:
|
| 68 |
+
adaptive: mean=`-8579.375846` std=`0.000000`
|
| 69 |
+
cluster_naive: mean=`-219759.448932` std=`6179.372334`
|
| 70 |
+
naive_random: mean=`-207727.899538` std=`14967.993309`
|
| 71 |
+
- mode=full_feature metric=best_docking_score:
|
| 72 |
+
adaptive: mean=`-17.186500` std=`nan`
|
| 73 |
+
cluster_naive: mean=`-30.320700` std=`0.000000`
|
| 74 |
+
naive_random: mean=`-30.320700` std=`0.000000`
|
| 75 |
+
- mode=full_feature metric=best_final_score:
|
| 76 |
+
adaptive: mean=`-21.414036` std=`nan`
|
| 77 |
+
cluster_naive: mean=`-33.352770` std=`0.000000`
|
| 78 |
+
naive_random: mean=`-33.352770` std=`0.000000`
|
| 79 |
+
- mode=full_feature metric=top10_in_first10pct:
|
| 80 |
+
adaptive: mean=`0.050000` std=`nan`
|
| 81 |
+
cluster_naive: mean=`0.128533` std=`0.008198`
|
| 82 |
+
naive_random: mean=`0.097600` std=`0.013901`
|
| 83 |
+
- mode=full_feature metric=top10_in_first20pct:
|
| 84 |
+
adaptive: mean=`0.049587` std=`nan`
|
| 85 |
+
cluster_naive: mean=`0.129733` std=`0.022329`
|
| 86 |
+
naive_random: mean=`0.099867` std=`0.006539`
|
| 87 |
+
- mode=full_feature metric=best_score_so_far_auc:
|
| 88 |
+
adaptive: mean=`-7864.257404` std=`nan`
|
| 89 |
+
cluster_naive: mean=`-219759.448932` std=`6179.372334`
|
| 90 |
+
naive_random: mean=`-207727.899538` std=`14967.993309`
|
| 91 |
+
|
| 92 |
+
## Significance / Effect Size (adaptive vs baselines)
|
| 93 |
+
- mode=docking_only metric=best_final_score adaptive vs naive_random: p=`0.0297272` U=`10.000`
|
| 94 |
+
- mode=docking_only metric=top10_in_first10pct adaptive vs naive_random: p=`0.0786429` U=`0.000`
|
| 95 |
+
- mode=docking_only metric=top10_in_first20pct adaptive vs naive_random: p=`0.075927` U=`0.000`
|
| 96 |
+
- mode=docking_only metric=best_final_score adaptive vs cluster_naive: p=`0.0297272` U=`10.000`
|
| 97 |
+
- mode=docking_only metric=top10_in_first10pct adaptive vs cluster_naive: p=`0.0786429` U=`0.000`
|
| 98 |
+
- mode=docking_only metric=top10_in_first20pct adaptive vs cluster_naive: p=`0.0786429` U=`0.000`
|
| 99 |
+
- mode=full_feature metric=best_final_score adaptive vs naive_random: p=`0.0736383` U=`5.000`
|
| 100 |
+
- mode=full_feature metric=top10_in_first10pct adaptive vs naive_random: p=`0.333333` U=`0.000`
|
| 101 |
+
- mode=full_feature metric=top10_in_first20pct adaptive vs naive_random: p=`0.234764` U=`0.000`
|
| 102 |
+
- mode=full_feature metric=best_final_score adaptive vs cluster_naive: p=`0.0736383` U=`5.000`
|
| 103 |
+
- mode=full_feature metric=top10_in_first10pct adaptive vs cluster_naive: p=`0.333333` U=`0.000`
|
| 104 |
+
- mode=full_feature metric=top10_in_first20pct adaptive vs cluster_naive: p=`0.333333` U=`0.000`
|
| 105 |
+
- mode=docking_only metric=best_final_score cliffs_delta=`1.0000` mean_adaptive=`-19.059859` mean_naive_random=`-30.320700`
|
| 106 |
+
- mode=docking_only metric=top10_in_first10pct cliffs_delta=`-1.0000` mean_adaptive=`0.066667` mean_naive_random=`0.097600`
|
| 107 |
+
- mode=docking_only metric=top10_in_first20pct cliffs_delta=`-1.0000` mean_adaptive=`0.066116` mean_naive_random=`0.099867`
|
| 108 |
+
- mode=docking_only metric=best_final_score cliffs_delta=`1.0000` mean_adaptive=`-19.059859` mean_cluster_naive=`-30.320700`
|
| 109 |
+
- mode=docking_only metric=top10_in_first10pct cliffs_delta=`-1.0000` mean_adaptive=`0.066667` mean_cluster_naive=`0.128533`
|
| 110 |
+
- mode=docking_only metric=top10_in_first20pct cliffs_delta=`-1.0000` mean_adaptive=`0.066116` mean_cluster_naive=`0.129733`
|
| 111 |
+
- mode=full_feature metric=best_final_score cliffs_delta=`1.0000` mean_adaptive=`-21.414036` mean_naive_random=`-33.352770`
|
| 112 |
+
- mode=full_feature metric=top10_in_first10pct cliffs_delta=`-1.0000` mean_adaptive=`0.050000` mean_naive_random=`0.097600`
|
| 113 |
+
- mode=full_feature metric=top10_in_first20pct cliffs_delta=`-1.0000` mean_adaptive=`0.049587` mean_naive_random=`0.099867`
|
| 114 |
+
- mode=full_feature metric=best_final_score cliffs_delta=`1.0000` mean_adaptive=`-21.414036` mean_cluster_naive=`-33.352770`
|
| 115 |
+
- mode=full_feature metric=top10_in_first10pct cliffs_delta=`-1.0000` mean_adaptive=`0.050000` mean_cluster_naive=`0.128533`
|
| 116 |
+
- mode=full_feature metric=top10_in_first20pct cliffs_delta=`-1.0000` mean_adaptive=`0.049587` mean_cluster_naive=`0.129733`
|
tests/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
"""Test package for adaptive docking pipeline."""
|
tests/test_backend_comparison_semantics.py
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
|
| 5 |
+
import pandas as pd
|
| 6 |
+
|
| 7 |
+
from libs.docking.comparison import build_backend_comparison_table
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class TestBackendComparisonSemantics(unittest.TestCase):
|
| 11 |
+
def test_mixed_backend_disables_direct_raw_comparison(self) -> None:
|
| 12 |
+
df = pd.DataFrame(
|
| 13 |
+
[
|
| 14 |
+
{
|
| 15 |
+
"ligand_id": "l1",
|
| 16 |
+
"backend_name": "rdock",
|
| 17 |
+
"backend_mode": "real-rdock",
|
| 18 |
+
"docking_score": -8.0,
|
| 19 |
+
"raw_output_file": "a",
|
| 20 |
+
"parsed_from": "a::SCORE",
|
| 21 |
+
},
|
| 22 |
+
{
|
| 23 |
+
"ligand_id": "l1",
|
| 24 |
+
"backend_name": "haddock",
|
| 25 |
+
"backend_mode": "real-haddock3-rescore",
|
| 26 |
+
"docking_score": -12.0,
|
| 27 |
+
"raw_output_file": "b",
|
| 28 |
+
"parsed_from": "b::HADDOCK",
|
| 29 |
+
},
|
| 30 |
+
]
|
| 31 |
+
)
|
| 32 |
+
out = build_backend_comparison_table(df)
|
| 33 |
+
self.assertEqual(out.shape[0], 2)
|
| 34 |
+
self.assertFalse(bool(out["direct_comparison_justified"].all()))
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
if __name__ == "__main__":
|
| 38 |
+
unittest.main()
|
| 39 |
+
|
tests/test_backend_diagnostic_logic.py
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import tempfile
|
| 4 |
+
import unittest
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
import numpy as np
|
| 8 |
+
import pandas as pd
|
| 9 |
+
|
| 10 |
+
from libs.analysis.backend_diagnostic import (
|
| 11 |
+
REQUIRED_BACKEND_COMPARISON_COLUMNS,
|
| 12 |
+
REQUIRED_POCKET_PREP_COLUMNS,
|
| 13 |
+
REQUIRED_REFERENCE_DIAG_COLUMNS,
|
| 14 |
+
compute_rank_percentile,
|
| 15 |
+
manual_agents_check,
|
| 16 |
+
recommend_toolchain,
|
| 17 |
+
select_suspicious_datasets,
|
| 18 |
+
validate_required_columns,
|
| 19 |
+
)
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
class TestBackendDiagnosticLogic(unittest.TestCase):
|
| 23 |
+
def test_manual_agents_check_exists(self) -> None:
|
| 24 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 25 |
+
p = Path(tmp) / "AGENTS.md"
|
| 26 |
+
p.write_text("x", encoding="utf-8")
|
| 27 |
+
out = manual_agents_check(p, manually_read=True)
|
| 28 |
+
self.assertTrue(out.exists)
|
| 29 |
+
self.assertTrue(out.manually_read)
|
| 30 |
+
self.assertEqual(Path(out.path), p.resolve())
|
| 31 |
+
|
| 32 |
+
def test_compute_rank_percentile(self) -> None:
|
| 33 |
+
df = pd.DataFrame(
|
| 34 |
+
{
|
| 35 |
+
"ligand_id": ["a", "b", "c", "d"],
|
| 36 |
+
"score": [5.0, 1.0, 3.0, 2.0],
|
| 37 |
+
}
|
| 38 |
+
)
|
| 39 |
+
# sorted lower-better: b,d,c,a -> c rank 3/4 => 75%
|
| 40 |
+
pct = compute_rank_percentile(df, "c", "score", lower_is_better=True)
|
| 41 |
+
self.assertAlmostEqual(pct, 75.0, places=6)
|
| 42 |
+
|
| 43 |
+
def test_select_suspicious(self) -> None:
|
| 44 |
+
d = pd.DataFrame(
|
| 45 |
+
{
|
| 46 |
+
"dataset": ["A", "B", "C", "D"],
|
| 47 |
+
"reference_ligand_rank_percentile": [10.0, 55.0, 25.0, 80.0],
|
| 48 |
+
}
|
| 49 |
+
)
|
| 50 |
+
out = select_suspicious_datasets(d, threshold_pct=30.0, max_deep=2)
|
| 51 |
+
self.assertEqual(out, ["D", "B"])
|
| 52 |
+
|
| 53 |
+
def test_validate_required_columns(self) -> None:
|
| 54 |
+
d = pd.DataFrame({"a": [1], "b": [2]})
|
| 55 |
+
missing = validate_required_columns(d, ["a", "x"])
|
| 56 |
+
self.assertEqual(missing, ["x"])
|
| 57 |
+
|
| 58 |
+
def test_recommend_toolchain_runtime_penalty(self) -> None:
|
| 59 |
+
b = pd.DataFrame(
|
| 60 |
+
[
|
| 61 |
+
{
|
| 62 |
+
"dataset": "A",
|
| 63 |
+
"backend": "vina",
|
| 64 |
+
"analysis_scope": "subset_default",
|
| 65 |
+
"available": True,
|
| 66 |
+
"runtime_per_ligand": 3.0,
|
| 67 |
+
"reference_ligand_rank_percentile": 10.0,
|
| 68 |
+
},
|
| 69 |
+
{
|
| 70 |
+
"dataset": "A",
|
| 71 |
+
"backend": "rdock",
|
| 72 |
+
"analysis_scope": "subset_default",
|
| 73 |
+
"available": True,
|
| 74 |
+
"runtime_per_ligand": 1.0,
|
| 75 |
+
"reference_ligand_rank_percentile": 12.0,
|
| 76 |
+
},
|
| 77 |
+
]
|
| 78 |
+
)
|
| 79 |
+
p = pd.DataFrame(
|
| 80 |
+
[
|
| 81 |
+
{
|
| 82 |
+
"dataset": "A",
|
| 83 |
+
"backend": "rdock",
|
| 84 |
+
"pocket_variant": "default",
|
| 85 |
+
"prep_variant": "default",
|
| 86 |
+
"reference_ligand_score": 5.0,
|
| 87 |
+
},
|
| 88 |
+
{
|
| 89 |
+
"dataset": "A",
|
| 90 |
+
"backend": "rdock",
|
| 91 |
+
"pocket_variant": "expanded",
|
| 92 |
+
"prep_variant": "tautomer",
|
| 93 |
+
"reference_ligand_score": 4.7,
|
| 94 |
+
},
|
| 95 |
+
]
|
| 96 |
+
)
|
| 97 |
+
out = recommend_toolchain(b, p)
|
| 98 |
+
self.assertEqual(out["recommended_main_backend"], "rdock")
|
| 99 |
+
self.assertIn("candidate_backend_too_slow_vs_rdock", out["evidence"])
|
| 100 |
+
|
| 101 |
+
def test_required_schema_constants_nonempty(self) -> None:
|
| 102 |
+
self.assertGreater(len(REQUIRED_REFERENCE_DIAG_COLUMNS), 0)
|
| 103 |
+
self.assertGreater(len(REQUIRED_BACKEND_COMPARISON_COLUMNS), 0)
|
| 104 |
+
self.assertGreater(len(REQUIRED_POCKET_PREP_COLUMNS), 0)
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
if __name__ == "__main__":
|
| 108 |
+
unittest.main()
|
tests/test_benchmark_outputs.py
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import tempfile
|
| 4 |
+
import unittest
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
import yaml
|
| 8 |
+
|
| 9 |
+
from pipeline.run_experimental_benchmark import run_benchmark
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
class TestBenchmarkOutputs(unittest.TestCase):
|
| 13 |
+
def test_benchmark_outputs_exist_in_tiny_run(self) -> None:
|
| 14 |
+
cfg = yaml.safe_load(Path("configs/experimental_benchmark.yaml").read_text(encoding="utf-8"))
|
| 15 |
+
cfg["run"]["adaptive_budget"] = 4
|
| 16 |
+
cfg["run"]["baseline_budget"] = 4
|
| 17 |
+
cfg["run"]["batch_size"] = 2
|
| 18 |
+
cfg["run"]["max_batches"] = 2
|
| 19 |
+
cfg["run"]["dataset_subset_size"] = 120
|
| 20 |
+
|
| 21 |
+
with tempfile.TemporaryDirectory() as tmpdir:
|
| 22 |
+
cfg["run"]["output_dir"] = str(Path(tmpdir) / "benchmark_tiny")
|
| 23 |
+
cfg_path = Path(tmpdir) / "benchmark_tiny.yaml"
|
| 24 |
+
cfg_path.write_text(yaml.safe_dump(cfg), encoding="utf-8")
|
| 25 |
+
|
| 26 |
+
result = run_benchmark(cfg_path)
|
| 27 |
+
out = Path(result["output_dir"])
|
| 28 |
+
|
| 29 |
+
required = [
|
| 30 |
+
"summary.json",
|
| 31 |
+
"final_ranking.csv",
|
| 32 |
+
"reference_recovery.csv",
|
| 33 |
+
"reference_comparison.csv",
|
| 34 |
+
"baseline_comparison.csv",
|
| 35 |
+
"parsed_scores.csv",
|
| 36 |
+
"feature_importance.json",
|
| 37 |
+
"self_audit_report.md",
|
| 38 |
+
]
|
| 39 |
+
for name in required:
|
| 40 |
+
self.assertTrue((out / name).exists(), f"Missing output: {name}")
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
if __name__ == "__main__":
|
| 44 |
+
unittest.main()
|
tests/test_budget_efficiency_helpers.py
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import json
|
| 4 |
+
import tempfile
|
| 5 |
+
import unittest
|
| 6 |
+
from pathlib import Path
|
| 7 |
+
|
| 8 |
+
import pandas as pd
|
| 9 |
+
|
| 10 |
+
from libs.adaptive.policies import PrioritizationPolicy
|
| 11 |
+
from libs.benchmark.budget_efficiency import (
|
| 12 |
+
clamp_time_importance,
|
| 13 |
+
controls_from_time_importance,
|
| 14 |
+
required_budget_metric_columns,
|
| 15 |
+
select_best_policy_budget,
|
| 16 |
+
validate_budget_metric_schema,
|
| 17 |
+
)
|
| 18 |
+
from pipeline.run_budget_efficiency_benchmark import _project_synthesis, _self_audit
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
class TestBudgetEfficiencyHelpers(unittest.TestCase):
|
| 22 |
+
def test_time_importance_clamp(self) -> None:
|
| 23 |
+
self.assertEqual(clamp_time_importance(-0.1), 0.0)
|
| 24 |
+
self.assertEqual(clamp_time_importance(1.5), 1.0)
|
| 25 |
+
self.assertEqual(clamp_time_importance(0.25), 0.25)
|
| 26 |
+
|
| 27 |
+
def test_time_importance_controls_shift(self) -> None:
|
| 28 |
+
base = PrioritizationPolicy()
|
| 29 |
+
low = controls_from_time_importance(base, exploration_boost=0.1, time_importance=0.0)
|
| 30 |
+
high = controls_from_time_importance(base, exploration_boost=0.1, time_importance=1.0)
|
| 31 |
+
self.assertGreaterEqual(high.utility_weight, low.utility_weight)
|
| 32 |
+
self.assertLessEqual(high.uncertainty_weight, low.uncertainty_weight)
|
| 33 |
+
self.assertLessEqual(high.diversity_weight, low.diversity_weight)
|
| 34 |
+
self.assertLessEqual(high.threshold_stop_shift, 0.0)
|
| 35 |
+
|
| 36 |
+
def test_schema_validation(self) -> None:
|
| 37 |
+
cols = required_budget_metric_columns()
|
| 38 |
+
df = pd.DataFrame([{c: 0 for c in cols}])
|
| 39 |
+
missing = validate_budget_metric_schema(df)
|
| 40 |
+
self.assertEqual(missing, [])
|
| 41 |
+
|
| 42 |
+
def test_policy_selection(self) -> None:
|
| 43 |
+
df = pd.DataFrame(
|
| 44 |
+
[
|
| 45 |
+
{
|
| 46 |
+
"dataset": "A",
|
| 47 |
+
"strategy": "adaptive_soft_stop",
|
| 48 |
+
"strategy_group": "adaptive",
|
| 49 |
+
"budget": 500,
|
| 50 |
+
"time_importance": 0.5,
|
| 51 |
+
"top10_recovery_fraction": 0.2,
|
| 52 |
+
"top50_recovery_fraction": 0.15,
|
| 53 |
+
"top100_recovery_fraction": 0.10,
|
| 54 |
+
"best_docking_score": -8.0,
|
| 55 |
+
"best_final_score": -9.0,
|
| 56 |
+
"dockings_performed": 500,
|
| 57 |
+
"wall_time_seconds": 10.0,
|
| 58 |
+
"quality_per_time": 0.010,
|
| 59 |
+
"quality_per_docking": 0.0002,
|
| 60 |
+
"auc_best_score_so_far": -100.0,
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"dataset": "A",
|
| 64 |
+
"strategy": "adaptive_no_stop",
|
| 65 |
+
"strategy_group": "adaptive",
|
| 66 |
+
"budget": 500,
|
| 67 |
+
"time_importance": 0.5,
|
| 68 |
+
"top10_recovery_fraction": 0.4,
|
| 69 |
+
"top50_recovery_fraction": 0.30,
|
| 70 |
+
"top100_recovery_fraction": 0.20,
|
| 71 |
+
"best_docking_score": -9.0,
|
| 72 |
+
"best_final_score": -10.0,
|
| 73 |
+
"dockings_performed": 500,
|
| 74 |
+
"wall_time_seconds": 9.0,
|
| 75 |
+
"quality_per_time": 0.022,
|
| 76 |
+
"quality_per_docking": 0.0004,
|
| 77 |
+
"auc_best_score_so_far": -150.0,
|
| 78 |
+
},
|
| 79 |
+
]
|
| 80 |
+
)
|
| 81 |
+
selected = select_best_policy_budget(df)
|
| 82 |
+
self.assertEqual(str(selected["strategy"]), "adaptive_no_stop")
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
class TestSynthesisAndAuditSchemas(unittest.TestCase):
|
| 86 |
+
def test_project_synthesis_outputs(self) -> None:
|
| 87 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 88 |
+
root = Path(tmp)
|
| 89 |
+
results = root / "results"
|
| 90 |
+
results.mkdir(parents=True, exist_ok=True)
|
| 91 |
+
# seed minimal legacy summaries expected by synthesis collector
|
| 92 |
+
for d in ["discovery_benchmark", "policy_repair_benchmark", "ppi_benchmark"]:
|
| 93 |
+
p = results / d
|
| 94 |
+
p.mkdir(parents=True, exist_ok=True)
|
| 95 |
+
(p / "summary.json").write_text(json.dumps({"ok": True, "value": 1}), encoding="utf-8")
|
| 96 |
+
out = results / "budget_efficiency_benchmark"
|
| 97 |
+
out.mkdir(parents=True, exist_ok=True)
|
| 98 |
+
tables, index, report = _project_synthesis(out, {"selected_policy": "adaptive_no_stop", "selected_budget": 500})
|
| 99 |
+
self.assertTrue(tables.exists())
|
| 100 |
+
self.assertTrue(index.exists())
|
| 101 |
+
self.assertTrue(report.exists())
|
| 102 |
+
|
| 103 |
+
def test_self_audit_schema(self) -> None:
|
| 104 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 105 |
+
root = Path(tmp)
|
| 106 |
+
results = root / "results"
|
| 107 |
+
results.mkdir(parents=True, exist_ok=True)
|
| 108 |
+
(results / "discovery_benchmark").mkdir(parents=True, exist_ok=True)
|
| 109 |
+
(results / "discovery_benchmark" / "summary.json").write_text(json.dumps({"ok": True}), encoding="utf-8")
|
| 110 |
+
|
| 111 |
+
out = results / "budget_efficiency_benchmark"
|
| 112 |
+
out.mkdir(parents=True, exist_ok=True)
|
| 113 |
+
policy_sel = out / "policy_selection.md"
|
| 114 |
+
policy_sel.write_text("ok", encoding="utf-8")
|
| 115 |
+
consistency = out / "cross_dataset_consistency.csv"
|
| 116 |
+
pd.DataFrame([{"x": 1}]).to_csv(consistency, index=False)
|
| 117 |
+
syn1 = out / "s1.md"
|
| 118 |
+
syn2 = out / "s2.md"
|
| 119 |
+
syn3 = out / "s3.md"
|
| 120 |
+
for s in [syn1, syn2, syn3]:
|
| 121 |
+
s.write_text("ok", encoding="utf-8")
|
| 122 |
+
|
| 123 |
+
d_a = root / "data" / "ligands" / "A"
|
| 124 |
+
d_b = root / "data" / "ligands" / "B"
|
| 125 |
+
d_a.mkdir(parents=True, exist_ok=True)
|
| 126 |
+
d_b.mkdir(parents=True, exist_ok=True)
|
| 127 |
+
pd.DataFrame([{"is_reference": True}]).to_csv(d_a / "shared_library_shuffled.csv", index=False)
|
| 128 |
+
pd.DataFrame([{"is_reference": True}]).to_csv(d_b / "shared_library_shuffled.csv", index=False)
|
| 129 |
+
|
| 130 |
+
manifest = pd.DataFrame([{"threads_used": 10}, {"threads_used": 10}])
|
| 131 |
+
metrics = pd.DataFrame([{"budget": 100}, {"budget": 500}, {"budget": 2500}, {"budget": 5000}, {"budget": 10000}])
|
| 132 |
+
path = _self_audit(
|
| 133 |
+
output_root=out,
|
| 134 |
+
dataset_a_cfg={"protein_name": "EGFR", "benchmark_dataset": {"output_dir": str(d_a.relative_to(root))}},
|
| 135 |
+
dataset_b_cfg={"protein_name": "ABL1", "benchmark_dataset": {"output_dir": str(d_b.relative_to(root))}},
|
| 136 |
+
metrics_a=metrics,
|
| 137 |
+
metrics_b=metrics,
|
| 138 |
+
policy_selection_path=policy_sel,
|
| 139 |
+
consistency_path=consistency,
|
| 140 |
+
synthesis_paths=[syn1, syn2, syn3],
|
| 141 |
+
run_manifest=manifest,
|
| 142 |
+
repo_root=root,
|
| 143 |
+
)
|
| 144 |
+
self.assertTrue(path.exists())
|
| 145 |
+
|
| 146 |
+
|
| 147 |
+
if __name__ == "__main__":
|
| 148 |
+
unittest.main()
|
tests/test_cleanup_logic.py
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import tempfile
|
| 4 |
+
import unittest
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
from libs.benchmark.cleanup import execute_results_cleanup, plan_results_cleanup
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class TestCleanupLogic(unittest.TestCase):
|
| 11 |
+
def test_plan_and_execute_archive(self) -> None:
|
| 12 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 13 |
+
root = Path(tmp) / "results"
|
| 14 |
+
root.mkdir(parents=True, exist_ok=True)
|
| 15 |
+
(root / "legacy_old").mkdir()
|
| 16 |
+
(root / "large_benchmark").mkdir()
|
| 17 |
+
(root / "smoke_test").mkdir()
|
| 18 |
+
|
| 19 |
+
plan = plan_results_cleanup(root)
|
| 20 |
+
names = [item.path.name for item in plan]
|
| 21 |
+
self.assertIn("legacy_old", names)
|
| 22 |
+
self.assertNotIn("large_benchmark", names)
|
| 23 |
+
|
| 24 |
+
archive = execute_results_cleanup(root, plan)
|
| 25 |
+
self.assertTrue(archive.exists())
|
| 26 |
+
self.assertFalse((root / "legacy_old").exists())
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
if __name__ == "__main__":
|
| 30 |
+
unittest.main()
|
| 31 |
+
|
tests/test_clustering.py
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
|
| 5 |
+
import numpy as np
|
| 6 |
+
|
| 7 |
+
from libs.adaptive.clustering import cluster_ligands_butina
|
| 8 |
+
from libs.adaptive.hyperclustering import hypercluster_representatives
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
class TestClustering(unittest.TestCase):
|
| 12 |
+
def test_butina_and_hyperclustering(self) -> None:
|
| 13 |
+
ligand_ids = [f"l{i}" for i in range(12)]
|
| 14 |
+
fps = [np.random.randint(0, 2, 128) for _ in ligand_ids]
|
| 15 |
+
cluster_map = cluster_ligands_butina(ligand_ids, fps, cutoff=0.7)
|
| 16 |
+
self.assertEqual(set(cluster_map.keys()), set(ligand_ids))
|
| 17 |
+
|
| 18 |
+
reps = {}
|
| 19 |
+
for lid, cid in cluster_map.items():
|
| 20 |
+
reps.setdefault(cid, []).append(np.random.rand(32))
|
| 21 |
+
reps_mean = {cid: np.mean(np.vstack(vecs), axis=0) for cid, vecs in reps.items()}
|
| 22 |
+
hyper = hypercluster_representatives(reps_mean)
|
| 23 |
+
|
| 24 |
+
self.assertEqual(set(hyper.keys()), set(reps_mean.keys()))
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
if __name__ == "__main__":
|
| 28 |
+
unittest.main()
|
tests/test_dataset_reuse_logic.py
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import tempfile
|
| 4 |
+
import unittest
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
from libs.benchmark.reuse import validate_reuse_inputs
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class TestDatasetReuseLogic(unittest.TestCase):
|
| 11 |
+
def test_reuse_check_ok(self) -> None:
|
| 12 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 13 |
+
root = Path(tmp)
|
| 14 |
+
a = root / "a.txt"
|
| 15 |
+
b = root / "b.txt"
|
| 16 |
+
a.write_text("x", encoding="utf-8")
|
| 17 |
+
b.write_text("y", encoding="utf-8")
|
| 18 |
+
check = validate_reuse_inputs([a, b])
|
| 19 |
+
self.assertTrue(check.ok)
|
| 20 |
+
self.assertEqual(check.missing, [])
|
| 21 |
+
|
| 22 |
+
def test_reuse_check_missing(self) -> None:
|
| 23 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 24 |
+
root = Path(tmp)
|
| 25 |
+
a = root / "a.txt"
|
| 26 |
+
a.write_text("x", encoding="utf-8")
|
| 27 |
+
check = validate_reuse_inputs([a, root / "missing.txt"])
|
| 28 |
+
self.assertFalse(check.ok)
|
| 29 |
+
self.assertEqual(len(check.missing), 1)
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
if __name__ == "__main__":
|
| 33 |
+
unittest.main()
|
| 34 |
+
|
tests/test_disk_guard.py
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import tempfile
|
| 4 |
+
import unittest
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
from libs.benchmark.disk_guard import (
|
| 8 |
+
append_disk_snapshot,
|
| 9 |
+
requires_cleanup,
|
| 10 |
+
run_repository_local_cleanup,
|
| 11 |
+
snapshot_disk_state,
|
| 12 |
+
)
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
class TestDiskGuard(unittest.TestCase):
|
| 16 |
+
def test_snapshot_and_cleanup_decision(self) -> None:
|
| 17 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 18 |
+
root = Path(tmp)
|
| 19 |
+
snap = snapshot_disk_state(root, stage="t", note="n", projected_output_gb=0.1)
|
| 20 |
+
self.assertGreater(snap.free_gb, 0.0)
|
| 21 |
+
self.assertGreaterEqual(snap.projected_free_after_gb, 0.0)
|
| 22 |
+
csv_path = root / "snap.csv"
|
| 23 |
+
append_disk_snapshot(csv_path, snap)
|
| 24 |
+
self.assertTrue(csv_path.exists() and csv_path.stat().st_size > 0)
|
| 25 |
+
self.assertIsInstance(requires_cleanup(snap, min_free_gb=1000.0), bool)
|
| 26 |
+
|
| 27 |
+
def test_cleanup_stays_repo_local(self) -> None:
|
| 28 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 29 |
+
repo = Path(tmp) / "repo"
|
| 30 |
+
results = repo / "results"
|
| 31 |
+
results.mkdir(parents=True, exist_ok=True)
|
| 32 |
+
run_dir = results / "run_x"
|
| 33 |
+
replay = run_dir / "replay_cache"
|
| 34 |
+
replay.mkdir(parents=True, exist_ok=True)
|
| 35 |
+
(run_dir / "summary.json").write_text("{}", encoding="utf-8")
|
| 36 |
+
(replay / "a.txt").write_text("x" * 1024, encoding="utf-8")
|
| 37 |
+
raw = run_dir / "raw_rdock_outputs"
|
| 38 |
+
for i in range(10):
|
| 39 |
+
b = raw / f"batch_{i:03d}"
|
| 40 |
+
b.mkdir(parents=True, exist_ok=True)
|
| 41 |
+
(b / "f.txt").write_text("x", encoding="utf-8")
|
| 42 |
+
|
| 43 |
+
actions = run_repository_local_cleanup(repo, results_dir=results, keep_raw_batches=3)
|
| 44 |
+
self.assertTrue(actions)
|
| 45 |
+
# replay cache should be removed
|
| 46 |
+
self.assertFalse(replay.exists())
|
| 47 |
+
# raw batches should be pruned
|
| 48 |
+
kept = [p for p in raw.iterdir() if p.is_dir()]
|
| 49 |
+
self.assertLessEqual(len(kept), 3)
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
if __name__ == "__main__":
|
| 53 |
+
unittest.main()
|
| 54 |
+
|
tests/test_docking_mode_filter.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
|
| 5 |
+
import pandas as pd
|
| 6 |
+
|
| 7 |
+
from pipeline.run_experimental_benchmark import _filter_mode_feature_tables
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class TestDockingModeFilter(unittest.TestCase):
|
| 11 |
+
def test_docking_only_keeps_rdock_and_cluster_channels(self) -> None:
|
| 12 |
+
values = pd.DataFrame(
|
| 13 |
+
[
|
| 14 |
+
{
|
| 15 |
+
"ligand_id": "L1",
|
| 16 |
+
"cluster_id_feature": 1.0,
|
| 17 |
+
"hypercluster_id_feature": 0.0,
|
| 18 |
+
"rdock_total_score": -10.0,
|
| 19 |
+
"mean_top3_pose_score": -9.8,
|
| 20 |
+
"ligand_logp": 2.1,
|
| 21 |
+
}
|
| 22 |
+
]
|
| 23 |
+
)
|
| 24 |
+
masks = pd.DataFrame(
|
| 25 |
+
[
|
| 26 |
+
{
|
| 27 |
+
"ligand_id": "L1",
|
| 28 |
+
"mask_cluster_id_feature": 1,
|
| 29 |
+
"mask_hypercluster_id_feature": 1,
|
| 30 |
+
"mask_rdock_total_score": 1,
|
| 31 |
+
"mask_mean_top3_pose_score": 1,
|
| 32 |
+
"mask_ligand_logp": 1,
|
| 33 |
+
}
|
| 34 |
+
]
|
| 35 |
+
)
|
| 36 |
+
v, m = _filter_mode_feature_tables(values, masks, feature_mode="docking_only")
|
| 37 |
+
self.assertIn("cluster_id_feature", v.columns)
|
| 38 |
+
self.assertIn("rdock_total_score", v.columns)
|
| 39 |
+
self.assertNotIn("ligand_logp", v.columns)
|
| 40 |
+
self.assertIn("mask_rdock_total_score", m.columns)
|
| 41 |
+
self.assertNotIn("mask_ligand_logp", m.columns)
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
if __name__ == "__main__":
|
| 45 |
+
unittest.main()
|
| 46 |
+
|
tests/test_epsilon_regret_logic.py
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
|
| 5 |
+
from libs.adaptive.epsilon_regret import EpsilonRegretConfig, EpsilonRegretController
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
class TestEpsilonRegretController(unittest.TestCase):
|
| 9 |
+
def test_does_not_stop_before_min_budget(self) -> None:
|
| 10 |
+
ctrl = EpsilonRegretController(
|
| 11 |
+
EpsilonRegretConfig(
|
| 12 |
+
min_budget=5,
|
| 13 |
+
patience_rounds=1,
|
| 14 |
+
min_improvement=0.0,
|
| 15 |
+
min_cluster_coverage=0.0,
|
| 16 |
+
min_hypercluster_coverage=0.0,
|
| 17 |
+
min_model_weight=0.0,
|
| 18 |
+
)
|
| 19 |
+
)
|
| 20 |
+
rec = ctrl.update(
|
| 21 |
+
round_idx=0,
|
| 22 |
+
n_evaluated=2,
|
| 23 |
+
best_score_now=-10.0,
|
| 24 |
+
recent_scores=[-10.0, -10.0],
|
| 25 |
+
model_weight=1.0,
|
| 26 |
+
cluster_coverage=1.0,
|
| 27 |
+
hypercluster_coverage=1.0,
|
| 28 |
+
expected_remaining_scores=[-10.01],
|
| 29 |
+
uncertainty_scores=[0.0],
|
| 30 |
+
time_importance=0.5,
|
| 31 |
+
budget_cap=10,
|
| 32 |
+
)
|
| 33 |
+
self.assertFalse(bool(rec["stop"]))
|
| 34 |
+
|
| 35 |
+
def test_stops_when_remaining_gain_below_epsilon(self) -> None:
|
| 36 |
+
ctrl = EpsilonRegretController(
|
| 37 |
+
EpsilonRegretConfig(
|
| 38 |
+
epsilon_quality=0.10,
|
| 39 |
+
acceptable_regret=0.10,
|
| 40 |
+
min_budget=3,
|
| 41 |
+
patience_rounds=1,
|
| 42 |
+
min_improvement=0.0,
|
| 43 |
+
min_cluster_coverage=0.0,
|
| 44 |
+
min_hypercluster_coverage=0.0,
|
| 45 |
+
min_model_weight=0.0,
|
| 46 |
+
)
|
| 47 |
+
)
|
| 48 |
+
# round 1
|
| 49 |
+
ctrl.update(
|
| 50 |
+
round_idx=0,
|
| 51 |
+
n_evaluated=3,
|
| 52 |
+
best_score_now=-10.0,
|
| 53 |
+
recent_scores=[-10.0, -10.0],
|
| 54 |
+
model_weight=1.0,
|
| 55 |
+
cluster_coverage=1.0,
|
| 56 |
+
hypercluster_coverage=1.0,
|
| 57 |
+
expected_remaining_scores=[-10.2],
|
| 58 |
+
uncertainty_scores=[0.01],
|
| 59 |
+
time_importance=0.5,
|
| 60 |
+
budget_cap=20,
|
| 61 |
+
)
|
| 62 |
+
# round 2 with tiny expected gain
|
| 63 |
+
rec = ctrl.update(
|
| 64 |
+
round_idx=1,
|
| 65 |
+
n_evaluated=4,
|
| 66 |
+
best_score_now=-10.0,
|
| 67 |
+
recent_scores=[-10.0, -10.0],
|
| 68 |
+
model_weight=1.0,
|
| 69 |
+
cluster_coverage=1.0,
|
| 70 |
+
hypercluster_coverage=1.0,
|
| 71 |
+
expected_remaining_scores=[-10.01],
|
| 72 |
+
uncertainty_scores=[0.0],
|
| 73 |
+
time_importance=1.0,
|
| 74 |
+
budget_cap=20,
|
| 75 |
+
)
|
| 76 |
+
self.assertTrue(bool(rec["stop"]))
|
| 77 |
+
self.assertIn(str(rec["reason"]), {"epsilon_regret_stop", "max_budget_reached"})
|
| 78 |
+
|
| 79 |
+
|
| 80 |
+
if __name__ == "__main__":
|
| 81 |
+
unittest.main()
|
| 82 |
+
|
tests/test_feature_extraction.py
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
|
| 5 |
+
import numpy as np
|
| 6 |
+
|
| 7 |
+
from libs.adaptive.features import (
|
| 8 |
+
build_complex_feature_bundle,
|
| 9 |
+
build_ligand_feature_bundle,
|
| 10 |
+
build_protein_feature_bundle,
|
| 11 |
+
)
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
class TestFeatureExtraction(unittest.TestCase):
|
| 15 |
+
def test_ligand_protein_complex_feature_bundles(self) -> None:
|
| 16 |
+
fp = np.zeros(32, dtype=float)
|
| 17 |
+
fp[[1, 7, 13]] = 1.0
|
| 18 |
+
|
| 19 |
+
ligand = build_ligand_feature_bundle(
|
| 20 |
+
ligand_id="lig_a",
|
| 21 |
+
smiles="CCO",
|
| 22 |
+
fingerprint=fp,
|
| 23 |
+
reference_mol=None,
|
| 24 |
+
)
|
| 25 |
+
self.assertIn("ligand_mw", ligand.features)
|
| 26 |
+
self.assertIn("ligand_logp", ligand.features)
|
| 27 |
+
self.assertIn("morgan_fp_0001", ligand.features)
|
| 28 |
+
self.assertTrue(ligand.features["ligand_mw"].available)
|
| 29 |
+
|
| 30 |
+
protein = build_protein_feature_bundle(
|
| 31 |
+
target_id="target_x",
|
| 32 |
+
sequence_features={"seq_length": 100.0, "aa_frac_A": 0.1, "aa_frac_D": 0.1, "aa_frac_S": 0.1},
|
| 33 |
+
structure_features={"residue_count": 120.0, "mean_spatial_extent": 10.0, "pocket_residue_count": 20.0},
|
| 34 |
+
)
|
| 35 |
+
self.assertIn("pocket_volume_approx", protein.features)
|
| 36 |
+
self.assertTrue(protein.features["pocket_volume_approx"].available)
|
| 37 |
+
|
| 38 |
+
complex_bundle = build_complex_feature_bundle(
|
| 39 |
+
ligand_id="lig_a",
|
| 40 |
+
docking_score=-8.5,
|
| 41 |
+
interface_features={"interface_contact_proxy": 0.7, "hbond_proxy": 0.4, "shape_proxy": 0.3},
|
| 42 |
+
ligand_bundle=ligand,
|
| 43 |
+
protein_bundle=protein,
|
| 44 |
+
)
|
| 45 |
+
expected = [
|
| 46 |
+
"complex_contact_count",
|
| 47 |
+
"complex_hbond_proxy",
|
| 48 |
+
"complex_interaction_density",
|
| 49 |
+
"energy_contact_proxy",
|
| 50 |
+
"energy_interaction_decomposition",
|
| 51 |
+
]
|
| 52 |
+
for name in expected:
|
| 53 |
+
self.assertIn(name, complex_bundle.features)
|
| 54 |
+
self.assertTrue(complex_bundle.features[name].available)
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
if __name__ == "__main__":
|
| 58 |
+
unittest.main()
|
tests/test_haddock_backend.py
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
from pathlib import Path
|
| 5 |
+
|
| 6 |
+
from libs.docking.backend_haddock import HADDOCKBackend
|
| 7 |
+
from libs.docking.base import DockingResult
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class TestHADDOCKBackend(unittest.TestCase):
|
| 11 |
+
def test_capability_schema(self) -> None:
|
| 12 |
+
backend = HADDOCKBackend()
|
| 13 |
+
cap = backend.check_capability()
|
| 14 |
+
self.assertEqual(cap.backend_name, "haddock")
|
| 15 |
+
self.assertIn("mode", cap.details)
|
| 16 |
+
self.assertIn("score_semantics", cap.details)
|
| 17 |
+
|
| 18 |
+
def test_parse_results_provenance(self) -> None:
|
| 19 |
+
backend = HADDOCKBackend()
|
| 20 |
+
rows = backend.parse_results(
|
| 21 |
+
[
|
| 22 |
+
DockingResult(
|
| 23 |
+
ligand_id="lig_1",
|
| 24 |
+
docking_score=-12.34,
|
| 25 |
+
pose_path=Path("/tmp/pose.pdb"),
|
| 26 |
+
backend_name="haddock",
|
| 27 |
+
backend_mode="real-haddock3-rescore",
|
| 28 |
+
score_source="haddock3:emscoring",
|
| 29 |
+
raw_output_file="/tmp/stdout.log",
|
| 30 |
+
parsed_from="/tmp/stdout.log::HADDOCK-score (emscoring)",
|
| 31 |
+
fallback_used=False,
|
| 32 |
+
success=True,
|
| 33 |
+
)
|
| 34 |
+
]
|
| 35 |
+
)
|
| 36 |
+
self.assertEqual(len(rows), 1)
|
| 37 |
+
self.assertEqual(rows[0]["quantity_type"], "energy_proxy")
|
| 38 |
+
self.assertEqual(rows[0]["backend_mode"], "real-haddock3-rescore")
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
if __name__ == "__main__":
|
| 42 |
+
unittest.main()
|
| 43 |
+
|
tests/test_large_plot_outputs.py
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import tempfile
|
| 4 |
+
import unittest
|
| 5 |
+
from pathlib import Path
|
| 6 |
+
|
| 7 |
+
import numpy as np
|
| 8 |
+
import pandas as pd
|
| 9 |
+
|
| 10 |
+
from pipeline.run_large_benchmark import _plot_large
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
class TestLargePlotOutputs(unittest.TestCase):
|
| 14 |
+
def test_required_plot_files_created(self) -> None:
|
| 15 |
+
rows = []
|
| 16 |
+
run_specs = [
|
| 17 |
+
("adaptive_docking_only_top1", "adaptive", "docking_only", 1),
|
| 18 |
+
("adaptive_docking_only", "adaptive", "docking_only", 1),
|
| 19 |
+
("adaptive_full_feature", "adaptive", "full_feature", 1),
|
| 20 |
+
("naive_docking_only_s11", "naive_random", "docking_only", 11),
|
| 21 |
+
("naive_full_feature_s11", "naive_random", "full_feature", 11),
|
| 22 |
+
("cluster_docking_only_s101", "cluster_naive", "docking_only", 101),
|
| 23 |
+
("cluster_full_feature_s101", "cluster_naive", "full_feature", 101),
|
| 24 |
+
]
|
| 25 |
+
for run_id, grp, mode, seed in run_specs:
|
| 26 |
+
for step in range(20):
|
| 27 |
+
rows.append(
|
| 28 |
+
{
|
| 29 |
+
"run_id": run_id,
|
| 30 |
+
"strategy": run_id,
|
| 31 |
+
"strategy_group": grp,
|
| 32 |
+
"mode": mode,
|
| 33 |
+
"seed": seed,
|
| 34 |
+
"step": step,
|
| 35 |
+
"docking_score": float(5 + step * 0.1 + (0.5 if grp == "naive_random" else 0.0)),
|
| 36 |
+
"final_score": float(4.5 + step * 0.1 + (0.5 if grp == "naive_random" else 0.0)),
|
| 37 |
+
"is_reference": step == 0,
|
| 38 |
+
"top_pose_rmsd_consistency": float(0.5 + 0.01 * step),
|
| 39 |
+
"replicate_score_variance": float(0.1 + 0.01 * step),
|
| 40 |
+
}
|
| 41 |
+
)
|
| 42 |
+
combined = pd.DataFrame(rows)
|
| 43 |
+
metrics = pd.DataFrame(
|
| 44 |
+
[
|
| 45 |
+
{
|
| 46 |
+
"run_id": "adaptive_docking_only_top1",
|
| 47 |
+
"strategy": "adaptive_docking_only_top1",
|
| 48 |
+
"strategy_group": "adaptive",
|
| 49 |
+
"mode": "docking_only",
|
| 50 |
+
"top10_in_first10pct": 0.2,
|
| 51 |
+
"top10_in_first20pct": 0.3,
|
| 52 |
+
"best_score_so_far_auc": -10.0,
|
| 53 |
+
},
|
| 54 |
+
{
|
| 55 |
+
"run_id": "adaptive_docking_only",
|
| 56 |
+
"strategy": "adaptive_docking_only",
|
| 57 |
+
"strategy_group": "adaptive",
|
| 58 |
+
"mode": "docking_only",
|
| 59 |
+
"top10_in_first10pct": 0.3,
|
| 60 |
+
"top10_in_first20pct": 0.4,
|
| 61 |
+
"best_score_so_far_auc": -12.0,
|
| 62 |
+
},
|
| 63 |
+
{
|
| 64 |
+
"run_id": "adaptive_full_feature",
|
| 65 |
+
"strategy": "adaptive_full_feature",
|
| 66 |
+
"strategy_group": "adaptive",
|
| 67 |
+
"mode": "full_feature",
|
| 68 |
+
"top10_in_first10pct": 0.35,
|
| 69 |
+
"top10_in_first20pct": 0.45,
|
| 70 |
+
"best_score_so_far_auc": -13.0,
|
| 71 |
+
},
|
| 72 |
+
]
|
| 73 |
+
)
|
| 74 |
+
feature_importance = {"rdock_total_score": 0.2, "rdock_vdw_term": 0.1, "ligand_logp": 0.05}
|
| 75 |
+
|
| 76 |
+
with tempfile.TemporaryDirectory() as tmp:
|
| 77 |
+
out = Path(tmp)
|
| 78 |
+
paths = _plot_large(output_dir=out, combined=combined, metrics_df=metrics, feature_importance=feature_importance)
|
| 79 |
+
self.assertTrue(paths)
|
| 80 |
+
required = [
|
| 81 |
+
"selected_score_vs_step_docking_only.png",
|
| 82 |
+
"selected_score_vs_step_full_feature.png",
|
| 83 |
+
"rdock_top1_vs_multipose_top10.png",
|
| 84 |
+
"rdock_top1_vs_multipose_top20.png",
|
| 85 |
+
"rdock_feature_variant_comparison.png",
|
| 86 |
+
"rdock_pose_consistency_vs_score.png",
|
| 87 |
+
"rdock_replicate_stability_vs_score.png",
|
| 88 |
+
"rdock_native_feature_importance.png",
|
| 89 |
+
]
|
| 90 |
+
for name in required:
|
| 91 |
+
p = out / "plots" / name
|
| 92 |
+
self.assertTrue(p.exists() and p.stat().st_size > 0, f"Missing/non-empty plot: {name}")
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
if __name__ == "__main__":
|
| 96 |
+
unittest.main()
|
| 97 |
+
|
tests/test_missing_features.py
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
|
| 5 |
+
import numpy as np
|
| 6 |
+
|
| 7 |
+
from libs.adaptive.features import FeatureBundle, FeatureValue, bundles_to_wide_frames
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class TestMissingFeatures(unittest.TestCase):
|
| 11 |
+
def test_missing_features_are_masked_and_not_silent_zero(self) -> None:
|
| 12 |
+
b1 = FeatureBundle(
|
| 13 |
+
object_id="lig_1",
|
| 14 |
+
features={
|
| 15 |
+
"f_present": FeatureValue(value=1.5, available=True, source="test", feature_type="exact"),
|
| 16 |
+
"f_missing": FeatureValue(value=None, available=False, source="test", feature_type="proxy"),
|
| 17 |
+
},
|
| 18 |
+
)
|
| 19 |
+
b2 = FeatureBundle(
|
| 20 |
+
object_id="lig_2",
|
| 21 |
+
features={
|
| 22 |
+
"f_present": FeatureValue(value=2.5, available=True, source="test", feature_type="exact"),
|
| 23 |
+
"f_missing": FeatureValue(value=3.0, available=True, source="test", feature_type="proxy"),
|
| 24 |
+
},
|
| 25 |
+
)
|
| 26 |
+
|
| 27 |
+
values, masks, names = bundles_to_wide_frames([b1, b2])
|
| 28 |
+
self.assertIn("f_missing", names)
|
| 29 |
+
|
| 30 |
+
lig1 = values.loc[values["ligand_id"] == "lig_1"].iloc[0]
|
| 31 |
+
lig1_mask = masks.loc[masks["ligand_id"] == "lig_1"].iloc[0]
|
| 32 |
+
|
| 33 |
+
self.assertTrue(np.isnan(float(lig1["f_missing"])))
|
| 34 |
+
self.assertEqual(int(lig1_mask["mask_f_missing"]), 0)
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
if __name__ == "__main__":
|
| 38 |
+
unittest.main()
|
tests/test_model_masking.py
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
|
| 5 |
+
import numpy as np
|
| 6 |
+
|
| 7 |
+
from libs.adaptive.surrogate_model import SurrogateConfig, SurrogateModel
|
| 8 |
+
|
| 9 |
+
|
| 10 |
+
class TestModelMasking(unittest.TestCase):
|
| 11 |
+
def test_surrogate_accepts_feature_masks(self) -> None:
|
| 12 |
+
rng = np.random.default_rng(123)
|
| 13 |
+
n = 40
|
| 14 |
+
d = 6
|
| 15 |
+
|
| 16 |
+
x = rng.normal(size=(n, d))
|
| 17 |
+
m = np.ones((n, d), dtype=float)
|
| 18 |
+
|
| 19 |
+
# Explicitly mark one channel as missing in half of samples.
|
| 20 |
+
x[:20, 2] = np.nan
|
| 21 |
+
m[:20, 2] = 0.0
|
| 22 |
+
|
| 23 |
+
y = 0.8 * np.nan_to_num(x[:, 0], nan=0.0) - 0.2 * np.nan_to_num(x[:, 1], nan=0.0) + rng.normal(0, 0.05, n)
|
| 24 |
+
|
| 25 |
+
model = SurrogateModel(
|
| 26 |
+
SurrogateConfig(
|
| 27 |
+
prefer_xgboost=False,
|
| 28 |
+
n_estimators=80,
|
| 29 |
+
min_train_samples=8,
|
| 30 |
+
max_depth_small=3,
|
| 31 |
+
max_depth_large=4,
|
| 32 |
+
)
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
fit_stats = model.fit(
|
| 36 |
+
features=x,
|
| 37 |
+
masks=m,
|
| 38 |
+
y=y,
|
| 39 |
+
feature_names=[f"f{i}" for i in range(d)],
|
| 40 |
+
mask_names=[f"mask_f{i}" for i in range(d)],
|
| 41 |
+
)
|
| 42 |
+
self.assertGreaterEqual(fit_stats["n_train"], 8)
|
| 43 |
+
|
| 44 |
+
pred = model.predict_bundle(x[:5], m[:5])
|
| 45 |
+
self.assertEqual(pred["expected_score"].shape[0], 5)
|
| 46 |
+
self.assertTrue(np.isfinite(pred["expected_score"]).all())
|
| 47 |
+
self.assertTrue(np.isfinite(pred["uncertainty"]).all())
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
if __name__ == "__main__":
|
| 51 |
+
unittest.main()
|
tests/test_multifidelity_controls.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
+
|
| 3 |
+
import unittest
|
| 4 |
+
|
| 5 |
+
import pandas as pd
|
| 6 |
+
|
| 7 |
+
from libs.benchmark.multifidelity import (
|
| 8 |
+
ExplorationControls,
|
| 9 |
+
StoppingControls,
|
| 10 |
+
UncertaintyControls,
|
| 11 |
+
enforce_control_limits,
|
| 12 |
+
simulate_multifidelity_policy,
|
| 13 |
+
)
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
class TestMultifidelityControls(unittest.TestCase):
|
| 17 |
+
def test_control_limit_enforced(self) -> None:
|
| 18 |
+
cfg = {
|
| 19 |
+
"stopping": {"a": 1, "b": 2, "c": 3, "d": 4},
|
| 20 |
+
"exploration": {},
|
| 21 |
+
"uncertainty": {},
|
| 22 |
+
}
|
| 23 |
+
with self.assertRaises(ValueError):
|
| 24 |
+
enforce_control_limits(cfg)
|
| 25 |
+
|
| 26 |
+
def test_diversity_fallback_only_after_plateau(self) -> None:
|
| 27 |
+
rows = []
|
| 28 |
+
for i in range(40):
|
| 29 |
+
rows.append(
|
| 30 |
+
{
|
| 31 |
+
"ligand_id": f"l{i}",
|
| 32 |
+
"step": i,
|
| 33 |
+
"cluster_id": 1 if i < 30 else 2,
|
| 34 |
+
"hypercluster_id": 1,
|
| 35 |
+
"docking_score": -6.0 if i < 30 else -6.5,
|
| 36 |
+
"predicted_score_prebatch": -6.0,
|
| 37 |
+
"predicted_uncertainty_prebatch": 0.2,
|
| 38 |
+
}
|
| 39 |
+
)
|
| 40 |
+
df = pd.DataFrame(rows)
|
| 41 |
+
truth_map = {f"l{i}": {"rank_percentile": float(50 - i)} for i in range(40)}
|
| 42 |
+
|
| 43 |
+
selected, trace = simulate_multifidelity_policy(
|
| 44 |
+
df,
|
| 45 |
+
truth_map=truth_map,
|
| 46 |
+
budget=30,
|
| 47 |
+
min_budget=5,
|
| 48 |
+
max_budget=30,
|
| 49 |
+
wall_time_per_dock=0.1,
|
| 50 |
+
max_wall_time_seconds=20.0,
|
| 51 |
+
stopping=StoppingControls(target_rank_percentile=0.1, peak_patience=5, min_improvement_delta=0.01),
|
| 52 |
+
exploration=ExplorationControls(stagnation_patience=3, diversity_boost_strength=0.6, dominant_window=10),
|
| 53 |
+
uncertainty=UncertaintyControls(uncertainty_low_threshold=0.3, uncertainty_patience=4, expected_gain_threshold=0.01),
|
| 54 |
+
)
|
| 55 |
+
|
| 56 |
+
self.assertFalse(selected.empty)
|
| 57 |
+
self.assertFalse(trace.empty)
|
| 58 |
+
bad = trace[(trace["fallback_triggered"].astype(bool)) & (~trace["dominant_plateau"].astype(bool))]
|
| 59 |
+
self.assertTrue(bad.empty)
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
if __name__ == "__main__":
|
| 63 |
+
unittest.main()
|