David Sehnal
David Sehnal
This is not a correct way. What you are looking for is `plug-in.state.data.selectQ(...)`. Where you find a sub tree with the current node and the filter it say based on...
That is a fair point @stefdoerr and a higher level API is something we might definitely consider adding. Maybe a good place to start this would be to write some...
Yes, a high-level API like this as an "extension" would definitely be a welcome contribution and I am sure many users would welcome that! The extension approach would also allow...
I was on phone with my original response so I just added some pointers. Either one of these two should do what you want: ```ts plugin.state.data.selectQ(q => q.byRef(selector.ref).subtree().ofType(PluginStateObject.Molecule.Structure.Representation3D)); plugin.state.data.selectQ(q =>...
Hi Tomasz, - most of the interactions are available through the behaviors in the `PluginContext`: https://github.com/molstar/molstar/blob/master/src/mol-plugin/context.ts#L83 - different modules of the code then subscribe to these (usually added as behaviors...
Have a look at how [bonds are computed](https://github.com/molstar/molstar/tree/master/src/mol-model/structure/structure/unit/bonds).
I see. I think the best course of action then would be adding a ``nearest(x, y, z): T | undefined`` function to ``Lookup3D`` (and ``GridLookup3DImpl``) in ``mol-math/geometry/lookup3d``. It should be...
> **Q1)** How can I distinguish between **spheres in the same group** using some kind of "Id", e.g. state.currentGroup? I.e. is there a way either to use state.currentGroup of a...
The event also contains the information about the representation you clicked on, you can distinguish between the spheres like that, by including some more info in the `sourceData` field (or...
You cannot distinguish between two spheres with the same group id inside the same visual. You need to give them different group id and keep a mapping outside of the...