The following notebooks contain examples of how to run Rosetta in parellel either locally on a compute cluster through the pyrosetta.distributed
package that is now included with PyRosetta.
The first three notebooks contain two high-level examples of parellel PyRosett through a Rosetta-PyData integration using the pyrosetta.distributed namespace.
For Chapter 15, Running PyRosetta in Parallel, you will need to use a specific version of PyRosetta that is built for parallelization. This is the serialization build. Besides manually building it from the Rosetta C++ source code, the general way to obtain this is through the use of a conda
environment.
A conda
environment is a way to run code that has specific versions of required packages, that instead of being installed globally, will be installed as a local virtual environment that you may run whenever you wish. This is extremely useful when some packages require specific versions of other packages, as is the case for some rosetta distributed code.
You will need to pass the username and password of PyRosetta to conda.
In order to do this, we will create a file in your home directory called .condarc
. If you already have this file, please edit it instead of overriding it below.
Here, instead of USERNAME and PASSWORD, enter the USERNAME and PASSWORD you were given while gaining access to PyRosetta.
echo "channels:" >> $HOME/.condarc
echo " - https://USERNAME:PASSWORD@conda.graylab.jhu.edu" >> $HOME/.condarc
echo " - defaults" >> $HOME/.condarc
conda env create -f environment.yml
conda activate PyRosetta.notebooks
Each time you wish to run this environment, use conda activate PyRosetta.notebooks
to create the local virtual environment. You may wish to put this in your system configuration on startup.
NOTE:
When using a notebook with this env - the python Kernel must be set to this env. In the following notebooks, this is done for you, but if you wish to use this environment in other notebooks, make sure to manually change this! You can do this by looking at the jupyter menu - Kernel
is after Cell
and before Widgets
. The option is 'Change Kernel`. This is how you would run python2 vs python3 or run a kernal with other conda environments you have installed on your computer.
Citation PyData integration notebooks:
Alexander S. Ford, Brian D. Weitzner, Christopher D. Bahl
Documentation for the pyrosetta.distributed
namespace can be found here: https://nbviewer.jupyter.org/github/proteininnovation/Rosetta-PyData_Integration/blob/master/distributed_overview.ipynb
Chapter contributors: