Skip to content

Commit

Permalink
calculating actifpTM only for interface residues, based on the predic…
Browse files Browse the repository at this point in the history
…ted distogram (#671)

* version of extended metrics, doesnt work because of tracing and dynamic conflict

* pairwise actifptm, iptm and chain-ptm calculation and plotting

* setting back poetry files to original

* updated version

* adding extended metrics calculation

* added command line arguments for actifptm

* import differently in colabdesign and colabfold

* fixed actifptm plot titles

* added actifptm

* added extended metrics to run function

* using/not using probabilities fixed

* working version of cull complex actifptm, with plots

* working actifptm, including for the whole complex

* actifptm with contacts not to crash without contacts between chains

* actifptm with contacts not to crash without contacts between chains

* removed unnecessary print

* small fixes

* fixes

* correct script for af2 ptm

* updated calculation of font sizes in figure

* actifptm doesnt crash with models without ptm

* not crashing with base af2 (no ptm) models, renamed extended to extra

* Update AlphaFold2.ipynb

---------

Co-authored-by: jvarga <[email protected]>
Co-authored-by: Sergey O <[email protected]>
  • Loading branch information
3 people authored Dec 18, 2024
1 parent e2ca9e8 commit bc30247
Show file tree
Hide file tree
Showing 6 changed files with 506 additions and 30 deletions.
28 changes: 9 additions & 19 deletions AlphaFold2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
"metadata": {
"accelerator": "GPU",
"colab": {
"name": "AlphaFold2.ipynb",
"provenance": [],
"machine_shape": "hm",
"gpuType": "T4",
"include_colab_link": true
"gpuType": "A100"
},
"kernelspec": {
"display_name": "Python 3",
Expand All @@ -28,16 +26,6 @@
}
},
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "view-in-github",
"colab_type": "text"
},
"source": [
"<a href=\"https://colab.research.google.com/github/sokrypton/ColabFold/blob/main/AlphaFold2.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -232,7 +220,7 @@
"cell_type": "code",
"source": [
"#@markdown ### Advanced settings\n",
"model_type = \"auto\" #@param [\"auto\", \"alphafold2_ptm\", \"alphafold2_multimer_v1\", \"alphafold2_multimer_v2\", \"alphafold2_multimer_v3\", \"deepfold_v1\"]\n",
"model_type = \"auto\" #@param [\"auto\", \"alphafold2_ptm\", \"alphafold2_multimer_v1\", \"alphafold2_multimer_v2\", \"alphafold2_multimer_v3\", \"deepfold_v1\", \"alphafold2\"]\n",
"#@markdown - if `auto` selected, will use `alphafold2_ptm` for monomer prediction and `alphafold2_multimer_v3` for complex prediction.\n",
"#@markdown Any of the mode_types can be used (regardless if input is monomer or complex).\n",
"num_recycles = \"3\" #@param [\"auto\", \"0\", \"1\", \"3\", \"6\", \"12\", \"24\", \"48\"]\n",
Expand All @@ -243,7 +231,8 @@
"#@markdown - max amber relax iterations, `0` = unlimited (AlphaFold2 default, can take very long)\n",
"pairing_strategy = \"greedy\" #@param [\"greedy\", \"complete\"] {type:\"string\"}\n",
"#@markdown - `greedy` = pair any taxonomically matching subsets, `complete` = all sequences have to match in one line.\n",
"\n",
"calc_extra_ptm = False #@param {type:\"boolean\"}\n",
"#@markdown - return pairwise chain iptm/actifptm\n",
"\n",
"#@markdown #### Sample settings\n",
"#@markdown - enable dropouts and increase number of seeds to sample predictions from uncertainty of the model.\n",
Expand Down Expand Up @@ -382,6 +371,7 @@
" input_features_callback=input_features_callback,\n",
" save_recycles=save_recycles,\n",
" user_agent=\"colabfold/google-colab-main\",\n",
" calc_extra_ptm=calc_extra_ptm,\n",
")\n",
"results_zip = f\"{jobname}.result.zip\"\n",
"os.system(f\"zip -r {results_zip} {jobname}\")"
Expand Down Expand Up @@ -508,10 +498,6 @@
},
{
"cell_type": "code",
"metadata": {
"id": "33g5IIegij5R",
"cellView": "form"
},
"source": [
"#@title Package and download results\n",
"#@markdown If you are having issues downloading the result archive, try disabling your adblocker and run this cell again. If that fails click on the little folder icon to the left, navigate to file: `jobname.result.zip`, right-click and select \\\"Download\\\" (see [screenshot](https://pbs.twimg.com/media/E6wRW2lWUAEOuoe?format=jpg&name=small)).\n",
Expand All @@ -527,6 +513,10 @@
" uploaded.Upload()\n",
" print(f\"Uploaded {jobname}.result.zip to Google Drive with ID {uploaded.get('id')}\")"
],
"metadata": {
"cellView": "form",
"id": "R_AH6JSXaeb2"
},
"execution_count": null,
"outputs": []
},
Expand Down
Loading

0 comments on commit bc30247

Please sign in to comment.