StreamJSME is a Streamlit component that use JSME to draw 2D molecules and use them on your Streamlit app
Project description
This package is intended to be used as a Molecule Draw component on Streamlit applications. It uses jsme-react.
Build |
|
Source Code |
|
Python Versions |
|
Dependencies |
|
License |
|
Downloads |
Installation
pip install StreamJSME
Use
from StreamJSME import StreamJSME
from rdkit import Chem
from rdkit.Chem import Descriptors
from rdkit.Chem import Draw
from io import BytesIO
import streamlit as st
st.title('✍️ molecules with JSME in Streamlit 🤩')
# Create a first plot with an input SMILES, by default smiles = 'C'
update_smiles = StreamJSME(smiles='CCC')
st.subheader('Using the draw molecule inside RDKit')
st.write(f"New SMILES = {update_smiles}")
mol = Chem.MolFromSmiles(update_smiles)
st.write(f"MolLogP = {Descriptors.MolLogP(mol)}\n\nTPSA = {Descriptors.TPSA(mol)}")
st.subheader('Getting the RDKit image')
img = Draw.MolToImage(mol)
bio = BytesIO()
img.save(bio, format='png')
st.image(img)
If trying to run the Streamlit application you get OSError: [Errno 28] inotify watch limit reached, just use the flag --server.fileWatcherType none:
streamlit run app.py --server.fileWatcherType none
Issues
If you have found a bug, please open an issue on the GitHub Issues.
Discussion
If you have questions on how to use StreamJSME, or if you want to give feedback or share ideas and new features, please head to the GitHub Discussions.
Acknowledgment
See the full list of contributors in the CONTRIBUTORS.md file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file streamjsme-0.1.0.tar.gz.
File metadata
- Download URL: streamjsme-0.1.0.tar.gz
- Upload date:
- Size: 100.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
185b0641770080934c96f2b5db6e761f69b91f3af4ec2298bbd555a160443050
|
|
| MD5 |
bf160800911e3d70fbf0cb8b9bcee63b
|
|
| BLAKE2b-256 |
df2941bc51b5a542fabbe7c8e196662e77166be3d6326c824a27ed2bb6fe092f
|
File details
Details for the file streamjsme-0.1.0-py3-none-any.whl.
File metadata
- Download URL: streamjsme-0.1.0-py3-none-any.whl
- Upload date:
- Size: 100.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8eac49881e8c4736b3cb4fc9821a18ec857de4ede4bdcac366745f1b39d8898c
|
|
| MD5 |
f74aaf36f1578d0779b9000abb8af00a
|
|
| BLAKE2b-256 |
77f9226c9a204d38c3c8458f947963aea371b2ea25a89b594292ef6def006b91
|