pragmatic-streamlit / streamlit-molstar

42 stars 5 forks source link

Jupyter notebook #2

Closed euhruska closed 9 months ago

euhruska commented 1 year ago

Does this work in jupyter notebooks? The README doesn't clarify.

mapix commented 1 year ago

@euhruska Unfortunately, the current implementation is closely tied to the usage pattern of the streamlit library. Therefore, as far as I know, it may not work very well in notebooks. Although there are some libraries like streamlit-jupyter that attempt to solve these problems, based on their descriptions they may not support this type of custom component. Perhaps in the future, with some internal project requirements, these components will gradually be separated out. However, this is unlikely to happen within the next few months.

Additionally, if you only need to display some molecular structures, you can consider using stmol which integrates better with notebooks.

mapix commented 9 months ago

@euhruska

Based on what we currently know, Streamlit components do not work well within Notebooks. However, we have recently been transitioning comprehensively from Streamlit to Dash. During this transition to Dash, we have explored many new capabilities of Molstar, which are based on https://github.com/everburstSun/dash-molstar and have been significantly enhanced in https://github.com/pragmatic-dash/dash-molstar. These enhancements include better visualization of protein pockets, local updates, and other features. Moreover, the good news is that Dash integrates seamlessly with Notebooks. This means you can try out Dash Molstar.