🧪 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
Exploratory Data Analysis for Employee Retention Dataset

Exploratory Data Analysis for Employee Retention Dataset Employee turn-over is a very costly problem for companies. The cost of replacing an employee

kana sudheer reddy 2 Oct 1, 2021
Exploratory data analysis

Exploratory data analysis An Exploratory data analysis APP TAPIWA CHAMBOKO ?? About Me I'm a full stack developer experienced in deploying artificial

tapiwa chamboko 1 Nov 7, 2021
DefAP is a program developed to facilitate the exploration of a material's defect chemistry

DefAP is a program developed to facilitate the exploration of a material's defect chemistry. A large number of features are provided and rapid exploration is supported through the use of autoplotting with carefully considered automatic data labelling and simplification options enabling production of publication quality plots.

null 6 Oct 25, 2022
A powerful data analysis package based on mathematical step functions. Strongly aligned with pandas.

The leading use-case for the staircase package is for the creation and analysis of step functions. Pretty exciting huh. But don't hit the close button

null 48 Dec 21, 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
Gathering data of likes on Tinder within the past 7 days

tinder_likes_data Gathering data of Likes Sent on Tinder within the past 7 days. Versions November 25th, 2021 - Functionality to get the name and age

Alex Carter 12 Jan 5, 2023
Additional tools for particle accelerator data analysis and machine information

PyLHC Tools This package is a collection of useful scripts and tools for the Optics Measurements and Corrections group (OMC) at CERN. Documentation Au

PyLHC 3 Apr 13, 2022
Tools for the analysis, simulation, and presentation of Lorentz TEM data.

ltempy ltempy is a set of tools for Lorentz TEM data analysis, simulation, and presentation. Features Single Image Transport of Intensity Equation (SI

McMorran Lab 1 Dec 26, 2022
Visions provides an extensible suite of tools to support common data analysis operations

Visions And these visions of data types, they kept us up past the dawn. Visions provides an extensible suite of tools to support common data analysis

null 168 Dec 28, 2022
Universal data analysis tools for atmospheric sciences

U_analysis Universal data analysis tools for atmospheric sciences Script written in python 3. This file defines multiple functions that can be used fo

Luis Ackermann 1 Oct 10, 2021
Data cleaning tools for Business analysis

Datacleaning datacleaning tools for Business analysis This program is made for Vicky's work. You can use it, too. 数据清洗 该数据清洗工具是为了商业分析 这个程序是为了Vicky的工作而

Lin Jian 3 Nov 16, 2021
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

null 2 Dec 13, 2022
Statistical Analysis 📈 focused on statistical analysis and exploration used on various data sets for personal and professional projects.

Statistical Analysis ?? This repository focuses on statistical analysis and the exploration used on various data sets for personal and professional pr

Andy Pham 1 Sep 3, 2022
This mini project showcase how to build and debug Apache Spark application using Python

Spark app can't be debugged using normal procedure. This mini project showcase how to build and debug Apache Spark application using Python programming language. There are also options to run Spark application on Spark container

Denny Imanuel 1 Dec 29, 2021
A set of functions and analysis classes for solvation structure analysis

SolvationAnalysis The macroscopic behavior of a liquid is determined by its microscopic structure. For ionic systems, like batteries and many enzymes,

MDAnalysis 19 Nov 24, 2022
simple way to build the declarative and destributed data pipelines with python

unipipeline simple way to build the declarative and distributed data pipelines. Why you should use it Declarative strict config Scaffolding Fully type

aliaksandr-master 0 Jan 26, 2022
A Pythonic introduction to methods for scaling your data science and machine learning work to larger datasets and larger models, using the tools and APIs you know and love from the PyData stack (such as numpy, pandas, and scikit-learn).

This tutorial's purpose is to introduce Pythonistas to methods for scaling their data science and machine learning work to larger datasets and larger models, using the tools and APIs they know and love from the PyData stack (such as numpy, pandas, and scikit-learn).

Coiled 102 Nov 10, 2022
Renato 214 Jan 2, 2023
Recommendations from Cramer: On the show Mad-Money (CNBC) Jim Cramer picks stocks which he recommends to buy. We will use this data to build a portfolio

Backtesting the "Cramer Effect" & Recommendations from Cramer Recommendations from Cramer: On the show Mad-Money (CNBC) Jim Cramer picks stocks which

Gábor Vecsei 12 Aug 30, 2022