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,115 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
#
|
|
3
|
+
# Copyright 2021-2023 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
|
+
from lazy_object_proxy import Proxy
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _fixed_rules():
|
|
23
|
+
"""
|
|
24
|
+
Rules working without Morgan.
|
|
25
|
+
These rules are used for charge canonization for heterocycles
|
|
26
|
+
"""
|
|
27
|
+
from ... import smarts
|
|
28
|
+
|
|
29
|
+
rules = []
|
|
30
|
+
|
|
31
|
+
# N1C=CN2[NH+]=CC=C12>>N1C=CC2=[NH+]C=CN12
|
|
32
|
+
# first and second atoms are ryrrole-like
|
|
33
|
+
# second atom will be charged
|
|
34
|
+
# if fix is True, third atom will be uncharged else first
|
|
35
|
+
q = smarts('[N;a;r5;+:1]:1:[N;r5:3]:2:[C;r5](:[N;r5:2]:[C;r5]:[C;r5]:2):[C;r5]:[C;r5]:1')
|
|
36
|
+
rules.append((q, False))
|
|
37
|
+
|
|
38
|
+
# N1C=C[N+]2=C1C=CN2>>N1C=CC2=[NH+]C=CN12
|
|
39
|
+
q = smarts('[N;a;r5;+:3]:1:2:[N;r5:1]:[C;r5]:[C;r5]:[C;r5]:1:[N;r5:2]:[C;r5]:[C;r5]:2')
|
|
40
|
+
rules.append((q, True))
|
|
41
|
+
|
|
42
|
+
# N1C=C2C=CN[N+]2=C1>>N1C=CC2=C[NH+]=CN12
|
|
43
|
+
q = smarts('[N;a;r5;+:3]:1:2:[N;r5:1]:[C;r5]:[C;r5]:[C;r5]:1:[C;r5]:[N;r5:2]:[C;r5]:2')
|
|
44
|
+
rules.append((q, True))
|
|
45
|
+
|
|
46
|
+
# N1C=C2NC=C[N+]2=C1>>N1C=CN2C=[NH+]C=C12
|
|
47
|
+
q = smarts('[N;a;r5;+:3]:1:2:[C;r5](:[N;r5:1]:[C;r5]:[C;r5]:1):[C;r5]:[N;r5:2]:[C;r5]:2')
|
|
48
|
+
rules.append((q, True))
|
|
49
|
+
|
|
50
|
+
# N1C2=[NH+]C=CC2=CC=C1>>N1C=CC2=CC=C[NH+]=C12
|
|
51
|
+
q = smarts('[N;a;r5;+:1]:1:[C;r6]:2:[N;r6:2]:[C;r6]:[C;r6]:[C;r6]:[C;r5]:2:[C;r5]:[C;r5]:1')
|
|
52
|
+
rules.append((q, False))
|
|
53
|
+
|
|
54
|
+
# N1C=C2C(=CC=[NH+]2)C=C1>>N1C=CC2=CC=[NH+]C=C12
|
|
55
|
+
q = smarts('[N;a;r5;+:1]:1:[C;r6]:2:[C;r6]:[N;r6:2]:[C;r6]:[C;r6]:[C;r5]:2:[C;r5]:[C;r5]:1')
|
|
56
|
+
rules.append((q, False))
|
|
57
|
+
|
|
58
|
+
# C1=CC=2C(=[NH+]1)C=CNC=2>>N1C=CC2=C[NH+]=CC=C12
|
|
59
|
+
q = smarts('[N;a;r5;+:1]:1:[C;r6]:2:[C;r6]:[C;r6]:[N;r6:2]:[C;r6]:[C;r5]:2:[C;r5]:[C;r5]:1')
|
|
60
|
+
rules.append((q, False))
|
|
61
|
+
|
|
62
|
+
# C=1C=[NH+]C=2C=1NC=CC=2>>N1C=CC2=[NH+]C=CC=C12
|
|
63
|
+
q = smarts('[N;a;r5;+:1]:1:[C;r6]:2:[C;r6]:[C;r6]:[C;r6]:[N;r6:2]:[C;r5]:2:[C;r5]:[C;r5]:1')
|
|
64
|
+
rules.append((q, False))
|
|
65
|
+
|
|
66
|
+
# C1=2C=[NH+]C=C1NC=CC=2>>N1C=C2C=CC=[NH+]C2=C1
|
|
67
|
+
q = smarts('[N;a;r5;+:1]:1:[C;r5]:[C;r6]:2:[N;r6:2]:[C;r6]:[C;r6]:[C;r6]:[C;r5]:2:[C;r5]:1')
|
|
68
|
+
rules.append((q, False))
|
|
69
|
+
|
|
70
|
+
# C1=2C=CNC=C1C=[NH+]C=2>>N1C=C2C=C[NH+]=CC2=C1
|
|
71
|
+
q = smarts('[N;a;r5;+:1]:1:[C;r5]:[C;r6]:2:[C;r6]:[N;r6:2]:[C;r6]:[C;r6]:[C;r5]:2:[C;r5]:1')
|
|
72
|
+
rules.append((q, False))
|
|
73
|
+
return rules
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _morgan_rules():
|
|
77
|
+
"""
|
|
78
|
+
Rules working with Morgan.
|
|
79
|
+
These rules are for charge canonization
|
|
80
|
+
"""
|
|
81
|
+
from ... import smarts
|
|
82
|
+
|
|
83
|
+
rules = []
|
|
84
|
+
|
|
85
|
+
# N1C=CC2=CC=[NH+]N12
|
|
86
|
+
q = smarts('[N;a;r5;+:1]:1:[N;D3]:2:[N;r5:2]:[C;r5]:[C;r5]:[C;D3]:2:[C;r5]:[C;r5]:1')
|
|
87
|
+
rules.append((q, False))
|
|
88
|
+
|
|
89
|
+
# N1C=CC2=[N+]1NC=C2
|
|
90
|
+
q = smarts('[N;a;D3;r5;+:3]:1:2:[N;r5:1]:[C;r5]:[C;r5]:[C;D3]:1:[C;r5]:[C;r5]:[N;r5:2]:2')
|
|
91
|
+
rules.append((q, True))
|
|
92
|
+
|
|
93
|
+
# N1C=CN2C=C[NH+]=C12
|
|
94
|
+
q = smarts('[N;a;r5;+:1]:1:[C;D3]:2:[N;r5:2]:[C;r5]:[C;r5]:[N;D3]:2:[C;r5]:[C;r5]:1')
|
|
95
|
+
rules.append((q, False))
|
|
96
|
+
|
|
97
|
+
# N1C=C[N+]2=C1NC=C2
|
|
98
|
+
q = smarts('[N;a;D3;r5;+:3]:1:2:[C;D3](:[N;r5:1]:[C;r5]:[C;r5]:1):[N;r5:2]:[C;r5]:[C;r5]:2')
|
|
99
|
+
rules.append((q, True))
|
|
100
|
+
|
|
101
|
+
# imidazole
|
|
102
|
+
q = smarts('[N;a;r5;+:1]:1:[C;r5]:[N;r5:2]:[C;r5]:[C;r5]:1')
|
|
103
|
+
rules.append((q, False))
|
|
104
|
+
|
|
105
|
+
# pyrazole+
|
|
106
|
+
q = smarts('[N;a;r5;+:1]:1:[N;r5:2]:[C;r5]:[C;r5]:[C;r5]:1')
|
|
107
|
+
rules.append((q, False))
|
|
108
|
+
return rules
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
fixed_rules = Proxy(_fixed_rules)
|
|
112
|
+
morgan_rules = Proxy(_morgan_rules)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
__all__ = ['fixed_rules', 'morgan_rules']
|