chython 2.4__cp312-cp312-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chython/__init__.py +31 -0
- chython/_functions.py +69 -0
- chython/algorithms/__init__.py +18 -0
- chython/algorithms/_isomorphism.cp312-win_amd64.pyd +0 -0
- chython/algorithms/_isomorphism.pyx +189 -0
- chython/algorithms/aromatics/__init__.py +27 -0
- chython/algorithms/aromatics/_rules.py +124 -0
- chython/algorithms/aromatics/kekule.py +530 -0
- chython/algorithms/aromatics/test/__init__.py +18 -0
- chython/algorithms/aromatics/test/test_kekule.py +160 -0
- chython/algorithms/aromatics/test/test_thiele.py +263 -0
- chython/algorithms/aromatics/thiele.py +226 -0
- chython/algorithms/calculate2d/__init__.py +23 -0
- chython/algorithms/calculate2d/clean2d.js +1 -0
- chython/algorithms/calculate2d/molecule.py +149 -0
- chython/algorithms/calculate2d/reaction.py +80 -0
- chython/algorithms/depict.py +523 -0
- chython/algorithms/fingerprints/__init__.py +48 -0
- chython/algorithms/fingerprints/linear.py +208 -0
- chython/algorithms/fingerprints/morgan.py +137 -0
- chython/algorithms/fingerprints/test/__init__.py +18 -0
- chython/algorithms/fingerprints/test/test_linear.py +127 -0
- chython/algorithms/fingerprints/test/test_morgan.py +79 -0
- chython/algorithms/isomorphism.py +667 -0
- chython/algorithms/mapping/__init__.py +28 -0
- chython/algorithms/mapping/_groups.py +94 -0
- chython/algorithms/mapping/_reactions.py +72 -0
- chython/algorithms/mapping/attention.py +216 -0
- chython/algorithms/mapping/fixmapper.py +84 -0
- chython/algorithms/mapping/groups.py +137 -0
- chython/algorithms/mcs.py +202 -0
- chython/algorithms/morgan.py +82 -0
- chython/algorithms/rings.py +551 -0
- chython/algorithms/smiles.py +556 -0
- chython/algorithms/standardize/__init__.py +30 -0
- chython/algorithms/standardize/_charged.py +115 -0
- chython/algorithms/standardize/_groups.py +926 -0
- chython/algorithms/standardize/_metal_organics.py +189 -0
- chython/algorithms/standardize/_reagents.py +44 -0
- chython/algorithms/standardize/_salts.py +68 -0
- chython/algorithms/standardize/molecule.py +479 -0
- chython/algorithms/standardize/reaction.py +429 -0
- chython/algorithms/standardize/resonance.py +196 -0
- chython/algorithms/standardize/salts.py +128 -0
- chython/algorithms/standardize/saturation.py +378 -0
- chython/algorithms/standardize/test/__init__.py +18 -0
- chython/algorithms/standardize/test/test_groups.py +118 -0
- chython/algorithms/stereo.py +1222 -0
- chython/algorithms/tautomers/__init__.py +171 -0
- chython/algorithms/tautomers/_acid.py +59 -0
- chython/algorithms/tautomers/_base.py +116 -0
- chython/algorithms/tautomers/_keto_enol.py +107 -0
- chython/algorithms/tautomers/acid_base.py +214 -0
- chython/algorithms/tautomers/heteroarenes.py +108 -0
- chython/algorithms/tautomers/keto_enol.py +148 -0
- chython/algorithms/tautomers/test/__init__.py +18 -0
- chython/algorithms/tautomers/test/test_tautomers.py +80 -0
- chython/algorithms/test/__init__.py +18 -0
- chython/algorithms/test/test_isomorphism.py +58 -0
- chython/algorithms/test/test_smiles.py +76 -0
- chython/algorithms/x3dom.py +355 -0
- chython/containers/__init__.py +43 -0
- chython/containers/_pack_v2.cp312-win_amd64.pyd +0 -0
- chython/containers/_pack_v2.pyx +271 -0
- chython/containers/_unpack_v0v2.cp312-win_amd64.pyd +0 -0
- chython/containers/_unpack_v0v2.pyx +300 -0
- chython/containers/bonds.py +255 -0
- chython/containers/cgr.py +115 -0
- chython/containers/graph.py +200 -0
- chython/containers/molecule.py +695 -0
- chython/containers/query.py +66 -0
- chython/containers/reaction.py +324 -0
- chython/exceptions.py +114 -0
- chython/files/MRVrw.py +523 -0
- chython/files/PDBrw.py +257 -0
- chython/files/RDFrw.py +298 -0
- chython/files/SDFrw.py +221 -0
- chython/files/__init__.py +29 -0
- chython/files/_convert.py +207 -0
- chython/files/_mapping.py +117 -0
- chython/files/_xyz.cp312-win_amd64.pyd +0 -0
- chython/files/_xyz.pyx +74 -0
- chython/files/daylight/__init__.py +24 -0
- chython/files/daylight/parser.py +157 -0
- chython/files/daylight/smarts.py +107 -0
- chython/files/daylight/smiles.py +245 -0
- chython/files/daylight/test/__init__.py +18 -0
- chython/files/daylight/test/test_daylight_smarts.py +289 -0
- chython/files/daylight/test/test_daylight_smiles.py +101 -0
- chython/files/daylight/test/test_parser.py +118 -0
- chython/files/daylight/test/test_tokenize.py +77 -0
- chython/files/daylight/tokenize.py +376 -0
- chython/files/libinchi/__init__.py +22 -0
- chython/files/libinchi/libinchi.dll +0 -0
- chython/files/libinchi/wrapper.py +555 -0
- chython/files/mdl/__init__.py +25 -0
- chython/files/mdl/emol.py +209 -0
- chython/files/mdl/erxn.py +67 -0
- chython/files/mdl/mol.py +144 -0
- chython/files/mdl/read.py +225 -0
- chython/files/mdl/rxn.py +67 -0
- chython/files/mdl/stereo.py +63 -0
- chython/files/mdl/write.py +165 -0
- chython/files/xyz.py +78 -0
- chython/periodictable/__init__.py +69 -0
- chython/periodictable/base/__init__.py +25 -0
- chython/periodictable/base/dynamic.py +149 -0
- chython/periodictable/base/element.py +452 -0
- chython/periodictable/base/groups.py +90 -0
- chython/periodictable/base/periods.py +46 -0
- chython/periodictable/base/query.py +473 -0
- chython/periodictable/base/vector.py +119 -0
- chython/periodictable/groupI.py +252 -0
- chython/periodictable/groupII.py +223 -0
- chython/periodictable/groupIII.py +1154 -0
- chython/periodictable/groupIV.py +210 -0
- chython/periodictable/groupIX.py +196 -0
- chython/periodictable/groupV.py +192 -0
- chython/periodictable/groupVI.py +183 -0
- chython/periodictable/groupVII.py +162 -0
- chython/periodictable/groupVIII.py +161 -0
- chython/periodictable/groupX.py +166 -0
- chython/periodictable/groupXI.py +164 -0
- chython/periodictable/groupXII.py +158 -0
- chython/periodictable/groupXIII.py +239 -0
- chython/periodictable/groupXIV.py +262 -0
- chython/periodictable/groupXV.py +276 -0
- chython/periodictable/groupXVI.py +457 -0
- chython/periodictable/groupXVII.py +324 -0
- chython/periodictable/groupXVIII.py +260 -0
- chython/reactor/__init__.py +24 -0
- chython/reactor/base.py +212 -0
- chython/reactor/deprotection.py +565 -0
- chython/reactor/groups.py +128 -0
- chython/reactor/reactions/__init__.py +157 -0
- chython/reactor/reactions/_amidation.py +58 -0
- chython/reactor/reactions/_amine_isocyanate.py +52 -0
- chython/reactor/reactions/_buchwald_hartwig.py +50 -0
- chython/reactor/reactions/_esterification.py +49 -0
- chython/reactor/reactions/_macmillan.py +43 -0
- chython/reactor/reactions/_reductive_amination.py +50 -0
- chython/reactor/reactions/_sonogashira.py +49 -0
- chython/reactor/reactions/_sulfonamidation.py +52 -0
- chython/reactor/reactions/_suzuki_miyaura.py +88 -0
- chython/reactor/reactions/ufe.py +99 -0
- chython/reactor/reactor.py +170 -0
- chython/reactor/retro/__init__.py +77 -0
- chython/reactor/retro/_amidation.py +39 -0
- chython/reactor/retro/_aryl_amination.py +32 -0
- chython/reactor/retro/_mitsunobu.py +49 -0
- chython/reactor/retro/_sonogashira.py +49 -0
- chython/reactor/retro/_suzuki_miyaura.py +54 -0
- chython/reactor/scaffold.py +122 -0
- chython/reactor/test/__init__.py +18 -0
- chython/reactor/test/test_deprotection.py +57 -0
- chython/reactor/test/test_reactor.py +40 -0
- chython/reactor/test/test_scaffold.py +57 -0
- chython/reactor/test/test_transformer.py +40 -0
- chython/reactor/transformer.py +62 -0
- chython/utils/__init__.py +57 -0
- chython/utils/free_wilson.py +114 -0
- chython/utils/grid.py +130 -0
- chython/utils/rdkit.py +165 -0
- chython/utils/retro.py +139 -0
- chython/utils/svg.py +57 -0
- chython/utils/test/__init__.py +18 -0
- chython/utils/test/test_rdkit.py +71 -0
- chython-2.4.dist-info/LICENSE +165 -0
- chython-2.4.dist-info/METADATA +101 -0
- chython-2.4.dist-info/RECORD +171 -0
- chython-2.4.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
from collections import deque
|
|
21
|
+
from itertools import product
|
|
22
|
+
from typing import Iterator, Optional, List
|
|
23
|
+
from ._amidation import template as amidation_template
|
|
24
|
+
from ._amine_isocyanate import template as amine_isocyanate_template
|
|
25
|
+
from ._buchwald_hartwig import template as buchwald_hartwig_template
|
|
26
|
+
from ._esterification import template as esterification_template
|
|
27
|
+
from ._macmillan import template as macmillan_template
|
|
28
|
+
from ._reductive_amination import template as reductive_amination_template
|
|
29
|
+
from ._sonogashira import template as songashira_template
|
|
30
|
+
from ._sulfonamidation import template as sulfonamidation_template
|
|
31
|
+
from ._suzuki_miyaura import template as suzuki_miyaura_template
|
|
32
|
+
from ..reactor import Reactor, fix_mapping_overlap
|
|
33
|
+
from ... import smarts, ReactionContainer, MoleculeContainer
|
|
34
|
+
|
|
35
|
+
"""
|
|
36
|
+
Predefined reactors for common reactions.
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
#################
|
|
41
|
+
# Magic Factory #
|
|
42
|
+
#################
|
|
43
|
+
|
|
44
|
+
__all__ = ['PreparedReactor', 'prepare_reactor']
|
|
45
|
+
__all__.extend(k[:-9] for k, v in globals().items() if k.endswith('_template') and isinstance(v, dict) and v)
|
|
46
|
+
_cache = {}
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class PreparedReactor:
|
|
50
|
+
"""
|
|
51
|
+
Prepared reactors with predefined sets of templates.
|
|
52
|
+
"""
|
|
53
|
+
def __init__(self, rules, name):
|
|
54
|
+
self.name = name
|
|
55
|
+
self.rules = rules
|
|
56
|
+
|
|
57
|
+
self.rxn_ms = []
|
|
58
|
+
self.rxn_os = []
|
|
59
|
+
self.alerts = []
|
|
60
|
+
|
|
61
|
+
self.global_alerts = [smarts(x) for x in rules['alerts']]
|
|
62
|
+
|
|
63
|
+
for c in rules['templates']:
|
|
64
|
+
alerts = [smarts(x) for x in c['alerts']]
|
|
65
|
+
p = smarts(c['product'])
|
|
66
|
+
for rs in product(*([smarts(x) for x in c[x]] for x in 'ABCD' if x in c)):
|
|
67
|
+
self.rxn_ms.append(Reactor(rs, [p], one_shot=False, automorphism_filter=False)) # noqa
|
|
68
|
+
self.rxn_os.append(Reactor(rs, [p], one_shot=True, automorphism_filter=False)) # noqa
|
|
69
|
+
self.alerts.append(alerts)
|
|
70
|
+
|
|
71
|
+
def __repr__(self):
|
|
72
|
+
return f'{__name__}.{self.name}'
|
|
73
|
+
|
|
74
|
+
def __str__(self):
|
|
75
|
+
return f'Reactor<{self.rules["name"]}>'
|
|
76
|
+
|
|
77
|
+
def __call__(self, *molecules: MoleculeContainer, one_shot=True, check_alerts: bool = True,
|
|
78
|
+
excess: Optional[List[int]] = None) -> Iterator[ReactionContainer]:
|
|
79
|
+
"""
|
|
80
|
+
:param molecules: Reactants molecules.
|
|
81
|
+
:param one_shot: Generate only single stage products. Otherwise, all possible combinations, including products.
|
|
82
|
+
:param check_alerts: Check structural alerts of reactants.
|
|
83
|
+
:param excess: Molecules indices which can be involved in multistep synthesis. All by default.
|
|
84
|
+
"""
|
|
85
|
+
if not molecules:
|
|
86
|
+
raise ValueError('empty molecule list')
|
|
87
|
+
if check_alerts and any(a < m for a, m in product(self.global_alerts, molecules)):
|
|
88
|
+
return
|
|
89
|
+
|
|
90
|
+
molecules = fix_mapping_overlap(molecules)
|
|
91
|
+
seen = set()
|
|
92
|
+
if one_shot:
|
|
93
|
+
for rx, al in zip(self.rxn_os, self.alerts):
|
|
94
|
+
if check_alerts and any(a < m for a, m in product(al, molecules)):
|
|
95
|
+
continue
|
|
96
|
+
for r in rx(*molecules):
|
|
97
|
+
if str(r) in seen:
|
|
98
|
+
continue
|
|
99
|
+
seen.add(str(r))
|
|
100
|
+
yield r
|
|
101
|
+
return
|
|
102
|
+
|
|
103
|
+
excess = molecules if excess is None else [molecules[x] for x in excess]
|
|
104
|
+
stack = deque([])
|
|
105
|
+
for i, (rx, al) in enumerate(zip(self.rxn_ms, self.alerts)):
|
|
106
|
+
if check_alerts and any(a < m for a, m in product(al, molecules)):
|
|
107
|
+
continue
|
|
108
|
+
x = self.rxn_ms.copy()
|
|
109
|
+
del x[i]
|
|
110
|
+
stack.appendleft((rx, molecules, x))
|
|
111
|
+
|
|
112
|
+
while stack:
|
|
113
|
+
rx, rct, nxt_rxn = stack.pop()
|
|
114
|
+
for r in rx(*rct):
|
|
115
|
+
if str(r) in seen:
|
|
116
|
+
continue
|
|
117
|
+
seen.add(str(r))
|
|
118
|
+
|
|
119
|
+
r = ReactionContainer([x.copy() for x in molecules], r.products)
|
|
120
|
+
yield r
|
|
121
|
+
|
|
122
|
+
x = excess.copy()
|
|
123
|
+
for p in reversed(r.products):
|
|
124
|
+
x.insert(0, p.copy())
|
|
125
|
+
x = fix_mapping_overlap(x)
|
|
126
|
+
if excess is not molecules:
|
|
127
|
+
# expected that product can react with all excess molecules simultaneously.
|
|
128
|
+
# e.g. multicomponent reaction (Ugi)
|
|
129
|
+
for m, nrx in enumerate(nxt_rxn):
|
|
130
|
+
z = nxt_rxn.copy()
|
|
131
|
+
del z[m]
|
|
132
|
+
stack.append((nrx, x.copy(), z))
|
|
133
|
+
else: # drop one of the reactants
|
|
134
|
+
for n in range(len(r.products), len(x)):
|
|
135
|
+
y = x.copy()
|
|
136
|
+
del y[n]
|
|
137
|
+
for m, nrx in enumerate(nxt_rxn):
|
|
138
|
+
z = nxt_rxn.copy()
|
|
139
|
+
del z[m]
|
|
140
|
+
stack.append((nrx, y, z))
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
prepare_reactor = PreparedReactor # backward compatibility
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
def __getattr__(name):
|
|
147
|
+
try:
|
|
148
|
+
return _cache[name]
|
|
149
|
+
except KeyError:
|
|
150
|
+
if name in __all__:
|
|
151
|
+
_cache[name] = t = PreparedReactor(globals()[f'{name}_template'], name)
|
|
152
|
+
return t
|
|
153
|
+
raise AttributeError
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
def __dir__():
|
|
157
|
+
return __all__
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template = {
|
|
23
|
+
'name': 'Amidation Reaction',
|
|
24
|
+
'description': 'Amides formation from acids and amines',
|
|
25
|
+
'templates': [
|
|
26
|
+
{
|
|
27
|
+
'A': [
|
|
28
|
+
# [H,R]COOH
|
|
29
|
+
'[O;x0;z2;M]=[C;x2:1][O;D1:2]'
|
|
30
|
+
],
|
|
31
|
+
'B': [
|
|
32
|
+
# Ar-NH2
|
|
33
|
+
'[N;D1;x0;z1:3][C;a;M]',
|
|
34
|
+
# Alk-NH2
|
|
35
|
+
'[N;D1;x0;z1:3][C;z1;x1;M]',
|
|
36
|
+
# Ar-NH-Ar
|
|
37
|
+
'[N;D2;x0;z1:3]([C;a;M])[C;a;M]',
|
|
38
|
+
# Alk-NH-Ar
|
|
39
|
+
'[N;D2;x0;z1:3]([C;a;M])[C;z1;x1;M]',
|
|
40
|
+
# Alk2NH
|
|
41
|
+
'[N;D2;x0;z1:3]([C;z1;x1;M])[C;z1;x1;M]',
|
|
42
|
+
# N1COCCC1
|
|
43
|
+
'[N;D2;x0;z1;r5,r6,r7,r8:3]([C;z1;x2;M]-;@[O;M])[C;z1;x1;M]',
|
|
44
|
+
# CNO[R,H]
|
|
45
|
+
'[N;D2;x1;z1:3]([O;x1;z1;M])[C;z1;x1;M]',
|
|
46
|
+
# C[NH]NAc
|
|
47
|
+
'[N;D2;x1;z1:3]([N;D2;z1;x1;M][C;x2;z2;M]=[O;M])[C;z1;x1;M]'
|
|
48
|
+
],
|
|
49
|
+
'product': '[A:1]-[A:3]',
|
|
50
|
+
'alerts': [],
|
|
51
|
+
'ufe': {
|
|
52
|
+
'A': 2, # use existing terminal atom
|
|
53
|
+
'B': '[A:3][At;M]' # add temporary terminal atom
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
'alerts': ['[O;D1;x0;z1][C;z1;x1]', '[O;D1;z1][C,N;a]'] # global untolerant groups
|
|
58
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template = {
|
|
23
|
+
'name': 'Amine with isocyanate reaction',
|
|
24
|
+
'description': 'Amine with isocyanate reaction, C-N coupling reaction',
|
|
25
|
+
'templates': [
|
|
26
|
+
{
|
|
27
|
+
'A': [
|
|
28
|
+
# RN=C=O
|
|
29
|
+
'[C;D2;x2;z3:2](=[O;M])=[N;D2;x0;z2:1]'
|
|
30
|
+
],
|
|
31
|
+
'B': [
|
|
32
|
+
# Ar-NH2
|
|
33
|
+
'[N;D1;x0;z1:3][C;a;M]',
|
|
34
|
+
# Alk-NH2
|
|
35
|
+
'[N;D1;x0;z1:3][C;z1;x1;M]',
|
|
36
|
+
# Ar-NH-Ar
|
|
37
|
+
'[N;D2;x0;z1:3]([C;a;M])[C;a;M]',
|
|
38
|
+
# Alk-NH-Ar
|
|
39
|
+
'[N;D2;x0;z1:3]([C;a;M])[C;z1;x1;M]',
|
|
40
|
+
# Alk2NH
|
|
41
|
+
'[N;D2;x0;z1:3]([C;z1;x1;M])[C;z1;x1;M]'
|
|
42
|
+
],
|
|
43
|
+
'product': '[A:1][A:2]-[A:3]',
|
|
44
|
+
'alerts': [],
|
|
45
|
+
'ufe': {
|
|
46
|
+
'A': '[A:1][A:2][At;M]',
|
|
47
|
+
'B': '[A:3][At;M]'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
],
|
|
51
|
+
'alerts': []
|
|
52
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template = {
|
|
23
|
+
'name': 'Buchwald-Hartwig reaction',
|
|
24
|
+
'description': 'Buchwald-Hartwig amination reaction, C-N coupling reaction',
|
|
25
|
+
'templates': [
|
|
26
|
+
{
|
|
27
|
+
'A': [
|
|
28
|
+
# Hal-Ar
|
|
29
|
+
'[Cl,Br,I;D1:1]-[C;a:2]'
|
|
30
|
+
],
|
|
31
|
+
'B': [
|
|
32
|
+
# Ar-NH2
|
|
33
|
+
'[N;D1;x0;z1:3][C;a;M]',
|
|
34
|
+
# Alk-NH2
|
|
35
|
+
'[N;D1;x0;z1:3][C;z1;x1;M]',
|
|
36
|
+
# Alk-NH-Ar
|
|
37
|
+
'[N;D2;x0;z1:3]([C;a;M])[C;z1;x1;M]',
|
|
38
|
+
# Alk2NH
|
|
39
|
+
'[N;D2;x0;z1:3]([C;z1;x1;M])[C;z1;x1;M]'
|
|
40
|
+
],
|
|
41
|
+
'product': '[A:2]-[A:3]',
|
|
42
|
+
'alerts': [],
|
|
43
|
+
'ufe': {
|
|
44
|
+
'A': 1,
|
|
45
|
+
'B': '[A:3][At;M]'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
'alerts': []
|
|
50
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template = {
|
|
23
|
+
'name': 'Fischer esterification',
|
|
24
|
+
'description': 'Esters formation from alcohols and acids',
|
|
25
|
+
'templates': [
|
|
26
|
+
# reactants sets fully mixable
|
|
27
|
+
{
|
|
28
|
+
'A': [
|
|
29
|
+
# C(=O)O
|
|
30
|
+
'[O;D1;x0;z1:2]-[C;x2;z2:1]=[O;M]',
|
|
31
|
+
],
|
|
32
|
+
'B': [
|
|
33
|
+
# CO
|
|
34
|
+
'[O;D1;x0;z1:3]-[C;x1;z1;M]'
|
|
35
|
+
],
|
|
36
|
+
'product': '[A:1]-[A:3]',
|
|
37
|
+
# condition-specific untolerant groups
|
|
38
|
+
'alerts': [
|
|
39
|
+
'[S;D1;x0;z1][C;x1;z1]', # thiol
|
|
40
|
+
'[O,S;D1;z1][A;a]' # [thia]phenol
|
|
41
|
+
],
|
|
42
|
+
'ufe': {
|
|
43
|
+
'A': 2,
|
|
44
|
+
'B': '[A:3][At;M]'
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
'alerts': [] # global untolerant groups
|
|
49
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# This file is part of chython.
|
|
5
|
+
#
|
|
6
|
+
# chython is free software; you can redistribute it and/or modify
|
|
7
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
8
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
9
|
+
# (at your option) any later version.
|
|
10
|
+
#
|
|
11
|
+
# This program is distributed in the hope that it will be useful,
|
|
12
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
# GNU Lesser General Public License for more details.
|
|
15
|
+
#
|
|
16
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
17
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
18
|
+
#
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
template = {
|
|
22
|
+
'name': 'Macmillan',
|
|
23
|
+
'description': 'Deoxygenative C-C coupling reaction',
|
|
24
|
+
'templates': [
|
|
25
|
+
{
|
|
26
|
+
'A': [
|
|
27
|
+
# Hal-Ar
|
|
28
|
+
'[Cl,Br,I;D1:1]-[C;a:2]'
|
|
29
|
+
],
|
|
30
|
+
'B': [
|
|
31
|
+
# CO
|
|
32
|
+
'[O;D1;x0;z1:3]-[C;x1;z1:4]'
|
|
33
|
+
],
|
|
34
|
+
'product': '[A:2]-[A:4]',
|
|
35
|
+
'alerts': [],
|
|
36
|
+
'ufe': {
|
|
37
|
+
'A': 1,
|
|
38
|
+
'B': 3
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
],
|
|
42
|
+
'alerts': []
|
|
43
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template = {
|
|
23
|
+
'name': 'Amine carbonyl reductive amination reaction',
|
|
24
|
+
'description': 'Amines formation from carbonyls and amines',
|
|
25
|
+
'templates': [
|
|
26
|
+
{
|
|
27
|
+
'A': [
|
|
28
|
+
# O=CR2
|
|
29
|
+
'[O;x0;z2:2]=[C;x1:1]'
|
|
30
|
+
],
|
|
31
|
+
'B': [
|
|
32
|
+
# Ar-NH2
|
|
33
|
+
'[N;D1;x0;z1:3][C;a;M]',
|
|
34
|
+
# Alk-NH2
|
|
35
|
+
'[N;D1;x0;z1:3][C;z1;x1;M]',
|
|
36
|
+
# Alk-NH-Ar
|
|
37
|
+
'[N;D2;x0;z1:3]([C;a;M])[C;z1;x1;M]',
|
|
38
|
+
# Alk2NH
|
|
39
|
+
'[N;D2;x0;z1:3]([C;z1;x1;M])[C;z1;x1;M]'
|
|
40
|
+
],
|
|
41
|
+
'product': '[A:1]-[A:3]',
|
|
42
|
+
'alerts': [],
|
|
43
|
+
'ufe': {
|
|
44
|
+
'A': 2,
|
|
45
|
+
'B': '[A:3][At;M]'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
'alerts': []
|
|
50
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template = {
|
|
23
|
+
'name': 'Sonogashira reaction',
|
|
24
|
+
'description': 'Sonogashira reaction, C-C coupling reaction. It employs a palladium catalyst as well as copper'
|
|
25
|
+
'co-catalyst',
|
|
26
|
+
'templates': [
|
|
27
|
+
{
|
|
28
|
+
'A': [
|
|
29
|
+
# HC#C-R
|
|
30
|
+
'[C;D1;x0;z3:1]#[C;D2;x0;M]'
|
|
31
|
+
],
|
|
32
|
+
'B': [
|
|
33
|
+
# Ar-Hal
|
|
34
|
+
'[Cl,Br,I;D1:3]-[C;a:2]',
|
|
35
|
+
# C=C-Hal
|
|
36
|
+
'[Cl,Br,I;D1:3]-[C;x1;z2:2]=[C;x0;z2;M]',
|
|
37
|
+
# R-C(=O)-Hal
|
|
38
|
+
'[Cl,Br,I;D1:3]-[C;x2;z2:2]=[O;M]'
|
|
39
|
+
],
|
|
40
|
+
'product': '[A:1]-[A:2]',
|
|
41
|
+
'alerts': [],
|
|
42
|
+
'ufe': {
|
|
43
|
+
'A': '[A:1][At;M]',
|
|
44
|
+
'B': 3
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
'alerts': []
|
|
49
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template = {
|
|
23
|
+
'name': 'Sulfoamination reaction',
|
|
24
|
+
'description': 'Sulfoamination reaction, S-N coupling reaction',
|
|
25
|
+
'templates': [
|
|
26
|
+
{
|
|
27
|
+
'A': [
|
|
28
|
+
# RS(=O)(=O)X
|
|
29
|
+
'[S;D4;x3;z3:1]([O,F,Cl,Br,I;D1:2])(=[O;M])(=[O;M])[C;M]'
|
|
30
|
+
],
|
|
31
|
+
'B': [
|
|
32
|
+
# Ar-NH2
|
|
33
|
+
'[N;D1;x0;z1:3][C;a;M]',
|
|
34
|
+
# Alk-NH2
|
|
35
|
+
'[N;D1;x0;z1:3][C;z1;x1;M]',
|
|
36
|
+
# Ar-NH-Ar
|
|
37
|
+
'[N;D2;x0;z1:3]([C;a;M])[C;a;M]',
|
|
38
|
+
# Alk-NH-Ar
|
|
39
|
+
'[N;D2;x0;z1:3]([C;a;M])[C;z1;x1;M]',
|
|
40
|
+
# Alk2NH
|
|
41
|
+
'[N;D2;x0;z1:3]([C;z1;x1;M])[C;z1;x1;M]'
|
|
42
|
+
],
|
|
43
|
+
'product': '[A:1]-[A:3]',
|
|
44
|
+
'alerts': [],
|
|
45
|
+
'ufe': {
|
|
46
|
+
'A': 2,
|
|
47
|
+
'B': '[A:3][At;M]'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
'alerts': []
|
|
52
|
+
}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2022-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
4
|
+
# Copyright 2023 Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
5
|
+
# This file is part of chython.
|
|
6
|
+
#
|
|
7
|
+
# chython is free software; you can redistribute it and/or modify
|
|
8
|
+
# it under the terms of the GNU Lesser General Public License as published by
|
|
9
|
+
# the Free Software Foundation; either version 3 of the License, or
|
|
10
|
+
# (at your option) any later version.
|
|
11
|
+
#
|
|
12
|
+
# This program is distributed in the hope that it will be useful,
|
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
# GNU Lesser General Public License for more details.
|
|
16
|
+
#
|
|
17
|
+
# You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
# along with this program; if not, see <https://www.gnu.org/licenses/>.
|
|
19
|
+
#
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
template = {
|
|
23
|
+
'name': 'Suzuki-Miyaura reaction',
|
|
24
|
+
'description': 'Suzuki-Miyaura C-C coupling reaction',
|
|
25
|
+
'templates': [
|
|
26
|
+
{
|
|
27
|
+
'A': [
|
|
28
|
+
# X-Ar
|
|
29
|
+
'[Cl,Br,I;D1:1]-[C;a:2]'
|
|
30
|
+
],
|
|
31
|
+
'B': [
|
|
32
|
+
# Ar-B
|
|
33
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;a:3]',
|
|
34
|
+
# C=C-B, [N,O]C=C-B, C=C([N,O])-B
|
|
35
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;x1,x2;z2:3]=[C;x0,x1;z2;M]',
|
|
36
|
+
# B-C#C
|
|
37
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;D2;x1;z3:3]',
|
|
38
|
+
# B-C(alk)
|
|
39
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;x1,x2;z1:3]'
|
|
40
|
+
],
|
|
41
|
+
'product': '[A:2]-[A:3]',
|
|
42
|
+
'alerts': [],
|
|
43
|
+
'ufe': {
|
|
44
|
+
'A': 1,
|
|
45
|
+
'B': '[A:3][At;M]'
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
'A': [
|
|
50
|
+
# X-C=C
|
|
51
|
+
'[Cl,Br,I;D1:1]-[C;x1,x2;z2:2]=[C;x0,x1;z2;M]'
|
|
52
|
+
],
|
|
53
|
+
'B': [
|
|
54
|
+
# Ar-B
|
|
55
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;a:3]',
|
|
56
|
+
# C=C-B, [N,O]C=C-B, C=C([N,O])-B
|
|
57
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;x1,x2;z2:3]=[C;x0,x1;z2;M]',
|
|
58
|
+
# B-C(alk)
|
|
59
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;x1,x2;z1:3]'
|
|
60
|
+
],
|
|
61
|
+
'product': '[A:2]-[A:3]',
|
|
62
|
+
'alerts': [],
|
|
63
|
+
'ufe': {
|
|
64
|
+
'A': 1,
|
|
65
|
+
'B': '[A:3][At;M]'
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
'A': [
|
|
70
|
+
# X-C(alk)
|
|
71
|
+
'[Cl,Br;D1:1]-[C;x1,x2;z1:2]'
|
|
72
|
+
],
|
|
73
|
+
'B': [
|
|
74
|
+
# Ar-B
|
|
75
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;a:3]',
|
|
76
|
+
# C=C-B, [N,O]C=C-B, C=C([N,O])-B
|
|
77
|
+
'[B;D3;x2;z1:4]([O:5])([O:6])-[C;x1,x2;z2:3]=[C;x0,x1;z2;M]'
|
|
78
|
+
],
|
|
79
|
+
'product': '[A:2]-[A:3]',
|
|
80
|
+
'alerts': [],
|
|
81
|
+
'ufe': {
|
|
82
|
+
'A': 1,
|
|
83
|
+
'B': '[A:3][At;M]'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
'alerts': []
|
|
88
|
+
}
|