Skip to content

About

Utility functions for protein and peptide modeling with PyRosetta, RDKit, and BioPython

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

joey_utils

Utility functions for protein and peptide modeling with PyRosetta, plus general helpers for sequences, PDB files, RDKit conversion, and everyday Python tasks.

Everything is available from the top-level package:

import joey_utils as ju

ju.pyrosetta_init()
pose = ju.load_pose("complex.pdb")
peptide = ju.chain_selector("P")
print(ju.smiles_from_pose(pose, selection=peptide))

Installation

pip install git+https://github.com/josephlubin/joey_utils.git

# with the optional scientific / chemistry dependencies
pip install "joey_utils[all] @ git+https://github.com/josephlubin/joey_utils.git"

Requires Python 3.9 or newer. Importing joey_utils needs no third-party packages: each dependency is imported only by the functions that use it.

Functions Need
joey_utils.rosetta (poses, selectors, scoring, movers, ...) PyRosetta
rdkit_mol_from_pose, smiles_from_pose, sdf_from_pose PyRosetta, RDKit, networkx
Tables, alignment, fitting pandas, numpy, BioPython, scikit-learn

PyRosetta is not on PyPI and requires a license (free for academic and non-commercial use). See https://www.pyrosetta.org/downloads. Tested with PyRosetta 2024.35 (Python 3.9) and 2026.39 (Python 3.13).

Modules

Module Contents
text String parsing and manipulation
lists List, dict, and sequence helpers
math_utils Numeric, geometric, and curve-fitting helpers
files File reading/writing, compression, output naming
protein Amino acid names, properties, and conversions
fasta FASTA parsing and sequence alignment (BioPython)
pdb PDB file parsing and tabulation
rosetta.setup PyRosetta initialization and pose loading
rosetta.pose_info Residue/atom lookups and numbering conversion
rosetta.pose_tables pandas tables of residues and H-bonds
rosetta.selectors Residue selector construction and queries
rosetta.scoring Score functions and energies
rosetta.constraints Geometric and residue-type constraints
rosetta.movers Packing, minimization, mutation, capping, bonds, cyclization
rosetta.geometry Coordinates, RMSD, SASA, contacts
rosetta.chemistry RDKit molecules, SMILES, and SDF files from poses
rosetta.silent_files Rosetta silent file I/O

Notes for cyclic peptides

  • set_chain_endings_from_pdb(pose): a LINK record for a head-to-tail cyclic peptide makes Rosetta load a receptor plus that peptide as a single chain, which breaks chain-based tools such as the InterfaceAnalyzerMover. Call this after loading such PDBs.
  • exit_on_crash() (called by pyrosetta_init on macOS): makes a segfault in PyRosetta end the process instead of hanging it.

Tests

pip install -e ".[dev]"
pytest

The PyRosetta tests are skipped automatically if PyRosetta or RDKit is not installed.

About

Utility functions for protein and peptide modeling with PyRosetta, RDKit, and BioPython

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages