Mol*
The goal of Mol\* (_/'mol-star/_) is to provide a technology stack that serves as a basis for the next-generation data delivery and analysis tools for (not only) macromolecular structure data. Mol* development was jointly initiated by PDBe and RCSB PDB to combine and build on the strengths of LiteMol (developed by PDBe) and NGL (developed by RCSB PDB) viewers.
When using Mol*, please cite:
David Sehnal, Sebastian Bittrich, Mandar Deshpande, Radka Svobodová, Karel Berka, Václav Bazgier, Sameer Velankar, Stephen K Burley, Jaroslav Koča, Alexander S Rose: Mol* Viewer: modern web app for 3D visualization and analysis of large biomolecular structures, _Nucleic Acids Research_, 2021; https://doi.org/10.1093/nar/gkab314.
Protein Data Bank Integrations
- The pdbe-molstar library is the Mol* implementation used by EMBL-EBI data
- rcsb-molstar is the Mol* plugin used by RCSB PDB.
Project Structure Overview
The v6 prototype separates code into pnpm workspace packages:
packages/{core,io,model,graphics}own the shared library layers.packages/plugin/{core,ui,headless}own plugin runtime, React UI and Node capture.packages/mvs/{builder,runtime}separate standalone MVS construction from plugin loading.packages/extensions/,apps/,examples/,servers/andcli/own their dependencies and builds.distributions/molstar/assembles the classic and browser ESM distribution.smoke/checks isolated package consumers and browser rendering.
Previous Work
This project builds on experience from previous solutions:
- LiteMol Suite
- WebChemistry
- NGL Viewer
- MMTF
- MolQL
- PDB Component Library
- And many others (list will be continuously expanded).
Building & Running
Use Node 22.13+ and the pnpm version specified in package.json.
pnpm install
pnpm build
pnpm dev # all apps and browser examples
pnpm dev:apps # all apps
pnpm dev:apps -- viewer # selected app
pnpm dev:examples # all browser examples
pnpm dev:examples -- basic-wrapper # selected example
Run pnpm check:workspace, pnpm test and pnpm --dir smoke smoke to check package boundaries, existing behavior and
packed ESM consumers. The smoke browser requires Chromium. Native GL is opt-in: pnpm native:install installs it
separately, and pnpm test:native runs the PR's test lanes with it (-- medium for the GL suite alone). For capture,
use pnpm native:run -- pnpm --dir smoke smoke:headless.
Serve distributions/molstar/ to access build/viewer/ and build/mvs-stories/. Browser ESM entry points are under
build/esm/. Use node scripts/clean.js --all for a clean rebuild. Detailed commands and code ownership are in the
workspace guide.
Code generators are compiled under their owning cli/ directories. For example:
node cli/cifschema/lib/index.js -mip @molstar/core/data -o packages/io/src/reader/cif/schema/mmcif.ts -p mmCIF
node cli/lipid-params/lib/index.js -o packages/model/src/model/structure/model/types/lipids.ts
node cli/syminfo/lib/index.js
node cli/cif2bcif/lib/index.js input.cif output.bcif
Development
Editor
To get syntax highlighting for shader files add the following to Visual Code's settings files and make sure relevant extensions are installed in the editor.
"files.associations": { "*.glsl.ts": "glsl", "*.frag.ts": "glsl", "*.vert.ts": "glsl" },
Publish
Prerelease
npm version prerelease # assumes the current version ends with '-dev.X' npm publish --tag next
Release
npm version 0.X.0 # provide valid semver string npm publish
Deploy
To prepare apps and demos for https://molstar.org deploy, run:
npm run test npm run deploy:local
To commit these changes remotely to the molstar/molstar.github.io repo:
npm run deploy:remote
Contributing
Just open an issue or make a pull request. All contributions are welcome.
Funding
Funding sources include but are not limited to:
- RCSB PDB funding by a grant [DBI-1338415; PI: SK Burley] from the NSF, the NIH, and the US DoE
- PDBe, EMBL-EBI
- CEITEC
- EntosAI