ngl icon indicating copy to clipboard operation
ngl copied to clipboard

dynamics? animation, simulation...

Open paul-shannon opened this issue 3 years ago • 1 comments

This is a naive question. I offer apologies in advance.

I have been delighted by the power of ngl.js, which I currently use via an R/shiny app. Our first application is an exploration of the structure of the oxygen-evolving complex in the the context of photsystem II.

See the Demo button in https://paulshannon.shinyapps.io/OECapp/. The underlying widget is maintained here.

Can ngl.js support dynamics, as well as structure? For instance: could I somehow animate/simulate the absorbtion of a photon and the travel of an excited electron down the electron transport chain?

I'd be grateful for any suggestions you have.

paul-shannon avatar Jun 21 '22 23:06 paul-shannon

I had it pulling a pdb from a dynamics simulation once a second. I disabled the feed a while back, but the code is likely still in the page. :-)

http://phobrain.com/pr/home/mol.html

phobrain avatar Jul 10 '22 15:07 phobrain

There are various ways this can be done:

  • NGL support multi-models files, such as PDB files containing multiple models. You could make an animation based on different frames saved as distinct models in the same PDB file.
  • NGL has support for trajectories such as the ones output by MD simulations. The general idea is to load the topology first and then change the atomic coordinates at each frame of the simulation. The MDsrv project is a related tool that facilitates the distribution of such simulation by streaming the coordinates for a given frame. A telling example of such usage can be found on the GPCR-MD database (e.g. https://submission.gpcrmd.org/view/245/)
  • It's possible to load a model in a distinct component and animate its position relative to other components. This could be used as a visual metaphor for electron transfer in your example. It would require a computation of all the translations based on the atomic coordinates, which might be tedious...

ppillot avatar Jan 08 '23 21:01 ppillot

@ppillot thank you for these three suggestions. I will give each a try.

paul-shannon avatar Jan 11 '23 00:01 paul-shannon