Give ipymolstar
a spin without even installing python!
solarafold
result viewer on huggingface 🤗pip install ipymolstar
from ipymolstar import PDBeMolstar
view = PDBeMolstar(molecule_id='1qyn', theme='light', hide_water=True)
view
Loading local data, hiding the buttons:
from pathlib import Path
fpth = Path().resolve() / 'assets' / '6vsb.bcif'
custom_data = {
'data': fpth.read_bytes(),
'format': 'cif',
'binary': True,
}
view = PDBeMolstar(
custom_data=custom_data,
hide_controls_icon=True,
hide_expand_icon=True,
hide_settings_icon=True,
hide_selection_icon=True,
hide_animation_icon=True,
hide_water=True,
hide_carbs=True,
)
view
See the example notebook for more advanced usage. Solara example code can be found here
ipymolstar
uses anywidget to create a widget based on the PDBe integration of Mol*.
When using ipymolstar
, please cite:
David Sehnal, Sebastian Bittrich, Mandar Deshpande, Radka Svobodová, Karel Berka, Václav Bazgier, Sameer Velankar, Stephen K Burley, Jaroslav Koča, Alexander S Rose: Mol* Viewer: modern web app for 3D visualization and analysis of large biomolecular structures, Nucleic Acids Research, 2021; 10.1093/nar/gkab31.
See also the RCSB citation policies for additional citation information.
__version__
in __init__.py
__version__
; ie 'v0.0.3'To enable anywidget hot reloading, you need to set th env var ANYWIDGET_HMR
to 1.
Windows:
set ANYWIDGET_HMR=1
jupyter lab