Skip to main content

prot-struct-viz

PyPI version Python versions tests Docs License: MIT Code style: black Ruff

Render a protein structure as a self-contained static HTML file using Mol*, with residues colored, labeled, and styled from a CSV. Everything the view needs — coordinates, colors, tooltips, labels — is embedded in the one file, so it can be dropped on GitHub Pages with no backend.

Install

pip install prot-struct-viz

Quick start

Write a CSV of the residues you want to say something about, and a spec file naming the structure, where the HTML goes, and one or more views of it. Then:

prot-struct-viz spec.yaml

That writes the page, plus a report on any disagreement between the CSV and the structure. One spec can hold several named views — different colorings, labels, representations, or heteroatoms — and the page gets a selector that switches between them without moving the camera. The URL tracks the selector, so a link can point at one particular view.

The quick start shows both files in full; the documentation covers every spec key, the CSV columns, and what a reader of the output can click.

Development

python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev,docs]"

scripts/check.sh            # pytest + ruff + black
scripts/build_examples.sh   # render examples/*/spec.yaml into examples/output/
scripts/build_docs.sh       # mkdocs build --strict

Documentation lives in docs/, which is the single source — this README is a front door, not a second copy. Conventions, and the checks to run after changing anything that affects rendering, are in CLAUDE.md.

Releasing

Releases are tag-driven and publish to PyPI through trusted publishing, so no API token is stored in the repo. The one-time PyPI setup and the per-release recipe are documented at the top of .github/workflows/release.yml. In short:

# 1. Bump `version` in pyproject.toml and roll CHANGELOG's [Unreleased] into it.
git commit -am "release vX.Y.Z"
git tag vX.Y.Z
git push && git push --tags

The workflow verifies the tag matches pyproject.toml before anything reaches PyPI.

Download files

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

Source Distribution

prot_struct_viz-0.1.0.tar.gz (211.2 kB view details)

Uploaded Source

Built Distribution

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

prot_struct_viz-0.1.0-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

Details for the file prot_struct_viz-0.1.0.tar.gz.

File metadata

  • Download URL: prot_struct_viz-0.1.0.tar.gz
  • Upload date:
  • Size: 211.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prot_struct_viz-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9de6f58a1a30086d9a83084a4a97c9d1a33c9655624d534b61b1bda574acad75
MD5 74e9bf29c1860c4ad8e9b66587adf24f
BLAKE2b-256 28da784e7b88a2e6f7753dff5226251207260d417b60d02745dd3b9da1417cfd

See more details on using hashes here.

Provenance

The following attestation bundles were made for prot_struct_viz-0.1.0.tar.gz:

Publisher: release.yml on jbloomlab/prot-struct-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prot_struct_viz-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: prot_struct_viz-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for prot_struct_viz-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e8c010a52ad69a9fbe44d3ed1638878225d3de20e4b2f63f5ab3b2fcfe874063
MD5 eb6d12b084aa56e29570a987998a6012
BLAKE2b-256 add630391d337395eeb1b8259aad421f1578578289a238503db9f9c92345d8f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for prot_struct_viz-0.1.0-py3-none-any.whl:

Publisher: release.yml on jbloomlab/prot-struct-viz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.0

2 files

0.2.0

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page