Library for processing molecules and reactions in python way

Overview

Chython [ˈkʌɪθ(ə)n]

Library for processing molecules and reactions in python way.

Features:
  • Read/write/convert formats: MDL .RDF (.RXN) and .SDF (.MOL), .MRV, SMILES, INCHI (inchi-trust library), .XYZ, .PDB
  • Standardize molecules and reactions and valid structures checker
  • Supported python-magic
  • Tetrahedron, Allene and CIS-TRANS stereo supporting
  • Perform subgraph search
  • Build/edit molecules and reactions
  • Produce template based reactions and molecules
  • Atom-to-atom mapping checker and rule-based fixer
  • Perform MCS search
  • 2d coordinates generation (based on SmilesDrawer)
  • 2d/3d depiction
  • Produce CGRs (Condensed Graph of Reaction)

Full documentation can be found here.

Chython is fork of CGRtools.

INSTALL

Highly recommended to use python 3.8+. Python 3.6 and 3.7 deprecated.

Note: for using clean2d install NodeJS into system.

  • stable version available through PyPI:

    pip install chython
    
  • Install chython library DEV version for features that are not well tested:

    pip install -U git+https://github.com/chython/[email protected]#egg=chython
    

TESTS

Run unit tests:

git clone https://github.com/chython/chython.git && cd chython  # skip if already got sources
pip install -e .
pytest --pyargs chython

COPYRIGHT

CONTRIBUTORS

Comments
  • Pip installation bug

    Pip installation bug

    I tried to install the package via pip (not the DEV version) and encountered an error related to setuptools. The error looks like this: setuptools bug

    I found that downgrading setuptools to version 41 solves problem. And it really worked out.

    opened by tagirshin 1
  • Bump loader-utils from 1.4.1 to 1.4.2 in /clean2d

    Bump loader-utils from 1.4.1 to 1.4.2 in /clean2d

    Bumps loader-utils from 1.4.1 to 1.4.2.

    Release notes

    Sourced from loader-utils's releases.

    v1.4.2

    1.4.2 (2022-11-11)

    Bug Fixes

    Changelog

    Sourced from loader-utils's changelog.

    1.4.2 (2022-11-11)

    Bug Fixes

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump loader-utils from 1.4.0 to 1.4.1 in /clean2d

    Bump loader-utils from 1.4.0 to 1.4.1 in /clean2d

    Bumps loader-utils from 1.4.0 to 1.4.1.

    Release notes

    Sourced from loader-utils's releases.

    v1.4.1

    1.4.1 (2022-11-07)

    Bug Fixes

    Changelog

    Sourced from loader-utils's changelog.

    1.4.1 (2022-11-07)

    Bug Fixes

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump minimist from 1.2.5 to 1.2.6 in /clean2d

    Bump minimist from 1.2.5 to 1.2.6 in /clean2d

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • allene stereo

    allene stereo

    fix bug image

    
      Mrv2115 01212215432D          
    
     10 10  0  0  0  0            999 V2000
       -7.6610    0.9215    0.0000 C   0  0  0  0  0  0  0  0  0  6  0  0
       -7.2485    1.6360    0.0000 C   0  0  0  0  0  0  0  0  0  8  0  0
       -6.4732    1.9181    0.0000 C   0  0  0  0  0  0  0  0  0 10  0  0
       -5.8542    1.4128    0.0000 C   0  0  1  0  0  0  0  0  0 12  0  0
       -5.2855    0.9215    0.0000 C   0  0  0  0  0  0  0  0  0 11  0  0
       -5.4287    0.1090    0.0000 C   0  0  0  0  0  0  0  0  0  9  0  0
       -6.0607   -0.4213    0.0000 C   0  0  0  0  0  0  0  0  0  7  0  0
       -6.8857   -0.4213    0.0000 C   0  0  0  0  0  0  0  0  0  5  0  0
       -7.5177    0.1090    0.0000 C   0  0  0  0  0  0  0  0  0  4  0  0
       -6.4732    2.7431    0.0000 H   0  0  0  0  0  0  0  0  0 13  0  0
      1  2  1  0  0  0  0
      2  3  1  0  0  0  0
      3  4  2  0  0  0  0
      4  5  2  0  0  0  0
      5  6  1  0  0  0  0
      6  7  1  0  0  0  0
      7  8  1  0  0  0  0
      8  9  1  0  0  0  0
      1  9  1  0  0  0  0
      3 10  1  1  0  0  0
    M  END
    
    
    opened by stsouko 0
Releases(1.48)
  • 1.48(Dec 14, 2022)

    What's Changed

    • Kekule fixed for invalid pyridine complexes
    • Automatic clean2d on depiction. useful for smiles-parsed structures.
    • Depiction customization

    Full Changelog: https://github.com/chython/chython/compare/1.45...1.48

    Source code(tar.gz)
    Source code(zip)
  • 1.45(Oct 26, 2022)

    What's Changed

    • molecules bytes pack V2
    • reactor enumerator now supports lists of atoms in product
    • smiles parser fix
    • smarts parser improved (globally unique masked atoms)
    • heuristic mapper fixed
    • thiele fixed
    • small bugfixes

    Full Changelog: https://github.com/chython/chython/compare/1.38...1.45

    Source code(tar.gz)
    Source code(zip)
  • 1.38(Aug 30, 2022)

    • parsers better logging added.
    • thiele and kekule fixed.
    • pandas adhoc fix for better representation of molecules in df. chython.utils.patch_pandas
    • remove_reagents method now support AAM-less detection.
    • Reactor call api changed.
    • new smiles formatting key: !z - disable charges information.
    • small bugs.

    Full Changelog: https://github.com/chython/chython/compare/1.27...1.38

    Source code(tar.gz)
    Source code(zip)
  • 1.27(May 30, 2022)

    • Fixed rule-based AAM fixer.
    • Improved clean2d
    • standardize now can keep tautomers.
    • remove_acids molecule standardization method added.
    • split_metal_salts molecule standardization implemented.
    • SDF metadata writer now follow specification
    • Reactor improved.
    • Groups deprotection transformers for common groups implemented.
    • utils.svg2png renderer added.

    Full Changelog: https://github.com/chython/chython/compare/1.23...1.27

    Source code(tar.gz)
    Source code(zip)
  • 1.23(Apr 21, 2022)

    SMARTS parser added!

    There are a few limitations:

    stereo ignored only D, a, h, r, and !R atom primitives supported. bond order list and not bond supported. [not]ring bond supported. Only with explicit bonds. not bond and order list supported. mapping, charge, and isotopes supported. list of elements supported. A - treats as any element. A primitive (aliphatic) ignored. M - treats as any metal. <&> logic operator unsupported. <;> logic operator is mandatory except for charge, isotope, and stereo marks. used CXSMARTS extension for radical, hybridization (SP3, SP2, SP1, and Aromatic coded as 3, 2, 1, and 4), and heteroatoms (not C or H) count coding

    For example:

        [C;r5,r6;a]-;!@[C;h0,h1] |atomProp:1.hyb.24:1.het.0|
    

    Aromatic C member of 5 or 6 atoms ring connected with non-ring single bond to aromatic or SP2 C with 0 or 1 hydrogen without heteroatomic neighbors. Left molecules matches.

    image

    • Tutorial updated.
    • Fixed Reactor stereo. Now patch without stereo doesn't override matched molecule stereo.
    • SMARTS generator fixed.

    Full Changelog: https://github.com/chython/chython/compare/1.22...1.23

    Source code(tar.gz)
    Source code(zip)
  • 1.22(Apr 15, 2022)

    What's Changed

    • Atom-to-Atom mapping for reactions.
    • SMILES parser refactored and fixed. CXSMILES support was added for fragments and radicals.
    • SMILES generator refactored. CXSMILES support was added for fragments and radicals.
    • Isomorphism speedup with cython.
    • Stereo processing speedup.
    • QueryContainer now supports bond in ring attribute. SMARTS now daylight compatible. CXSMARTS notation used for radicals, hybridizations, and heteroatoms attrs.
    • chython.utils.GridDepict and chython.utils.RetroDepict for lists of molecules and rooted tree of molecules (e.g. retro-synthetic tree)
    • Tautomerism refactored. Use mol.enumerate_tautomers() for generating.
    • Protonated and deprotonated structures enumeration added mol.enumerate_charged_forms()
    • Bug fixes.

    New Contributors

    • @TimurGimadiev

    Full Changelog: https://github.com/chython/chython/commits/1.22

    Source code(tar.gz)
    Source code(zip)
Simple tool for creating changelogs

Description Simple utility for quickly generating changelogs, assuming your commits are ordered as they should be. This tool will simply log all lates

2 Jan 05, 2022
Tools for binary data on cassette

Micro Manchester Tape Storage Tools for storing binary data on cassette Includes: Python script for encoding Arduino sketch for decoding Eagle CAD fil

Zack Nelson 28 Dec 25, 2022
This code renames subtitle file names to your video files names, so you don't need to rename them manually.

Rename Subtitle This code renames your subtitle file names to your video file names so you don't need to do it manually Note: It only works for series

Mostafa Kazemi 4 Sep 12, 2021
Python Random Number Genrator

This Genrates Random Numbers. This Random Number Generator was made using python. This software uses Time and Random extension. Download the EXE file and run it to get your answer.

Krish Sethi 2 Feb 03, 2022
A tool written in python to generate basic repo files from github

A tool written in python to generate basic repo files from github

Riley 7 Dec 02, 2021
Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method.

Astvuln Astvuln is a simple AST scanner which recursively scans a directory, parses each file as AST and runs specified method. Some search methods ar

Bitstamp Security 7 May 29, 2022
Simple Python tool that generates a pseudo-random password with numbers, letters, and special characters in accordance with password policy best practices.

Simple Python tool that generates a pseudo-random password with numbers, letters, and special characters in accordance with password policy best practices.

Joe Helle 7 Mar 25, 2022
Fraud Multiplication Table Detection in python

Fraud-Multiplication-Table-Detection-in-python In this program, I have detected fraud multiplication table using python without class. Here, I have co

Sachin Vinayak Dabhade 4 Sep 24, 2021
A Container for the Dependency Injection in Python.

Python Dependency Injection library aiodi is a Container for the Dependency Injection in Python. Installation Use the package manager pip to install a

Denis NA 3 Nov 25, 2022
Python utilities for writing cross-version compatible libraries

Python utilities for writing cross-version compatible libraries

Tyler M. Kontra 85 Jun 29, 2022
Experimental python optimistic rollup fraud-proof generation

Macula Experimental python optimistic rollup fraud-proof generation tech by @protolambda. Working on a python version for brevity and simplicity. See

Diederik Loerakker 30 Sep 01, 2022
A python package for your Kali Linux distro that find the fastest mirror and configure your apt to use that mirror

Kali Mirror Finder Using Single Python File A python package for your Kali Linux distro that find the fastest mirror and configure your apt to use tha

MrSingh 6 Dec 12, 2022
Prime Path Generator is a prime path generator used to generate prime paths.

Prime Path Generator is a prime path generator used to generate prime paths.

1 Nov 06, 2021
async parser for JET

This project is mainly aims to provide an async parsing option for NTDS.dit database file for obtaining user secrets.

15 Mar 08, 2022
Various importers for cointracker

cointracker_importers Various importers for cointracker To convert nexo .csv format to cointracker .csv format: Download nexo csv file. run python Nex

Stefanos Anastasiou 9 Oct 24, 2022
Know your customer pipeline in apache air flow

KYC_pipline Know your customer pipeline in apache air flow For a successful pipeline run take these steps: Run you Airflow server Admin - connection

saeed 4 Aug 01, 2022
Bounding Boxes Python Utils

Bounding Boxes Python Utils

Vadim 4 May 01, 2022
💉 코로나 잔여백신 예약 매크로 커스텀 빌드 (속도 향상 버전)

Korea-Covid-19-Vaccine-Reservation 코로나 잔여 백신 예약 매크로를 기반으로 한 커스텀 빌드입니다. 더 빠른 백신 예약을 목표로 하며, 속도를 우선하기 때문에 사용자는 이에 대처가 가능해야 합니다. 지정한 좌표 내 대기중인 병원에서 잔여 백신

Queue.ri 21 Aug 15, 2022
Greenery - tools for parsing and manipulating regular expressions

Greenery - tools for parsing and manipulating regular expressions

qntm 242 Dec 15, 2022
Gradually automate your procedures, one step at a time

Gradualist Gradually automate your procedures, one step at a time Inspired by https://blog.danslimmon.com/2019/07/15/ Features Main Features Converts

Ross Jacobs 8 Jul 24, 2022