Chython [ˈkʌɪθ(ə)n]
Library for processing molecules and reactions in a Python way.
Features
File formats
- Read and write MDL RDF/RXN and SDF/MOL (V2000 and V3000, including atom parity and enhanced stereo), Marvin MRV, CML, ChemDraw CDX and CDXML, SMILES, and InChI with InChIKey (InChI Trust library)
- Read and write HELM and BILN biopolymer notations, canonical on write, against the Pistoia HELMCoreLibrary or a monomer library you attach
- Read SMARTS and SMIRKS, Tripos MOL2, PDBx/mmCIF, legacy PDB, XYZ, and IUPAC names through OPSIN
- Compact binary (de)serialization —
pachfor a wire record,mol.to_bytes()for the arena buffer — and full pickle support - A coordinate format hands back a record of atoms and coordinates rather than a molecule, because it states no bond order:
build_molecule()places the atoms,perceive_bonds()reads the connectivity out of a geometry,saturate()raises the orders, and all three are calls the caller makes
Input is unreliable by default
A reader stores and logs what a file says — an illegal valence, a nonsense charge, an underivable
hydrogen count — and never rejects a record for being chemically wrong. Repair is a pipeline you run
afterwards: kekule(), standardize(), fix_resonance(), thiele().
Toolkit interoperability
Conversions build the target structure directly from the graph, so atom order matches
atoms() and stereo is carried over without needing a 2D layout. Each toolkit has one callable in
chython.interop that dispatches on its argument, and the export direction is also a container method.
| Toolkit | API | Requires |
|---|---|---|
| RDKit | mol.to_rdkit(), rxn.to_rdkit(), chython.interop.rdkit() both ways |
extra rdkit |
| Open Babel | mol.to_openbabel() |
extra extra-clean2d |
| Indigo | mol.to_indigo() |
extra extra-clean2d |
| CDK | mol.to_cdk() |
extra extra-clean2d + cdk.jar (CDK_PATH) |
| CDPKit | mol.to_cdpkit(), and 3D conformers (conformer_engine = 'cdpkit') |
extra extra-clean3d |
RDKit is the only one of the five with a reaction form.
Allene stereo is not portable through any of these toolkits. Indigo additionally omits cis-trans, which it derives from 2D coordinates.
IUPAC names, both directions
from chython import iupac
mol = iupac('ethanol') # name -> structure, via OPSIN
mol.iupac # 'ethanol' -- structure -> name, via openclatura
iupac() needs JPype and opsin.jar (OPSIN_PATH); the .iupac property needs the
iupac extra (Python >= 3.11) and returns None when the structure cannot be named.
Molecules
- Atoms and bonds in one contiguous buffer, addressed by an id that survives editing; edits go through
an explicit session (
with mol.edit() as e:) and derived data is recomputed on seal - Standardize, canonicalize, kekulize/aromatize, repair resonance forms, neutralize, put a mobile hydrogen and charge where the canonical order says, check valences
- Split and decompose salts, expand contracted groups, derive implicit hydrogen counts
- Many 3D models per molecule in one conformer store
- Tetrahedral, cis-trans, allene, atropisomer and helical stereo, with CIP labels
- Descriptors: TPSA, Crippen logP and MR, hydrogen-bond donors and acceptors, rotatable bonds, ring counts, Bertz CT, Randić and Zagreb indices
- The 166 MACCS structural keys, one-based, and QED with its three published weight sets — both state what they transcribe and neither claims parity with another implementation's bits or score
- Morgan and linear fingerprints with Tanimoto similarity, as hash sets, folded bit vectors or count
vectors, and the graph matrices and distance-derived descriptors — extra
ml - A molecule or a mapped reaction as
int32arrays for a model:mol.state_view(),rxn.transition_view()— extraml
Search
- Subgraph isomorphism
- SMARTS parser with chython-specific query semantics, including component grouping for intramolecular patterns
Reactions
- Template application from SMIRKS:
mol.react(template), ormol @ otherfor a two-component join - Reaction enumeration over the shipped reaction corpus
- Functional and protective group detection and deprotection, with the whole corpus in the docs
- Sticky fragment / linker enumeration for combinatorial reassembly
- Atom-to-atom mapping reconstruction against a template corpus:
rxn.reconstruct_mapping() - Reaction-level standardization: each molecule pass once per molecule, plus the passes a loop cannot do
Depiction
- 2D coordinate generation, default SmilesDrawer, switchable to RDKit/CDK/Open Babel/Indigo (
clean2d_engine) - SVG and SVGZ output with Jupyter support, and scalar data overlaid on the same scene
- 3D: a stored conformer as an X3DOM document (
mol.depict3d()) or a notebook widget (mol.view3d()) - 3D conformer generation with RDKit or CDPKit (
conformer_engine)
Full documentation can be found here.
Install
Only Python 3.10+.
pip install chython
The default 2D layout backend needs no extra: its JS engine (QuickJS) is a required dependency and costs under 2.5 MB.
A plain install has no numpy, and that is deliberate — the base install is about 7.5 MB of runtime
files, small enough for a serverless bundle. Reading and writing every format, standardize(),
kekule(), thiele(), canonicalize(), stereo, substructure matching, template application and
depiction all work without it. What needs chython[ml] is the surface that answers a numpy array: the
fingerprints, atom_invariants, adjacency_matrix, distance_matrix, the distance-derived graph
descriptors, pharmacophore_invariants, maccs_keys()/maccs_bit_set() and the ML views. Each of
those raises an ImportError naming the extra when you call it, so nothing fails at import time.
Optional extras, combinable (chython[rdkit,iupac]):
| Extra | Enables |
|---|---|
ml |
numpy, and with it fingerprints, atom invariants, the graph matrices, the descriptors built on them and the ML views |
rdkit |
RDKit conversion both ways, RDKit 2D layout and 3D conformers |
iupac |
molecule.iupac name generation (Python >= 3.11) |
extra-clean2d |
CDK, Open Babel and Indigo backends (CDK also needs cdk.jar) |
extra-clean3d |
CDPKit conformer engine |
CGRtools
Chython is a fork of CGRtools.
Copyright
- 2014-2026 Ramil Nugmanov nougmanoff@protonmail.com main developer
Contributors
CGRtools contributors are included too.
- Adelia Fatykhova adelik21979@gmail.com
- Aigul Khakimova
- Aleksandr Sizov murkyrussian@gmail.com
- Alexandre Varnek varnek@unistra.fr
- Dinar Batyrshin batyrshin-dinar@mail.ru
- Dmitrij Zanadvornykh zandmitrij@gmail.com
- Philippe Gantzer
- Ravil Mukhametgaleev sonic-mc@mail.ru
- Tagir Akhmetshin tagirshin@gmail.com
- Timur Gimadiev timur.gimadiev@gmail.com
- Timur Madzhidov tmadzhidov@gmail.com
- Zarina Ibragimova
Metadata
Release files for chython 3.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| chython-3.8.tar.gz | 4.2 MB | Without provenance | Details for chython-3.8.tar.gz |
Built distributions (wheels)
Total release size: 140.0 MB
Release files / chython-3.8.tar.gz
| Download URL | chython-3.8.tar.gz |
|---|---|
| Size | 4.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2d9c9cddcbaf1d0ea4dd24aa6ddc84755008327b99641b59b66e4958532b1b1
|
|
BLAKE2b-256 checksum How to use checksums |
b97cdda598c60a6d8939bd6521d5209f114e2db551d2180485bb8ffb722b5c4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / chython-3.8-cp314-cp314-win_amd64.whl
| Download URL | chython-3.8-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 6.0 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0fe990251df3dfa5afc77b3b00258c5694fc75c18cc86a0332c4c792070e4ddb
|
|
BLAKE2b-256 checksum How to use checksums |
bb89d6fb9eb5cd6de75aac3b6d2f1d51bebcb2aca50a7c8def997917bea161ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / chython-3.8-cp314-cp314-manylinux_2_39_x86_64.whl
| Download URL | chython-3.8-cp314-cp314-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 6.4 MB |
| Tags | CPython 3.14 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
74482334a01107018df3c93da7fe0187e60210c8ce41999cb9bd557a0b9069a8
|
|
BLAKE2b-256 checksum How to use checksums |
8d63996e7c4ac3bca4d23e22b47f6537597d2077183d222055c57ea632ce03c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / chython-3.8-cp314-cp314-manylinux_2_39_aarch64.whl
| Download URL | chython-3.8-cp314-cp314-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.14 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
e6cd8ca1e639edec7a8ae5acb360122c75b08a2c713320ee802ff7555eda1c40
|
|
BLAKE2b-256 checksum How to use checksums |
1ef06a9bb42053329e6083045eafbaa6146587afa541ad9c8a6f63ca0810f9c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / chython-3.8-cp314-cp314-macosx_10_15_universal2.whl
| Download URL | chython-3.8-cp314-cp314-macosx_10_15_universal2.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.14 macOS 10.15+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
99b02fd365ee4e5f0c438ffe1c894b8f38151d6844f8e9e23010549403e3b224
|
|
BLAKE2b-256 checksum How to use checksums |
c89009195d5d924cb8860620afce5146cc06a69bfece1e7803d7eeee2c6d0341
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / chython-3.8-cp313-cp313-win_amd64.whl
| Download URL | chython-3.8-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d2e5b72e7940ddfd23a39f376d034b8aeacd6d535b544e9a39960dde07aa3425
|
|
BLAKE2b-256 checksum How to use checksums |
426b57c116d29999edfcceb3c00aefb4ae5270188034cafca6e0c242a87c48e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.17
|
Release files / chython-3.8-cp313-cp313-manylinux_2_39_x86_64.whl
| Download URL | chython-3.8-cp313-cp313-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.13 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
a17c2a3bc8b0d13cc16d0d5059d00d4f5515616b59ea0397ab2e40bdc586319a
|
|
BLAKE2b-256 checksum How to use checksums |
86656bb454380cd18eb87b6d67b84af731b63c406fb18f99fd37870706c4bab7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / chython-3.8-cp313-cp313-manylinux_2_39_aarch64.whl
| Download URL | chython-3.8-cp313-cp313-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.13 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
6d35dc5a1f3ceef2ea20835b503d81f7742827760315af4fc7d3b202e24ac3ea
|
|
BLAKE2b-256 checksum How to use checksums |
9448a91df29f79354b727fc06aad3daf72512e73edb439a979a2d0ece16a6020
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.18
|
Release files / chython-3.8-cp313-cp313-macosx_10_13_universal2.whl
| Download URL | chython-3.8-cp313-cp313-macosx_10_13_universal2.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.13 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
eb50fb9b476b28f3e8aa888c3eb3ccc5bbf641b70afc39e371700b5c7ed1e5a2
|
|
BLAKE2b-256 checksum How to use checksums |
55825ac5aba0f287e16f1d736eb37308485c43fea4dca7186a082d3ac199962f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.17
|
Release files / chython-3.8-cp312-cp312-win_amd64.whl
| Download URL | chython-3.8-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
60a75d2fa9e086349e1f6e07dd16273c148fbb04f54f295940b9fc0e62c2929a
|
|
BLAKE2b-256 checksum How to use checksums |
cebdf0146ae57b507014a6f4cb09cabd242e8abe2c57cac3c952f132cafc28a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / chython-3.8-cp312-cp312-manylinux_2_39_x86_64.whl
| Download URL | chython-3.8-cp312-cp312-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
c3a1f7a4a3d85fae53d900dd375adb0f66bdd1c0b26bf64c73aa22de70a9ae22
|
|
BLAKE2b-256 checksum How to use checksums |
db1c0ab8b538ffafc73be58877b578d6e09550d19ae759a935be18ea034448a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / chython-3.8-cp312-cp312-manylinux_2_39_aarch64.whl
| Download URL | chython-3.8-cp312-cp312-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
e138e397f97bbb17a2b819f7551e8a055d838d832cc168f28c27f1e0ff725b27
|
|
BLAKE2b-256 checksum How to use checksums |
89add559308f479e98a572e6291c02ad6c9698ee575c0e23c28b08cd6145d98e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.16
|
Release files / chython-3.8-cp312-cp312-macosx_10_13_universal2.whl
| Download URL | chython-3.8-cp312-cp312-macosx_10_13_universal2.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.12 macOS 10.13+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
e712c41bf8881c9929b4602c14e7897a9736ef9a2227d55ebb6e43702e66fe82
|
|
BLAKE2b-256 checksum How to use checksums |
52bfc994b284efa28e26a198943a0a28ff9019bb960f659f867a39301e748f5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.10
|
Release files / chython-3.8-cp311-cp311-win_amd64.whl
| Download URL | chython-3.8-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
e4d6b9174d72abe27b6b325370830e8985b3b9d60dddf098bc5a9bce30f42bd5
|
|
BLAKE2b-256 checksum How to use checksums |
7b7c19f6710c6d0fb28f00b27420860532930cda79a6af87bdb795c317b7345f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / chython-3.8-cp311-cp311-manylinux_2_39_x86_64.whl
| Download URL | chython-3.8-cp311-cp311-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 6.5 MB |
| Tags | CPython 3.11 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
3c142d4c6799e5245008861961c10c588f2e0fc1714ca2c4609ffafca2d465da
|
|
BLAKE2b-256 checksum How to use checksums |
efab50939bb91eb26f95f35f9a4e666775c730fc4ff521e042f231835fe069ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Release files / chython-3.8-cp311-cp311-manylinux_2_39_aarch64.whl
| Download URL | chython-3.8-cp311-cp311-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.11 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
7e5ef8c427bc8aee769680627d5e28a250c98c718ff7f4673f4d23d8a2af299c
|
|
BLAKE2b-256 checksum How to use checksums |
94e82f93417347b61b422d6f8380851d6d8d8e5863590c8e8487ec3926651f0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.18
|
Release files / chython-3.8-cp311-cp311-macosx_10_9_universal2.whl
| Download URL | chython-3.8-cp311-cp311-macosx_10_9_universal2.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
0b8b20f4adf2ff2ab5f868e4ccafd785f32fc1ece7af26ff1a1f9ba1d8a6253a
|
|
BLAKE2b-256 checksum How to use checksums |
dba4cf6676f8595b1ec02b8707337398f430c466eb960317e9ceaba16ac394ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / chython-3.8-cp310-cp310-win_amd64.whl
| Download URL | chython-3.8-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 5.9 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
415ec0fe66351746135df74c48f6b0963ecb18c61791782d0c42504c60df70d6
|
|
BLAKE2b-256 checksum How to use checksums |
4bb5b075bb62bcf499b9bc5fa8a65bd124089897d2f1118e2faed664abe8e781
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Release files / chython-3.8-cp310-cp310-manylinux_2_39_x86_64.whl
| Download URL | chython-3.8-cp310-cp310-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 6.5 MB |
| Tags | CPython 3.10 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
a577b310449ee86c4eacc410dfd7b156ed8e39356da4dc84f3d22dcf106c918c
|
|
BLAKE2b-256 checksum How to use checksums |
049dd3d0e511e6ab07a126ac15626780076b5f7998a5a87f496be24eb0b4cc6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / chython-3.8-cp310-cp310-manylinux_2_39_aarch64.whl
| Download URL | chython-3.8-cp310-cp310-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 6.3 MB |
| Tags | CPython 3.10 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
152aac3117d60fc54ddeb87fe8426f2db9aa7b6a7ccd15445353c45cc8ec0bbd
|
|
BLAKE2b-256 checksum How to use checksums |
003756ae3e5fe8e1e33a1bc6d438bd3c910e2c1b23bbd817c1920104562d7518
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.22
|
Release files / chython-3.8-cp310-cp310-macosx_10_9_universal2.whl
| Download URL | chython-3.8-cp310-cp310-macosx_10_9_universal2.whl |
|---|---|
| Size | 8.6 MB |
| Tags | CPython 3.10 macOS 10.9+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
fedca1effc8852ae4cc402b02a155bb116162af14e39bcd8f64cdc06f95bdd2e
|
|
BLAKE2b-256 checksum How to use checksums |
c99cff4d933338664d2db2412e162e1559fdf9ddec64d954c4af58d74da87094
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.11
|
Security for chython 3.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.