Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions AlphaFold3_of3.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"source": [
"#@title Install dependencies (~3 mins)\n",
"%%time\n",
"import os, time, glob\n",
"import os, sys, time, glob, json, urllib.request\n",
"\n",
"use_af3_weights = True #@param {type:\"boolean\"}\n",
"#@markdown - **use_af3_weights**: leave OFF to use the free, open **OpenFold3** weights. Turn ON to\n",
Expand All @@ -59,7 +59,20 @@
" print('Installing packages...')\n",
" os.system(\"pip install -q 'jax[cuda12]==0.10.1' dm-haiku==0.0.16 rdkit==2025.9.4 \\\n",
" zstandard awscli tokamax==0.0.11 py3Dmol py2Dmol\")\n",
" os.system(\"pip install -q --no-deps 'https://github.com/sokrypton/alphafold3/releases/download/v3.1.4/alphafold3_open-3.1.4-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl'\")\n",
" # Resolve the alphafold3-open wheel for THIS interpreter (Colab bumps its Python\n",
" # version yearly; a hardcoded cp312 filename breaks the day it does).\n",
" AF3_VER, AF3_REPO = '3.1.5', 'sokrypton/alphafold3'\n",
" _pytag = f'cp{sys.version_info.major}{sys.version_info.minor}'\n",
" _whl = (f'https://github.com/{AF3_REPO}/releases/download/v{AF3_VER}/alphafold3_open-'\n",
" f'{AF3_VER}-{_pytag}-{_pytag}-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl')\n",
" try: # prefer the release manifest, so a changed platform tag still resolves\n",
" _rel = json.load(urllib.request.urlopen(\n",
" f'https://api.github.com/repos/{AF3_REPO}/releases/tags/v{AF3_VER}'))\n",
" _whl = next(a['browser_download_url'] for a in _rel['assets']\n",
" if a['name'].endswith('.whl') and f'-{_pytag}-' in a['name'])\n",
" except Exception as _e:\n",
" print(f'(release lookup failed, using default wheel URL: {_e})')\n",
" os.system(f\"pip install -q --no-deps '{_whl}'\")\n",
" base = 'https://raw.githubusercontent.com/sokrypton/alphafold3/refs/heads/main'\n",
" for script in ['run_alphafold', 'convert_of3_weights']:\n",
" os.system(f'wget -q -nc {base}/{script}.py')\n",
Expand Down
Loading