molstar

A comprehensive macromolecular library

https://github.com/molstar/molstar

Science Score: 67.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
    2 of 54 committers (3.7%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary

Keywords

molecular-graphics scientific-visualization web-graphics webgl webgl2

Keywords from Contributors

protein-structure structure-alignment structural-bioinformatics sequence-alignment protein-sequences protein-modification protein-data-bank pdb parser-library genomics
Last synced: 4 months ago · JSON representation ·

Repository

A comprehensive macromolecular library

Basic Info
  • Host: GitHub
  • Owner: molstar
  • License: mit
  • Language: TypeScript
  • Default Branch: master
  • Homepage: https://molstar.org
  • Size: 40.1 MB
Statistics
  • Stars: 807
  • Watchers: 26
  • Forks: 209
  • Open Issues: 155
  • Releases: 114
Topics
molecular-graphics scientific-visualization web-graphics webgl webgl2
Created almost 8 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog License Citation

README.md

License npm version Build Gitter

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 resources such as PDBe, PDBe-KB and AlphaFold DB. This implementation can be used as a JS plugin and a Web component and supports property/attribute-based easy customisation. It provides helper methods to facilitate programmatic interactions between the web application and the 3D viewer. It also provides a superposition view for overlaying all the observed ligand molecules on representative protein conformations.

  • rcsb-molstar is the Mol* plugin used by RCSB PDB. The project provides additional presets for the visualization of structure alignments and structure motifs such as ligand binding sites. Furthermore, rcsb-molstar allows to interactively add or hide of (parts of) chains, as seen in the 3D Protein Feature View.

Project Structure Overview

The core of Mol* consists of these modules (see under src/):

  • mol-task Computation abstraction with progress tracking and cancellation support.
  • mol-data Collections (integer-based sets, interface to columns/tables, etc.)
  • mol-math Math related (loosely) algorithms and data structures.
  • mol-io Parsing library. Each format is parsed into an interface that corresponds to the data stored by it. Support for common coordinate, experimental/map, and annotation data formats.
  • mol-model Data structures and algorithms (such as querying) for representing molecular data (including coordinate, experimental/map, and annotation data).
  • mol-model-formats Data format parsers for mol-model.
  • mol-model-props Common "custom properties".
  • mol-script A scripting language for creating representations/scenes and querying (includes the MolQL query language).
  • mol-geo Creating (molecular) geometries.
  • mol-theme Theming for structure, volume and shape representations.
  • mol-repr Molecular representations for structures, volumes and shapes.
  • mol-gl A wrapper around WebGL.
  • mol-canvas3d A low-level 3d view component. Uses mol-geo to generate geometries.
  • mol-state State representation tree with state saving and automatic updates.
  • mol-plugin Allow to define modular Mol* plugin instances utilizing mol-state and mol-canvas3d.
  • mol-plugin-state State transformations, builders, and managers.
  • mol-plugin-ui React-based user interface for the Mol* plugin. Some components of the UI are usable outside the main plugin and can be integrated into 3rd party solutions.
  • mol-util Useful things that do not fit elsewhere.

Moreover, the project contains the implementation of servers, including

  • servers/model A tool for accessing coordinate and annotation data of molecular structures.
  • servers/volume A tool for accessing volumetric experimental data related to molecular structures.
  • servers/plugin-state A basic server to store Mol* Plugin states.

The project also contains performance tests (perf-tests), examples, and cli apps (CIF to BinaryCIF converter and JSON domain annotation to CIF converter).

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

Build:

npm install
npm run build

Build automatically on file save:

npm run watch

If working on just the viewer, npm run watch-viewer will provide shorter compile times.

Build with debug mode enabled:

DEBUG=molstar npm run watch

Debug/production mode in browsers can be turned on/off during runtime by calling setMolStarDebugMode(true/false, true/false) from the dev console.

Cleaning and forcing a full rebuild

npm run clean

Wipes the build and lib directories and .tsbuildinfo files.

npm run rebuild

Runs the cleanup script prior to building the project, forcing a full rebuild of the project.

Use these commands to resolve occasional build failures which may arise after some dependency updates. Once done, npm run build should work again. Note that full rebuilds take more time to complete.

Develop with esbuild

Experimental support for faster builds with esbuild - npm run dev:all - watch mode for all apps and examples - npm run dev:viewer - watch mode for viewer - npm run dev:apps - watch mode for all apps - npm run dev:examples - watch mode for all examples - npm run dev -- -a <app name 1> <app name 2> -e <example name 1> ... - watch mode for specified apps/examples. -a/-e with without any names will build everything.

Build for production:

NODE_ENV=production npm run build

Run

If not installed previously:

npm install -g http-server

...or a similar solution.

From the root of the project:

http-server -p PORT-NUMBER

and navigate to build/viewer

Code generation

CIF schemas

node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/mmcif.ts -p mmCIF
node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/ccd.ts -p CCD
node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/bird.ts -p BIRD
node ./lib/commonjs/cli/cifschema -mip ../../../../mol-data -o src/mol-io/reader/cif/schema/cif-core.ts -p CifCore -aa

Lipid names

node lib/commonjs/cli/lipid-params -o src/mol-model/structure/model/types/lipids.ts

Ion names

node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-ions.js src/mol-model/structure/model/types/ions.ts

Saccharide names

node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-saccharides.js src/mol-model/structure/model/types/saccharides.ts

Other scripts

Create chem comp bond table

node --max-old-space-size=4096 lib/commonjs/cli/chem-comp-dict/create-table.js build/data/ccb.bcif -b

Test model server

export NODE_PATH="lib"; node build/src/servers/model/test.js

State Transformer Docs

export NODE_PATH="lib"; node build/state-docs

Convert any CIF to BinaryCIF (or vice versa)

node lib/commonjs/servers/model/preprocess -i file.cif -ob file.bcif

To see all available commands, use node lib/commonjs/servers/model/preprocess -h.

Or

node lib/commonjs/cli/cif2bcif

E.g.

node lib/commonjs/cli/cif2bcif src.cif out.bcif.gz
node lib/commonjs/cli/cif2bcif src.bcif.gz out.cif

Development

Installation

If node complains about a missing acorn peer dependency, run the following commands

npm update acorn --depth 20
npm dedupe

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

Owner

  • Name: Mol*
  • Login: molstar
  • Kind: organization

Mol* (/'molstar/) is an open collaboration started by PDBe and RCSB PDB to provide a technology stack for the data delivery and analysis tools of macromolecule

Citation (CITATION.cff)

cff-version: 1.2.0
title: >-
  Mol* library
message: >-
  Please cite this software using the metadata from
  'preferred-citation'.
authors:
  - given-names: Alexander S
    family-names: Rose
    orcid: 'https://orcid.org/0000-0002-0893-5551'
  - given-names: David
    family-names: Sehnal
    orcid: 'https://orcid.org/0000-0002-0682-3089'
  - given-names: Sebastian
    family-names: Bittrich
    orcid: 'https://orcid.org/0000-0003-3576-0387'
  - given-names: Áron Samuel
    family-names: Kovács
  - given-names: Ludovic
    family-names: Autin
    orcid: 'https://orcid.org/0000-0002-2197-191X'
  - given-names: Michal
    family-names: Malý
  - given-names: Jiří
    family-names: Černý
  - given-names: Panagiotis
    family-names: Tourlas
type: software
doi: 10.5281/zenodo.3947306
preferred-citation:
  authors:
    - given-names: David
      family-names: Sehnal
      orcid: 'https://orcid.org/0000-0002-0682-3089'
    - given-names: Sebastian
      family-names: Bittrich
      orcid: 'https://orcid.org/0000-0003-3576-0387'
    - given-names: Mandar
      family-names: Deshpande
      orcid: 'https://orcid.org/0000-0002-9043-7665'
    - given-names: Radka
      family-names: Svobodová
      orcid: 'https://orcid.org/0000-0002-3840-8760'
    - given-names: Karel
      family-names: Berka
      orcid: 'https://orcid.org/0000-0001-9472-2589'
    - given-names: Václav
      family-names: Bazgier
      orcid: 'https://orcid.org/0000-0003-3393-3010'
    - given-names: Sameer
      family-names: Velankar
      orcid: 'https://orcid.org/0000-0002-8439-5964'
    - given-names: Stephen K
      family-names: Burley
      orcid: 'https://orcid.org/0000-0002-2487-9713'
    - given-names: Jaroslav
      family-names: Koča
      orcid: 'https://orcid.org/0000-0002-2780-4901'
    - given-names: Alexander S
      family-names: Rose
      orcid: 'https://orcid.org/0000-0002-0893-5551'
  title: >-
    Mol* Viewer: modern web app for 3D visualization
    and analysis of large biomolecular structures
  type: article
  doi: 10.1093/nar/gkab314
  journal: "Nucleic Acids Research"
  issue: W1
  volume: 49
  year: 2021
  month: 7
  pages: "W431–W437"

GitHub Events

Total
  • Fork event: 65
  • Create event: 98
  • Commit comment event: 2
  • Release event: 14
  • Issues event: 237
  • Watch event: 128
  • Delete event: 78
  • Member event: 3
  • Issue comment event: 672
  • Push event: 451
  • Pull request event: 294
  • Pull request review event: 391
  • Pull request review comment event: 334
Last Year
  • Fork event: 65
  • Create event: 98
  • Commit comment event: 2
  • Release event: 14
  • Issues event: 237
  • Watch event: 128
  • Delete event: 78
  • Member event: 3
  • Issue comment event: 672
  • Push event: 451
  • Pull request event: 294
  • Pull request review event: 391
  • Pull request review comment event: 334

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 7,276
  • Total Committers: 54
  • Avg Commits per committer: 134.741
  • Development Distribution Score (DDS): 0.425
Past Year
  • Commits: 527
  • Committers: 24
  • Avg Commits per committer: 21.958
  • Development Distribution Score (DDS): 0.522
Top Committers
Name Email Commits
Alexander Rose a****e@w****e 4,184
David Sehnal d****l@g****m 2,054
JonStargaryen s****h@r****g 285
yakomaxa 4****a 151
ludovic autin a****n@s****u 95
giagitom g****m@g****m 91
midlik m****k@g****m 60
Sebastian Bittrich b****h@h****e 58
Sukolsak Sakshuwong s****k@g****m 42
Michal Malý m****y@i****z 36
Yakov Pechersky f****8@g****m 23
Jason Pattle j****e@e****k 23
ptourlas p****s@a****m 20
AronKovacs s****s@g****m 19
McMenemy j****y@g****m 11
Russell Parker r****l@b****m 9
luna215 p****5@g****m 9
Paul Pillot p****t@t****m 9
Yana Rose y****a@g****m 8
Zepei Xu x****7@g****m 8
Herman Bergwerf p****t@h****l 8
MarcoSchaeferT s****s@w****e 7
Alice Russell a****l@e****k 7
aliaksei-chareshneu c****h@g****m 6
Daofeng Li l****f@g****m 5
Ventura Rivera 3****a 5
hui2000ji 3****6@q****m 4
Cole Christie c****e@g****m 3
David Williams d****s@n****m 3
dependabot[bot] 4****] 3
and 24 more...

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 463
  • Total pull requests: 620
  • Average time to close issues: 3 months
  • Average time to close pull requests: 21 days
  • Total issue authors: 194
  • Total pull request authors: 39
  • Average comments per issue: 2.58
  • Average comments per pull request: 1.38
  • Merged pull requests: 489
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 153
  • Pull requests: 338
  • Average time to close issues: 12 days
  • Average time to close pull requests: 8 days
  • Issue authors: 72
  • Pull request authors: 25
  • Average comments per issue: 1.6
  • Average comments per pull request: 1.09
  • Merged pull requests: 254
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • giagitom (54)
  • luckyxutao (40)
  • arose (28)
  • nataliarosa9 (15)
  • rtviii (14)
  • alisterburt (12)
  • pechersky (9)
  • Marwa-Da (8)
  • luna215 (8)
  • QDMarkMan (6)
  • midlik (6)
  • bergwerf (6)
  • papillot (5)
  • russellp17 (5)
  • zachcp (5)
Pull Request Authors
  • dsehnal (161)
  • arose (135)
  • midlik (64)
  • giagitom (45)
  • corredD (39)
  • JonStargaryen (21)
  • sbittrich (18)
  • aliaksei-chareshneu (16)
  • pechersky (13)
  • ventura-rivera (10)
  • bergwerf (8)
  • zachcp (8)
  • papillot (8)
  • agdturner (8)
  • hui2000ji (6)
Top Labels
Issue Labels
question (154) enhancement (56) bug (54) help wanted (13) good first issue (4) dependencies (4) duplicate (1) invalid (1)
Pull Request Labels
enhancement (75) bug (12)

Packages

  • Total packages: 4
  • Total downloads:
    • npm 112,735 last-month
  • Total docker downloads: 156
  • Total dependent packages: 29
    (may contain duplicates)
  • Total dependent repositories: 41
    (may contain duplicates)
  • Total versions: 632
  • Total maintainers: 4
npmjs.org: molstar

A comprehensive macromolecular library.

  • Versions: 309
  • Dependent Packages: 27
  • Dependent Repositories: 40
  • Downloads: 112,726 Last month
  • Docker Downloads: 156
Rankings
Dependent packages count: 0.9%
Docker downloads count: 1.6%
Downloads: 1.9%
Average: 2.0%
Dependent repos count: 2.1%
Forks count: 2.8%
Stargazers count: 3.0%
Maintainers (2)
Last synced: 4 months ago
proxy.golang.org: github.com/molstar/molstar
  • Versions: 311
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 4 months ago
npmjs.org: @inftech/molstar

A comprehensive macromolecular library.

  • Versions: 11
  • Dependent Packages: 2
  • Dependent Repositories: 0
  • Downloads: 3 Last month
Rankings
Forks count: 3.7%
Stargazers count: 4.1%
Dependent packages count: 9.5%
Average: 13.6%
Downloads: 25.2%
Dependent repos count: 25.3%
Maintainers (1)
Last synced: 4 months ago
npmjs.org: @dp-launching/molstar

A comprehensive macromolecular library.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 6 Last month
Rankings
Forks count: 2.8%
Stargazers count: 3.0%
Dependent repos count: 10.3%
Average: 21.4%
Downloads: 39.3%
Dependent packages count: 51.9%
Maintainers (1)
Last synced: 4 months ago

Dependencies

.github/workflows/node.yml actions
  • actions/checkout v2 composite
  • actions/setup-node v2 composite
package-lock.json npm
  • 1035 dependencies
package.json npm
  • @graphql-codegen/add ^5.0.0 development
  • @graphql-codegen/cli ^5.0.0 development
  • @graphql-codegen/time ^5.0.0 development
  • @graphql-codegen/typescript ^4.0.1 development
  • @graphql-codegen/typescript-graphql-files-modules ^2.2.1 development
  • @graphql-codegen/typescript-graphql-request ^5.0.0 development
  • @graphql-codegen/typescript-operations ^4.0.1 development
  • @types/cors ^2.8.13 development
  • @types/gl ^6.0.2 development
  • @types/jest ^29.5.4 development
  • @types/jpeg-js ^0.3.7 development
  • @types/pngjs ^6.0.1 development
  • @types/react ^18.2.21 development
  • @types/react-dom ^18.2.7 development
  • @typescript-eslint/eslint-plugin ^6.5.0 development
  • @typescript-eslint/parser ^6.5.0 development
  • benchmark ^2.1.4 development
  • concurrently ^8.2.1 development
  • cpx2 ^5.0.0 development
  • crypto-browserify ^3.12.0 development
  • css-loader ^6.8.1 development
  • eslint ^8.48.0 development
  • extra-watch-webpack-plugin ^1.0.3 development
  • file-loader ^6.2.0 development
  • fs-extra ^11.1.1 development
  • graphql ^16.8.0 development
  • http-server ^14.1.1 development
  • jest ^29.6.4 development
  • mini-css-extract-plugin ^2.7.6 development
  • path-browserify ^1.0.1 development
  • raw-loader ^4.0.2 development
  • react ^18.2.0 development
  • react-dom ^18.2.0 development
  • sass ^1.66.1 development
  • sass-loader ^13.3.2 development
  • simple-git ^3.19.1 development
  • stream-browserify ^3.0.0 development
  • style-loader ^3.3.3 development
  • ts-jest ^29.1.1 development
  • typescript ^5.2.2 development
  • webpack ^5.88.2 development
  • webpack-cli ^5.1.4 development
  • @types/argparse ^2.0.10
  • @types/benchmark ^2.1.2
  • @types/compression 1.7.2
  • @types/express ^4.17.17
  • @types/node ^16.18.47
  • @types/node-fetch ^2.6.4
  • @types/swagger-ui-dist 3.30.1
  • argparse ^2.0.1
  • body-parser ^1.20.2
  • compression ^1.7.4
  • cors ^2.8.5
  • express ^4.18.2
  • h264-mp4-encoder ^1.0.12
  • immer ^9.0.21
  • immutable ^4.3.4
  • node-fetch ^2.7.0
  • rxjs ^7.8.1
  • swagger-ui-dist ^5.4.2
  • tslib ^2.6.2
  • util.promisify ^1.1.2
  • xhr2 ^0.2.1