Giter Site home page Giter Site logo

ipymolstar's Introduction

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

ipymolstar's People

Contributors

jhsmit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.