A SQLite chemical database.
Project description
AtomLite
AtomLite is a Python library for simple molecular database on top of SQLite.
For an alternative to AtomLite, which provides stronger integration with RDKit, and a greater focus on cheminformatics, see chemicalite.
Installation
pip install atomlite
Quickstart
You can see a lot more examples in our docs but here is a taste of using AtomLite:
import atomlite
import rdkit.Chem as rdkit
# Create a database.
db = atomlite.Database("molecules.db")
# Create database entries.
entry1 = atomlite.Entry.from_rdkit("first", rdkit.MolFromSmiles("C"), {"prop1": "hi", "prop2": 100})
entry2 = atomlite.Entry.from_rdkit("second", rdkit.MolFromSmiles("CN"), {"prop1": "thing", "prop2": 203})
# Add entries to database.
db.add_entries([entry1, entry2])
# Retrieve entries from database.
for entry in db.get_entries(["first", "second"]):
molecule = atomlite.json_to_rdkit(entry.molecule)
print(entry.properties)
{'prop1': 'hi', 'prop2': 100} {'prop1': 'thing', 'prop2': 203}
db.get_property_df(["$.prop1", "$.prop2"])
shape: (2, 3) ┌────────┬─────────┬─────────┐ │ key ┆ $.prop1 ┆ $.prop2 │ │ --- ┆ --- ┆ --- │ │ str ┆ str ┆ i64 │ ╞════════╪═════════╪═════════╡ │ first ┆ hi ┆ 100 │ │ second ┆ thing ┆ 203 │ └────────┴─────────┴─────────┘
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
atomlite-4.5.0.tar.gz
(86.7 kB
view details)
Built Distribution
atomlite-4.5.0-py3-none-any.whl
(10.9 kB
view details)
File details
Details for the file atomlite-4.5.0.tar.gz
.
File metadata
- Download URL: atomlite-4.5.0.tar.gz
- Upload date:
- Size: 86.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
5ec67dac050a464dad059aac008cbb0ac16b49c53d1a192739709580b2ba9676
|
|
MD5 |
72824ef777b9877dce44fb1efa51d7ac
|
|
BLAKE2b-256 |
65ea15d2da0d4ecefba5b6d850ff3dd7401b96c606143db045b78c4516c07ce7
|
File details
Details for the file atomlite-4.5.0-py3-none-any.whl
.
File metadata
- Download URL: atomlite-4.5.0-py3-none-any.whl
- Upload date:
- Size: 10.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
960bd9eb8d50bcf473d145b1e53e4cbf2f48267125081330e262810bd7baec6c
|
|
MD5 |
20679c9e261f2030e1d3b33af937e472
|
|
BLAKE2b-256 |
eb83aef5f2af1090d6b21782a519e23c4afcde3b8808c16cb84e5b64dbde5d2d
|