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.
Files changed (171) hide show
  1. chython/__init__.py +31 -0
  2. chython/_functions.py +69 -0
  3. chython/algorithms/__init__.py +18 -0
  4. chython/algorithms/_isomorphism.cp312-win_amd64.pyd +0 -0
  5. chython/algorithms/_isomorphism.pyx +189 -0
  6. chython/algorithms/aromatics/__init__.py +27 -0
  7. chython/algorithms/aromatics/_rules.py +124 -0
  8. chython/algorithms/aromatics/kekule.py +530 -0
  9. chython/algorithms/aromatics/test/__init__.py +18 -0
  10. chython/algorithms/aromatics/test/test_kekule.py +160 -0
  11. chython/algorithms/aromatics/test/test_thiele.py +263 -0
  12. chython/algorithms/aromatics/thiele.py +226 -0
  13. chython/algorithms/calculate2d/__init__.py +23 -0
  14. chython/algorithms/calculate2d/clean2d.js +1 -0
  15. chython/algorithms/calculate2d/molecule.py +149 -0
  16. chython/algorithms/calculate2d/reaction.py +80 -0
  17. chython/algorithms/depict.py +523 -0
  18. chython/algorithms/fingerprints/__init__.py +48 -0
  19. chython/algorithms/fingerprints/linear.py +208 -0
  20. chython/algorithms/fingerprints/morgan.py +137 -0
  21. chython/algorithms/fingerprints/test/__init__.py +18 -0
  22. chython/algorithms/fingerprints/test/test_linear.py +127 -0
  23. chython/algorithms/fingerprints/test/test_morgan.py +79 -0
  24. chython/algorithms/isomorphism.py +667 -0
  25. chython/algorithms/mapping/__init__.py +28 -0
  26. chython/algorithms/mapping/_groups.py +94 -0
  27. chython/algorithms/mapping/_reactions.py +72 -0
  28. chython/algorithms/mapping/attention.py +216 -0
  29. chython/algorithms/mapping/fixmapper.py +84 -0
  30. chython/algorithms/mapping/groups.py +137 -0
  31. chython/algorithms/mcs.py +202 -0
  32. chython/algorithms/morgan.py +82 -0
  33. chython/algorithms/rings.py +551 -0
  34. chython/algorithms/smiles.py +556 -0
  35. chython/algorithms/standardize/__init__.py +30 -0
  36. chython/algorithms/standardize/_charged.py +115 -0
  37. chython/algorithms/standardize/_groups.py +926 -0
  38. chython/algorithms/standardize/_metal_organics.py +189 -0
  39. chython/algorithms/standardize/_reagents.py +44 -0
  40. chython/algorithms/standardize/_salts.py +68 -0
  41. chython/algorithms/standardize/molecule.py +479 -0
  42. chython/algorithms/standardize/reaction.py +429 -0
  43. chython/algorithms/standardize/resonance.py +196 -0
  44. chython/algorithms/standardize/salts.py +128 -0
  45. chython/algorithms/standardize/saturation.py +378 -0
  46. chython/algorithms/standardize/test/__init__.py +18 -0
  47. chython/algorithms/standardize/test/test_groups.py +118 -0
  48. chython/algorithms/stereo.py +1222 -0
  49. chython/algorithms/tautomers/__init__.py +171 -0
  50. chython/algorithms/tautomers/_acid.py +59 -0
  51. chython/algorithms/tautomers/_base.py +116 -0
  52. chython/algorithms/tautomers/_keto_enol.py +107 -0
  53. chython/algorithms/tautomers/acid_base.py +214 -0
  54. chython/algorithms/tautomers/heteroarenes.py +108 -0
  55. chython/algorithms/tautomers/keto_enol.py +148 -0
  56. chython/algorithms/tautomers/test/__init__.py +18 -0
  57. chython/algorithms/tautomers/test/test_tautomers.py +80 -0
  58. chython/algorithms/test/__init__.py +18 -0
  59. chython/algorithms/test/test_isomorphism.py +58 -0
  60. chython/algorithms/test/test_smiles.py +76 -0
  61. chython/algorithms/x3dom.py +355 -0
  62. chython/containers/__init__.py +43 -0
  63. chython/containers/_pack_v2.cp312-win_amd64.pyd +0 -0
  64. chython/containers/_pack_v2.pyx +271 -0
  65. chython/containers/_unpack_v0v2.cp312-win_amd64.pyd +0 -0
  66. chython/containers/_unpack_v0v2.pyx +300 -0
  67. chython/containers/bonds.py +255 -0
  68. chython/containers/cgr.py +115 -0
  69. chython/containers/graph.py +200 -0
  70. chython/containers/molecule.py +695 -0
  71. chython/containers/query.py +66 -0
  72. chython/containers/reaction.py +324 -0
  73. chython/exceptions.py +114 -0
  74. chython/files/MRVrw.py +523 -0
  75. chython/files/PDBrw.py +257 -0
  76. chython/files/RDFrw.py +298 -0
  77. chython/files/SDFrw.py +221 -0
  78. chython/files/__init__.py +29 -0
  79. chython/files/_convert.py +207 -0
  80. chython/files/_mapping.py +117 -0
  81. chython/files/_xyz.cp312-win_amd64.pyd +0 -0
  82. chython/files/_xyz.pyx +74 -0
  83. chython/files/daylight/__init__.py +24 -0
  84. chython/files/daylight/parser.py +157 -0
  85. chython/files/daylight/smarts.py +107 -0
  86. chython/files/daylight/smiles.py +245 -0
  87. chython/files/daylight/test/__init__.py +18 -0
  88. chython/files/daylight/test/test_daylight_smarts.py +289 -0
  89. chython/files/daylight/test/test_daylight_smiles.py +101 -0
  90. chython/files/daylight/test/test_parser.py +118 -0
  91. chython/files/daylight/test/test_tokenize.py +77 -0
  92. chython/files/daylight/tokenize.py +376 -0
  93. chython/files/libinchi/__init__.py +22 -0
  94. chython/files/libinchi/libinchi.dll +0 -0
  95. chython/files/libinchi/wrapper.py +555 -0
  96. chython/files/mdl/__init__.py +25 -0
  97. chython/files/mdl/emol.py +209 -0
  98. chython/files/mdl/erxn.py +67 -0
  99. chython/files/mdl/mol.py +144 -0
  100. chython/files/mdl/read.py +225 -0
  101. chython/files/mdl/rxn.py +67 -0
  102. chython/files/mdl/stereo.py +63 -0
  103. chython/files/mdl/write.py +165 -0
  104. chython/files/xyz.py +78 -0
  105. chython/periodictable/__init__.py +69 -0
  106. chython/periodictable/base/__init__.py +25 -0
  107. chython/periodictable/base/dynamic.py +149 -0
  108. chython/periodictable/base/element.py +452 -0
  109. chython/periodictable/base/groups.py +90 -0
  110. chython/periodictable/base/periods.py +46 -0
  111. chython/periodictable/base/query.py +473 -0
  112. chython/periodictable/base/vector.py +119 -0
  113. chython/periodictable/groupI.py +252 -0
  114. chython/periodictable/groupII.py +223 -0
  115. chython/periodictable/groupIII.py +1154 -0
  116. chython/periodictable/groupIV.py +210 -0
  117. chython/periodictable/groupIX.py +196 -0
  118. chython/periodictable/groupV.py +192 -0
  119. chython/periodictable/groupVI.py +183 -0
  120. chython/periodictable/groupVII.py +162 -0
  121. chython/periodictable/groupVIII.py +161 -0
  122. chython/periodictable/groupX.py +166 -0
  123. chython/periodictable/groupXI.py +164 -0
  124. chython/periodictable/groupXII.py +158 -0
  125. chython/periodictable/groupXIII.py +239 -0
  126. chython/periodictable/groupXIV.py +262 -0
  127. chython/periodictable/groupXV.py +276 -0
  128. chython/periodictable/groupXVI.py +457 -0
  129. chython/periodictable/groupXVII.py +324 -0
  130. chython/periodictable/groupXVIII.py +260 -0
  131. chython/reactor/__init__.py +24 -0
  132. chython/reactor/base.py +212 -0
  133. chython/reactor/deprotection.py +565 -0
  134. chython/reactor/groups.py +128 -0
  135. chython/reactor/reactions/__init__.py +157 -0
  136. chython/reactor/reactions/_amidation.py +58 -0
  137. chython/reactor/reactions/_amine_isocyanate.py +52 -0
  138. chython/reactor/reactions/_buchwald_hartwig.py +50 -0
  139. chython/reactor/reactions/_esterification.py +49 -0
  140. chython/reactor/reactions/_macmillan.py +43 -0
  141. chython/reactor/reactions/_reductive_amination.py +50 -0
  142. chython/reactor/reactions/_sonogashira.py +49 -0
  143. chython/reactor/reactions/_sulfonamidation.py +52 -0
  144. chython/reactor/reactions/_suzuki_miyaura.py +88 -0
  145. chython/reactor/reactions/ufe.py +99 -0
  146. chython/reactor/reactor.py +170 -0
  147. chython/reactor/retro/__init__.py +77 -0
  148. chython/reactor/retro/_amidation.py +39 -0
  149. chython/reactor/retro/_aryl_amination.py +32 -0
  150. chython/reactor/retro/_mitsunobu.py +49 -0
  151. chython/reactor/retro/_sonogashira.py +49 -0
  152. chython/reactor/retro/_suzuki_miyaura.py +54 -0
  153. chython/reactor/scaffold.py +122 -0
  154. chython/reactor/test/__init__.py +18 -0
  155. chython/reactor/test/test_deprotection.py +57 -0
  156. chython/reactor/test/test_reactor.py +40 -0
  157. chython/reactor/test/test_scaffold.py +57 -0
  158. chython/reactor/test/test_transformer.py +40 -0
  159. chython/reactor/transformer.py +62 -0
  160. chython/utils/__init__.py +57 -0
  161. chython/utils/free_wilson.py +114 -0
  162. chython/utils/grid.py +130 -0
  163. chython/utils/rdkit.py +165 -0
  164. chython/utils/retro.py +139 -0
  165. chython/utils/svg.py +57 -0
  166. chython/utils/test/__init__.py +18 -0
  167. chython/utils/test/test_rdkit.py +71 -0
  168. chython-2.4.dist-info/LICENSE +165 -0
  169. chython-2.4.dist-info/METADATA +101 -0
  170. chython-2.4.dist-info/RECORD +171 -0
  171. chython-2.4.dist-info/WHEEL +4 -0
@@ -0,0 +1,324 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright 2019-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
4
+ # Copyright 2019 Alexander Nikanshin <17071996sasha@gmail.com>
5
+ # Copyright 2019 Tagir Akhmetshin <tagirshin@gmail.com>
6
+ # This file is part of chython.
7
+ #
8
+ # chython is free software; you can redistribute it and/or modify
9
+ # it under the terms of the GNU Lesser General Public License as published by
10
+ # the Free Software Foundation; either version 3 of the License, or
11
+ # (at your option) any later version.
12
+ #
13
+ # This program is distributed in the hope that it will be useful,
14
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ # GNU Lesser General Public License for more details.
17
+ #
18
+ # You should have received a copy of the GNU Lesser General Public License
19
+ # along with this program; if not, see <https://www.gnu.org/licenses/>.
20
+ #
21
+ from .base import Element
22
+ from .base.groups import GroupXVII
23
+ from .base.periods import PeriodII, PeriodIII, PeriodIV, PeriodV, PeriodVI, PeriodVII
24
+
25
+
26
+ class F(Element, PeriodII, GroupXVII):
27
+ __slots__ = ()
28
+
29
+ @property
30
+ def atomic_number(self):
31
+ return 9
32
+
33
+ @property
34
+ def isotopes_distribution(self):
35
+ return {17: 0., 18: 0., 19: 1.0}
36
+
37
+ @property
38
+ def isotopes_masses(self):
39
+ return {17: 17.002095, 18: 18.000938, 19: 18.998403}
40
+
41
+ @property
42
+ def _common_valences(self):
43
+ return 1,
44
+
45
+ @property
46
+ def _valences_exceptions(self):
47
+ return (-1, False, 0, ()),
48
+
49
+ @property
50
+ def atomic_radius(self):
51
+ return .42
52
+
53
+ @property
54
+ def mdl_isotope(self):
55
+ return 19
56
+
57
+ @property
58
+ def is_forming_single_bonds(self):
59
+ return True
60
+
61
+
62
+ class Cl(Element, PeriodIII, GroupXVII):
63
+ __slots__ = ()
64
+
65
+ @property
66
+ def atomic_number(self):
67
+ return 17
68
+
69
+ @property
70
+ def isotopes_distribution(self):
71
+ return {35: 0.7578, 36: 0., 37: 0.2422}
72
+
73
+ @property
74
+ def isotopes_masses(self):
75
+ return {35: 34.968853, 36: 35.968307, 37: 36.965903}
76
+
77
+ @property
78
+ def _common_valences(self):
79
+ return 1,
80
+
81
+ @property
82
+ def _valences_exceptions(self):
83
+ return ((-1, False, 0, ()),
84
+ (-1, False, 0, ((1, 'Cl'), (1, 'I'))), # [I-Cl-Cl]-
85
+
86
+ (0, False, 0, ((1, 'O'), (2, 'O'))), # HClO2
87
+ (0, False, 0, ((1, 'O'), (2, 'O'), (2, 'O'))), # HClO3
88
+ (0, False, 0, ((1, 'O'), (2, 'O'), (2, 'O'), (2, 'O'))), # HClO4
89
+
90
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'))), # ClF3
91
+
92
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'))), # ClF5
93
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (2, 'O'))), # ClOF3
94
+ (0, False, 0, ((1, 'F'), (2, 'O'), (2, 'O')))) # ClO2F
95
+
96
+ @property
97
+ def atomic_radius(self):
98
+ return .79
99
+
100
+ @property
101
+ def mdl_isotope(self):
102
+ return 35
103
+
104
+ @property
105
+ def is_forming_single_bonds(self):
106
+ return True
107
+
108
+ @property
109
+ def is_forming_double_bonds(self):
110
+ return True
111
+
112
+
113
+ class Br(Element, PeriodIV, GroupXVII):
114
+ __slots__ = ()
115
+
116
+ @property
117
+ def atomic_number(self):
118
+ return 35
119
+
120
+ @property
121
+ def isotopes_distribution(self):
122
+ return {76: 0., 77: 0., 79: 0.5069, 81: 0.4931, 82: 0.}
123
+
124
+ @property
125
+ def isotopes_masses(self):
126
+ return {76: 75.924541, 77: 76.921379, 79: 78.918338, 81: 80.916291, 82: 81.916804}
127
+
128
+ @property
129
+ def _common_valences(self):
130
+ return 1,
131
+
132
+ @property
133
+ def _valences_exceptions(self):
134
+ return ((-1, False, 0, ()),
135
+ (-1, False, 0, ((1, 'Br'), (1, 'I'))), # [I-Br-Br]-
136
+ (-1, False, 0, ((1, 'Br'), (1, 'Br'))), # [Br-Br-Br]-
137
+ (-1, False, 0, ((1, 'Br'), (1, 'Cl'))), # [Br-Br-Cl]-
138
+ (-1, False, 0, ((1, 'Cl'), (1, 'Cl'))), # [Cl-Br-Cl]-
139
+ (-1, False, 0, ((1, 'I'), (1, 'I'))), # [I-Br-I]-
140
+
141
+ (0, False, 0, ((1, 'O'), (2, 'O'))), # HBrO2
142
+ (0, False, 0, ((1, 'O'), (2, 'O'), (2, 'O'))), # HBrO3
143
+ (0, False, 0, ((1, 'O'), (2, 'O'), (2, 'O'), (2, 'O'))), # HBrO4
144
+
145
+ (0, False, 0, ((1, 'O'), (1, 'O'), (1, 'O'))), # Br(OX)3
146
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'))), # BrF3
147
+
148
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'))), # BrF5
149
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (2, 'O'))), # BrOF3
150
+ (0, False, 0, ((1, 'F'), (2, 'O'), (2, 'O'))), # BrO2F
151
+
152
+ (0, False, 0, ((1, 'F'), (2, 'O'), (2, 'O'), (2, 'O')))) # BrO3F
153
+
154
+ @property
155
+ def atomic_radius(self):
156
+ return 0.94
157
+
158
+ @property
159
+ def mdl_isotope(self):
160
+ return 80
161
+
162
+ @property
163
+ def is_forming_single_bonds(self):
164
+ return True
165
+
166
+ @property
167
+ def is_forming_double_bonds(self):
168
+ return True
169
+
170
+
171
+ class I(Element, PeriodV, GroupXVII):
172
+ __slots__ = ()
173
+
174
+ @property
175
+ def atomic_number(self):
176
+ return 53
177
+
178
+ @property
179
+ def isotopes_distribution(self):
180
+ return {123: 0., 124: 0., 125: 0., 127: 1.0, 129: 0., 131: 0., 135: 0.}
181
+
182
+ @property
183
+ def isotopes_masses(self):
184
+ return {123: 122.905589, 124: 123.906210, 125: 124.904630, 127: 126.904468, 129: 128.904988, 131: 130.906125,
185
+ 135: 134.910048}
186
+
187
+ @property
188
+ def _common_valences(self):
189
+ return 1,
190
+
191
+ @property
192
+ def _valences_exceptions(self):
193
+ return ((-1, False, 0, ()),
194
+ (-1, False, 0, ((1, 'I'), (1, 'I'))), # [I-I-I]-
195
+ (-1, False, 0, ((1, 'I'), (1, 'Br'))), # [I-I-Br]-
196
+ (-1, False, 0, ((1, 'Cl'), (1, 'Cl'))), # [Cl-I-Cl]-
197
+ (1, False, 0, ((1, 'C'), (1, 'C'))),
198
+
199
+ (0, False, 0, ((1, 'O'), (2, 'O'))), # HIO2
200
+ (0, False, 0, ((1, 'C'), (2, 'O'))),
201
+ (0, False, 0, ((1, 'C'), (2, 'C'))),
202
+ (0, False, 0, ((1, 'C'), (2, 'N'))),
203
+ (0, False, 0, ((1, 'O'), (2, 'O'), (2, 'O'))), # HIO3
204
+ (0, False, 0, ((1, 'O'), (2, 'O'), (2, 'O'), (2, 'O'))), # HIO4
205
+ (0, False, 0, ((1, 'O'), (1, 'O'), (1, 'O'), (2, 'O'), (2, 'O'))), # H3IO5
206
+ (0, False, 0, ((1, 'O'), (1, 'O'), (1, 'O'), (1, 'O'), (1, 'O'), (2, 'O'))), # H5IO6
207
+
208
+ (0, False, 0, ((1, 'O'), (1, 'O'), (1, 'O'))), # I(OX)3
209
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'))), # IHal3
210
+ (0, False, 0, ((1, 'Cl'), (1, 'Cl'), (1, 'Cl'))),
211
+ (0, False, 0, ((1, 'Br'), (1, 'Br'), (1, 'Br'))),
212
+ (0, False, 0, ((1, 'C'), (1, 'O'), (1, 'Cl'))),
213
+ (0, False, 0, ((1, 'C'), (1, 'O'), (1, 'C'))),
214
+ (0, False, 0, ((1, 'C'), (1, 'O'), (1, 'O'))),
215
+ (0, False, 0, ((1, 'C'), (1, 'O'), (1, 'N'))),
216
+ (0, False, 0, ((1, 'C'), (1, 'F'), (1, 'F'))),
217
+ (0, False, 0, ((1, 'C'), (1, 'Cl'), (1, 'Cl'))),
218
+ (0, False, 0, ((1, 'C'), (1, 'C'), (1, 'Cl'))),
219
+ (0, False, 0, ((1, 'C'), (1, 'C'), (1, 'C'))),
220
+ (0, False, 0, ((1, 'C'), (1, 'C'), (1, 'N'))),
221
+
222
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'))), # IF5
223
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (2, 'O'))), # IOF3
224
+ (0, False, 0, ((1, 'F'), (2, 'O'), (2, 'O'))), # IO2F
225
+ (0, False, 0, ((1, 'C'), (2, 'O'), (2, 'O'))),
226
+ (0, False, 0, ((1, 'C'), (1, 'O'), (1, 'O'), (2, 'O'))),
227
+ (0, False, 0, ((1, 'C'), (1, 'O'), (1, 'O'), (1, 'O'), (1, 'O'))),
228
+
229
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'))), # IF7
230
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (2, 'O'))), # IOF5
231
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (2, 'O'), (2, 'O'))), # IO2F3
232
+ (0, False, 0, ((1, 'F'), (2, 'O'), (2, 'O'), (2, 'O')))) # IO3F
233
+
234
+ @property
235
+ def atomic_radius(self):
236
+ return 1.15
237
+
238
+ @property
239
+ def mdl_isotope(self):
240
+ return 127
241
+
242
+ @property
243
+ def is_forming_single_bonds(self):
244
+ return True
245
+
246
+ @property
247
+ def is_forming_double_bonds(self):
248
+ return True
249
+
250
+
251
+ class At(Element, PeriodVI, GroupXVII):
252
+ __slots__ = ()
253
+
254
+ @property
255
+ def atomic_number(self):
256
+ return 85
257
+
258
+ @property
259
+ def isotopes_distribution(self):
260
+ return {210: 1.0, 211: 0.}
261
+
262
+ @property
263
+ def isotopes_masses(self):
264
+ return {210: 209.987155, 211: 210.987496}
265
+
266
+ @property
267
+ def _common_valences(self):
268
+ return 0, 1
269
+
270
+ @property
271
+ def _valences_exceptions(self):
272
+ return ((1, False, 0, ()), (-1, False, 0, ()),
273
+ (0, False, 0, ((1, 'O'), (2, 'O'), (2, 'O'))))
274
+
275
+ @property
276
+ def atomic_radius(self):
277
+ return 1.27
278
+
279
+ @property
280
+ def mdl_isotope(self):
281
+ return 210
282
+
283
+ @property
284
+ def is_forming_single_bonds(self):
285
+ return True
286
+
287
+ @property
288
+ def is_forming_double_bonds(self):
289
+ return True
290
+
291
+
292
+ class Ts(Element, PeriodVII, GroupXVII):
293
+ __slots__ = ()
294
+
295
+ @property
296
+ def atomic_number(self):
297
+ return 117
298
+
299
+ @property
300
+ def isotopes_distribution(self):
301
+ return {293: 1.0}
302
+
303
+ @property
304
+ def isotopes_masses(self):
305
+ return {293: 293.0}
306
+
307
+ @property
308
+ def _common_valences(self):
309
+ return 0,
310
+
311
+ @property
312
+ def _valences_exceptions(self):
313
+ return ()
314
+
315
+ @property
316
+ def atomic_radius(self):
317
+ return 1.27 # unknown, taken radius of previous element in group
318
+
319
+ @property
320
+ def mdl_isotope(self):
321
+ return 297
322
+
323
+
324
+ __all__ = ['F', 'Cl', 'Br', 'I', 'At', 'Ts']
@@ -0,0 +1,260 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright 2019-2024 Ramil Nugmanov <nougmanoff@protonmail.com>
4
+ # Copyright 2019 Tagir Akhmetshin <tagirshin@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 .base import Element
21
+ from .base.groups import GroupXVIII
22
+ from .base.periods import *
23
+
24
+
25
+ class He(Element, PeriodI, GroupXVIII):
26
+ __slots__ = ()
27
+
28
+ @property
29
+ def atomic_number(self):
30
+ return 2
31
+
32
+ @property
33
+ def isotopes_distribution(self):
34
+ return {3: 1e-06, 4: 0.999999}
35
+
36
+ @property
37
+ def isotopes_masses(self):
38
+ return {3: 3.016029, 4: 4.002603}
39
+
40
+ @property
41
+ def _common_valences(self):
42
+ return 0,
43
+
44
+ @property
45
+ def _valences_exceptions(self):
46
+ return ()
47
+
48
+ @property
49
+ def atomic_radius(self):
50
+ return .31
51
+
52
+ @property
53
+ def mdl_isotope(self):
54
+ return 4
55
+
56
+
57
+ class Ne(Element, PeriodII, GroupXVIII):
58
+ __slots__ = ()
59
+
60
+ @property
61
+ def atomic_number(self):
62
+ return 10
63
+
64
+ @property
65
+ def isotopes_distribution(self):
66
+ return {20: 0.9048, 21: 0.0027, 22: 0.0925}
67
+
68
+ @property
69
+ def isotopes_masses(self):
70
+ return {20: 19.99244, 21: 20.993847, 22: 21.991386}
71
+
72
+ @property
73
+ def _common_valences(self):
74
+ return 0,
75
+
76
+ @property
77
+ def _valences_exceptions(self):
78
+ return ()
79
+
80
+ @property
81
+ def atomic_radius(self):
82
+ return .38
83
+
84
+ @property
85
+ def mdl_isotope(self):
86
+ return 20
87
+
88
+
89
+ class Ar(Element, PeriodIII, GroupXVIII):
90
+ __slots__ = ()
91
+
92
+ @property
93
+ def atomic_number(self):
94
+ return 18
95
+
96
+ @property
97
+ def isotopes_distribution(self):
98
+ return {36: 0.003365, 38: 0.000632, 40: 0.996003}
99
+
100
+ @property
101
+ def isotopes_masses(self):
102
+ return {36: 35.967546, 38: 37.962732, 40: 39.962383}
103
+
104
+ @property
105
+ def _common_valences(self):
106
+ return 0,
107
+
108
+ @property
109
+ def _valences_exceptions(self):
110
+ return ()
111
+
112
+ @property
113
+ def atomic_radius(self):
114
+ return .71
115
+
116
+ @property
117
+ def mdl_isotope(self):
118
+ return 40
119
+
120
+
121
+ class Kr(Element, PeriodIV, GroupXVIII):
122
+ __slots__ = ()
123
+
124
+ @property
125
+ def atomic_number(self):
126
+ return 36
127
+
128
+ @property
129
+ def isotopes_distribution(self):
130
+ return {78: 0.0035, 80: 0.0228, 81: 0., 82: 0.1158, 83: 0.1149, 84: 0.57, 86: 0.173}
131
+
132
+ @property
133
+ def isotopes_masses(self):
134
+ return {78: 77.920386, 80: 79.916378, 81: 80.916592, 82: 81.913485, 83: 82.914136, 84: 83.911507, 86: 85.91061}
135
+
136
+ @property
137
+ def _common_valences(self):
138
+ return 0,
139
+
140
+ @property
141
+ def _valences_exceptions(self):
142
+ return ()
143
+
144
+ @property
145
+ def atomic_radius(self):
146
+ return .87
147
+
148
+ @property
149
+ def mdl_isotope(self):
150
+ return 84
151
+
152
+
153
+ class Xe(Element, PeriodV, GroupXVIII):
154
+ __slots__ = ()
155
+
156
+ @property
157
+ def atomic_number(self):
158
+ return 54
159
+
160
+ @property
161
+ def isotopes_distribution(self):
162
+ return {124: 0.0009, 126: 0.0009, 127: 0., 128: 0.0192, 129: 0.2644, 130: 0.0408, 131: 0.2118, 132: 0.2689,
163
+ 133: 0., 134: 0.1044, 136: 0.0887}
164
+
165
+ @property
166
+ def isotopes_masses(self):
167
+ return {124: 123.905896, 126: 125.904269, 127: 126.905184, 128: 127.90353, 129: 128.904779, 130: 129.903508,
168
+ 131: 130.905082, 132: 131.904155, 133: 132.905911, 134: 133.905394, 136: 135.90722}
169
+
170
+ @property
171
+ def _common_valences(self):
172
+ return 0,
173
+
174
+ @property
175
+ def _valences_exceptions(self):
176
+ # XeF2, XeF4, XeF6, XeO3, XeO4, XeO2F2, XeOF4, XeO3F2, [XeO6]4-
177
+ return ((0, False, 0, ((1, 'F'), (1, 'F'))),
178
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'))),
179
+ (0, False, 0, ((1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'))),
180
+ (0, False, 0, ((2, 'O'), (2, 'O'), (2, 'O'))),
181
+ (0, False, 0, ((2, 'O'), (2, 'O'), (2, 'O'), (2, 'O'))),
182
+ (0, False, 0, ((2, 'O'), (2, 'O'), (1, 'F'), (1, 'F'))),
183
+ (0, False, 0, ((2, 'O'), (1, 'F'), (1, 'F'), (1, 'F'), (1, 'F'))),
184
+ (0, False, 0, ((2, 'O'), (2, 'O'), (2, 'O'), (1, 'F'), (1, 'F'))),
185
+ (0, False, 0, ((1, 'O'), (1, 'O'), (1, 'O'), (1, 'O'), (2, 'O'), (2, 'O'))))
186
+
187
+ @property
188
+ def atomic_radius(self):
189
+ return 1.08
190
+
191
+ @property
192
+ def mdl_isotope(self):
193
+ return 131
194
+
195
+
196
+ class Rn(Element, PeriodVI, GroupXVIII):
197
+ __slots__ = ()
198
+
199
+ @property
200
+ def atomic_number(self):
201
+ return 86
202
+
203
+ @property
204
+ def isotopes_distribution(self):
205
+ return {222: 1.0}
206
+
207
+ @property
208
+ def isotopes_masses(self):
209
+ return {222: 222.017578}
210
+
211
+ @property
212
+ def _common_valences(self):
213
+ return 0,
214
+
215
+ @property
216
+ def _valences_exceptions(self):
217
+ return (0, False, 0, ((1, 'F'), (1, 'F'))), (1, False, 0, ((1, 'F'),))
218
+
219
+ @property
220
+ def atomic_radius(self):
221
+ return 1.2
222
+
223
+ @property
224
+ def mdl_isotope(self):
225
+ return 222
226
+
227
+
228
+ class Og(Element, PeriodVII, GroupXVIII):
229
+ __slots__ = ()
230
+
231
+ @property
232
+ def atomic_number(self):
233
+ return 118
234
+
235
+ @property
236
+ def isotopes_distribution(self):
237
+ return {294: 1.0}
238
+
239
+ @property
240
+ def isotopes_masses(self):
241
+ return {294: 294.0}
242
+
243
+ @property
244
+ def _common_valences(self):
245
+ return 0,
246
+
247
+ @property
248
+ def _valences_exceptions(self):
249
+ return ()
250
+
251
+ @property
252
+ def atomic_radius(self):
253
+ return 1.2 # unknown, taken radius of previous element in group
254
+
255
+ @property
256
+ def mdl_isotope(self):
257
+ return 294
258
+
259
+
260
+ __all__ = ['He', 'Ne', 'Ar', 'Kr', 'Xe', 'Rn', 'Og']
@@ -0,0 +1,24 @@
1
+ # -*- coding: utf-8 -*-
2
+ #
3
+ # Copyright 2021, 2022 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 .reactor import Reactor
20
+ from .transformer import Transformer
21
+
22
+ # Note: don't import [de]protection and other predefined reactors to prevent imports crashing!
23
+
24
+ __all__ = ['Transformer', 'Reactor']