MolGFX

MolGFX

Semantic molecular visualization for Python, Rust, and WebGPU.

MolGFX renders a MolFrame structure as an interactive scene or a deterministic image. It is a rendering library: MolFrame reads structures and provides the selection language; MolGFX decides how they look.

Start with a real structure

The quickstart uses haemoglobin (PDB 4HHB), cartoon context, and a space-filling heme pocket.

Choose a path

What MolGFX owns

  • MolFrame: structure input, molecular selections, and bond inference.
  • Rust engine: scenes, representations, appearance, interaction state, cameras and their controllers, rendering, picking, and the patch stream a host mirrors.
  • Official web/ host: one npm SDK, DOM input, canvas lifecycle and notebook adapter. Python uses its exact built artifacts through AnyWidget. Session alone owns command truth.
  • Your application: where structures come from and every panel, caption, tour or workflow around the canvas. The host is not a Workbench and supplies no console, toolbar or file picker.

That division keeps the selection syntax consistent. Pass a MolFrame query object or its query text to a MolGFX target; consult the MolFrame documentation for the full query language.

Verification status

The documented ownership boundary is implemented: MolFrame owns structure identity and query evaluation, while MolGFX owns scene state, representations, interaction, rendering, and the patch stream. This page does not certify an end-to-end browser, notebook, or WebGPU run on any particular device.

On this page