Skip to main content

A Python package for rendering protein structures of PDB format in 3D using Ursina

Project description

Ursina Proteins

Python Version from PEP 621 TOML uv Ruff Code-quality CI pre-commit Conventional Commits License: MIT

A Python package for rendering protein structures in 3D using Ursina, as featured in Ursina's sample projects.

Example proteins

Installation

The package is published on PyPI, and can be installed with pip install ursina-proteins. You can also clone the repo down and install dependencies with uv.

# Clone the repo
git clone https://github.com/HarrisonTCodes/ursina-proteins.git
cd ursina_proteins

# Install dependencies with uv
uv sync

Usage

You can render proteins from files in the (default) PDB format, or the mmCIF/PDBx format (by passing legacy_pdb = False in the Protein class constructor). Many protein files can be found at the RCSB Protein Data Bank. You can use the library in an existing Ursina project by importing the Protein class and creating an instance from a protein file.

from ursina_proteins.protein import Protein

Protein("/path/to/file.pdb")

You can also test the library out by running demo.py. This script renders a simple scene with an example protein (insulin).

uv run src/demo.py

Contributions

Contributions are welcome. Please enable pre-commit hooks to catch and fix formatting/linting issues locally before raising a PR.

# Enable pre-commit hooks
uv run pre-commit install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ursina_proteins-2.0.0.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ursina_proteins-2.0.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

Details for the file ursina_proteins-2.0.0.tar.gz.

File metadata

  • Download URL: ursina_proteins-2.0.0.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for ursina_proteins-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b5204b200f9a969d466528772e8d15a2e4701f384a5da1e051a6795c6c971462
MD5 fd8118f71e9d58b09dfe3c64944014ad
BLAKE2b-256 90fb10a03b3304c2eaeda2f282777b5d712e7b1a3324c7af7f17cbf9adec6d25

See more details on using hashes here.

File details

Details for the file ursina_proteins-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for ursina_proteins-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4ebb654a5cad2700e86457cfdc9af7a7bc9f4b1f85616d71bc78974e86c190a
MD5 c8b09a7d5adb22d3b093374c0c339609
BLAKE2b-256 f15608318054c4febf1edf0ac008ea485744c87b7ab9a88dc309cd559c8a00fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page