prot-struct-viz
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.
- Documentation: https://jbloomlab.github.io/prot-struct-viz/
- Live example: https://jbloomlab.github.io/prot-struct-viz/examples/
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
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 prot_struct_viz-0.3.0.tar.gz.
File metadata
- Download URL: prot_struct_viz-0.3.0.tar.gz
- Upload date:
- Size: 216.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07a1e745b7f322612cf181297de50bd3fc92decb58d479b923b093a9b1b4f192
|
|
| MD5 |
a3bf0a1a83d190bffa1b96a5f6c87958
|
|
| BLAKE2b-256 |
ed88f817b1c8a27f8102044200d487ffae9765a5fe2f8f969be74a8bc2295e6e
|
Provenance
The following attestation bundles were made for prot_struct_viz-0.3.0.tar.gz:
Publisher:
release.yml on jbloomlab/prot-struct-viz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prot_struct_viz-0.3.0.tar.gz -
Subject digest:
07a1e745b7f322612cf181297de50bd3fc92decb58d479b923b093a9b1b4f192 - Sigstore transparency entry: 2689819546
- Sigstore integration time:
-
Permalink:
jbloomlab/prot-struct-viz@2e5f848e5553bc0bc4520956095a855df0832999 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/jbloomlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2e5f848e5553bc0bc4520956095a855df0832999 -
Trigger Event:
push
-
Statement type:
File details
Details for the file prot_struct_viz-0.3.0-py3-none-any.whl.
File metadata
- Download URL: prot_struct_viz-0.3.0-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf99d9b9ad74350f7b8c522f007cc47bb61d83dc268b347ee6b5375f03c0caba
|
|
| MD5 |
08a9775a5deadc1be4651eea1ace0809
|
|
| BLAKE2b-256 |
b03a00aee681baca375e7d64d2fec6f7052b199c8ae59bbe48c48ccf8659ab91
|
Provenance
The following attestation bundles were made for prot_struct_viz-0.3.0-py3-none-any.whl:
Publisher:
release.yml on jbloomlab/prot-struct-viz
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
prot_struct_viz-0.3.0-py3-none-any.whl -
Subject digest:
cf99d9b9ad74350f7b8c522f007cc47bb61d83dc268b347ee6b5375f03c0caba - Sigstore transparency entry: 2689819765
- Sigstore integration time:
-
Permalink:
jbloomlab/prot-struct-viz@2e5f848e5553bc0bc4520956095a855df0832999 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/jbloomlab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@2e5f848e5553bc0bc4520956095a855df0832999 -
Trigger Event:
push
-
Statement type: