Code Monkey home page Code Monkey logo

awesome-panel / panel-chemistry Goto Github PK

View Code? Open in Web Editor NEW
115.0 6.0 16.0 45.79 MB

๐Ÿงช๐Ÿ“ˆ ๐Ÿ. The purpose of the panel-chemistry project is to make it really easy for you to do DATA ANALYSIS and build powerful DATA AND VIZ APPLICATIONS within the domain of Chemistry using using Python and HoloViz Panel.

License: MIT License

Python 70.70% Shell 0.40% TypeScript 28.90%
panel datavisualization python chemistry data-science molecule dataexploration

panel-chemistry's Introduction

๐Ÿงช Panel-Chemistry

Follow on Twitter Follow on LinkedIn

We want to

  • make it super simple to do exploratory data analysis and develop high-quality Panel data apps within the domain of chemistry.

We provide

  • the panel-chemistry python package of chemistry components for Panel.
  • example notebooks and data apps.

Panel Chemistry Intro

๐Ÿš€ Get started in under a minute

You can install the package with pip

pip install panel-chemistry[examples]

Explore the sample apps

pn hello panel-chemistry

You can now find the reference notebooks in the examples/awesome-panel/panel-chemistry folder. Check them out by running jupyter lab.

๐Ÿ“’ Explore the examples online

Click one of the buttons

nbviewer Binder

๐Ÿƒ Serve a data app

Add the below to a python file or notebook

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()

Run panel serve name_of_app.py or panel_serve name_of_notebook.ipynb.

JSME Editor

Install with conda

conda install -c conda-forge panel-chemistry

โญ Support

Please support Panel and awesome-panel by giving the projects a star on Github:

Thanks

โค๏ธ Contribute

You can find good first issues in the issue tracker. To get started check out the DEVELOPER_GUIDE.

I would love to support and receive your contributions. Thanks.

Hacktober Fest.

๐Ÿ–ฅ๏ธ Monitor

PyPI version Downloads Python Versions License Test Results Binder

panel-chemistry's People

Contributors

ea42gh avatar jhsmit avatar marcskovmadsen avatar sebaztiano avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

panel-chemistry's Issues

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.

Deploy first version of Package

We should deploy a first, simple version of the package in order to "reserve" the package name on PyPi.

The plan is to use a setup.py file, twine and manual upload similar to what is done at panel-highcharts.

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?

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)

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.

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.

Ketcher editor

Request

It would be nice to have Ketcher component in Panel, with bidirectional communication of SMILES strings (Python -> Editor and Editor -> Python), as well as editor's Selection and Highlight.

Motivation

An easy-to-use editor could enable some nice applications: calculate properties as user draws molecules (e.g. GT4SD), enable AI copilot-style applications where AI proposes modifications, or collect human feedback on which parts of molecules would be "flagged" by chemists for undesirable properties.

Drawbacks

No response

Alternatives

Ketcher is quite similar to JSME, however, JSME interface "feels" quite outdated. There is Ketcher in Streamlit and Ketcher in Gradio (and Gradio implementation looks surprisingly short).

Additional Context

I got a few questions. Would panel-chemistry be a suitable "home" for Ketcher Panel component, or should it have its own repo? From PR #41 it looks like panel-chemistry does not yet support the latest Panel version, if that is correct, how difficult is it to upgrade?

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

Setup initial project structure and tools

The structure of the project will be the same as the panel-highcharts project and package until something else is decided. I.e. we use

  • binder to provide an easy to use environment for trying, learning, exploring and using the packing. See.
  • Python Invoke to easily run build, test etc tasks. See
    • This includes includes running isort, autoflake, black, pylint, mypy and pytest and making sure all test should pass before merging to main branch. This will keep the code and package working and maintainable.
  • Provide documentation via this README and an examples folder of notebooks. See

Maybe later we improve it further

  • Add CI/ CD on Github to build, test and deploy the package. (I have not tried this before)
  • Add various badges (I have not tried this before).
  • Add documentation on read the docs. But not for now in order to keep things simple.

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.