🧪 Panel-Chemistry - exploratory data analysis and build powerful data and viz tools within the domain of Chemistry using Python and HoloViz Panel.

Overview

🧪 Panel-Chemistry

👨‍🔬 📈 🛠️ 🐍 ❤️

Python Versions Style Black License Test Results Follow on Twitter

The purpose of the panel-chemistry project is to make it really easy for you to do exploratory data analysis and build powerful data and viz tools within the domain of Chemistry using Python and HoloViz Panel.

Panel Chemistry Teaser

Check out the panel-chemistry examples on Binder

Jupyter Notebook Jupyter Labs Panel Apps
Binder Binder Binder

🏁 Background

This project is just starting (2021-05-19) and not much more than an idea.

It was started by the discussion How to display JSME molecular editor with Panel? in the Panel Community Forum

🏃 Getting Started

pip install panel-chemistry

Run the below in a Notebook or using panel serve NAME_OF_SCRIPT.py.

import panel as pn
from panel_chemistry.widgets import JSMEEditor

pn.extension("jsme", sizing_mode="stretch_width")
smiles="N[C@@H](CCC(=O)N[C@@H](CS)C(=O)NCC(=O)O)C(=O)O"
editor = JSMEEditor(value=smiles, height=500, format="smiles")

editor.servable()

JSME Editor

👩‍🏫 Examples

Check out the panel-chemistry reference guides on Binder

Guide Github Notebook Jupyter Notebook Jupyter Labs Panel Apps
JSME Editor View Binder Binder Binder
NGL Viewer View Binder Binder Binder

💡 Inspiration

🎁 Contributing

If you want to contribute reach out via Github Issues or in the Contributor Community Forum on Gitter: https://gitter.im/panel-chemistry/community#

For more details see the Developer Guide

FAQ

How do I Install with Conda?

You can do

conda install pip
pip install panel-chemistry

You can also include panel-chemistry in your environment.yaml file as described on Stack Overflow: Combining conda environment.yml with pip requirements.txt.

Comments
  • Request for Conda support

    Request for Conda support

    As chemo-informaticians nowadays who use Python, are mainly relied on RDKit to compute about molecule information, it is preferable that that RDKit could be easily bundled in panel-chemistry. But, since RDKit installation with pip is really tedious, registering panel-chemistry in Anaconda repository could help users to use it easily.

    opened by arifin-chemist89 17
  • Adds Pbde Molstar

    Adds Pbde Molstar

    Continuation of #19

    A Panel Pane to wrap the PDBe implementation of the Mol* ('MolStar') viewer.

    Check out

    Cite Mol*: 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; https://doi.org/10.1093/nar/gkab314.

    Todo:

    • [] Test that dynamic updates work
    • [] Decide if light theme should be could default as is custom in Panel.
    • [] Decide if default theme should be dark or default/ light.
    • [] Add/ use utility functions
    • [] Add events.
    • [] Fix that the component get slower and slower on each rerender.
    • [] Reference Notebook
    • [] Add automated tests
    • [] Test, Test, Test
    • [] pypi package
    • [] conda package
    • [] Communication

    Nice to have

    • Some Gallery notebook showing an example application.
    • Some way to update the css file across all PdbeMolstar instances when the theme changes.
    • Set default theme based on theme=default or them=dark url query args.
    opened by MarcSkovMadsen 16
  • Add pdbe molstar viewer

    Add pdbe molstar viewer

    Current status of the PR adds the PBDe webcomponent implementation of the molstar viewer

    The webcomponent works well although there are some bugs/confusion around setting of some boolean parameters: https://github.com/PDBeurope/pdbe-molstar/issues/44

    pdbe-molstar-webcomponent

    I'm planning to further add the PDBe JS plugin as ReactiveHTML and perhaps also the Mol* viewer

    opened by Jhsmit 7
  • Molstar updates

    Molstar updates

    A Panel Pane to wrap the PDBe implementation of the Mol* ('MolStar') viewer.

    Check out

    Cite Mol*: 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; https://doi.org/10.1093/nar/gkab314.

    Continuation of #20

    Changes:

    • Adding a default visual style hides waters by default, set default to None
    • Theme default to default (= light)
    • Hide structure split per boolean, update via visual.visibility
    • Hide canvas button split per boolean, update via rerender (only works for some buttons)
    • Added function for coloring a selection (one color)
    • Add function for coloring a selection (many colors)

    I've changed the theme to 'default' (which is light). Since this is the default in panel I think it makes the most sense. It looks like the CSS theme already updates across PDBeMolStar instances (at least in jupyer notebooks) Ideally we would also couple the background color to the theme. Previously I used bg_color with default=None and set the bg color depending on the theme but that is currently bugged (https://github.com/holoviz/panel/issues/3058). Ideally as you state under 'nice to have' would be nice to have it like that :)

    The selection and coloring API has a few more options (color by auth_residue_number,) which I'm not familiar with but I suspect its related to the mmCIF protein structure data format

    Current (known) bugs:

    • [ ] If you set hide_water is True via __init__ they cannot be switched back to show

    Previous:

    Todo:

    • [x] Test that dynamic updates work
    • [x] Decide if light theme should be could default as is custom in Panel.
    • [x] Decide if default theme should be dark or default/ light.
    • [x] Add/ use utility functions
      • [x] ~~.select()~~ color() function can be used for coloring
      • [x] `.clear_selection()
      • [x] highlight()
      • [x] clear_highlight()
      • [x] reset()
    • [x] Add events.
      • [x] hide/show water, het, polymer, etc
      • [x] hide/show some (but not all) canvas buttons
    • [ ] Fix that the component get slower and slower on each rerender. (I have not experienced this)
    • [x] Reference Notebook
    • [x] Add automated tests
    • [ ] Test, Test, Test
      • [ ] Test on non-protein molecules
      • [ ] Test other formats than pdb (mmcif, mdtraj?)
    • [ ] pypi package
    • [ ] conda package
    • [ ] Communication

    Nice to have

    • Some Gallery notebook showing an example application.
    • Some way to update the css file across all PdbeMolstar instances when the theme changes (this seems to happen already, at least in the notebook example).
    • Set default theme based on theme=default or them=dark url query args.
    opened by Jhsmit 6
  • pip install failure

    pip install failure

    I was following the instructions from video 0.1:

    git clone https://github.com/MarcSkovMadsen/panel-chemistry.git
     cd panel-chemistry
     conda create --name panel-chemistry
     conda activate panel-chemistry
     pip install -e .[all]
    

    this resulted in an error for pywinpty

     Cargo, the Rust package manager, is not installed or is not on PATH.
        This package requires Rust and Cargo to compile extensions.
    
    opened by ea42gh 6
  • Question about static-dirs in panel

    Question about static-dirs in panel

    Hi, I've been working with the pdbe molstar code and I think it's fantastic. I'm a little confused about how static files would work for panel in a jupyter notebook though. Is there a way to specify an assets directory in a notebook without running panel serve --static-dirs from the command line?

    opened by cschlick 5
  • Fixing issue #23 (import error with panel 0.13+)

    Fixing issue #23 (import error with panel 0.13+)

    Fixing issue in #23 : cannot import name 'string_types' from 'panel.util' They removes from six import string_types in panel 0.13, so I juste replaced

    from panel.util import lazy_load, string_types
    

    by

    from panel.util import lazy_load
    from six import string_types
    
    opened by tubiana 2
  • Configure Project for

    Configure Project for "Prebuilt Bokeh Extensions"

    We also need to setup the project to support pre-built Bokeh Extensions.

    This is described in https://awesome-panel.readthedocs.io/en/latest/guides/awesome-panel-extensions-guide/bokeh-extensions.html#prebuilt-bokeh-extensions. If possible we should record and distribute this as a video to make it easier for the Panel Community to build new packages/ extensions in the future.

    opened by MarcSkovMadsen 2
  • Make it dead easy to try panel-chemistry

    Make it dead easy to try panel-chemistry

    Request

    Make it dead easy to try panel-chemistry. I would like a CLI tool panel-chemistry with the commands

    • hello which panel serves the example notebooks
    • examples which copies the example notebooks to /examples/panel-chemistry.

    Motivation

    Currently there is some friction to try out panel-chemistry. You have to open Binder (slow) or download the notebooks from github. It takes some time and some users might now how to do or understand its possible. You can also git clone the repo. There are 4 commands you have to execute and it might fail.

    Drawbacks

    It would add dependencies like Typer and Rich to the package if we implement it like the awesome-panel-cli.

    Alternatives

    • Not do it.
    • I've also considered whether the awesome-panel-cli should enable plugins. So having one cli to collect everything. But I think

    Additional Context

    We should do this in a general way that is consistent with awesome-panel-cli, panel-highcharts etc.

    enhancement 
    opened by MarcSkovMadsen 1
  • Feature/0.2.0

    Feature/0.2.0

    Updates the package to v 0.0.2 and

    • adds Panel 0.14.0 support and Python 3.10 support
    • removes Python 3.6 support
    • refactors to an awesome-panel-cli powered project.
    opened by MarcSkovMadsen 1
  • ImportError: cannot import name 'string_types' from 'panel.util'

    ImportError: cannot import name 'string_types' from 'panel.util'

    When testing on panel 0.13.0rc5 I get

    2022-04-07 21:06:14,769 Error running application handler <bokeh.application.handlers.script.ScriptHandler object at 0x0000029BC5655100>: cannot import name 'string_types' from 'panel.util' (c:\repos\private\awesome-panel\.venv\lib\site-packages\panel\util.py)
    File 'ngl_viewer.py', line 15, in <module>:
    from panel.util import lazy_load, string_types Traceback (most recent call last):
      File "c:\repos\private\awesome-panel\.venv\lib\site-packages\bokeh\application\handlers\code_runner.py", line 231, in run
        exec(self._code, module.__dict__)
      File "C:\repos\private\awesome-panel\awesome_panel\apps\py3dmol.py", line 4, in <module>
        from panel_chemistry.pane import Py3DMol
      File "c:\repos\private\awesome-panel\.venv\lib\site-packages\panel_chemistry\pane\__init__.py", line 6, in <module>
        from .ngl_viewer import NGLViewer
      File "c:\repos\private\awesome-panel\.venv\lib\site-packages\panel_chemistry\pane\ngl_viewer.py", line 15, in <module>
        from panel.util import lazy_load, string_types
    ImportError: cannot import name 'string_types' from 'panel.util' (c:\repos\private\awesome-panel\.venv\lib\site-packages\panel\util.py)
    
    opened by MarcSkovMadsen 1
  • Align teaser .gif video with awesome-panel-cli video

    Align teaser .gif video with awesome-panel-cli video

    Request

    Align the panel-chemistry intro video

    with the awesome-panel-cli video

    Motivation

    • I think the awesome-panel-cli video communicates better.
    • I would like the same look and feel across awesome-panel projects.

    Drawbacks

    Takes time.

    Alternatives

    Keep it as it is.

    Additional Context

    The panel-chemistry video is

    https://github.com/awesome-panel/panel-chemistry/blob/main/assets/panel-chemistry-teaser.gif

    The awesome-panel-cli video is

    https://github.com/awesome-panel/awesome-panel-cli/blob/main/assets/videos/awesome-panel-cli-intro.gif

    documentation enhancement good first issue 
    opened by MarcSkovMadsen 0
  • Add NGL Molecule Viewer

    Add NGL Molecule Viewer

    PyHDX has an existing NGL Molecule Viewer which is ok to copy or get inspiration from.

    https://github.com/Jhsmit/PyHDX/blob/master/dev/bokeh_extension.py

    https://twitter.com/Jhsmit_/status/1398233190519693317

    image

    opened by MarcSkovMadsen 3
Releases(v0.0.6)
  • v0.0.6(May 25, 2021)

    Added guicolor and improved reference notebook of JSME Editor

    https://user-images.githubusercontent.com/42288570/119439642-13e1c400-bd23-11eb-8ad3-7826a030c771.mp4

    Source code(tar.gz)
    Source code(zip)
  • v0.0.5(May 24, 2021)

    In this release

    • a first version of the JSMEEditor is included.
      • We created a draft of a nice reference notebook.
    • we released the first panel-chemistry package to Pypi. Check out https://pypi.org/project/panel-chemistry/
    • We improved the look and feel of the project

    jsme-editor-x1-5

    Source code(tar.gz)
    Source code(zip)
  • v0.0.3(May 23, 2021)

    This release add a JSME Editor Widget. But only as a dummy widget.

    The idea is to demonstrate that the easiest way to add a new Bokeh/ Panel extension is to start as simple as possible. And that is to copy some existing small component, refactor minimally, build and test it works. Then you can start refactoring and extending the component.

    image

    You can see how this was implemented in this video https://youtu.be/AA8qIY_zrbA

    Supplementary written documentation can be found in

    Source code(tar.gz)
    Source code(zip)
  • v0.0.2(May 23, 2021)

  • v0.0.1(May 22, 2021)

    This Release provides the basic structure of a HoloViz Panel Extensions project. This includes

    • A nice CLI based on Python Invoke
    • Automated tests on pull requests and pushes to the main branch based on Github Actions.
    • A nice setup for Binder including example notebooks, panel apps served and VS Code server.
    • A nice setup.py file for release to PyPi.
    Source code(tar.gz)
    Source code(zip)
Owner
Marc Skov Madsen
Data, Models and Analytics Ninja. PhD, CFA® and Lead Data Scientist Developer at Ørsted. Developer of awesome-panel.org and awesome-streamlit.org
Marc Skov Madsen
Evaluation of a Monocular Eye Tracking Set-Up

Evaluation of a Monocular Eye Tracking Set-Up As part of my master thesis, I implemented a new state-of-the-art model that is based on the work of Che

Pascal 19 Dec 17, 2022
A 2-dimensional physics engine written in Cairo

A 2-dimensional physics engine written in Cairo

Topology 38 Nov 16, 2022
Powerful, efficient particle trajectory analysis in scientific Python.

freud Overview The freud Python library provides a simple, flexible, powerful set of tools for analyzing trajectories obtained from molecular dynamics

Glotzer Group 195 Dec 20, 2022
Parses data out of your Google Takeout (History, Activity, Youtube, Locations, etc...)

google_takeout_parser parses both the Historical HTML and new JSON format for Google Takeouts caches individual takeout results behind cachew merge mu

Sean Breckenridge 27 Dec 28, 2022
In this tutorial, raster models of soil depth and soil water holding capacity for the United States will be sampled at random geographic coordinates within the state of Colorado.

Raster_Sampling_Demo (Resulting graph of this demo) Background Sampling values of a raster at specific geographic coordinates can be done with a numbe

2 Dec 13, 2022
A DSL for data-driven computational pipelines

"Dataflow variables are spectacularly expressive in concurrent programming" Henri E. Bal , Jennifer G. Steiner , Andrew S. Tanenbaum Quick overview Ne

1.9k Jan 03, 2023
t-SNE and hierarchical clustering are popular methods of exploratory data analysis, particularly in biology.

tree-SNE t-SNE and hierarchical clustering are popular methods of exploratory data analysis, particularly in biology. Building on recent advances in s

Isaac Robinson 61 Nov 21, 2022
Toolchest provides APIs for scientific and bioinformatic data analysis.

Toolchest Python Client Toolchest provides APIs for scientific and bioinformatic data analysis. It allows you to abstract away the costliness of runni

Toolchest 11 Jun 30, 2022
VevestaX is an open source Python package for ML Engineers and Data Scientists.

VevestaX Track failed and successful experiments as well as features. VevestaX is an open source Python package for ML Engineers and Data Scientists.

Vevesta 24 Dec 14, 2022
Display the behaviour of a realtime program with a scope or logic analyser.

1. A monitor for realtime MicroPython code This library provides a means of examining the behaviour of a running system. It was initially designed to

Peter Hinch 17 Dec 05, 2022
Datashader is a data rasterization pipeline for automating the process of creating meaningful representations of large amounts of data.

Datashader is a data rasterization pipeline for automating the process of creating meaningful representations of large amounts of data.

HoloViz 2.9k Jan 06, 2023
PySpark bindings for H3, a hierarchical hexagonal geospatial indexing system

h3-pyspark: Uber's H3 Hexagonal Hierarchical Geospatial Indexing System in PySpark PySpark bindings for the H3 core library. For available functions,

Kevin Schaich 12 Dec 24, 2022
BErt-like Neurophysiological Data Representation

BENDR BErt-like Neurophysiological Data Representation This repository contains the source code for reproducing, or extending the BERT-like self-super

114 Dec 23, 2022
This module is used to create Convolutional AutoEncoders for Variational Data Assimilation

VarDACAE This module is used to create Convolutional AutoEncoders for Variational Data Assimilation. A user can define, create and train an AE for Dat

Julian Mack 23 Dec 16, 2022
My solution to the book A Collection of Data Science Take-Home Challenges

DS-Take-Home Solution to the book "A Collection of Data Science Take-Home Challenges". Note: Please don't contact me for the dataset. This repository

Jifu Zhao 1.5k Jan 03, 2023
Zipline, a Pythonic Algorithmic Trading Library

Zipline is a Pythonic algorithmic trading library. It is an event-driven system for backtesting. Zipline is currently used in production as the backte

Quantopian, Inc. 15.7k Jan 07, 2023
Code for the DH project "Dhimmis & Muslims – Analysing Multireligious Spaces in the Medieval Muslim World"

Damast This repository contains code developed for the digital humanities project "Dhimmis & Muslims – Analysing Multireligious Spaces in the Medieval

University of Stuttgart Visualization Research Center 2 Jul 01, 2022
Yet Another Workflow Parser for SecurityHub

YAWPS Yet Another Workflow Parser for SecurityHub "Screaming pepper" by Rum Bucolic Ape is licensed with CC BY-ND 2.0. To view a copy of this license,

myoung34 8 Dec 22, 2022
Py-price-monitoring - A Python price monitor

A Python price monitor This project was focused on Brazil, so the monitoring is

Samuel 1 Jan 04, 2022
A Python package for Bayesian forecasting with object-oriented design and probabilistic models under the hood.

Disclaimer This project is stable and being incubated for long-term support. It may contain new experimental code, for which APIs are subject to chang

Uber Open Source 1.6k Dec 29, 2022