Instructions for Installing PyRosetta on Windows 10 with Anniversary Update Page created 10/2016 using Windows 10 Home, version 1607 This article is intended to guide a user through the process of updating Windows 10 with the Anniversary Update, enabling BASH, and installing PyRosetta. The process will require at least one reboot of the computer. If the Anniversary Update is not installed, plan for a longer window of time, in order to install the update. If it is already installed, skip to step 2. Installing BASHWindows updateMake sure Windows is up to date on your computer. a. Open Settings. This can be done by clicking the gear symbol in the bottom left when you tap the Windows key or click the bottom left icon. Alternatively, you can type ‘Settings’ into the search. c.
Select the Windows Update tab on the left
sidebar d.
Select Check for updates e.
If the Anniversary Update has not been
installed, there will be updates listed to install. Install them. This may require some time and
several reboots. Change to Developer modeWindows must be in Developer mode to use BASH. a.
Again under Settings, go to Update & Security
(see above) b.
Select the For developers tab on the left
sidebar c.
Select Developer mode Activating Linux a.
Open the Control Panel. This can be done with a search, or by
scrolling down the apps list to Windows System > Control Panel b.
Go to
Programs c.
Go to Programs and Features d.
Go to Turn Windows features on or off, on the left sidebar e.
Check the box for Windows Subsystem for Linux. Note: This option is not available if the Anniversary
Update has not been installed. f. At this point, one needs to open the Windows store and install one of the Linux flavors. Go to https://aka.ms/wslstore, choose Ubuntu, install. Then open bash. Then it forces you to make a new user with a password. Implementing this change will require a reboot
of your computer.
Accessing BASHAfter the restart, BASH should be available. It can be accessed either with a search or by scrolling down the apps list to Bash on Ubuntu on Windows. There are several install options. Option 1: Set up a BASH user accountThis approach is safer, but will require the use of that password and ‘sudo’ for subsequent steps. It reduces the risk of a casual user accidentally messing things up. Open a BASH window and create a username and password. Option 2: Set up a root accountWith this approach, you are always the super user, so ‘sudo’ and a password input will not be necessary when using BASH from this account. Open a Windows terminal (not BASH). A terminal can be opened either with a search, or by scrolling down the apps list to Windows System > Command Prompt In the terminal window, enter the following: lxrun /install /y
Installing and running PyRosettaInstalling BASH functionsThe following functions will be needed to properly set up PyRosetta4Open a BASH window (see above) and type the following commands. Note that the 'sudo' may be omitted if the second BASH installation option was chosen. Otherwise, the first 'sudo' command will prompt you to put in the password you created. sudo apt-get update sudo apt-get install ipython sudo apt-get install python-setuptools Download PyRosettaThere are several options for this. In either case, you should make or choose a directory for PyRosetta. Option 1: Installing by direct downloadPreferred method B. Enter username and password C. Download the appropriate Linux Release, based on your Python version D. Move the downloaded file to the desired directory. E. In BASH, move to the PyRosetta directory cd [your PyRosetta directory, ex: /mnt/c/Users/jhlubin/PyRosetta/] F. Unpack PyRosetta tar -vjxf [PyRosetta file, ex: PyRosetta4.Release.python27.linux.master-58947.tar.bz2] Option 2: Installing using gitMore applicable for users planning to modify Rosetta A. In BASH, enter the following command to install Git: sudo apt-get install git B. In BASH, move to the PyRosetta directory cd [your PyRosetta directory, ex: /mnt/c/Users/jhlubin/PyRosetta/] C. Enter the following commands to download PyRosetta git init git clone http:// [USERNAME@]graylab.jhu.edu/download/PyRosetta4/git/release/PyRosetta4.MinSizeRel.python27.linux.release.git/D. Enter password There may be a long delay without any message displaying in the terminal while the file copies into your directory. This is due to the large size of the file. Setting up and testing PyrosettaCongratulations, you now have PyRosetta! You can set it up with the following commands: cd [new PyRosetta folder]/setup This moves you to the setup folder. sudo python setup.py install You can test PyRosetta with the following commands: cd .. This moves you back up from the setup folder to the main PyRosetta4 directory. python self-test.py For further testing, try opening an interactive PyRosetta session yourself. The following commands are a simple example, and their expected output is shown below. We encourage you to play with PyRosetta further, and to try out the tutorials here. ipython
from rosetta import * from pyrosetta import * init()
p=pose_from_sequence("ACDEFGHIKLMNPQRSTVWY") print p
print p.residue(4)
Note that when you are done with ipython, you can exit the session and return to where you left off in BASH by typing control + d and entering y. Running the PyMol MoverFor instructions on installing PyMOL, see https://www.pymol.org/install For tips using the PyMOL_Mover, see http://www.pyrosetta.org/pymol_mover-tutorial Ideally, having PyMOL and PyRosetta installed, and running PyMOLPyRosettaServer.py in PyMOL should work properly. However, there are several issues that have been noted, and their solutions follow.
a. To see what ports are in use, open the Resource Monitor. This can be done with a search, or by scrolling down the apps list to Windows Administrative Tools > Resource Monitor b. Go to the Network tab and open the Listening Ports dropdown. The used ports will all be listed in the Port column. c. Select a port number that is not in use. This can be any number between 1024 and 65536. In the above example, 65002 was used. d. Open PyMOLPyRosettaServer.py in a text editor. e. Find the line, usually 1186 near the end of the file, that says Change the port from 65000 to the new port number
f. In the future, when running PyRosetta and initiating the PyMOL_Mover, instead of using the command pmm = PyMOL_Mover() use the following
pmm
= PyMOL_Mover('127.0.0.1', port=[new port number, ex: 65002]) g. If desired, this change can be made to the following files in the PyRosetta 4 test folder to view the tests in PyMOL: · C001_Carbohydrates_Demo01.py · Workshop3test.py · Workshop4test.py · Workshop5test.py · Workshop8test.py
All tests except 'C001_Carbohydrates_Demo01' should pass. Tips and suggestionsCopying and Pasting in BASH on WindowsYou may have noted that control + shift + c and control + shift + v do not work in the Windows BASH as they do on Linux. The best solution we have found so far is to do the following:
Now, copying and pasting is possible. To copy text from the BASH window, highlight it and right click. Pasting can be done similarly; if you have copied text from elsewhere, right clicking into the command line will past the text into the BASH terminal. Alternatively, copying and pasting can be made by right clicking the BASH icon and going to Edit. We hope you have found this guide helpful. For further questions, we encourage you to go to https://www.rosettacommons.org/forum |
Documentation >