molstar / molstar

A comprehensive macromolecular library
https://molstar.org
MIT License
599 stars 140 forks source link

Tunnels extension #1105

Closed vDusky closed 1 month ago

vDusky commented 1 month ago

Description

Created extension for visualization of tunnels.

Actions

arose commented 1 month ago

Is this ready for testing? Are there example files available? Could you add a Preset for files with an PDB ID?

arose commented 1 month ago

@arose got any comments too?

I will have a closer look on the weekend. In general I like the pattern in the assembly-symmetry extension more where you have 1) the data in a structure property and 2) either get it from an url or a file (can be stored in the session), 3) have a transform from structure to representation.

And to reiterate, I really would like to see a Preset so it is readily usable for structure with a PDB ID.

dsehnal commented 1 month ago

@arose the main use case for this was to enable https://channelsdb2.biodata.ceitec.cz/ and @vDusky already added the DownloadTunnels action to be able to set up the scene.

Although, you are right the assembly-symmetry is a nice approach as well. @vDusky, in addition to the DownloadTunnels action, can you please add/register a preset similar to this? It should show up in the menu afterwards and allow loading channels even for existing entries:

image

arose commented 1 month ago

EDIT: Never mind there was just no entry for 3pqr (it has a tunnel though, but maybe it gets not recognized or has not been precalculated)

--

Thanks for adding the preset. Could the server providing the tunnel data set the CORS headers so the data can be retrieved from other origins.

Access to fetch at 'https://channelsdb2.biodata.ceitec.cz/api/channels/pdb/3pqr' from origin 'http://127.0.0.1:1338' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

arose commented 1 month ago

Nice work and thanks for sharing this with the community as an extension @vDusky!