Skip to main content

Molecular Barcode (MolBar): Molecular Identifier for Organic and Inorganic Molecules

Project description

MolBar

logo

License: MIT PyPI - Version Python Versions Coverage Downloads Downloads Paper

This package provides an implementation of the Molecular Barcode (MolBar), a molecular identifier based on quantum chemistry. It is designed to ensure the uniqueness of data in chemical 3D structure databases. The identifier is optimized for computational chemistry applications such as black-box chemical space exploration. It generates the identifier directly from 3D Cartesian coordinates, encoding the 3D shape of the molecule:

  • 🧪 Universal: Works with organic molecules, metal complexes, and inorganic systems
  • 🔀 Stereochemistry: Encodes central, axial, planar, and helical chirality
  • 🔒 Atropisomerism: When rotation around single bond is hindered, MolBar recognizes this and describe the absolute configurations for both enantiomers.
  • 🔬 3D-Aware: MolBar encodes 3D arrangement of the molecule.
  • 🔄 Conformer-invariant: Same identifier across conformers
  • ⚛️ Direct from QC files: Generates MolBar directly from Cartesian coordinates without XYZ to Molfile conversion beforehand.
  • 🐍 Python Native: CLI and library interfaces

🚀 Quick Start

Installation

# Install from PyPI (recommended)
pip install molbar

# Install from source
git clone https://git.rwth-aachen.de/bannwarthlab/molbar.git
cd molbar
make install

Basic Usage

Command Line:

# Generate molecular barcode
molbar molecule.xyz

Python API:

from molbar import get_molbar_from_coordinates
import numpy as np

# From coordinates and elements
coordinates = np.array([[0.0, 0.0, 0.0], [1.0, 0.0, 0.0]])  # 2 atoms
elements = ['C', 'H']
molbar_id = get_molbar_from_coordinates(coordinates, elements)
print(molbar_id)

# From structure file
from molbar import get_molbar_from_file
molbar_id = get_molbar_from_file("molecule.xyz")

📊 Example Output

$ molbar caffeine.xyz
MolBar | 1.2.0 | C8N4O2H10 | 0 | 1 | -377 -288 -241 -170 -129 -88 -51 20 20 20 20 20 20 38 147 160 279 377 441 495 556 721 784 896 | -345 -207 -152 -96 40 69 115 243 246 369 448 615 680 846 | -145 -143 -136 -37 4 9 9 9 9 9 9 25 29 43 81 94 128 172 240 290 365 536 609 1465 | 0 0 0 0 

The barcode format: MolBar | version | formula | charge | multiplicity | topology | heavy_topology | topography | chirality

📖 Documentation

📚 Complete Documentation - Full documentation, tutorials, and API reference

Quick links:

🛠️ Utility Tools

MolBar includes additional tools described in the documentation:

  • ensplit - Split ensemble files by molecular barcodes
  • fragcount - Count molecular fragments
  • mbslice - Extract molecular fragments
  • molopt - Optimize geometries with MolBar's structure unification force field
  • moldiff - Compare molecular structures

📄 Citation

If you use MolBar in your research, please cite:

@article{molbar2024,
  title={MolBar: a molecular identifier for inorganic and organic molecules with full support of stereoisomerism},
  author={van Staalduinen, Nils and Bannwarth, Christoph},
  journal={Digital Discovery},
  volume={3},
  pages={2298--2319},
  year={2024},
  publisher={Royal Society of Chemistry},
  doi={10.1039/D4DD00208C}
}

📞 Support

MolBar License and Disclaimer

MIT License

Copyright (c) 2022 Nils van Staalduinen, Christoph Bannwarth

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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

molbar-1.2.0rc1.tar.gz (1.3 MB view details)

Uploaded Source

Built Distributions

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

molbar-1.2.0rc1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

molbar-1.2.0rc1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

molbar-1.2.0rc1-cp314-cp314-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

molbar-1.2.0rc1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

molbar-1.2.0rc1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

molbar-1.2.0rc1-cp313-cp313-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

molbar-1.2.0rc1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

molbar-1.2.0rc1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

molbar-1.2.0rc1-cp312-cp312-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

molbar-1.2.0rc1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

molbar-1.2.0rc1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

molbar-1.2.0rc1-cp311-cp311-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

molbar-1.2.0rc1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

molbar-1.2.0rc1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

molbar-1.2.0rc1-cp310-cp310-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

molbar-1.2.0rc1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

molbar-1.2.0rc1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

molbar-1.2.0rc1-cp39-cp39-macosx_11_0_arm64.whl (2.0 MB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

molbar-1.2.0rc1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

molbar-1.2.0rc1-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl (1.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ ARM64manylinux: glibc 2.28+ ARM64

File details

Details for the file molbar-1.2.0rc1.tar.gz.

File metadata

  • Download URL: molbar-1.2.0rc1.tar.gz
  • Upload date:
  • Size: 1.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for molbar-1.2.0rc1.tar.gz
Algorithm Hash digest
SHA256 ee9824af9df8ebdf49ea36a9ac97d20dbfea6b4c08a03a2e9658eb8cd1a5b638
MD5 d5ce5341f3c6ed49539732801b0f1eb1
BLAKE2b-256 176051d39e118ba5e7e4b8a35c9a6fb85b20fcf413d5e569007a7738cc83898d

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a31e870067d3c612f055fec60c927af7ee8cdc88d1fe0d738d51801b46b8f1c9
MD5 179bdd10f5f60765fd8f97c4bad02719
BLAKE2b-256 f664ceeccbdde1fafec0ed82e79e16c20746373fc76c4235dae8c8d3e4c44c9c

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp314-cp314-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b0b8390c81301da586147dde16912e21fb0940624ea4a197023a4371eaee4513
MD5 f799fc8ce489394afed6bdbfae425bb1
BLAKE2b-256 39c6af5c75e9bcc663829c7e3ddd6ea154a4deb49b280ac3fa36b89f3c0be5d1

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 36f6e8ba1a10342b8ccab76c56adc91b610faf2ba71c3798d440837c65535b62
MD5 ffd6c9ef70c231479c32817620ddc8fe
BLAKE2b-256 c3bb0ab5d0218e50461ab9fa65cca5fec9e4fed7445586b2193e89433dc9bea4

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ded785501b7648171b2174ae6ce73590495af4b7c761af3ab95587659008ceea
MD5 aecd69c05b1f08144e7b4dd0096c064d
BLAKE2b-256 b358eb0c3904ba1d1ae6cd3815f3962c3c6d8f55537f9241e1c2111df9b1fc43

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2298027b5080490d21bbe037967f429c9a71bec6990bed9349b0dba90ff4e6b8
MD5 4fa523487c8a995a53581d5cb708c03e
BLAKE2b-256 a7f4ca8147a4df26ca663820d0f5457b8e7522c74701ab40b7ff00c000965ae9

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bcb35295ffc64cf2fdc888cfbb28a8aff44e93cfb52a1c50b076a352afba2735
MD5 d53f3384193c9a03db5baf48424ae6c8
BLAKE2b-256 596d867e95b7a4237155fad84e534fefb6dd62d271b49a745fac052af3940a6b

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ea33ee340c631686ddb15f05694e544d8fcc5f11e30de1a8c2927e95ecd95df0
MD5 db915a03850ef0f6d9f7b5a5dc8f8a30
BLAKE2b-256 54456c88075f86d94b9ceb91786a8c8e5c11d127ee1aac205d43f5e379cc948d

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 47f72193ba8abcda0e07940753cdd5e76931f10bbae391c1fedeba1a593b77a5
MD5 f2292e71a77b78c4af17d9a16d7c3d96
BLAKE2b-256 71a5b26033026ed90e93c72b4da799e42d6e64f876c0294cf43f38e62ecb7c35

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0c47343c7e71716c175a4dfd1d6908b2e8f7951126c2a2f2f3a6280057d970e1
MD5 866a09cb0aeefd5795f1e142b578e39c
BLAKE2b-256 3aaaeea6a589f9fc5df4637d52a170cb047db592ff16c4c832285d6c3cfe9cbe

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 25370c472c718457a9ae6309c16cadc9ae57fdd9975a1bd65102dbdf611e4760
MD5 0c1bd96357bae5946141f08f23243e92
BLAKE2b-256 e2c38af3b270e847c0951f92739d4dc25db6b11efc7faad85a82e539187fc999

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d085e25967c71f9f2d7b2a7f5634d93f97f299e0741f26b2378718339566045d
MD5 5170e54d4d4009b6e517b9aa9f3050ff
BLAKE2b-256 1738dd6557d4a785925061e5bdf1f189911bea5d2106b875a028e4c68f7be7eb

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 abcc5e64f20d72a7fc0cd64b336b84e5ea2fc8d3d9064f543961701eb82da55c
MD5 5a86355b1a8b1e713a2b673bde27083b
BLAKE2b-256 cdcda2d6509c03a2128c98f51a1d167973b8971c1302ee061fc6ff8cdb2e979f

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 53be664b922baae9da29515686e4492f07982a05f6a0fa65280f4800807370d3
MD5 d9dd9a720d049fb2e8a298760b27ec60
BLAKE2b-256 b82a01bda8c328985eb7df951c32824b97e9300e62c33cede2d3cdf4396c66e3

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 6fb2428e92633136f07997a7b0e82add42618136b544165aa182da0cf6921e5c
MD5 569b789a5c5b9d6875f23ff776295079
BLAKE2b-256 8510ff0e28d96d15f0c63ea272c4f62086d68019af2e5496917a89211bc0cbaf

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a82bab3817fecaa0cb74becca6dd24a5de2ad563655f607317bc77172274e5f8
MD5 2a9b7780c07e6229bae63ebb1eb1d741
BLAKE2b-256 4ed87df838f7442b892bf1513c6f63f4cd5a49c5c2cd30454b4a0fa43be9e482

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7083480db591e0a6f61f0d42e535b2f24229f5ed2da97448642a64fd8a542174
MD5 57da3f979af8d297442a49e74a26686d
BLAKE2b-256 deef170c7debf1694ff42a2caec8bdb0e3959fd5d5bf564a968024138ab12377

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4e9d9169dde8a2b2bc07070eef8b612445c4cee9d51b3844cf27fd9ca1b103d2
MD5 1820d0a48c2fdfa300dada1591c1856a
BLAKE2b-256 23e01f902f67a5adcf17dc9cdfe1ceaa0283b1fc388505dcc8a9aa58bc3a6321

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6b1170c5dc532897d7d4459abc63725e0380a774f9b6ded68e6aa57bb357c6b5
MD5 d0d04931eefb612ec285dc899bdb940c
BLAKE2b-256 ca9f617f8bb8e2dba0179e83f7f5b7a31df0d1474b0b1550958a9b82b08d8a88

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a1e2225f54e1dfe3d39c472ee2fc048bd8081a19a28bc80b4f8b061e1b4c48e1
MD5 224ac5e78e480403a95837dc92713e39
BLAKE2b-256 403375c1302b322a29e9d2b5cc571bbeaafe4ad055ddac68b6eca1017cd7237c

See more details on using hashes here.

File details

Details for the file molbar-1.2.0rc1-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for molbar-1.2.0rc1-cp38-cp38-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 440249ab7c09255e00de3fc4dff09d1430b791a91aaf6c0c10f03b0ed21513c5
MD5 b5265ee34477f11d501a3b5ec6577e06
BLAKE2b-256 6142d41124b3cfe1b3579c9c15bb9d9a55ecbe49b60068cc33bdf133ea548b85

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