Skip to main content

molbloom

Can I buy this molecule? Returns results in about 500 ns and consumes about 100MB of RAM (or 2 GB if using all ZINC20).

pip install molbloom
from molbloom import buy
buy('CCCO')
# True
buy('ONN1CCCC1')
# False

If buy returns True - it may be purchasable with a measured error rate of 0.0003. If it returns False - it is not purchasable. The catalog information is from ZINC20. Add canonicalize=True if your SMILES are not canonicalized (requires installing rdkit).

There are other available catalogs - see options with molbloom.catalogs(). Most catalogs require an initial download. buy('CCCO', catalog='zinc-instock-mini) doesn't require a download and is included in the package. Useful for testing, but has a high false positive rate of 1%.

Simple Reagents

By default, it will first check against common organic reagents like water, ether, etc. You can disable this check by adding check_common=False

Querying Small World

Just because buy returns True doesn't mean you can buy it -- you should follow-up with a real query at ZINC or you can use the search feature in SmallWorld to find similar purchasable molecules.

from smallworld_api import SmallWorld
sw = SmallWorld()

aspirin = 'O=C(C)Oc1ccccc1C(=O)O'
results = sw.search(aspirin, dist=5, db=sw.REAL_dataset)

this will query ZINC Small World.

Custom Filter

Do you have your own list of SMILES? There are two ways to build a filter -- you can use a C tool that is very fast (1M / s) if your SMILES are in a file and already canonical. Or you can use the Python API to programmaticaly build a filter and canonicalize as you go. See below

Once your custom filter is built:

from molbloom import BloomFilter
bf = BloomFilter('myfilter.bloom')
# usage:
'CCCO' in bf

Build with C Tool

You can build your own filter using the code in the tool/ directory.

cd tool
make
./molbloom-bloom <MB of final filter> <filter name> <approx number of compounds> <input file 1> <input file 2> ...

where each input file has SMILES on each line in the first column and is already canonicalized. The higher the MB, the lower the rate of false positives. If you want to choose the false positive rate rather than the size, you can use the equation:

$$ M = - \frac{N \ln \epsilon}{(\ln 2)^2} $$

where $M$ is the size in bits, $N$ is the number of compounds, and $\epsilon$ is the false positive rate.

Build with Python

You can also build a filter using python as follows:

from molbloom import CustomFilter, canon
bf = CustomFilter(size=100, n=1000, name='myfilter')
bf.add('CCCO')
# canonicalize one record
s = canon("CCCOC")
bf.add(s)
# finalize filter into a file
bf.save('test.bloom')

Citation

@article{medina2023bloom,
  title={Bloom filters for molecules},
  author={Medina, Jorge and White, Andrew D},
  journal={Journal of Cheminformatics},
  volume={15},
  number={1},
  pages={95},
  year={2023},
  publisher={Springer}
}

Metadata

Release files for molbloom 3.2.0

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

Source distribution (sdist)

Source distribution for molbloom 3.2.0
File Size Uploaded
molbloom-3.2.0.tar.gz 9.3 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for molbloom 3.2.0
File
molbloom-3.2.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
molbloom-3.2.0-cp313-cp313-win32.whl CPython 3.13 CPython 3.13 Windows x86-32 Details
molbloom-3.2.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.5+ x86-64, Linux glibc 2.17+ x86-64 Details
molbloom-3.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.13 CPython 3.13 Linux glibc 2.5+ x86-32, Linux glibc 2.17+ x86-32 Details
molbloom-3.2.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
molbloom-3.2.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
molbloom-3.2.0-cp312-cp312-win32.whl CPython 3.12 CPython 3.12 Windows x86-32 Details
molbloom-3.2.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.5+ x86-64, Linux glibc 2.17+ x86-64 Details
molbloom-3.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.12 CPython 3.12 Linux glibc 2.5+ x86-32, Linux glibc 2.17+ x86-32 Details
molbloom-3.2.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
molbloom-3.2.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
molbloom-3.2.0-cp311-cp311-win32.whl CPython 3.11 CPython 3.11 Windows x86-32 Details
molbloom-3.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.5+ x86-64, Linux glibc 2.17+ x86-64 Details
molbloom-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-32, Linux glibc 2.5+ x86-32 Details
molbloom-3.2.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details

Total release size: 148.6 MB

Release files / molbloom-3.2.0.tar.gz

Download URL molbloom-3.2.0.tar.gz
Size 9.3 MB
Tags Source
SHA-256 checksum
How to use checksums
ff73be3f31c3214b04033ea148a5781f66fb5a512b0641f90c35507d2c5aca82
BLAKE2b-256 checksum
How to use checksums
f0a55f116881a548b65a8151eda981d1546a751577335a0fcf9631382684e7ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp313-cp313-win_amd64.whl

Download URL molbloom-3.2.0-cp313-cp313-win_amd64.whl
Size 9.2 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
e18482ea9802467c5388748f300d0881f2a7a7c293443ad5b5dc9b97b54a0ca1
BLAKE2b-256 checksum
How to use checksums
af91009790db69cc2777d62ed0574017066fba2f1462f3cec01c486b543bad73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp313-cp313-win32.whl

Download URL molbloom-3.2.0-cp313-cp313-win32.whl
Size 9.2 MB
Tags CPython 3.13 Windows x86-32
SHA-256 checksum
How to use checksums
e11481c12072284b97d0dd6d9a4c0583b03f4a3bad5a4a082c958f5323e828ab
BLAKE2b-256 checksum
How to use checksums
2037583c14c1217d390132da54c04ada1899ff09d6e5f8064755822454e60cf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL molbloom-3.2.0-cp313-cp313-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 9.4 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
e63635eddb6c380804b008cc8783c048e31d6acd9cb3bc393469c6fdaeb104a6
BLAKE2b-256 checksum
How to use checksums
70605cf47040e66c1370b366b9658ca600872333cb06772a4ec823866b1b925a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL molbloom-3.2.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 9.3 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
039a854334e76345283ca1edff7cde23068645f8c03446339b85a51fd0b70940
BLAKE2b-256 checksum
How to use checksums
26a0548c859a58b74d356c0edaf3d6a1f52bdaa3094cb708a77c96f949b128bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL molbloom-3.2.0-cp313-cp313-macosx_11_0_arm64.whl
Size 9.2 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c180514339572e55c47532b2fb1268f9a1e2b739e0ba02dab95a376072dd06df
BLAKE2b-256 checksum
How to use checksums
f975c624a7c426f091b6c20a43a3e44a1a5696f8b89f12ab46df4f7b8245b7db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp312-cp312-win_amd64.whl

Download URL molbloom-3.2.0-cp312-cp312-win_amd64.whl
Size 9.2 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
9c32f22d82caae65e3bb0bf09e6a705ecf05881dce3cc001acf3648e893da2e3
BLAKE2b-256 checksum
How to use checksums
23eb6c8df9be34b723b4c560c574271abeff192741d9a008a15e5adc207e56b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp312-cp312-win32.whl

Download URL molbloom-3.2.0-cp312-cp312-win32.whl
Size 9.2 MB
Tags CPython 3.12 Windows x86-32
SHA-256 checksum
How to use checksums
d5481ed22ee123a35612203dc55faff540fa6651fd62299a374668f4acef2c14
BLAKE2b-256 checksum
How to use checksums
8760aec2331ddd1595fbad38ff7432e046f13fa4c91e03a4a17aec46cf5be663
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL molbloom-3.2.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 9.4 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
b7a122a8c8009e3f409b09dce4ff82354f49600b7df3da0c62c1ea8e9b4e61d9
BLAKE2b-256 checksum
How to use checksums
617cc840c3f6e1bcee87d43e8ce2776602d96ef74db027fd5b034d94c3607fae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL molbloom-3.2.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 9.4 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
39052799fb1ecb16a97963c73eb2544ab08911230bb31e6732f70439cba4788c
BLAKE2b-256 checksum
How to use checksums
d35226d31dc9b7991973e772d2ed5f7914d970dbbadd7136899a33d01fb19968
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL molbloom-3.2.0-cp312-cp312-macosx_11_0_arm64.whl
Size 9.2 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
2c7ec4292e6fb818b1d020f060036ab453d4d20f43b5c706efbe7955519d0fce
BLAKE2b-256 checksum
How to use checksums
cce304d95589d9336e5209287ca879c2f66e14fbe5e9fd9ed91de432513b80a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp311-cp311-win_amd64.whl

Download URL molbloom-3.2.0-cp311-cp311-win_amd64.whl
Size 9.2 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5fabdd0450e2c27878101a7fa403a83dc88662611a8b78cce4f6919a271e89b1
BLAKE2b-256 checksum
How to use checksums
e1b43e7ea765bfd07af7fcf5f07ed8cac7fffbf318aa898b3f7c28228d013f6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp311-cp311-win32.whl

Download URL molbloom-3.2.0-cp311-cp311-win32.whl
Size 9.2 MB
Tags CPython 3.11 Windows x86-32
SHA-256 checksum
How to use checksums
d352ca169137a82a1f73f52a722566ee74874f601855ee9c2a2afe7679f5a80a
BLAKE2b-256 checksum
How to use checksums
24896afd05e4dacdd0f9ca6347214230f9ce2bc5df1bddc175750fc53405b3c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL molbloom-3.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 9.4 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
84d0557300c6f0a0068927c6498ac1ecedd3984a92f582fc527e9c86371a0a70
BLAKE2b-256 checksum
How to use checksums
7ed5b12dfdb195c81a1889c653ead31783fceacaf533b18551f2e73f4a70a69d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl

Download URL molbloom-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl
Size 9.3 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-32 Linux glibc 2.5+ x86-32
SHA-256 checksum
How to use checksums
f81a7aeff94eae51b2337d564654909c70dc3f0ebadd015f6553c9c401cf468d
BLAKE2b-256 checksum
How to use checksums
83b4bfd99e0ed25e53745a5ecd43136f82b0444939f042131e8053ac070b2c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / molbloom-3.2.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL molbloom-3.2.0-cp311-cp311-macosx_11_0_arm64.whl
Size 9.2 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ce21b49204215ffdef67c63ecf2cdd4c13da5a1d21c29a35ce8a1a4007863c3d
BLAKE2b-256 checksum
How to use checksums
6b5ab03f9055aaa7bc76ed5efdb0e7b70921817e3dda98fbcbd9ef1b63bd682c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

3.2.0 This release

16 release files

3.1.1

16 release files

3.1.0

16 release files

3.0.0

16 release files

2.3.5

16 release files

2.3.4

16 release files

2.3.3

16 release files

2.3.2

16 release files

2.3.1

16 release files

2.3.0

16 release files

2.2.2

16 release files

2.2.1

61 release files

2.1.1

76 release files

2.1.0

48 release files

2.0.0

48 release files

1.0.0

48 release files

0.3.0

48 release files

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.0

1 release file

0.0.2

1 release file

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