Skip to main content

Astrochem ML

https://img.shields.io/pypi/v/astrochem_ml.svg https://img.shields.io/travis/laserkelvin/astrochem_ml.svg Documentation Status

Doing astrochemistry with robots.

The astrochem_ml package is designed for bringing accessible cheminformatics to astrochemical discovery. The main features, some of which are currently active development, are interfaces to common operations using RDKit that are relevant to astrochemistry, and pre-trained embedding models ready for machine learning projects that combine molecules and astrophysics.

The plan is to deliver a general purpose library, in addition to providing a command line interface to several common tasks.

Installation

Not yet on PyPI, and so for now you can install astrochem_ml via:

`pip install git+https://github.com/laserkelvin/astrochem_ml`

Features

Molecule generation

A significant amount of functionality wraps the rdkit package, the main library for doing cheminformatics in Python. For all molecule interactions, we go back and forth between the native rdkit objects and SMILES/SMARTS strings.

  • Exhaustive isotopologue generation in SMILES

>>> from astrochem_ml.smiles import isotopes
# exhaustively enumerate all possible combinations isotopologues
# user can set the threshold for natural abundance and whether
# to include hydrogens
>>> isotopes.generate_all_isos("c1ccccc1", explicit_h=False)
['c1[13cH]c[13cH][13cH][13cH]1', ... 'c1ccccc1', '[13cH]1[13cH][13cH][13cH][13cH][13cH]1','c1c[13cH][13cH][13cH]c1']
  • Functional group substitutions

Replace substructures with other ones in a tree data structure!

>>> from astrochem_ml.smiles import MoleculeGenerator
# randomly grow out possible structures starting from benzene,
# and iteratively replace structures with other functional groups
>>> benzene = MoleculeGenerator("c1ccccc1", substructs=["c", "cC#N", "cC=O", "cN"])
>>> benzene.grow_tree(50)
100%|██████████████████████████████████████████████████████████████████| 50/50 [00:00<00:00, 237.44it/s]
>>> print(benzene)
c1ccccc1
├── Nc1ccccc1
├── N#Cc1ccccc1
└── O=Cc1ccccc1
├── Nc1ccccc1C=O
│   └── N#Cc1ccccc1C=O
├── Nc1cccc(C=O)c1
│   ├── Nc1cccc(C=O)c1N
│   │   ├── Nc1c(C=O)ccc(C=O)c1N
│   │   ├── Nc1cc(C=O)cc(C=O)c1N
...

This provides a high level interface to view every structure generated, and from which parent.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Metadata

Release files for astrochem-ml 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astrochem-ml 0.1.1
File Size Uploaded Provenance Actions
astrochem_ml-0.1.1.tar.gz 11.5 kB Without provenance Details for astrochem_ml-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for astrochem-ml 0.1.1
File Interpreter ABI Platform Actions
astrochem_ml-0.1.1-py3-none-any.whl Python 3 none any Details for astrochem_ml-0.1.1-py3-none-any.whl

Total release size: 24.7 kB

Release files / astrochem_ml-0.1.1.tar.gz

Download URL astrochem_ml-0.1.1.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9e54ebc4c420199f1cd240e5ef14ea743695bd87726bc7a1dd68b04f483696ac
BLAKE2b-256 checksum
How to use checksums
53776d496390001babc3eb40866c3103e09657cc9a11227325b5cd14a8208a67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.9.1 Linux/5.13.0-7620-generic

Release files / astrochem_ml-0.1.1-py3-none-any.whl

Download URL astrochem_ml-0.1.1-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b3053c872e0c3549e8e274ada63890e6f31a24a8c57ef63570dfc4d0aca5ff8
BLAKE2b-256 checksum
How to use checksums
8ba90ee183e046697729e2e517edb8f8741bc18e14f1fd346dac2fc73514de4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.9.1 Linux/5.13.0-7620-generic

Security for astrochem-ml 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page