Install PyRosetta - Kortemme-Lab/wiki GitHub Wiki

Here are some non-comprehensive instructions that worked for folks in lab. Instructions for using conda or wheel can also be found at http://www.pyrosetta.org/dow.

    1. Instructions to install from binaries, worked for Mac OS and linux
      1. First, you need to get the binaries. Here are various options:
To build binaries from a Rosetta download:
  - explained at http://www.pyrosetta.org/documentation#TOC-2.-Building-PyRosetta
  - I do this with Rosetta installed from github:
  - `cd ~/Rosetta/main/source/src/python/PyRosetta`
  - `python build.py -j24 --create-package ~/PyRosetta`

To download the binaries from the PyRosetta website:

  - https://graylab.jhu.edu/download/PyRosetta4/archive/release
    - Username: pose
    - Password: [ask someone in lab]
  - Go into the folder corresponding to your OS and desired version
  - download the tar.bz2 file you want
  - unpack binaries where you want the folder to live, and rename if you want (I rename to PyRosetta)

To download the binaries from github:

  - `git clone https://[email protected]/download/PyRosetta4/git/release/PyRosetta4.Release.python38.mac.release.git`
  - git releases found at http://graylab.jhu.edu/download/PyRosetta4/git/release/
  - NOTE: in order to update these repositories, use `git fetch && git reset --hard origin/master && git clean -fd`
      1. Now, you have the binaries, you can install
To install to the default system python, run:
  - `cd ~/PyRosetta/setup`
  - `python setup.py install`

To install into a pipenv, starting from the directory with the Pipfile:

  - `pipenv shell`
  - `pipenv install ~/PyRosetta/setup`

Compiling PyRosetta

To compile PyRosetta with default settings:

$ cd path_to_rosetta/main/source/src/python/PyRosetta 
$ ./build.py -j 4 --type Release -p path_to_store_the_pacakge
$ cd path_to_store_the_pacakge/setup
$ python setup.py build
$ sudo python setup.py install

On the QB3 cluster, you need to tell the python libraries for the binder. Here is my example. You may point to your own libraries:

$ cd path_to_rosetta/main/source/src/python/PyRosetta 
$ source /opt/rh/llvm-toolset-7/enable
$ ./build.py -j 4 --compiler clang --python-include-dir /wynton/home/kortemme/username/.local/include/python2.7 --python-lib /wynton/home/kortemme/username/.local/lib/python2.7 --type Release -p path_to_store_the_pacakge
$ cd path_to_store_the_pacakge/setup
$ python setup.py build
$ python setup.py install

Note: The following instructions are depreciated. Compiling with GCC does not seem to work on Wynton. Try the above instructions first. (However, do skip to the "Some things to try..." section if the above instructions do not work.)

On the QB3 cluster, you need to tell the python libraries for the binder. Here is my example. You may point to your own libraries:

$ cd path_to_rosetta/main/source/src/python/PyRosetta 
$ source /opt/rh/devtoolset-4/enable
$ ./build.py -j 4 --compiler gcc --python-include-dir /wynton/home/kortemme/username/.local/include/python2.7 --python-lib /wynton/home/kortemme/username/.local/lib/python2.7 --type Release -p path_to_store_the_pacakge
$ cd path_to_store_the_pacakge/setup
$ python setup.py build
$ python setup.py install

Some things to try for QB3 cluster installation if the above does not work:

1. Install a newer version of cmake in your local folder. (Version 3.9.6 worked for me.)

$ ssh dev1
$ wget https://cmake.org/files/v3.9/cmake-3.9.6.tar.gz
$ tar -xzf cmake-3.9.6.tar.gz
$ cd cmake-3.9.6
$ ./boostrap --prefix=/wynton/home/kortemme/krivacic/cmake
$ make
$ make install

2. Install ninja locally.

$ git clone https://github.com/ninja-build/ninja.git && cd ninja
$ git checkout release
$ ./configure.py --bootstrap

3. Add these to your $PATH environment variable by adding the following lines to your ~/.bashrc file:

export $PATH=~/cmake:$PATH
export $PATH=~/ninja:$PATH

4. Download Rosetta submodules.

$ cd path-to-rosetta
$ git submodule init
$ git submodule update

5. Enable python 2.7 or 3.6 (whichever matches your --python-include-dir and --python-lib flags) when building PyRosetta:

$ scl enable python27 './build.py -j 4 ...'
$ scl enable rh-python36 './build.py -j 4 ...'

Tutorials

http://www.pyrosetta.org/tutorials

PyRosetta scripts repository

https://github.com/RosettaCommons/pyrosetta_scripts

⚠️ **GitHub.com Fallback** ⚠️