Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What about Mol*? #1057

Open
panda-byte opened this issue Nov 12, 2024 · 3 comments
Open

What about Mol*? #1057

panda-byte opened this issue Nov 12, 2024 · 3 comments

Comments

@panda-byte
Copy link

Hey, kind of embarrassing question but I'm unsure about the differences between NGL Viewer and Mol*. The latter sometimes pops up in issues (like #759) and it seems like almost a successor for NGL Viewer in that context? To me, the description of Mol* is a bit vague ("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."). From the description I assume it's some sort of wrapper / abstract interface? Everything seems to revolve around the use of plugins. The documentation https://molstar.org/docs/ also doesn't talk about concrete applications.

I guess the purposes of both are completely different? But I'm not even sure how the Mol* sample applications work, is a 3D Viewer part of Mol* itself? Or does it use NGL (or another 3D viewer) for visualization?

@fredludlow
Copy link
Collaborator

The original NGL author (Alex Rose) went on to create Mol* together with the LiteMol author. It's the viewer you see when look at structures on the PDBe and RCSB websites, for example: https://www.ebi.ac.uk/pdbe/entry/pdb/1ajx/index (click 3D visualization in the right hand column).

While some of the code from NGL (and LiteMol) has been adapted to make Mol* I think fundamentally it's a ground-up rewrite (it's not the case that mol* is a wrapper around NGL for example).

While the NGL github page is pretty quiet these days, it mostly just works, and I think there are quite a few people like myself who are using it productively and for whom it's pretty much a "done" project. It can read molecules and draw them to a WebGL canvas easily, it can handle thousands of molecules loaded simultaneously without making my laptop catch fire or freeze up! Mol* offers a much richer application interface (it has a UI) and there are numerous improvements to graphics, parsing, state management etc etc, but my impression is that the learning curve is a little steeper (this view might well be out of date though!)

@papillot
Copy link
Contributor

papillot commented Nov 13, 2024

I am currently doing the migration from NGL to Mol*. Everything that Fred mentions above is point on. You don't have to use Mol* UI and could only use the visualization part, but not many users do that as it's very complex to create its own UI.

Mol* learning curve is very steep. The documentation is very sparse even if there are efforts made in that direction.
The coding paradigms in the library are quite different also, as it relies more on functions you pass objects to, rather than objects which have methods. This has the advantage of slim objects, but it makes harder to discover what you can do with objects.
There are many concepts which are alien to NGL and add complexity. Like, the hierarchy is Data -> Trajectory -> Model -> Structure -> StructureComponent -> Representation (everything is a trajectory even if there is only one frame). In NGL, it would be Component -> Structure / Component -> Representation. A Mol* Structure is divided in Units which may be mapped to UnitSymmetryGroups. A selection boils down to a Loci which contains a list of Units with list of indices associated to each. Each data structure has its own optimizations, so you can't manipulate indices without a dedicated type function that handle these internal implementations.
This creates a lot of overhead when you need to manipulate the underlying data, and I find NGL much simpler and less error prone in that respect.

That being said, Mol* really stands-out in terms of graphics. Many outstanding issues from NGL have been solved, like the representations of cartoons for single residues, the representation of cyclic peptides, glycans, etc...

My team has contributed to a couple of coded examples you can have a look to if you're interested: https://github.com/molstar/example-gallery?tab=readme-ov-file#examples-and-sandboxes

@panda-byte
Copy link
Author

I see, thank you both for the detailed explanations. What you said about the Mol* documentation being sparse is certainly true. From the documentation available from the repository I wasn't even sure what the project exactly was and where to start, no "Quick start" or anything, no code sandbox examples etc. The developer documentation just covers "Installation" and then goes straight to "Plugins".

I'm not really interested in the UI, so I guess I will just stick to NGL, because I wouldn't even know how to load and display data for just a simple canvas with Mol*.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants