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

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.2
File
molgfx-0.3.2-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
molgfx-0.3.2-cp312-abi3-manylinux_2_28_x86_64.whl CPython 3.12 abi3 Linux glibc 2.28+ x86-64 Details
molgfx-0.3.2-cp312-abi3-manylinux_2_28_aarch64.whl CPython 3.12 abi3 Linux glibc 2.28+ ARM64 Details
molgfx-0.3.2-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details
molgfx-0.3.2-cp312-abi3-macosx_10_12_x86_64.whl CPython 3.12 abi3 macOS 10.12+ x86-64 Details

Total release size: 48.8 MB

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

Download URL molgfx-0.3.2-cp312-abi3-win_amd64.whl
Size 10.2 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8bbe9c74c8e8f49c2b7562a092e9b6f971ddf50425ed06c46d1e640628a74d03
BLAKE2b-256 checksum
How to use checksums
2d5a9f07332f6e32ca89a6b67d5705c72bcf81d371700f6abae2581fdc8892e6
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.2-cp312-abi3-manylinux_2_28_x86_64.whl

Download URL molgfx-0.3.2-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
56dbbefead670a3a61052149b694dca4080c15e1e3903c99d3cd6cdc1e159b0a
BLAKE2b-256 checksum
How to use checksums
f96cd8f6d7c83368815b69bd664c558c2e7f247cceb79fc5a1a50a9bbe5e4819
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.2-cp312-abi3-manylinux_2_28_aarch64.whl

Download URL molgfx-0.3.2-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
b6dec4347b349fbc72539def78efa284530cc8019de72fa782ac0ad46519826f
BLAKE2b-256 checksum
How to use checksums
a8f568458e48b0ad2e5f6e1b0dcb99b07b07983b75466a75d32c719f72bbd3f4
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.2-cp312-abi3-macosx_11_0_arm64.whl

Download URL molgfx-0.3.2-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
af696018262d387e6a978880ee29f363d857c84a5cd9098bed1dc1f65b635ff6
BLAKE2b-256 checksum
How to use checksums
d4ce47f8a2344e4e8cb78a501e4f693f3d3ffa728f538a7d3fdf2253e70e1f4c
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.2-cp312-abi3-macosx_10_12_x86_64.whl

Download URL molgfx-0.3.2-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
a8e75cb58a66b22b371232c00a4664494c578b9d2ffd2de0f5021cd96b42eca7
BLAKE2b-256 checksum
How to use checksums
97e8611e89bb3e84a2d65ade04654fa62d0c2f58b91ea4955492ed3b79f1cb90
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.2

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