Giter Site home page Giter Site logo

molrender's Introduction

License npm version Gitter Changelog

alt example

Usage

Molrender creates images of the following types: model, assembly, chain, chain-list, models, or all. Either as png or jpeg.

Create all images as PNG

molrender all /path/to/5cbg.cif /path/to/out/

Create all images as JPEG

molrender all /path/to/1nmr.cif /path/to/out/ --format jpeg

Building

Build:

npm install
npm run build

Build automatically on file save:

npm run watch

Build with debug mode enabled:

DEBUG=molstar npm run watch

Build for production:

NODE_ENV=production npm run build

Scripts installation

npm run build
npm install -g

Publish

Prerelease

npm version prerelease # asumes the current version ends with '-dev.X'
npm publish --tag next

Release

npm version 0.X.0 # provide valid semver string
npm publish

Contributing

Just open an issue or make a pull request. All contributions are welcome.

Funding

Funding sources include but are not limited to:

molrender's People

Contributors

arose avatar bioinsilico avatar buzzcrackle avatar dsehnal avatar jonstargaryen avatar markma2003 avatar oferze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

molrender's Issues

Performance on Large Structures

  • it's painfully slow to generate all images for some structures, 4v99 took almost 24 h, 3j3q and most ribosomes are fine however (which is why I didn't spot this sooner)
  • the process gets slower over time, it's even worse if a large assembly gets rendered first
  • looks to me as if some data is lingering, but GC/memory look normal to me and the canvas gets cleared after each rendering
  • I'm able to run with comparable speeds to 0.4.1 when I create a fresh ImageRenderer instance for each chain - doing so doesn't result in a noticeable performance penalty but seems like a pretty heavy-handed fix

When profiling, most time is spent in drawElementsInstancedANGLE but to a way higher ratio with the current code.

0.5.0 @ ~5 min per chain:

 [JavaScript]:
   ticks  total  nonlib   name
  21221   60.1%   66.7%  LazyCompile: *drawElementsInstancedANGLE /Users/sebastian/IdeaProjects/molrender/node_modules/gl/src/javascript/extensions/angle-instanced-arrays.js:47:30
    503    1.4%    1.6%  LazyCompile: *query :161:15
    440    1.2%    1.4%  LazyCompile: *JPEGEncoder.encode /Users/sebastian/IdeaProjects/molrender/node_modules/jpeg-js/lib/encoder.js:614:25

 [Summary]:
   ticks  total  nonlib   name
  24985   70.8%   78.5%  JavaScript
   5199   14.7%   16.3%  C++
   1095    3.1%    3.4%  GC
   3491    9.9%          Shared libraries
   1625    4.6%          Unaccounted

Fresh ImageRenderer for each render operation @ ~0.3 s per chain:

 [JavaScript]:
   ticks  total  nonlib   name
   5445    3.5%    4.2%  LazyCompile: *drawElementsInstancedANGLE /Users/sebastian/IdeaProjects/molrender/node_modules/gl/src/javascript/extensions/angle-instanced-arrays.js:47:30
   3290    2.1%    2.6%  LazyCompile: *write /Users/sebastian/IdeaProjects/molrender/node_modules/glsl-tokenizer/index.js:92:17
   1661    1.1%    1.3%  LazyCompile: *query :161:15

 [Summary]:
   ticks  total  nonlib   name
  24613   15.9%   19.1%  JavaScript
  43122   27.9%   33.5%  C++
   9708    6.3%    7.5%  GC
  25941   16.8%          Shared libraries
  61115   39.5%          Unaccounted

@arose @dsehnal Do you have any idea what might be going on? Could this be another problem in headless-gl?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.