Skip to main content

molviewer

2D and 3D molecular visualization for Jupyter, Colab, and Streamlit.

Install

pip install molviewer

Quick Start

import molviewer

# 2D drawing
molviewer.draw("CC(=O)Oc1ccccc1C(=O)O")
molviewer.draw(["CCO", "c1ccccc1"], legends=["Ethanol", "Benzene"])

# 3D viewing — py3Dmol
molviewer.view3d("CC(=O)Oc1ccccc1C(=O)O", style="stick")
molviewer.view3d("CC(=O)Oc1ccccc1C(=O)O", style="ball_and_stick", spin=True)

# 3D viewing — Speck (ambient occlusion)
molviewer.view3d("CC(=O)Oc1ccccc1C(=O)O", style="speck")
molviewer.view3d("CC(=O)Oc1ccccc1C(=O)O", style="speck", preset="houkmol")
molviewer.view3d("CC(=O)Oc1ccccc1C(=O)O", style="speck", preset="toon")
molviewer.view3d("CC(=O)Oc1ccccc1C(=O)O", style="speck", preset="licorice")

Speck Presets

Preset Description
ball_and_stick Default — atoms + bonds with ambient occlusion
toon Flat shading with depth-aware outlines
licorice Thick bonds, small atoms
houkmol Houk group style — matte, outlines, bright atoms
metal Metallic material (ipyspeck)
glass Transparent glass (ipyspeck)
glossy Shiny surface (ipyspeck)
goodsell David Goodsell style (ipyspeck)

Custom Parameters

molviewer.view3d("CCO", style="speck", atom_scale=0.6, ao=0.9, outline=1.0)

Parameters: atom_scale, bond_scale, ao, brightness, outline, bonds.

Attribution Maps

import molfp
import molviewer

result = molfp.interpret(smiles, activities, fp_type="maccs")
molviewer.draw_attribution("CC(=O)Oc1ccccc1C(=O)O", result, style="highlight", save="attr.png")
molviewer.draw_attribution("CC(=O)Oc1ccccc1C(=O)O", result, style="contour", save="attr.png")

License

MIT

Metadata

Release files for molviewer 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for molviewer 0.1.2
File Size Uploaded
molviewer-0.1.2.tar.gz 11.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for molviewer 0.1.2
File Interpreter ABI Platform
molviewer-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.1 kB

Release files / molviewer-0.1.2.tar.gz

Download URL molviewer-0.1.2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4d6db70d443071db53bb5fc71052ca367fe9397bc3d44919e2313fa26bca5d69
BLAKE2b-256 checksum
How to use checksums
244128695cc41c69f42c4dbe968f66df748695dc916a12c634bac81443fa2552
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / molviewer-0.1.2-py3-none-any.whl

Download URL molviewer-0.1.2-py3-none-any.whl
Size 11.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
276d2bb3b3870e7b1258c7f885bb71638cb720083d794c3ea7c54440c3fb3ac0
BLAKE2b-256 checksum
How to use checksums
75943d0765b6cd47c676e2a9b85daa9a381151890cf6e3ebb10c230962b43a8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release 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