{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "*This notebook contains material from [PyRosetta](https://RosettaCommons.github.io/PyRosetta.notebooks);\n", "content is available [on Github](https://github.com/RosettaCommons/PyRosetta.notebooks.git).*" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "< [Running Rosetta in Parallel](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/16.00-Running-PyRosetta-in-Parallel.ipynb) | [Contents](toc.ipynb) | [Index](index.ipynb) | [Distributed computation example: miniprotein design](http://nbviewer.jupyter.org/github/RosettaCommons/PyRosetta.notebooks/blob/master/notebooks/16.02-PyData-miniprotein-design.ipynb) >
"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Distributed analysis example: exhaustive ddG PSSM\n",
"\n",
"## Notes\n",
"This tutorial will walk you through how to generate an exhaustive ddG PSSM in PyRosetta using the PyData stack for analysis and distributed computing.\n",
"\n",
"This Jupyter notebook uses parallelization and is not meant to be executed within a Google Colab environment.\n",
"\n",
"## Setup\n",
"Please see setup instructions in Chapter 16.00\n",
"\n",
"## Citation\n",
"[Integration of the Rosetta Suite with the Python Software Stack via reproducible packaging and core programming interfaces for distributed simulation](https://doi.org/10.1002/pro.3721)\n",
"\n",
"Alexander S. Ford, Brian D. Weitzner, Christopher D. Bahl\n",
"\n",
"## Manual\n",
"Documentation for the `pyrosetta.distributed` namespace can be found here: https://nbviewer.jupyter.org/github/proteininnovation/Rosetta-PyData_Integration/blob/master/distributed_overview.ipynb"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install pyrosettacolabsetup\n",
"import pyrosettacolabsetup; pyrosettacolabsetup.install_pyrosetta()\n",
"import pyrosetta; pyrosetta.init()\n"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import logging\n",
"logging.basicConfig(level=logging.INFO)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import pandas\n",
"import seaborn\n",
"import matplotlib"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"import Bio.SeqUtils\n",
"import Bio.Data.IUPACData as IUPACData"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
"import pyrosetta\n",
"import pyrosetta.distributed.io as io\n",
"import pyrosetta.distributed.packed_pose as packed_pose\n",
"import pyrosetta.distributed.tasks.rosetta_scripts as rosetta_scripts\n",
"import pyrosetta.distributed.tasks.score as score"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'3.7.6'"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import os,sys,platform\n",
"\n",
"platform.python_version()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Create test pose, initialize rosetta and pack"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"input_protocol = \"\"\"\n",
"