Hi all,
Sorry, not an OpenMM question directly. Has anyone had consistent success running OpenMM in a colab instance? I've maxed out all my GPUs but of course still want to work on other scripts!
The most recent success I've seen is at: https://github.com/molmod/openmm-tutori ... e_colab.md
Presently that doesn't work - leads to a 'runtime has crashed' - it looks like because the packages get installed in python3.7 but colab (and the instructions given there) wants to work in 3.6. Changing `python=3.6` to 3.7 doesn't work - I think the system python is 3.6 and that can't be changed.
So I tried using a miniconda specific to 3.6, but installing openmm wants python3.7. Is there a way to install openmm using conda that doesn't require 3.7? Thanks!
OpenMM on colab
- lewis martin
- Posts: 63
- Joined: Tue Mar 06, 2018 8:56 pm
Re: OpenMM on colab
Managed to get around the python version issue by specifying the a python3.6 build explicitly:
This appears to install correctly, and the simtk package is present in the right directory. However after this it just fails to recognise that openmm is installed:
output:
I'll keep trying for now.
Code: Select all
!time conda install -y -q -c conda-forge -c omnia/label/cuda101 -c omnia openmm=7.4.1=py36_cuda101_rc_1
Code: Select all
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')
import simtk.testInstallation
simtk.testInstallation.main()
Code: Select all
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-28-ad74050948f0> in <module>()
1 import sys
2 sys.path.append('/usr/local/lib/python3.6/site-packages/')
----> 3 import simtk.testInstallation
4 simtk.testInstallation.main()
ModuleNotFoundError: No module named 'simtk'
- lewis martin
- Posts: 63
- Joined: Tue Mar 06, 2018 8:56 pm
Re: OpenMM on colab
OK, solution that should persist if they change CUDA/python version.
You have to reset the runtime after installing to recognise installed packages.
Full sequence is:
Reset the runtime
One day colab will use a different version of CUDA and python. Check in colab with . In that case, change the cuda flags that openmm uses (assuming openmm has version consistent with whatever colab is using), e.g.:
and when they change the python version, you can look for the build code for openmm with that python by scanning through
Also update to the next python colab is using.
You have to reset the runtime after installing to recognise installed packages.
Full sequence is:
Code: Select all
!wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh && bash Miniconda3-4.5.4-Linux-x86_64.sh -bfp /usr/local
!time conda install -y -q -c conda-forge -c omnia/label/cuda101 -c omnia openmm=7.4.1=py36_cuda101_rc_1
Code: Select all
import sys
sys.path.append('/usr/local/lib/python3.6/site-packages/')
import simtk.testInstallation
simtk.testInstallation.main()
Code: Select all
!nvcc --version
Code: Select all
!time conda install -y -q -c conda-forge -c omnia/label/cuda102 -c omnia openmm=7.4.1=py36_cuda102_rc_1
Code: Select all
conda search -c omnia openmm
Code: Select all
sys.path.append('/usr/local/lib/python3.7/site-packages/')