Using Molstar in Quarto

Notes
Molecular viz
Author

Jennifer HY Lin

Published

April 6, 2024

Background

This is really a short post (note) for myself and probably for others who may be interested in software tools to visualise in silico macromolecules and small molecules.

Most bioinformaticians or structural biologists are probably already familiar with this software package, Molstar or Mol* (Sehnal et al. 2021). Molstar is a 3D viewer for large macromolecules (e.g. proteins), which are commonly used in structural biology and drug discovery (and also other related scientific disciplines).

A Quarto extension has been developed to embed the Molstar interactive 3D viewer inside Quarto markdown documents, which can be rendered as HTML pages. The main advantage of this is that it’s useful for reports or presentations.


An example using Molstar with RCSB PDB

The following example retrieves a protein (PDB ID: 4MQT) from RCSB PDB.

{{< mol-rcsb 4mqt >}}

Hover over protein structure to see details of amino acid residues or ligands present in the structure.

To focus or zoom-in on the ligand bound to the receptor, just click on the ligand first. This shows most of the chemical interactions between the receptor and ligand bound to it (e.g. hydrogen bondings, other chemical interactions will appear if present e.g. pi-pi stacking).

Screenshots or state snapshots are also available from the viewer (other utility functions can be found on the top right corner of the viewer).

An close-up screenshot of 4MQT showing bound ligand

MD trajectories are also available, although I haven’t quite got there yet but it’s useful to know this may be possible (see example C from https://molstar.org/viewer-docs/examples/).

It’s also possible to upload AlphaFold-sourced proteins, or from other file sources (see examples shown from Molstar example).

References

Sehnal, David, Sebastian Bittrich, Mandar Deshpande, Radka Svobodová, Karel Berka, Václav Bazgier, Sameer Velankar, Stephen K Burley, Jaroslav Koča, and Alexander S Rose. 2021. “Mol* Viewer: Modern Web App for 3D Visualization and Analysis of Large Biomolecular Structures.” Nucleic Acids Research 49 (W1): W431–37. https://doi.org/10.1093/nar/gkab314.