Skip to main content

Synthetic accessibility scoring from RDKit Contrib SA_Score

Project description

neoralab-sascorer

License Python PyPI Docs

Synthetic accessibility scoring banner

A small, pip-installable wrapper around RDKit's Contrib/SA_Score implementation for computing the synthetic accessibility (SA) score.

📚 Documentation: See the MkDocs site content in docs/index.md.

Features

  • Simple Python API for SMILES or RDKit molecule inputs.
  • CLI for quick SA score checks from the shell.
  • Lightweight packaging with dynamic versioning from git tags.

Requirements

  • Python 3.8+
  • RDKit (install via conda or ensure a compatible wheel is available for your platform)

Installation

Dependency: This package requires RDKit. pip install neoralab-sascorer expects an RDKit wheel to be available for your platform. If you prefer conda, you can install RDKit via conda and then install this package.

Editable install from this repo:

uv pip install -e .

The fpscores.pkl.gz fragment score file must be present in neoralab-sascorer/src/neoralab_sascorer/ (it is distributed with RDKit's Contrib/SA_Score and should be copied in before building a wheel).

Usage

Python API

from neoralab_sascorer import sa_score

score = sa_score("CC(=O)Oc1ccccc1C(=O)O")
print(score)
from rdkit import Chem
from neoralab_sascorer import sa_score_mol

mol = Chem.MolFromSmiles("CC(=O)Oc1ccccc1C(=O)O")
print(sa_score_mol(mol))

CLI

neoralab-sascorer "CC(=O)Oc1ccccc1C(=O)O"

Output format:

<SMILES>\t<score>

Development

Versioning

This project uses versioningit to derive versions from git tags. For example, a commit after the 0.1.0 tag will produce a version like 0.1.0.dev3.

Pre-commit

Install and run pre-commit hooks locally:

uv pip install pre-commit
pre-commit install
pre-commit run --all-files

Attribution

This package bundles the SA_Score implementation and data originally distributed in RDKit's Contrib/SA_Score, based on the method described by Ertl and Schuffenhauer ("Estimation of synthetic accessibility score of drug-like molecules based on molecular complexity and fragment contributions", J. Cheminformatics 1:8, 2009).

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

neoralab_sascorer-0.1.1.tar.gz (3.9 MB view details)

Uploaded Source

Built Distribution

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

neoralab_sascorer-0.1.1-py3-none-any.whl (3.9 MB view details)

Uploaded Python 3

File details

Details for the file neoralab_sascorer-0.1.1.tar.gz.

File metadata

  • Download URL: neoralab_sascorer-0.1.1.tar.gz
  • Upload date:
  • Size: 3.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for neoralab_sascorer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 938d738afdd0ab6fee093763de02c43e31c408d25e34f70b07cb482ae9d97a3f
MD5 4eef1431af859434a6fa496c1cea4885
BLAKE2b-256 4a3f0dbab7aa64a6b36d0b4fbe099c68b9325f2f8f9f9e1a99031ddcf4fb0492

See more details on using hashes here.

File details

Details for the file neoralab_sascorer-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for neoralab_sascorer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cedd974cf9de094d8aee6fc177bae33d52689abfb8bc5bc5c77526978b6934aa
MD5 99ca2be99b557ccce6108595dae5c6a9
BLAKE2b-256 dfe9b9e104bddb8bf95547f7bfb8262343528a1a55a768cecb9c21f712ae29fc

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