Skip to main content

No project description provided

Project description

check PyPI version PyPI Supported Python Versions

altmol

altmol enhances Altair visualizations by integrating interactive 2D molecular structures, leveraging RDKit for rendering. This package is inspired by the capabilities of molplotly.

Beautiful :) Beautiful :)

Installation

altmol can be easily installed using pip or poetry, accommodating both traditional and modern Python workflows.

Using pip

pip install altmol

Using Poetry

If you're managing your project with Poetry, add altmol to your project using:

poetry add altmol

Alternatively, you can manually add it to your pyproject.toml and then install it using:

poetry install

Quick Start

To get started with altmol, ensure you have Altair and RDKit installed in your environment. Here's a simple example to illustrate how to create an interactive scatter plot with molecule visualizations:

import altair as alt
import pandas as pd

from altmol.plot import chem_plot
from altmol.chem import encode_molecules

# URL of the ESOL dataset
url_esol = 'https://raw.githubusercontent.com/deepchem/deepchem/master/datasets/delaney-processed.csv'

# Load your dataset
df = pd.read_csv(url_esol)

# Prepare your data (ensure you have a 'smiles' column for molecular structures)
df = encode_molecules(df, smiles_col_name='smiles', img_format='svg')

x_col_name = "measured log solubility in mols per litre"
y_col_name = "ESOL predicted log solubility in mols per litre"

# Generate and display the interactive plot
chart = chem_plot(
    df,
    x_axis=alt.X(f"{x_col_name}:Q", title="True Log solubility"),
    y_axis=alt.Y(f"{y_col_name}:Q", title="Pred Log solubility"),
    tooltip=[x_col_name, y_col_name],
    selector=False,
    interactive=False,
    title="ESOL Regression"
)
chart.display()

Contributing

Contributions to altmol are welcome! Whether it's bug reports, feature requests, or contributions to the code, we value your input.

License

altmol is released under the MIT License. See the LICENSE file for more details.

Acknowledgements

altmol is built upon the powerful capabilities of RDKit and Altair, and we are grateful to the developers and contributors of these projects.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

altmol-0.2.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

altmol-0.2.2-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file altmol-0.2.2.tar.gz.

File metadata

  • Download URL: altmol-0.2.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for altmol-0.2.2.tar.gz
Algorithm Hash digest
SHA256 90173da9975067dcaf6d125eebe9b5be8d2189add52a931396e5aa9f111a9eee
MD5 a92b9ec3d3e417f79c275835cd71d69d
BLAKE2b-256 10c4403265f5e9fedd0e2f53e716b1772f99393c0ce2c4ec4bc6b0d5d332d405

See more details on using hashes here.

File details

Details for the file altmol-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: altmol-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for altmol-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3f34db3f2cd62566a8af0894538d4d55e48fdc540d1673a2ece0fd1225a55654
MD5 3552ab60909b55479e3bfa3395fc81d2
BLAKE2b-256 94b953497ecd8327b2a91453e42cd44c152e43a1cb7cf22d1b16d387c3060530

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page