Skip to content

Commit

Permalink
Standardize docking success criterion for failure mode analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
amorehead committed Jan 20, 2025
1 parent 788f6bf commit 1a6b003
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions notebooks/failure_modes_analysis_plotting.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -763,6 +763,7 @@
"# sns.histplot(posebusters_complex_pdb_deposition_dates_df[\"Deposition Date\"].values, bins=25)\n",
"# plt.xlabel(\"Deposition Date\")\n",
"# plt.xticks(rotation=45)\n",
"# plt.tight_layout()\n",
"# plt.savefig(\"posebusters_benchmark_complex_pdb_deposition_dates.png\")\n",
"# plt.show()\n",
"# plt.close(\"all\")"
Expand All @@ -783,8 +784,7 @@
"source": [
"# find PDB IDs of complexes for which the correct (e.g., RMSD ≤ 2 Å & PB-Valid) binding conformation was not found by any method\n",
"for dataset in datasets:\n",
" # NOTE: for DockGen, we consider centroid RMSD (cRMSD) ≤ 1 Å as a surrogate docking success criterion\n",
" docking_success_column = \"cRMSD ≤ 1 Å\" if dataset == \"dockgen\" else \"RMSD ≤ 2 Å & PB-Valid\"\n",
" docking_success_column = \"RMSD ≤ 2 Å & PB-Valid\"\n",
"\n",
" for repeat_index in range(1, max_num_repeats_per_method + 1):\n",
" dataset_results_table = globals()[f\"results_table_{repeat_index}\"].loc[\n",
Expand Down Expand Up @@ -916,8 +916,7 @@
"source": [
"# find complexes that AlphaFold 3 failed to correctly predict\n",
"for dataset in datasets:\n",
" # NOTE: for DockGen, we consider centroid RMSD (cRMSD) ≤ 1 Å as a surrogate docking success criterion\n",
" docking_success_column = \"cRMSD ≤ 1 Å\" if dataset == \"dockgen\" else \"RMSD ≤ 2 Å & PB-Valid\"\n",
" docking_success_column = \"RMSD ≤ 2 Å & PB-Valid\"\n",
"\n",
" for repeat_index in range(1, max_num_repeats_per_method + 1):\n",
" dataset_results_table = globals()[f\"results_table_{repeat_index}\"].loc[\n",
Expand Down Expand Up @@ -1076,13 +1075,15 @@
" sns.histplot(pdb_report_df[\"Refinement Resolution (Å)\"].values)\n",
" plt.xlim(0, 10)\n",
" plt.xlabel(\"Refinement Resolution (Å)\")\n",
" plt.tight_layout()\n",
" plt.savefig(f\"{report_type}_pdb_report_resolution.png\")\n",
" plt.show()\n",
"\n",
" plt.close(\"all\")\n",
"\n",
" sns.histplot(pdb_report_df[\"Deposition Date\"].values)\n",
" plt.xlabel(\"Deposition Date\")\n",
" plt.tight_layout()\n",
" plt.savefig(f\"{report_type}_pdb_report_deposition_date.png\")\n",
" plt.show()\n",
"\n",
Expand All @@ -1104,8 +1105,7 @@
"source": [
"# find PoseBusters Benchmark set and CASP15 complexes that AlphaFold 3 failed to correctly predict\n",
"for dataset in [\"posebusters_benchmark\", \"casp15\"]:\n",
" # NOTE: for DockGen, we consider centroid RMSD (cRMSD) ≤ 1 Å as a surrogate docking success criterion\n",
" docking_success_column = \"cRMSD ≤ 1 Å\" if dataset == \"dockgen\" else \"RMSD ≤ 2 Å & PB-Valid\"\n",
" docking_success_column = \"RMSD ≤ 2 Å & PB-Valid\"\n",
"\n",
" for repeat_index in range(1, max_num_repeats_per_method + 1):\n",
" dataset_results_table = globals()[f\"results_table_{repeat_index}\"].loc[\n",
Expand Down Expand Up @@ -1295,6 +1295,7 @@
"sns.histplot(failed_complex_pdb_deposition_dates_df[\"Deposition Date\"].values, bins=25)\n",
"plt.xlabel(\"Deposition Date\")\n",
"plt.xticks(rotation=45)\n",
"plt.tight_layout()\n",
"plt.savefig(\"af3_failed_complex_pdb_deposition_dates.png\")\n",
"plt.show()\n",
"plt.close(\"all\")\n",
Expand All @@ -1317,6 +1318,7 @@
"sns.histplot(top_match_pdb_deposition_dates_df[\"Deposition Date\"].values, bins=30)\n",
"plt.xlabel(\"Deposition Date\")\n",
"plt.xticks(rotation=45)\n",
"plt.tight_layout()\n",
"plt.savefig(\"af3_failed_complex_top_match_pdb_deposition_dates.png\")\n",
"plt.show()\n",
"plt.close(\"all\")\n",
Expand Down

0 comments on commit 1a6b003

Please sign in to comment.