Giter Club home page Giter Club logo

datamol's Introduction

Molecular Manipulation Made Easy


DOI Binder PyPI Conda PyPI - Downloads Conda PyPI - Python Version license GitHub Repo stars GitHub Repo stars Codecov

Datamol is a python library to work with molecules. It's a layer built on top of RDKit and aims to be as light as possible.

  • ๐Ÿ Simple pythonic API
  • โš—๏ธ RDKit first: all you manipulate are rdkit.Chem.Mol objects.
  • โœ… Manipulating molecules often rely on many options; Datamol provides good defaults by design.
  • ๐Ÿง  Performance matters: built-in efficient parallelization when possible with optional progress bar.
  • ๐Ÿ•น๏ธ Modern IO: out-of-the-box support for remote paths using fsspec to read and write multiple formats (sdf, xlsx, csv, etc).

Try Online

Visit Binder and try Datamol online.

Documentation

Visit https://doc.datamol.io.

Installation

Use conda:

mamba install -c conda-forge datamol

Quick API Tour

import datamol as dm

# Common functions
mol = dm.to_mol("O=C(C)Oc1ccccc1C(=O)O", sanitize=True)
fp = dm.to_fp(mol)
selfies = dm.to_selfies(mol)
inchi = dm.to_inchi(mol)

# Standardize and sanitize
mol = dm.to_mol("O=C(C)Oc1ccccc1C(=O)O")
mol = dm.fix_mol(mol)
mol = dm.sanitize_mol(mol)
mol = dm.standardize_mol(mol)

# Dataframe manipulation
df = dm.data.freesolv()
mols = dm.from_df(df)

# 2D viz
legends = [dm.to_smiles(mol) for mol in mols[:10]]
dm.viz.to_image(mols[:10], legends=legends)

# Generate conformers
smiles = "O=C(C)Oc1ccccc1C(=O)O"
mol = dm.to_mol(smiles)
mol_with_conformers = dm.conformers.generate(mol)

# 3D viz (using nglview)
dm.viz.conformers(mol, n_confs=10)

# Compute SASA from conformers
sasa = dm.conformers.sasa(mol_with_conformers)

# Easy IO
mols = dm.read_sdf("s3://my-awesome-data-lake/smiles.sdf", as_df=False)
dm.to_sdf(mols, "gs://data-bucket/smiles.sdf")

How to cite

Please cite Datamol if you use it in your research: DOI.

Compatibilities

Version compatibilities are an essential topic for production-software stacks. We are cautious about documenting compatibility between datamol, python and rdkit.

See below the associated versions of Python and RDKit, for which a minor version of Datamol has been tested during its whole lifecycle.

datamol python rdkit
0.7 [3.8, 3.9] [2021.09, 2022.03]
0.6 [3.8, 3.9] [2021.09]
0.5 [3.8, 3.9] [2021.03, 2021.09]
0.4 [3.8, 3.9] [2020.09, 2021.03]
0.3 [3.8, 3.9] [2020.09, 2021.03]

CI Status

The CI run tests and perform code quality checks for the following combinations:

  • The three major platforms: Windows, OSX and Linux.
  • The two latest Python versions.
  • The two latest RDKit versions.
main
Lib build & Testing GitHub Workflow Status
Code Sanity (linting and type analysis) GitHub Workflow Status
Documentation Build GitHub Workflow Status

Changelogs

See the latest changelogs at CHANGELOG.rst.

License

Under the Apache-2.0 license. See LICENSE.

Authors

See AUTHORS.rst.

datamol's People

Contributors

craigmichaelm avatar deepsource-autofix[bot] avatar deepsourcebot avatar hadim avatar ishan-kumar2 avatar maclandrol avatar mercuryseries avatar michelml avatar therence1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.