molviewspec-live

This website is an exeriment that lets us create interactive molecular visualziations in the browser. See examples.

Goal

Inclusion of interactive molviewspec-driven viz in webpages using the following example Quarto syntax:

  ```{.python .molviewspec-live}
  from molviewspec import create_builder;
  builder = create_builder();
  structure = (builder
      .download(
          url="https://www.ebi.ac.uk/pdbe/entry-files/download/1cbs_updated.cif")
      .parse(format="mmcif")
      .model_structure()
      .component()
      .representation()
      .color(color="blue")
  )
  builder.get_state().dumps()

Technologies

  • Python Evaluation:
    • pyodide - Python scientific stack in the browser via WebAssembly.
    • molviewspec - Domain-specific language for molecular visualization specifications.
  • Website:
    • mol* - Open-source toolkit for visualization of molecular structures.
    • quarto - Scientific and technical publishing system built on Pandoc.
    • react - JavaScript library for building user interfaces.
    • jotai - Primitive and flexible state management for React.