MolViewSpec for Scene Description

MolViewSpec: a Mol* extension for describing and sharing molecular visualizations. Midlik A, Bittrich S, Fleming JR, Nair S, Velankar S, Burley SK, Young JY, Vallat B, Sehnal D. Nucleic Acids Res. 2025 May 6:gkaf370. Online ahead of print. [website: code, documentation, examples]

Describing and Sharing Molecular Visualizations Using the MolViewSpec Toolkit. Bittrich S, Midlik A, Varadi M, Velankar S, Burley SK, Young JY, Sehnal D, Vallat B. Curr Protoc. 2024 Jul;4(7):e1099. (earlier prototype)
[back to paper list]

  • MolViewSpec is an open standard for describing molecular scenes:
    • ribbons and atomic representations
    • pseudobonds and labels
    • volumes (density maps)
    • geometric shapes
  • freely available [MIT license] as a Mol* extension [github] and a standalone Python package [github]
  • collaboration effort by the PDBe, RCSB PDB, and National Centre for Biomolecular Research (NCBR)/Central European Institute of Technology (CEITEC) in the Czech Republic

MolViewSpec Features

MolViewSpec separates the creation of complex molecular scenes from viewer-specific details; the open standard enables extending viewers other than Mol*. A "MolViewSpec State" (MVSS) is a scene description.

Features currently include:

  • specifying data source and format, with focus on PDBx/mmCIF, BinaryCIF, and PDB
  • constructing molecular structures, including the specification of asymmetric unit, biological assembly, or crystal symmetry
  • defining selections via predefined structure components (protein, ligand, nucleic acids, carbohydrates, etc.) or lists of atoms, residues, chains, or molecular entities
  • specifying 3D molecular representations (cartoons, ball and stick, surfaces, etc.)
  • volumetric data rendering (isosurfaces)
  • labeling and coloring individual selections
  • visualization of geometrical primitives (meshes, lines, spheres, distance/angle measurements, etc.)
  • specifying coordinate transformations to enable superposition
  • controlling camera position within the scene, allowing either a static viewpoint or automatic focus on a specific selection
  • transitions between multiple views to create visual narratives

Integration with Mol*


The MolViewSpec Mol* Viewer extension allows:


  • loading a MolViewSpec State into Mol* by drag-and-drop or GUI menu

  • including a link or embedded MVSS as part of the browser URL

  • using JavaScript to specify or load MVSS into a Mol* instance embedded in external applications

  • using a command-line utility to render MVSS as PNG or JPEG without a web browser

MolViewSpec Architecture

The MolViewSpec toolkit has three parts:

  • MolViewSpec State JSON schema: defines the properties of individual nodes of the tree data structure stored in files with .mvsj and .mvsx extensions
  • MolViewSpec API: provides a mechanism for building and validating MVSS stored in JSON format as defined by the schema. The API is available in Python and JavaScript/TypeScript.
  • MolViewSpec Mol* Viewer extension implemented in TypeScript, for rendering MVSS in a web browser

MolViewSpec can installed from PyPi.

Interactive Demo Example

IHM Restraints Example





Available Models

Several examples are available at the MolViewSpec website. Code for the examples is available on github.

MolViewSpec Future Directions


  • actively addressing community requirements as they arise

  • standardizing molecular visualization color schemes (currently user-defined)

  • supporting programming languages other than JavaScript/TypeScript and Python, e.g. Java or C#

  • coordinating with developers of major 3D viewers like PyMOL and ChimeraX to facilitate MolViewSpec cross-platform support and enhance interoperability, allowing researchers to create consistent and reusable visualizations

  • creating a user-friendly interface for building MolViewSpec States to broaden accessibility beyond the developer community