GithubHelp home page GithubHelp logo

densities / blob Goto Github PK

View Code? Open in Web Editor NEW
7.0 7.0 0.0 2.16 MB

blob: plot densities directly in your browser.

Home Page: https://densities.github.io/blob/

License: GNU Affero General Public License v3.0

CSS 0.91% HTML 12.14% JavaScript 86.96%
browser density isosurface javascript threejs

blob's Issues

Inconsistency with paraview

It seems Blob plots the function skewed compared to paraview.

I was able to get a symmetric plot of a He density with Blob using this cube header, step length computed as h = L/(n + 1) = 8.0/26 = 3.076923e-01

Cube file format
Generated by MRChem
    1  -4.000000e+00  -4.000000e+00  -4.000000e+00
   25   3.076923e-01   0.000000e+00   0.000000e+00
   25   0.000000e+00   3.076923e-01   0.000000e+00
   25   0.000000e+00   0.000000e+00   3.076923e-01
    2   2.000000e+00   0.000000e+00   0.000000e+00   0.000000e+00
  3.9415e-11  7.8768e-11  1.5008e-10  2.7374e-10  4.7477e-10  7.7984e-10
  1.2114e-09  1.7688e-09  2.4268e-09  3.1159e-09  3.7333e-09  4.1676e-09
  4.3225e-09  4.1676e-09  3.7333e-09  3.1159e-09  2.4268e-09  1.7688e-09
...

but this gives a non-symmetric plot in paraview (atomic coordinate is not at the center of the density). With paraview, on the other hand, the following cube plot becomes symmetric, step length computed as h = L/(n - 1) = 8.0/24 = 3.333333e-01

Cube file format
Generated by MRChem
    1  -4.000000e+00  -4.000000e+00  -4.000000e+00
   25   3.333333e-01   0.000000e+00   0.000000e+00
   25   0.000000e+00   3.333333e-01   0.000000e+00
   25   0.000000e+00   0.000000e+00   3.333333e-01
    2   2.000000e+00   0.000000e+00   0.000000e+00   0.000000e+00
  3.9415e-11  7.8768e-11  1.5008e-10  2.7374e-10  4.7477e-10  7.7984e-10
  1.2114e-09  1.7688e-09  2.4268e-09  3.1159e-09  3.7333e-09  4.1676e-09
  4.3225e-09  4.1676e-09  3.7333e-09  3.1159e-09  2.4268e-09  1.7688e-09
...

Light source rotates with the molecule

This means that some portions of the isosurface can be "in the shadow". Perhaps the light should be fixed w.r.t. the camera? (thanks Gosia for pointing it out)

Meshing is not optimized

  • I think the data is not aligned with the meshing triple loops
  • The meshing algorithm loops over all voxels but for typical molecular densities we could screen away many voxels or entire planes

Show molecular structures

The reason why I did not do this yet is that the cube file does not "know" the structure. It only knows the positions. So we need some scheme to deduce bonds and/or additional formats.

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.