Skip to main content

MolGFX

Documentation · Runnable Workbench notebook

MolGFX is a semantic molecular-rendering library for Python, Rust, and WebGPU. It renders structures supplied by MolFrame as interactive browser scenes or deterministic native images. MolGFX does not parse, fetch, dock, simulate, or open an application window.

MolGFX haemoglobin cartoon, heme, and local pocket

Install

python -m pip install --upgrade "molgfx[jupyter]>=0.3.0"

Render a structure

import molframe
import molgfx

# Infer bonds so atom-and-bond representations have sticks to draw.
structure = molframe.read("structure.cif").infer_bonds()
scene = molgfx.Scene(structure)
scene.add(molgfx.rep.cartoon(target=molgfx.sel.protein(), color=molgfx.color.chain()))
scene.add(molgfx.rep.ball_and_stick(target=molgfx.sel.ligands()))

molgfx.Renderer().render_image(scene, size=(1920, 1080)).save("structure.png")

Use molgfx.viewer.Workbench in Jupyter for a browser WebGPU canvas, selection commands, completion, history, and undo/redo. See the Workbench notebook for haemoglobin (PDB 4HHB).

Targets are MolFrame queries, and the Workbench console speaks a small command language around them:

show cartoon, protein
select pocket, byres (within 5 of resname HEM) and protein
show licorice, $pocket
color orange, $pocket

Writing queries and commands walks through both, and the MolFrame query reference lists every keyword.

Status

Beta. Public APIs are available through the molgfx facade; MolFrame provides structure input and molecular selection semantics.

License

MIT

Metadata

Release files for molgfx 0.3.5

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

Built distributions (wheels)

Table of built distributions (wheels) for molgfx 0.3.5
File
molgfx-0.3.5-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
molgfx-0.3.5-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details
molgfx-0.3.5-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details
molgfx-0.3.5-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
molgfx-0.3.5-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details

Total release size: 48.9 MB

Release files / molgfx-0.3.5-cp312-abi3-win_amd64.whl

Download URL molgfx-0.3.5-cp312-abi3-win_amd64.whl
Size 10.2 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
1f3b72074a1ff70982052905f1d7d3a28f54929d23e5c4b68a3ffbdeb9e2f2b4
BLAKE2b-256 checksum
How to use checksums
4017d6cd82be34667e6742990d8573d915017e00c2815e7865eda52430bbb1e5
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 Sep 29, 2026.

Transparency log

Release files / molgfx-0.3.5-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL molgfx-0.3.5-cp312-abi3-manylinux_2_28_x86_64.whl
Size 10.1 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
134b09649c04e6064ba9ee7ce1bc993f1886bed382f541f8b0715aff4142c251
BLAKE2b-256 checksum
How to use checksums
a543a579a6abeda46b42b2b3a9d55217b7376f63450b15391c7f9be8fe3475e3
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 Sep 29, 2026.

Transparency log

Release files / molgfx-0.3.5-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL molgfx-0.3.5-cp312-abi3-manylinux_2_28_aarch64.whl
Size 9.8 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
0b89dbc9489df0db58c3ed7592d05dc41e6a42f0581f53c66348513859e947b4
BLAKE2b-256 checksum
How to use checksums
750378f5a8e4af69ebd12b6b99b7c39724f78576afaa99d2eea3f11c0717b827
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 Sep 29, 2026.

Transparency log

Release files / molgfx-0.3.5-cp312-abi3-macosx_11_0_arm64.whl

Download URL molgfx-0.3.5-cp312-abi3-macosx_11_0_arm64.whl
Size 9.1 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ea901293d190a7d44699f0a2d3ba702f89b99129ab969301b3decb6efffdc20d
BLAKE2b-256 checksum
How to use checksums
990fb2851564c1d66b839db1a3019146ae8e1015150a3d2f71e36f37e100d2f7
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 Sep 29, 2026.

Transparency log

Release files / molgfx-0.3.5-cp312-abi3-macosx_10_12_x86_64.whl

Download URL molgfx-0.3.5-cp312-abi3-macosx_10_12_x86_64.whl
Size 9.6 MB
Tags CPython 3.12 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
80b7257ff76efeebe700d8649562c5683740910f981d6a11797a8d876dfcac60
BLAKE2b-256 checksum
How to use checksums
45a68222f407e9ff9e0da8ce24a03ded5206acfc91c2bbae4eafc33a68643e2f
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 Sep 29, 2026.

Transparency log

Security for molgfx 0.3.5

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.

Full provenance

All 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for molgfx-0.3.5-cp312-abi3-win_amd64.whl

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 Sep 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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