Scripts
Several Python scripts were written by developers and users to help others use PyRosetta. You are also encouraged to examine the code for the test scripts found in the /test folder of your PyRosetta install directory.
PyMOL Scripts
PyMOL is the favorite visualizer to use among the PyRosetta community — so much so that we built a Mover specifically for sending structures directly to an instance of PyMOL running the "listener" script.
PyMOL Servers ("Listeners")
PyMOL must run a "listener" script to properly translate packets sent to it from PyRosetta. These listeners can only translate a few types of packets but can be customized to translate any desired output. If you plan on using PyRosetta with PyMOL often, we recommend you add the line run PyMOLPyRosettaServer.py to your .pymolrc file so that PyMOL starts up automatically listening to PyRosetta. The PyMOLPyRosettaServer.py script is found in your PyRosetta install directory. For more details, please see the PyMOL_Mover Tutorial.
Sample Scripts
A collection of sample/demo scripts found in the /demos folder are outlined here. The demo scripts demonstrate PyRosetta's data structures, syntax, and traditional applications. Any data files required by default are also provided in the /test/data or /demos/data directories. Since these sample scripts are filled with comments on usage, we've also provided a summary of the terms and format used.
Essential Objects
requires data file test_in.pdb
requires data file test_in.pdb
requires data file test_in.pdb
requires data file test_in.pdb
Folding Applications
requires data files
requires data file test_in.pdb
requires data files
Docking Applications
requires data file test_dock.pdb
Protein Docking
requires data file test_dock.pdb
DNA Docking
requires data file test_dna.pdb
Small Molecule Docking
requires data files
Tools
Numerous helper scripts have been developed to make using PyRosetta easier. We provide a sampling of tools below, which can also be found in the /toolbox folder.
Several of the Tools below rely on third-party software. If using PyRosetta on a computer network, make sure to obtain or request the required software. These tool scripts are meant to provide a starting point for many custom applications.
Unfortunately, the rapid changes to Rosetta and PyRosetta have made support difficult. The tools provided here are developer favorites or use methods essential to some PyRosetta applications. These may not work with all versions of PyRosetta and have only been tested with PyRosetta v2.0 beta or intermediate revisions, unlike the sample/demo scripts, which are tested with every new build. Once you are experienced using Python and PyRosetta (by performing the workshops and studying the sample scripts), editing these files to your liking should be fairly easy.
Current Tools
cleaning.py — simple PDB file cleaning for PyRosetta; removes non-ATOM lines and redundant chains
rcsb.py — loads PDB files, FASTA files, and Poses directly from RCSB (requires the Python urllib module)
mutants.py — performs sequence changes, constructs Poses from sequences, etc.
generate_resfile.py — produces resfiles for use with PackerTasks
molfile2params.py — converts .mdl or .mol files to .params files, for use in ligand docking applications, etc.
load_ligand.py — loads files from PubChem and adds them to the minirosetta_database (requires molfile2params.py and openbabel)
extract_coords_pose.py — extracts coordinates from a Pose object into Python lists
make_rna_rosetta_ready.py — converts clean RNA .pdb files such that they include Rosetta-allowed residue names