Skip to content

hermanzhaozzzz/ProTopo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Qukck Example

🧪 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

EGFP demo

🧪 Testing

poetry run pytest

License

MIT License © Huanan Herman Zhao

Contribution

Welcome to contribute codes and ideas

About

A Python package for drawing protein topology diagrams.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages