Written and maintained by CASRAI Editorial Board
Last updated
PyRosetta is the Python interface to the Rosetta molecular modeling suite. Researchers use it to load a protein structure, score it with the Rosetta force field and refine it with protocols such as FastRelax. This page shows which install route to pick, what a first script looks like, and where refinement fits after a structure-prediction tool.
What PyRosetta is used for in research
PyRosetta is a script-based interface for implementing molecular modeling algorithms using Rosetta. The original methods paper (Chaudhury, Lyskov and Gray, Bioinformatics 26(5):689-691, 2010, doi:10.1093/bioinformatics/btq007) describes an interactive mode, with tab completion and built-in help, and a script mode for longer protocols. Because structures are loaded as Python objects, the same session can load a model, score it and run a Rosetta protocol on it.
A common sequence in computational structural biology is to predict a structure first and then refine or score it. Predictors covered on this site include ColabFold, ESMFold and SWISS-MODEL; the Rosetta relax application is described by its documentation as simple all-atom refinement of structures in the Rosetta force field. The game-based side of protein design is covered in Foldit.
Install or access (official source only)
The official downloads page (pyrosetta.org/downloads, read 2026-11-08) states that PyRosetta is built quarterly as of January 2026. It lists these routes:
| Route | Command or location listed on the downloads page |
|---|---|
| pip, quarterly release (recommended) | pip install pyrosetta --find-links https://west.rosettacommons.org/pyrosetta/quarterly/release |
| pip installer, weekly development builds | pip install pyrosetta-installer, then python -c 'import pyrosetta_installer; pyrosetta_installer.install_pyrosetta()' |
| Distributed computing package | pip install pyrosetta-distributed |
| conda, West mirror | conda install -y -c https://conda.rosettacommons.org -c conda-forge pyrosetta |
| conda, East mirror | conda install -c https://conda.graylab.jhu.edu -c conda-forge pyrosetta |
The page also lists MinSizeRel and thread-serialization builds under the same quarterly location. It gives the requirements as Python 3.6 or later (the conda channel lists Python 3.6 to 3.14), on Intel Mac, M1 arm64 Mac and 64-bit Linux (Red Hat, Ubuntu), with Windows 10 supported through a Unix layer.
Licence
According to the downloads page, PyRosetta is free for academic and non-commercial users under the PyRosetta Software Non-Commercial License Agreement. Commercial use needs a separate licence, and the page states that this includes fee-for-service work by academic users. Licensing enquiries go to the University of Washington CoMotion office ([email protected], as listed there).
Step-by-step task: load, score and relax a structure
The official documentation page (pyrosetta.org/documentation, read 2026-11-08) and the PyRosetta API reference give the building blocks below. Exact call forms follow the documentation; confirm them against the version you installed.
- Start Rosetta in Python with
init(). The API reference gives the signaturepyrosetta.init(options='-ex1 -ex2aro', extra_options='', set_logging_handler=None, notebook=None, silent=False).init()uses the default flags,init(extra_options='-pH')adds flags to the defaults, and passingoptionsreplaces the defaults (put-databaselast). - Load a structure. The documentation shows
pose_from_pdb(p, 'my_favorite.pdb'), wherepis a pose; it notes that the PDBInfo object is only useful if the pose was loaded this way. - Create the standard full-atom score function with
get_fa_scorefxn()and assign it to a variable, for examplescorefxn = get_fa_scorefxn(), then callscorefxn(pose)to score the pose. - Refine with FastRelax. The API reference lists a
FastRelaxconstructor that takes a ScoreFunction and anapply(pose)method, both inpyrosetta.rosetta.protocols.relax:relax = FastRelax(scorefxn), thenrelax.apply(pose).
The relax application documentation describes FastRelax as alternating side-chain repacking with gradient minimization while ramping the repulsive weight (fa_rep), keeping the best-scoring pose. It is a local search, so it is recommended on previously idealized structures. In the command-line application, -relax:quick (the default) runs 5 cycles, -relax:thorough runs 15, and -nstruct sets the number of output structures.
Output and how to read it
The score of a pose is the total from the score function, computed from weighted energy terms. Compare scores only between structures of the same sequence scored with the same score function, and treat a single relaxed model as one sample from a local search rather than a result. The relax documentation does not define a threshold for a good score, and neither does this page.
Troubleshooting
A score term weight prints as 0.0
The official documentation warns that get_fa_scorefxn().weights()[fa_atr] returns 0.0 even though the weight is 0.8. Assign the score function to a variable first and query the variable.
PDB metadata is missing from the pose
Per the documentation, PDBInfo is only useful if the pose was loaded with pose_from_pdb.
Install fails on an unsupported platform
Check the platform and Python version against the requirements above. The documentation page also links a Common Problems page.
Free alternatives
| Tool | What it does | Guide |
|---|---|---|
| ColabFold | Structure prediction in a notebook | ColabFold guide |
| ESMFold | Language-model structure prediction | ESMFold guide |
| SWISS-MODEL | Homology modelling server | SWISS-MODEL guide |
These predict structures rather than refine them, so they complement PyRosetta instead of replacing it.
FAQ
Is PyRosetta free?
Free for academic and non-commercial users under the non-commercial licence; commercial use, including fee-for-service work by academic users, needs a separate licence (downloads page, read 2026-11-08).
Which install route should I use?
The downloads page marks pip with the quarterly release as recommended; the installer package gives weekly development builds, and conda is offered on West and East mirrors.
Which Python versions are supported?
Python 3.6 or later; the conda channel lists 3.6 to 3.14.
Sources
- PyRosetta downloads, read 2026-11-08
- PyRosetta documentation, read 2026-11-08
- PyRosetta API reference, read 2026-11-08
- Rosetta relax application documentation, read 2026-11-08
- Chaudhury S, Lyskov S, Gray JJ. PyRosetta: a script-based interface for implementing molecular modeling algorithms using Rosetta. Bioinformatics 26(5):689-691 (2010). doi:10.1093/bioinformatics/btq007







