Skip to main content

No project description provided

Project description

ipymolstar

image

Live Demo

Give ipymolstar a spin without even installing python!

Installation

pip install ipymolstar

Use

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

Cite

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.

Development

Creating a new release

  • update __version__ in __init__.py
  • create a new release on GitHub, choose as tag 'v' + __version__; ie 'v0.0.3'
  • GitHub actions should automatically deploy to PyPi

Hot reloading

To enable anywidget hot reloading, you need to set th env var ANYWIDGET_HMR to 1.

Windows:

set ANYWIDGET_HMR=1
jupyter lab

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipymolstar-0.0.4.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

ipymolstar-0.0.4-py2.py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page