### INSTALLING ROSETTA ### Easy, just download a pre-compiled package, untar it, and move it to /usr/local/rosetta or wherever you want to keep it ### I will assume that rosetta is at /usr/local/rosetta ### If you need to recompile Rosetta: sudo yum install gcc sudo yum install gcc-g++ cd /path/to/rosetta/main/source ./scons.py bin mode=release ### To get MPI-enabled Rosetta: sudo yum install openmpi openmpi-devel ### Add the following line to each user's .bashrc file: export PATH=/usr/lib64/openmpi/bin:$PATH ### Then do the following sudo ln -s /usr/lib64/openmpi/bin/mpiCC /usr/bin/mpiCC sudo ln -s /usr/lib64/openmpi/bin/mpicc /usr/bin/mpicc cd /path/to/rosetta/main/source ./scons.py bin mode=release extras=mpi ### Add the following to each user's .bashrc file export ROSETTA=/usr/local/rosetta/main/source/bin export ROSETTADB=/usr/local/rosetta/main/database export ANTIBODY=/usr/local/rosetta/tools/antibody export LD_LIBRARY_PATH=/usr/local/rosetta/main/source/build/external/release/linux/2.6/64/x86/gcc/4.4/mpi:$LD_LIBRARY_PATH ### ================================================================================================================================= ### INSTALLING BLAST ### This is needed for antibody.py ### Visit http://blast.ncbi.nlm.nih.gov/Blast.cgi?PAGE_TYPE=BlastDocs&DOC_TYPE=Download ### Get ncbi-blast-2.2.30+-x86-linux.tar.gz ### I was not able to get into FTP on the Linux machine and had to download it from the Windows laptop and move it over via USB tar zxvf ncbi-blast-2.2.30+-x86-linux.tar.gz sudo mv ncbi-blast-2.2.30+ /opt ### Add the following to each user's .bashrc file export PATH=/opt/ncbi-blast-2.2.30+/bin:$PATH ### Now you can download local BLAST databases ### You need nr for Rosetta fragments generation (which is needed for structure modeling and flexible peptide docking) ### Visit ftp://ftp.ncbi.nlm.nih.gov/blast/db and download a suitable nr database ### Again I couldn't get FTP to work in Linux, so I had to download on Windows and transfer using a USB stick ### Assuming the package is called nr.15.tar.gz and it's in Downloads: sudo mkdir /opt/ncbi-blast-2.2.30+/db tar zxvf nr.15.tar.gz sudo mv nr.15.p* /opt/ncbi-blast-2.2.30+/db ### Add the following to each user's .bashrc file export BLASTDB=/opt/ncbi-blast-2.2.30+/db ### When you use a database, you specify the filename up to the trailing extension ### So the above example would, for instance, use: psiblast -query query.fasta -db nr.15 ### ================================================================================================================================= ### Installing legacy BLAST ### Some Rosetta software depends on legacy BLAST executables, most notably blastpgp ### Download ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release/2.2.26/blast-2.2.26-x86-linux.tar.gz tar zxvf blast-2.2.26-x86-linux.tar.gz sudo mv blast-2.2.26 /opt ### Edit each user's .bashrc file and add the following line: export PATH=/opt/blast-2.2.26/bin:$PATH ### Create the file ~/.ncbirc for each user and add the following to it: [NCBI] data=/opt/blast-2.2.26/data ### ================================================================================================================================= ### INSTALLING PYROSETTA ### Looks like Python2.7 is not installed on ScientificLinux 6, which is an issue ### Okay, we can still probably use PyRosetta with Python2.6, but PyRosetta will have to be recompiled ### These issues can be avoided entirely, making installation of Rosetta and PyRosetta as simple as unpacking tgz files, if a newer version of Linux is used ### I don't know if ScientificLinux 7 would get around these issues, but I know that the most recent version of Fedora will and most likely CentOS as well, which are both RedHat-based sudo yum install gcc sudo yum install gcc-c++ sudo yum install cmake sudo yum install git sudo yum install python-devel sudo yum install zlib-devel sudo yum install numpy sudo yum install wget cd /path/to/rosetta/root (you'll see the directories ["main", "tools", "documentation", "demos"], something like that, depending on whether the release was a weekly one or one of the major, main releases) cd tools/PyRosetta.develop python DeployPyRosetta.py --prefix=$HOME/PyRosetta --omit-cmake cp $HOME/PyRosetta/BuildPyRosetta.sh /path/to/rosetta/main/source cd /path/to/rosetta/main/source ./BuildPyRosetta.sh ### This step takes ~16 hours, so do it overnight ### Now the PyRosetta build should be in /path/to/rosetta/root/main/source/build/PyRosetta/linux/namespace/release sudo mkdir /usr/local/PyRosetta sudo mv /path/to/rosetta/root/main/source/build/PyRosetta/linux/namespace/release/* /usr/local/PyRosetta ### Now there is a "database" symbolic link in /usr/local/PyRosetta that is probably broken, fortunately database just contains a bunch of text files that can be copied from the rosetta directory sudo rm /usr/local/PyRosetta/database sudo cp -r /path/to/rosetta/root/main/database /usr/local/PyRosetta ### The following needs to be added to each user's .bashrc file so they can import Rosetta in Python from anywhere source /usr/local/PyRosetta/SetPyRosettaEnvironment.sh ### ================================================================================================================================= ### INSTALLING ROSETTA 2.3.1 ### This is needed for SnugDock Antibody Docking ### First download Rosetta2.3.1 from RosettaCommons tar zxvf RosettaSnugDock-2.3.1.tar.gz cd RosettaSnugDock-2.3.1/rosetta++ ### Now you have to edit a bunch of files... ### Add #include to the beginning of zipstream.ipp ### Add #include to the beginning of DirectedSimAnnealer.cc, then around line 67 change INT_MAX to std::numeric_limits::max() ### Add #include to the beginning of dna.cc ### Add #include to the beginning of dna_classes.h ### Add #include to the beginning of loop_class.h ### In packing_measures.cc, use find/replace to replace all instances of bit_or with ObjexxFCL::bit_or ### Add #include to the beginning of random_numbers.cc ### Add #include to the beginning of XUtilities.cc ### Add #include to the beginning of src/ObjexxFCL/string.functions.cc sudo yum install zlib-static sudo yum install glibc-static rm lib/i686-pc-linux-gnu/libz.a sudo cp /usr/lib64/libz.a lib/i686-pc-linux-gnu sudo chown username:users lib/i686-pc-linux-gnu ### In job_distributor.cc, add // to the beginning of line 745, which says "pathways::pathways_generator_main(failed);" make gcc cd .. sudo mv rosetta++ /usr/local sudo mv rosetta_database /usr/local/rosetta++ ### Add the following to each user's .bashrc file export ROSETTA2=/usr/local/rosetta++ export ROSETTA2DB=/usr/local/rosetta++/rosetta_database ### ================================================================================================================================= ### OPTIONAL INSTALLS ### IPYTHON ### If you are new to PyRosetta scripting, ipython makes using PyRosetta much, much easier ### The tab-completion feature is very useful for exploring modules ### There is also a help feature that displays useful information about functions/classes, including documentation text and function argument lists ### It also saves your scripting history like a bash shell does ### ipython makes prototyping PyRosetta scripts much simpler ### If installing from yum does not work wget "http://archive.ipython.org/release/1.2.1/ipython-1.2.1.tar.gz" tar zxvf ipython-1.2.1.tar.gz cd ipython-1.2.1 sudo python setup.py install ### ipython is now installed at /usr/bin/ipython ### The following is necessary to install InteractiveROSETTA ### If this is the Linux server, then you don't actually need to do any of this since InteractiveROSETTA will run on client Windows PCs ### You do however need to have Rosetta and PyRosetta running on the Linux server ### Here's how to install it on ScientificLinux 6 ### ================================================================================================================================= ### INSTALL WXPYTHON sudo yum install gtk2-devel sudo yum install mesa-*-devel sudo yum install gstreamer-*-devel wget "http://sourceforge.net/projects/wxpython/files/wxPython/3.0.2.0/wxPython-src-3.0.2.0.tar.bz2/download?use_mirror=softlayer-dal" tar xjvf wxPython-src-3.0.2.0.tar.bz2 cd wxPython-src-3.0.2.0 mkdir bld cd bld mkdir $HOME/wxPython ../configure --prefix=$HOME/wxPython --with-gtk --with-gnomeprint --with-opengl --enable-debug --enable-debug_gdb --enable-geomtery --enable-graphics_ctx --enable-sound --with-sdl --enable-mediactrl --enable-display --enable-unicode --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin --with-zlib=builtin make make install export PATH=$HOME/wxPython/bin:$PATH # You need wx-config to be on the path cd ../wxPython python setup.py build_ext --inplace --debug sudo mkdir -p /opt/wx/3.0 sudo mv $HOME/wxPython/* /opt/wx/3.0 sudo mkdir -p /opt/wx/3.0/lib/python2.6/site-packages sudo mv wx* /opt/wx/3.0/lib/python2.6/site-packages ### Add the following to each user's .bashrc script: export LD_LIBRARY_PATH=/opt/wx/3.0/lib:$LD_LIBRARY_PATH export PYTHONPATH=/opt/wx/3.0/lib/python2.6/site-packages:$PYTHONPATH ### You can make sure wxPython works by using the demo: cd demo python demo.py ### Then you should see a sophisticated GUI window that tests all the functionalities of wxPython ### ================================================================================================================================= ### INSTALL PYMOL wget "http://sourceforge.net/projects/pymol/files/pymol/1.7/pymol-v1.7.2.1.tar.bz2/download" tar zxvf glew-1.12.0.tgz cd glew-1.12.0 make sudo make install cd .. wget "http://sourceforge.net/projects/glew/files/glew/1.12.0/glew-1.12.0.tgz/download" tar xvjf pymol-v1.7.2.1.tar.bz2 cd pymol sudo mkdir /opt/pymol sudo python setup.py build install --home=/opt/pymol --install-lib=/opt/pymol/modules --install-scripts=/opt/pymol ### It seems that for some Linux distros, the OpenGL drivers are not that great and PyMOL rendering can be slow ### In this case, refrain from using cartoon representations except for imaging and only use the ribbon representations to display BB ### ================================================================================================================================= ### INSTALL OPENBABEL wget "http://sourceforge.net/projects/openbabel/files/openbabel/2.3.2/openbabel-2.3.2.tar.gz/download" tar zxvf openbabel-2.3.2.tar.gz mkdir build cd build cmake ../openbabel-2.3.2 -DPYTHON_BINDINGS=ON make -j24 ### Or however many processors the computer has, check by looking at /proc/cpuinfo sudo make install ### Add the following to each user's .bashrc file: export PYTHONPATH=/usr/local/lib:$PYTHONPATH ### ================================================================================================================================= ### To install InteractiveROSETTA on a Windows 7/8 PC First install the Windows version of PyRosetta Open a web browser and navigate to https://github.com/schenc3/InteractiveROSETTA/releases Download InteractiveROSETTA_Windows64bit.zip Right click on the package and click "Extract All" Choose "C:\Program Files (x86)" as the extraction location Navigate to C:\Program Files (x86)\InteractiveROSETTA Right-click on "shortcut.bat", choose "Run as Administrator" and now there should be shortcuts on the desktop and in the Start menu Right-click on either of these shortcuts and choose "Run as Administrator" Accept the license agreement Make sure that the molfile2params items were unpacked properly -> Navigate to C:\Program Files (x86)\InteractiveROSETTA\scripts and there should be a folder called "rosetta_py" in there (this step will not have worked if you did not previously install PyRosetta) If it is not there, then go to C:\Program Files (x86)\InteractiveROSETTA, right click on "molfile.bat", and "Run as Administrator" (again, PyRosetta needs to be installed first for this to work) After accepting the license agreement, you can run InteractiveROSETTA simply by using the shortcuts (no need to run as Administrator anymore) To use the Linux server, click on the "S" button in the top right corner of the Sequence Window and enter the http address of the Linux server (this will have to be provided by whoever sets up the Linux server) sudo easy_install poster sudo easy_install psutil sudo easy_install requests sudo easy_install biopython ### ================================================================================================================================= ### TO SETUP THE LINUX INTERACTIVEROSETTA SERVER ### You do not need the GUI for this, but you do need Apache sudo yum install httpd ### httpd should be enabled by default after this, but to make sure: sudo service httpd start sudo chkconfig httpd on ### Now you should be able to open a web browser and search for "localhost" and get the default Apache page ### To let other computers on the network see this computer, you need to allow port 80 traffic through the firewall sudo /etc/init.d/iptables save sudo /etc/init.d/iptables stop sudo gedit /etc/sysconfig/iptables ### Around line 10 it will say something like "-A INPUT -j REJECT --reject-with icmp-host-prohibited" ### If such a line does not exist, the line you are looking for is the first one with "-j REJECT" in it ### Before this line, add the following two lines: -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT -A INPUT -p tcp -m state --state NEW -m tcp --dport 443 -j ACCEPT ### Save and exit sudo /etc/init.d/iptables start ### Get the IP address of this computer ifconfig ### Look for the "inet addr" field, it will be 10.*.*.* where * is a number ### On another computer on the network, attempt to search for "http://10.*.*.*" in a web browser, replacing the * with the actual numbers ### You should be able to see the test page ### Now get the server up and running ### Assuming that the user running the server is called "username" sudo mkdir -p /var/www/html/username mkdir $HOME/server sudo ln -s $HOME/server /var/www/html/username/InteractiveROSETTA sudo chown username:users /var/www/html/username sudo chown username:users /var/www/html/username/InteractiveROSETTA ### Untar the InteractiveROSETTA_Linux.tgz file tar zxvf InteractiveROSETTA_Linux.tgz sudo cp -r /path/to/InteractiveROSETTA/server/* /var/www/html/username/InteractiveROSETTA cd /var/www/html/username/InteractiveROSETTA sudo chmod 777 cgi-bin ### You need to generate a file called "hostlist" that contains the names of all the computers that run the PyRosetta ### daemon, called "daemon_server.py", and these machines need to be able to access the same filesystem via NFS ### The following will set up only this one computer to run the daemon, and you will not need NFS to run only one daemon hostname > hostlist ### Now configure Apache to allow CGI script execution: sudo gedit /etc/httpd/conf/httpd.conf ### Search for the text "ScriptAlias" ### Underneath that line, enter the following: ScriptAlias /username/InteractiveROSETTA/cgi-bin "/var/www/html/username/InteractiveROSETTA/cgi-bin" ### Save and exit sudo service httpd restart ### On each machine that runs the PyRosetta daemon, you have to add an entry to the crontab file to start the daemon, ### make sure it is still running, and clean up the output files after they've been visible long enough for the ### client to retrieve them ### The server will be running this daemon, but you could have others as well as long as the main web server machine ### we just set up can have $HOME/server mounted on these extra machines via NFS crontab -e ### Add the following line: * * * * * cd /var/www/html/username/InteractiveROSETTA; csh maintain.csh >& /dev/null ### For users unfamiliar with VI's commands: ### Press the i key to enter "INSERT" mode ### Type the above text ### Press ESC to get out of INSERT mode ### Type ":wq" followed by the RETURN key to write changes and quit ### If tcsh is not installed, the maintain.csh script will not run: sudo yum install tcsh ### Some of the protocols make calls to other installed programs, including mpirun, pymol, and blast ### It has trouble finding some of these things on custom paths, so just copy these files to their standard locations sudo ln -s /usr/lib64/openmpi/bin/mpirun /usr/bin/mpirun sudo cp -r /opt/pymol/modules/* /usr/lib64/python2.6/site-packages sudo cp -r /opt/ncbi-blast-2.2.30+/bin/* /usr/bin ### ================================================================================================================================= ### INSTALLING THE FRAGMENT-GENERATION DEPENDENCIES ### This is needed for homology modeling and flexible peptide docking ### Install PSIPRED ### PSIPRED appears to be free even for commercial use, provided that you don't attempt to commercialize software that uses it wget http://bioinfadmin.cs.ucl.ac.uk/downloads/psipred/psipred3.5.tar.gz tar zxvf psipred3.5.tar.gz cd psipred sudo mkdir /usr/local/psipred sudo mv bin /usr/local/psipred sudo mv data /usr/local/psipred ### Edit runpsipred_single ### Replace the "set execdir" and "set datadir" lines to the following: set execdir = /usr/local/psipred/bin set datadir = /usr/local/psipred/data ### Back to the terminal sudo mv runpsipred_single /usr/bin ### INSTALL BLASTPGP # Get the executable package from ftp://ftp.ncbi.nlm.nih.gov/blast/executables/release/2.2.26/blast-2.2.26-x86-linux.tar.gz tar zxvf blast-2.2.26-x86-linux.tar.gz sudo mv blast-2.2.26 /opt ### Add the following lines to each user's .bashrc file: export PATH=/opt/blast-2.2.26/bin:$PATH ### Create a file called ~/.ncbirc for each user. It has the following content: [NCBI] data=/opt/blast-2.2.26/data ### ================================================================================================================================= ### TO INSTALL EXTRA MODULES FOR INTERACTIVEROSETTA 1. You'll need to first develop the package 2. There will be an example in C:\Users\\InteractiveROSETTA\modules\template 3. You need a folder with the name of your module. I will refer to this name as from here on out. 4. In this folder, there should be an __init__.py script implementing the GUI panel that will appear in the Protocols Window -> You need to keep the panel named "ModulePanel" and keep the same number of constructor arguments as in templates\__init__.py -> If you want to name it, have a line with "### PROTOCOL NAME: " and then will be what appears in the menu -> Take all of the functions that are in template\__init__.py and follow the instructions in them. You may add more functions as you need. 5. If the protocol runs locally, you need to create a file called \job\__init__.py -> Refer to templates\job\__init__.py for an example -> There must be a function called "runJob" and this is what the daemon attempts to execute -> All of your data should end up in input, which is saved in the variable "inputfile" in the main __init__.py script -> Returned data should be in output, saved in the variable "outputfile" in runJob 6. If the protocol runs on the remote server, create a file called \server\__init__.py -> There must be a function called "runJob" and it gets a lot of arguments that will help you to run programs in MPI mode on your server -> Refer to templates\server\__init__.py for an example -> NOTE: If your server script needs to submit a job to a queuing system (e.g. SLURM) such that the command that is submitted is non-blocking, you need to have the runJob function stall after that submission until the job is done (as in, put it in a sleep loop until some criterion is met indicating that the outputfiles have been generated) The calling function assumes that the output files are ready when runJob terminates 7. To package the module, simply go to the protocols option "Module Manager" and use the "Create" button. 8. Select the folder 9. Select a directory to output the package to. 10. There should now be a package called .irm in this folder. 11. You can give .irm to other people and they can install it by using the "Install" feature of the Module Manager. 12. If it has a server component, the server administrator can install it by executing "python install_module.py .irm" at the Linux command line, where install_module.py is a script in the main server package (in the same place as daemon_server.py)