🧪 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
Analysis scripts for QG equations

qg-edgeofchaos Analysis scripts for QG equations FIle/Folder Structure eigensolvers.py - Spectral and finite-difference solvers for Rossby wave eigenf

Norman Cao 2 Sep 27, 2022
Python-based Space Physics Environment Data Analysis Software

pySPEDAS pySPEDAS is an implementation of the SPEDAS framework for Python. The Space Physics Environment Data Analysis Software (SPEDAS) framework is

SPEDAS 98 Dec 22, 2022
Deep universal probabilistic programming with Python and PyTorch

Getting Started | Documentation | Community | Contributing Pyro is a flexible, scalable deep probabilistic programming library built on PyTorch. Notab

7.7k Dec 30, 2022
PyPSA: Python for Power System Analysis

1 Python for Power System Analysis Contents 1 Python for Power System Analysis 1.1 About 1.2 Documentation 1.3 Functionality 1.4 Example scripts as Ju

758 Dec 30, 2022
Very useful and necessary functions that simplify working with data

Additional-function-for-pandas Very useful and necessary functions that simplify working with data random_fill_nan(module_name, nan) - Replaces all sp

Alexander Goldian 2 Dec 02, 2021
Maximum Covariance Analysis in Python

xMCA | Maximum Covariance Analysis in Python The aim of this package is to provide a flexible tool for the climate science community to perform Maximu

Niclas Rieger 39 Jan 03, 2023
AptaMat is a simple script which aims to measure differences between DNA or RNA secondary structures.

AptaMAT Purpose AptaMat is a simple script which aims to measure differences between DNA or RNA secondary structures. The method is based on the compa

GEC UTC 3 Nov 03, 2022
Data Scientist in Simple Stock Analysis of PT Bukalapak.com Tbk for Long Term Investment

Data Scientist in Simple Stock Analysis of PT Bukalapak.com Tbk for Long Term Investment Brief explanation of PT Bukalapak.com Tbk Bukalapak was found

Najibulloh Asror 2 Feb 10, 2022
Python Implementation of Scalable In-Memory Updatable Bitmap Indexing

PyUpBit CS490 Large Scale Data Analytics — Implementation of Updatable Compressed Bitmap Indexing Paper Table of Contents About The Project Usage Cont

Hyeong Kyun (Daniel) Park 1 Jun 28, 2022
This is a tool for speculation of ancestral allel, calculation of sfs and drawing its bar plot.

superSFS This is a tool for speculation of ancestral allel, calculation of sfs and drawing its bar plot. It is easy-to-use and runing fast. What you s

3 Dec 16, 2022
Full ELT process on GCP environment.

Rent Houses Germany - GCP Pipeline Project: The goal of the project is to extract data about house rentals in Germany, store, process and analyze it u

Felipe Demenech Vasconcelos 2 Jan 20, 2022
Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis

Validated, scalable, community developed variant calling, RNA-seq and small RNA analysis. You write a high level configuration file specifying your in

Blue Collar Bioinformatics 917 Jan 03, 2023
An interactive grid for sorting, filtering, and editing DataFrames in Jupyter notebooks

qgrid Qgrid is a Jupyter notebook widget which uses SlickGrid to render pandas DataFrames within a Jupyter notebook. This allows you to explore your D

Quantopian, Inc. 2.9k Jan 08, 2023
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
Elementary is an open-source data reliability framework for modern data teams. The first module of the framework is data lineage.

Data lineage made simple, reliable, and automated. Effortlessly track the flow of data, understand dependencies and analyze impact. Features Visualiza

898 Jan 09, 2023
The official repository for ROOT: analyzing, storing and visualizing big data, scientifically

About The ROOT system provides a set of OO frameworks with all the functionality needed to handle and analyze large amounts of data in a very efficien

ROOT 2k Dec 29, 2022
Data collection, enhancement, and metrics calculation.

l3_data_collection Data collection, enhancement, and metrics calculation. Summary Repository containing code for QuantDAO's JDT data collection task.

Ruiwyn 3 Dec 23, 2022
API>local_db>AWS_RDS - Disclaimer! All data used is for educational purposes only.

APIlocal_dbAWS_RDS Disclaimer! All data used is for educational purposes only. ETL pipeline diagram. Aim of project By creating a fully working pipe

0 Apr 25, 2022
ETL pipeline on movie data using Python and postgreSQL

Movies-ETL ETL pipeline on movie data using Python and postgreSQL Overview This project consisted on a automated Extraction, Transformation and Load p

Juan Nicolas Serrano 0 Jul 07, 2021
Data Analytics on Genomes and Genetics

Data Analytics performed on On genomes and Genetics dataset to predict genetic disorder and disorder subclass. DONE by TEAM SIGMA!

1 Jan 12, 2022