A Python package for rendering protein structures of PDB format in 3D using Ursina
Project description
Ursina Proteins
A Python package for rendering protein structures in 3D using Ursina, as featured in Ursina's sample projects.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ursina_proteins-1.5.1.tar.gz.
File metadata
- Download URL: ursina_proteins-1.5.1.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f7d100fb499fba568a5fd0d857cd4dcaf43038a159de5163d15c7f74052f466
|
|
| MD5 |
7d5a9be4ff55a2c3eee75399878afe1f
|
|
| BLAKE2b-256 |
043c9a4d0a6a76c11f29d40fea8748c416bd3dfe0a4a2448541dabca982e4f15
|
File details
Details for the file ursina_proteins-1.5.1-py3-none-any.whl.
File metadata
- Download URL: ursina_proteins-1.5.1-py3-none-any.whl
- Upload date:
- Size: 8.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee9031a002c0c7d6e200cd5f62909c2f4ae160adfbf2f5349dd94b9f5f96c693
|
|
| MD5 |
ccfa2a1989b4b07edea8305fb55c460b
|
|
| BLAKE2b-256 |
77124ec6b174c4c32669b61f35a238dd85dd25ea785170cd00d9f82175fef50b
|