Skip to content

Commit 955737f

Browse files
Augustin-Zidekcopybara-github
authored andcommitted
Upgrade OpenMM from 7.5.1 to 7.7.0 and bump Colab Python version to 3.10.
We don't need to patch anymore as the fix has been included upstream. PiperOrigin-RevId: 528742992 Change-Id: I804707216bf00367c8346dffde69aeffcb7dad8f
1 parent 2819de4 commit 955737f

File tree

6 files changed

+13
-64
lines changed

6 files changed

+13
-64
lines changed

alphafold/relax/amber_minimize.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@
2727
import ml_collections
2828
import numpy as np
2929
import jax
30-
from simtk import openmm
31-
from simtk import unit
32-
from simtk.openmm import app as openmm_app
33-
from simtk.openmm.app.internal.pdbstructure import PdbStructure
30+
import openmm
31+
from openmm import unit
32+
from openmm import app as openmm_app
33+
from openmm.app.internal.pdbstructure import PdbStructure
3434

3535

3636
ENERGY = unit.kilocalories_per_mole

alphafold/relax/cleanup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
import io
2121

2222
import pdbfixer
23-
from simtk.openmm import app
24-
from simtk.openmm.app import element
23+
from openmm import app
24+
from openmm.app import element
2525

2626

2727
def fix_pdb(pdbfile, alterations_info):

alphafold/relax/cleanup_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
from absl.testing import absltest
1919
from alphafold.relax import cleanup
20-
from simtk.openmm.app.internal import pdbstructure
20+
from openmm.app.internal import pdbstructure
2121

2222

2323
def _pdb_to_structure(pdb_str):

docker/Dockerfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ RUN wget -q -P /tmp \
5555
ENV PATH="/opt/conda/bin:$PATH"
5656
RUN conda install -qy conda==4.13.0 \
5757
&& conda install -y -c conda-forge \
58-
openmm=7.5.1 \
58+
openmm=7.7.0 \
5959
cudatoolkit==${CUDA_VERSION} \
6060
pdbfixer \
6161
pip \
@@ -74,10 +74,6 @@ RUN pip3 install --upgrade pip --no-cache-dir \
7474
jaxlib==0.3.25+cuda11.cudnn805 \
7575
-f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
7676

77-
# Apply OpenMM patch.
78-
WORKDIR /opt/conda/lib/python3.8/site-packages
79-
RUN patch -p0 < /app/alphafold/docker/openmm.patch
80-
8177
# Add SETUID bit to the ldconfig binary so that non-root users can run it.
8278
RUN chmod u+s /sbin/ldconfig.real
8379

docker/openmm.patch

Lines changed: 0 additions & 42 deletions
This file was deleted.

notebooks/AlphaFold.ipynb

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,8 @@
111111
" %env PATH=/opt/conda/bin:{PATH}\n",
112112
" %shell conda install -qy conda==4.13.0 \\\n",
113113
" \u0026\u0026 conda install -qy -c conda-forge \\\n",
114-
" python=3.9 \\\n",
115-
" openmm=7.5.1 \\\n",
114+
" python=3.10 \\\n",
115+
" openmm=7.7.0 \\\n",
116116
" pdbfixer\n",
117117
" pbar.update(80)\n",
118118
"\n",
@@ -163,16 +163,11 @@
163163
" %shell pip3 install --upgrade pyopenssl\n",
164164
" pbar.update(10)\n",
165165
"\n",
166-
" # Apply OpenMM patch.\n",
167-
" %shell pushd /opt/conda/lib/python3.9/site-packages/ \u0026\u0026 \\\n",
168-
" patch -p0 \u003c /content/alphafold/docker/openmm.patch \u0026\u0026 \\\n",
169-
" popd\n",
170-
"\n",
171166
" # Make sure stereo_chemical_props.txt is in all locations where it could be searched for.\n",
172167
" %shell mkdir -p /content/alphafold/alphafold/common\n",
173168
" %shell cp -f /content/stereo_chemical_props.txt /content/alphafold/alphafold/common\n",
174-
" %shell mkdir -p /opt/conda/lib/python3.9/site-packages/alphafold/common/\n",
175-
" %shell cp -f /content/stereo_chemical_props.txt /opt/conda/lib/python3.9/site-packages/alphafold/common/\n",
169+
" %shell mkdir -p /opt/conda/lib/python3.10/site-packages/alphafold/common/\n",
170+
" %shell cp -f /content/stereo_chemical_props.txt /opt/conda/lib/python3.10/site-packages/alphafold/common/\n",
176171
"\n",
177172
" # Load parameters\n",
178173
" %shell mkdir --parents \"{PARAMS_DIR}\"\n",
@@ -197,7 +192,7 @@
197192
"\n",
198193
"# Make sure everything we need is on the path.\n",
199194
"import sys\n",
200-
"sys.path.append('/opt/conda/lib/python3.9/site-packages')\n",
195+
"sys.path.append('/opt/conda/lib/python3.10/site-packages')\n",
201196
"sys.path.append('/content/alphafold')\n",
202197
"\n",
203198
"executed_cells.add(2)"

0 commit comments

Comments
 (0)