dsehnal / LiteMol

A library/plugin for handling 3D structural molecular data (not only) in the browser.
Other
155 stars 36 forks source link

Can I transform coordinates in LiteMol? #64

Open filippersson opened 3 years ago

filippersson commented 3 years ago

Is it possible to perform coordinate transformations in LiteMol, say apply a rotation to a molecule so that its orientation changes relative to another molecule loaded in the same "scene"?

Alternatively, can I update the coordinate data within litemol by supplying new coordinates via JSON data to LiteMol?

Nice work with LiteMol by the way :)

dsehnal commented 3 years ago

You can check https://github.com/dsehnal/LiteMol/tree/master/examples/Transforms for how to do that. JSON is possible, but some work required.

Glad you like it. If you are starting out now, you should have a look into https://molstar.org (it's an "official" successor to LiteMol and NGL). I can do the transforms too (shown in one of the examples/apps there) and loading JSON is somewhat easier.

filippersson commented 3 years ago

Thanks, I'll check it out!

I just started to look for a molecule-viewer solution to my simple web app project, so molstar seems like a nice option here. My app essentially superposes two molecules based on their surface shape, so I would like to dynamically load (user specified) two molecules into LiteMol/molstar to visualize their original orientation, and then apply the coordinate transformation in the viewer to visualize the final superposition after the search has completed. I have experimented with JSmol which works, but it is far from ideal in terms of performance (speed/footprint) and visualization quality (it is showing its age in other words).

Nice work with MolStar too - keep it up! :)

dsehnal commented 3 years ago

https://www.ebi.ac.uk/pdbe/about/news/superimposition-and-batch-downloads-added-pdbe-kb-aggregated-views