molstar / molstar

A comprehensive macromolecular library

Home Page:https://molstar.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Highlighting Specific Regions and Adding Custom Geometries in Embedded Mol* Viewer

smbatyankh opened this issue · comments

Hello Mol* Team,

I am using the Embedded Mol* viewer for molecular visualization and have two questions about its capabilities:

  1. Is there an existing method to effectively highlight specific regions, such as active sites within a protein, especially for large molecules(from embedded html src/apps/viewer/embedded.html)?

  2. Does Mol* support the addition of custom geometric shapes, such as boxes, based on specified center coordinates and dimensions within the embedded viewer? If not, is this a feature you might consider adding in the future(from embedded html src/apps/viewer/embedded.html)?

Thank you for your support and looking forward to your response.

Hi, this is not really possible to do directly. You will need to build a small library that bundles all the required functionality. To set this up, please refer to https://github.com/molstar/example-gallery to see how you can use esbuild for this purpose.

This is super cool, thanks. I created library that can do the listed.

Just one small question, can I customize plugin specs to add controls. I mean without creating viewer or using react?

What specs and controls do you want to customize?

I am trying to add these buttons, I am wondering if it will be possible to add without creating react component?

Screenshot_20240605-000020

Those buttons are svg, just use your browser dev tools inspect option. In molstar the svg is in src\mol-plugin-ui\controls\icons.tsx together with the source of the icons.