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.1

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.1
File Size Uploaded
molviewer-0.1.1.tar.gz 11.6 kB Details

Built distribution (wheel)

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

Total release size: 22.9 kB

Release files / molviewer-0.1.1.tar.gz

Download URL molviewer-0.1.1.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cbef3b40b2d6d8ebd977ada62aa8557047f5b1386a02f36f36c3b95beeb69996
BLAKE2b-256 checksum
How to use checksums
2e37094a1cbde08efae54d3ec24c6437aeab9e56947ba139af9fe06046ecd3b6
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.1-py3-none-any.whl

Download URL molviewer-0.1.1-py3-none-any.whl
Size 11.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28fd8be35f87facb1947b39ef18132d4f4a218abc7161d9aefb48c37c4291393
BLAKE2b-256 checksum
How to use checksums
a5e3eee1ea01c99e13bfcbe1d0fcd1dd9f986ac67df7b71351115042623454a7
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

0.1.2

2 release files

This release

0.1.1 This release

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