marimo-chem-utils
A collection of cheminformatics utility functions for use with marimo, an open-source reactive notebook for Python.
Installation
You can install marimo-chem-utils using pip:
pip install marimo-chem-utils
Usage
Here is an example of how to use some of the functions in this library.
import pandas as pd
import marimo as mo
from marimo_chem_utils import (
add_fingerprint_column,
add_image_column,
add_inchi_key_column,
add_tsne_columns,
interactive_chart
)
# Load some data
df = pd.read_csv("https://raw.githubusercontent.com/PatWalters/datafiles/refs/heads/main/carbonic.csv")
# Add fingerprints, images, and InChI keys
df = add_fingerprint_column(df, fp_type="counts_fp")
df = add_image_column(df, smiles_column="SMILES")
df = add_inchi_key_column(df, smiles_column="SMILES")
# Generate t-SNE coordinates
df = add_tsne_columns(df)
# Create an interactive plot
chart = interactive_chart(df, x_col="TSNE_x", y_col="TSNE_y", color_col="PIC50", image_col="image")
# In a marimo cell, you would display the chart like this:
# mo.ui.altair_chart(chart)
This will create a pandas.DataFrame with additional columns for fingerprints, images, and InChI keys, and then generate an interactive t-SNE plot that you can explore in your marimo notebook. The plot will display molecule images in the tooltips.
Examples
The examples directory contains marimo notebooks that demonstrate how to use marimo-chem-utils. You can run them from the command line.
- scatterplot.py: An interactive scatterplot that shows chemical structures as tooltips. Selections on the plot are used to display a grid of molecules.
marimo edit examples/scatterplot.py
- clustering.py: An example of clustering molecules and viewing the cluster members.
marimo edit examples/clustering.py
Metadata
Release files for marimo-chem-utils 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| marimo_chem_utils-0.2.4.tar.gz | 5.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| marimo_chem_utils-0.2.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.0 kB
Release files / marimo_chem_utils-0.2.4.tar.gz
| Download URL | marimo_chem_utils-0.2.4.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a6b74d070403d277e204db8fd352305fe19b4675db6cd0b2b7c9dba828e2090b
|
|
BLAKE2b-256 checksum How to use checksums |
116e4f28b9b0b8ffbf9bc91e445b410a2b71f876e66775061a32ffb7e274fadc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / marimo_chem_utils-0.2.4-py3-none-any.whl
| Download URL | marimo_chem_utils-0.2.4-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6bbe9259f019bf8693e3611de0b3fa91758e39d34e20028e732298f7a854262c
|
|
BLAKE2b-256 checksum How to use checksums |
91a3c146035b43067b817a0dd3e6329712170b76eda5d96275fb5120db889a02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|