# Mounting Google Drive and add it to Python sys path
google_drive_mount_point = '/content/google_drive'
import os, sys, time
if 'google.colab' in sys.modules:
from google.colab import drive
drive.mount(google_drive_mount_point)
if not os.getenv("DEBUG"):
google_drive = google_drive_mount_point + '/My Drive'
%%time
if not os.getenv("DEBUG"):
# installing PyRosetta
if sys.version_info.major != 3 or sys.version_info.minor != 7:
print('Need Python-3.7 to run!')
sys.exit(1)
# upload PyRosetta Linux WHEEL package into your google drive and put it into /PyRosetta dir
# or alternatively you can download PyRosetta directly from GrayLab web site (but this might take some time!)
#!mkdir $notebook_path/PyRosetta
#!cd $notebook_path/PyRosetta && wget --user USERNAME --password PASSWORD https://graylab.jhu.edu/download/PyRosetta4/archive/release/PyRosetta4.Release.python37.ubuntu.wheel/latest.html
pyrosetta_distr_path = google_drive + '/PyRosetta'
# finding path to wheel package, if multiple packages is found take first one
# replace this with `wheel_path = pyrosetta_distr_path + /<wheel-file-name>.whl` if you want to use particular whl file
wheel_path = pyrosetta_distr_path + '/' + [ f for f in os.listdir(pyrosetta_distr_path) if f.endswith('.whl')][0]
print(f'Using PyRosetta wheel package: {wheel_path}')
!pip3 install '{wheel_path}'
from pyrosetta import *
pyrosetta.init()