Skip to content

terraytherapeutics/streamlit-ketcher

 
 

Repository files navigation

🧪 Streamlit Ketcher

GitHub PyPI

Streamlit components that adds the ability to draw chemical compounds. This is a critical dependency for most drug discovery / drug design / cheminformatics applications.

It is based on Ketcher.

Installation

pip install streamlit-ketcher

Getting started

import streamlit as st

from streamlit_ketcher import st_ketcher

molecule = st.text_input("Molecule", "CCO")
smile_code = st_ketcher(molecule)
st.markdown(f"Smile code: ``{smile_code}``")

Development Notes

To setup the dev server, cd frontend and run yarn install --frozen-lockfile to reproduce the dev environment exactly. Then run yarn start to start a local server.

Simple unit tests can be run with pytest tests/.

To install in editable mode locally (to run integration tests), cd frontend and run yarn build before running pip install -e . Integration tests also require setting up playwright (installed from dev-requirements.txt). Install browsers with playwright install after pip reqs are downloaded. Afterwards, run pytest e2e/.

Demo

Open in Streamlit

Preview

About

Tweaks and improvements to streamlit_ketcher.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 57.3%
  • TypeScript 38.2%
  • HTML 2.5%
  • Other 2.0%