David Sehnal

Results 234 comments of David Sehnal

Perhaps something along these lines: ```ts const focusGroupRootRef: string = ''; const focusRepresentationRefs: Set = new Set(); const reprCells = plugin.state.data.selectQ(q => q .byRef(focusGroupRootRef) .ancestorOfType(PluginStateObject.Molecule.Structure) .subtree() .ofType(PluginStateObject.Molecule.Structure.Representation3D) ); const toHide...

> So in this case, the `focusRepresentationRefs` would be the ref strings returned by `ensureShape`? What would be the `focusGroupRootRef`? This is my mistake, I thought the focus representations were...

Hi, more customization options, including deleting the group when it's empty, could definitely be added. If I understand it correctly, you just want the ability to hide the measurements group...

Maybe you can make a PR which adds the ability to create the measurements group as a ghost cell (perhaps via an option in `PluginConfig.Structure`) and also returns the corresponding...

Sorry for the late reply. You are right, this should be mentioned in the specification -- I will add it.

Hi, yes, this is possible: ![image](https://github.com/molstar/molstar/assets/21145776/711b375b-6b39-4f02-b6f1-2d59eea25282) You have to apply the visual node to the transformed part: ```ts const xform = builder.to(ref) .apply(StateTransforms.Model.TransformStructureConformation, { transform: { name: 'matrix' as const,...

Using the conformation transforms like this isn't a way to do an editor due to how that is implemented. I've previously built an editor by providing a custom data source...

There are other ways too, don't need to go full out custom data model. I don't the requirements for you app but, for example, you can keep track of the...

Something like this (pseudocode): ```ts const WithConformation = Transform({ from: Model, to: Model, params: { conformation: PD.Value() } })({ apply({ a, params }) { return { ...a.data, conformation: params.conformation };...

Models store, among other things, the raw coordinate data. Structures are more fancy with instancing etc. The reason only rotation/translations are supported there is that we can do nearest neighbor...