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