ProTopo
ProTopo is a lightweight Python package for drawing 2D protein topology diagrams — including α-helices, β-strands, linkers, N/C-terminals, and customizable markers.
It helps visualize and annotate simplified protein secondary structure layouts for publications, teaching, or design explanation.
GitHub repo | Issue page | Author
✨ Features
- Simple, declarative interface (
add_alpha,add_beta,add_linker) - Tracks residue indices and directions automatically
- Custom triangle/marker support (for cuts, domains, etc.)
- Outputs high-quality vector graphics via Matplotlib
- Built-in EGFP topology example
📦 Installation
pip install protopo
# or if developing locally
poetry install
🚀 Quick Example
from protopo import ProTopo
pt = ProTopo()
pt.add_n_term()
pt.add_alpha(1, 10, label="H1", to="→")
pt.add_linker(10, 13, to="↓→", steps=(0.5, 0.5))
pt.add_beta(13, 22, label="S1", to="→")
pt.add_triangles([15])
pt.add_c_term()
pt.show()
# pt.save("demo.pdf") # save fig
# pt.close() # release memory
🧪 Run EGFP Example
This renders the schematic topology diagram of Enhanced GFP, following literature-reported secondary structure layout.
from protopo.demo import draw_egfp
egfp = draw_egfp()
egfp.add_triangles(idx=[6, 211])
egfp.show()
# egfp.save("egfp.svg")
# egfp.close() # release memory
then you will see
🧪 Testing
poetry run pytest
License
MIT License © Huanan Herman Zhao
Contribution
Welcome to contribute codes and ideas
Metadata
Release files for protopo 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| protopo-0.1.9.tar.gz | 7.5 kB | Without provenance | Details for protopo-0.1.9.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| protopo-0.1.9-py3-none-any.whl | Python 3 | none | any | Details for protopo-0.1.9-py3-none-any.whl |
Total release size: 15.7 kB
Release files / protopo-0.1.9.tar.gz
| Download URL | protopo-0.1.9.tar.gz |
|---|---|
| Size | 7.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dd0f8c253b1f815086a73ed1a457ac8fcdc3e58e3cd4d4a9f8d535c255eeeb9
|
|
BLAKE2b-256 checksum How to use checksums |
6199b93d5699cc10ee91f5b314aefbff79acb48d09e6fa7edb6c0ec0d94e74a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0
|
Release files / protopo-0.1.9-py3-none-any.whl
| Download URL | protopo-0.1.9-py3-none-any.whl |
|---|---|
| Size | 8.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5b6d4a2616927c0765f8c28be7ea4a1fea3647ce651b5b2a437432a0fc4065d
|
|
BLAKE2b-256 checksum How to use checksums |
45f0e0c1e873743b6690e43cf59d08d6674041f2fcae4447a06dc0d03af326c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.13.5 Darwin/24.5.0
|
Security for protopo 0.1.9
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.