Skip to content

Repository files navigation

SynKit

PyPI version Conda version Docker Pulls Docker Image Version License Release Last Commit Zenodo CI Stars

Graph-native reaction informatics and executable electron-flow models

SynKit is a Python toolkit for atom-mapped reactions, chemical graph transformations, Lewis-labelled graphs, and explicitly supplied reaction mechanisms. It connects reaction representation, rule extraction, graph rewriting, stereochemistry, and mechanism verification through a common attributed-graph model.

SynKit verifies mechanisms supplied by the user; it does not claim to predict the kinetically or thermodynamically preferred mechanism.

SynKit graphical abstract

Highlights

  • Convert mapped reaction SMILES into ITS and reaction-centre graphs.
  • Extract and apply attributed graph-transformation rules.
  • Represent lone pairs, radicals, and separate sigma and pi occupancies with Lewis-labelled graphs.
  • Execute curved-arrow and atomically coupled fishhook events.
  • Preserve tetrahedral, axial, and extended stereochemical information.
  • Build and analyse mechanism trajectory graphs and chemical reaction networks.

Installation

SynKit requires Python 3.11 or later.

python -m pip install synkit

Install the optional dependencies with:

python -m pip install "synkit[all]"

Alternatively, use the published container:

docker pull tieulongphan/synkit:latest
docker run --rm tieulongphan/synkit:latest \
  python -c "import synkit; print(synkit.__version__)"

Quick start

This self-contained example converts an atom-mapped substitution into an imaginary transition-state graph and reports its changed bonds:

from synkit.IO import rsmi_to_its

reaction = "[CH3:1][Br:2].[OH-:3]>>[CH3:1][OH:3].[Br-:2]"
its = rsmi_to_its(reaction, core=False, format="tuple")

changed_bonds = [
    (source, target, data["order"])
    for source, target, data in its.edges(data=True)
    if data["order"][0] != data["order"][1]
]
print(changed_bonds)

The output records the broken C-Br bond as (1.0, 0.0) and the formed C-O bond as (0.0, 1.0). Continue with the graph, rule, and synthesis guides.

Supplied-mechanism verification

SynKit can parse typed electron-flow annotations, replay their elementary steps, and return a verification certificate and mechanism trajectory graph. Canonical electron loci distinguish lone pairs, sigma bonds, pi bonds, and radical electrons. Curved arrows carry two electrons; fishhooks carry one; coupled radical events commit atomically from a common pre-state.

See the mechanism documentation for the supported interchange formats, verification policies, and complete examples.

Documentation

Publications

Contributing

Contributions and bug reports are welcome. Create a branch from the current mainline, make a focused change, and run the repository checks before opening a pull request:

git switch -c feature/short-description
bash scripts/lint.sh
bash scripts/pytest.sh

Questions can be sent to tieu@bioinf.uni-leipzig.de.

Contributors

License

SynKit is distributed under the MIT License. See LICENSE.

Acknowledgments

This project received funding from the European Union's Horizon Europe Doctoral Network programme under Marie Skłodowska-Curie grant agreement No. 101072930 (TACsy).

Releases

Packages

Used by

Contributors

Languages