Lightweight molecular structure viewer for Jupyter notebooks using py3Dmol
Project description
atomview
A lightweight, standalone molecular structure viewer for Jupyter notebooks. Visualize biotite AtomArray structures interactively using py3Dmol (3Dmol.js) — with chain-coloured cartoons, ligand sticks, ion spheres, surfaces, and hover labels out of the box.
atomview extracts and refactors the excellent view() function from atomworks (atomworks.io.utils.visualize) into a focused, minimal package. If all you need is a quick way to render structures in a notebook, you no longer have to pull in atomworks and its full dependency tree (RDKit, ML tooling, dataset infrastructure, etc.).
Installation
pip install atomview
Or with uv:
uv add atomview
Quickstart
# from urllib.request import urlretrieve
# urlretrieve("https://files.rcsb.org/download/4HHB.cif", "4hhb.cif")
from atomview import load_structure, view
structure = load_structure("4hhb.cif")
view(structure)
Gallery
| Default protein view | Surface overlay |
|---|---|
| One-line rendering with automatic chain colouring. | Optional translucent VDW surface for shape context. |
| Ligand focus | Mixed complex |
|---|---|
| Zoom to a ligand or binding-site selection. | Proteins, nucleic acids, ligands, and ions styled together. |
API
view()
The main entry point. Returns a py3Dmol.view object that renders inline in Jupyter.
from atomview import view
v = view(
structure,
show_cartoon=True, # cartoon for polymers
show_surface=False, # VDW surface overlay
show_hover=True, # hover labels
hide_solvent=True, # remove water
hide_crystallization_aids=True,
zoom_to_selection=None, # e.g. {"chain": "A", "resi": 35}
width=600,
height=400,
colors=None, # custom colour list, or use defaults
)
Why not just use atomworks?
atomworks is a fantastic, comprehensive framework for biomolecular modelling maintained by RosettaCommons. But it's a big library — it bundles I/O, transforms, ML dataset tooling, RDKit integration, and more. If you just want to call view(structure) in a notebook, that's a lot of overhead.
atomview gives you exactly that one thing: a great molecular viewer with sensible defaults, in a package that installs in seconds.
License
MIT
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 atomview-0.0.1.tar.gz.
File metadata
- Download URL: atomview-0.0.1.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b65b634f95888fe4ba4fbda2d59b16039a5da00130065d1fb24bebad2b0851f
|
|
| MD5 |
cb8b890e0004df72415350fcc05d45c2
|
|
| BLAKE2b-256 |
3c6d9b5d4649e851b9ce2c3173d63f6508c1c4c52cdf05da4e2ee5aa8a7df2a1
|
Provenance
The following attestation bundles were made for atomview-0.0.1.tar.gz:
Publisher:
deploy.yml on cch1999/atomview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomview-0.0.1.tar.gz -
Subject digest:
9b65b634f95888fe4ba4fbda2d59b16039a5da00130065d1fb24bebad2b0851f - Sigstore transparency entry: 1435611598
- Sigstore integration time:
-
Permalink:
cch1999/atomview@7a612a324351ab00a6e4e1fab9dd89f54b12134f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cch1999
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@7a612a324351ab00a6e4e1fab9dd89f54b12134f -
Trigger Event:
push
-
Statement type:
File details
Details for the file atomview-0.0.1-py3-none-any.whl.
File metadata
- Download URL: atomview-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
192a920e17d6975d029af0a4c6390b1c352fc85912f348ed6fde4eebdb228fc6
|
|
| MD5 |
91608f3938054653d7906db71b11834c
|
|
| BLAKE2b-256 |
5d2b4bae67bbc3bcc452564a20827620b934158131e3236c0de3d239c85a8746
|
Provenance
The following attestation bundles were made for atomview-0.0.1-py3-none-any.whl:
Publisher:
deploy.yml on cch1999/atomview
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atomview-0.0.1-py3-none-any.whl -
Subject digest:
192a920e17d6975d029af0a4c6390b1c352fc85912f348ed6fde4eebdb228fc6 - Sigstore transparency entry: 1435611679
- Sigstore integration time:
-
Permalink:
cch1999/atomview@7a612a324351ab00a6e4e1fab9dd89f54b12134f -
Branch / Tag:
refs/heads/main - Owner: https://github.com/cch1999
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
deploy.yml@7a612a324351ab00a6e4e1fab9dd89f54b12134f -
Trigger Event:
push
-
Statement type: