molstar
molstar copied to clipboard
Suggestion/Request: public concatStructures method like NGL
There's a great example of a docking-viewer app that comes up pretty regularly. My understanding is that this requires building and hosting the applet. In NGL, this is not so since a user can concatStructures after loading NGL from a CDN.
I don't know the work involved, but it would be useful if one could do the same with Molstar. As a use-case example, I wrote a small app (not being a frontend dev in any way) that I think has several advantages: chiefly, the app isn't hosted on a server, so confidential structures can be loaded and kept in-browser. It all relies on the concatStructures method. All the best and thanks for Molstar (and NGL)!
Something like this indeed does come up quite often.
Perhaps a suitable workaround for now would be to include the loadStructuresFromUrlsAndMerge
in the default viewer app (apps/viewer
). This way the method would be accessible from JS as well. Would you be ok with making a PR with this?
Sure thing. Is is suitable to add this to molstar/src/apps/viewer/app.ts? Similar to this existing example: https://github.com/molstar/molstar/blob/22e5c9d65b2714bc6e59713361d8a39200ee0508/src/apps/viewer/app.ts#L230
Sure thing. Is is suitable to add this to molstar/src/apps/viewer/app.ts?
Yes!