chython 3.5__tar.gz → 3.8__tar.gz

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 (602) hide show
  1. {chython-3.5/chython.egg-info → chython-3.8}/PKG-INFO +5 -2
  2. {chython-3.5 → chython-3.8}/README.md +2 -1
  3. {chython-3.5 → chython-3.8}/chython/__init__.py +36 -14
  4. {chython-3.5 → chython-3.8}/chython/chemistry/__init__.py +3 -2
  5. {chython-3.5 → chython-3.8}/chython/chemistry/_isomers.py +161 -4
  6. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_isomers.py +49 -1
  7. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_reaction_passes.py +1 -1
  8. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_smarts.py +3 -78
  9. chython-3.5/chython/chemistry/test/test_standardize_differential.py → chython-3.8/chython/chemistry/test/test_standardize_corpus.py +8 -69
  10. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_thiele_is_single_purpose.py +5 -37
  11. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_z_translation.py +6 -72
  12. {chython-3.5 → chython-3.8}/chython/core/_canonical.pxi +25 -11
  13. {chython-3.5 → chython-3.8}/chython/core/_molecule_arena.pxi +3 -4
  14. {chython-3.5 → chython-3.8}/chython/core/_molecule_container.pxi +49 -9
  15. {chython-3.5 → chython-3.8}/chython/core/_smiles_write.pxi +50 -16
  16. {chython-3.5 → chython-3.8}/chython/core/_smirks_patch.pxi +5 -3
  17. {chython-3.5 → chython-3.8}/chython/core/_smirks_read.pxi +8 -2
  18. {chython-3.5 → chython-3.8}/chython/core/_stereo.pxi +187 -11
  19. {chython-3.5 → chython-3.8}/chython/core/_valence.pxi +3 -4
  20. {chython-3.5 → chython-3.8}/chython/core/chains.py +22 -8
  21. {chython-3.5 → chython-3.8}/chython/core/monomers.py +46 -0
  22. chython-3.8/chython/core/nucleotides.py +106 -0
  23. {chython-3.5 → chython-3.8}/chython/core/reaction.py +5 -5
  24. {chython-3.5 → chython-3.8}/chython/core/test/gen_valence_rules.py +26 -202
  25. {chython-3.5 → chython-3.8}/chython/core/test/reaction_pach_corpus.py +5 -9
  26. {chython-3.5 → chython-3.8}/chython/core/test/test_aggregates.py +3 -51
  27. {chython-3.5 → chython-3.8}/chython/core/test/test_alternative_spellings.py +0 -64
  28. {chython-3.5 → chython-3.8}/chython/core/test/test_bridgehead_realisability.py +5 -4
  29. {chython-3.5 → chython-3.8}/chython/core/test/test_canonical_mirror.py +7 -25
  30. {chython-3.5 → chython-3.8}/chython/core/test/test_chains.py +12 -0
  31. {chython-3.5 → chython-3.8}/chython/core/test/test_clean_isotopes_and_coordinate_bonds.py +2 -79
  32. chython-3.5/chython/core/test/test_no_chython_two_imports.py → chython-3.8/chython/core/test/test_core_isolation.py +15 -49
  33. {chython-3.5 → chython-3.8}/chython/core/test/test_dead_stereo_groups.py +43 -0
  34. {chython-3.5 → chython-3.8}/chython/core/test/test_element_tables.py +1 -102
  35. {chython-3.5 → chython-3.8}/chython/core/test/test_enrich.py +13 -1
  36. {chython-3.5 → chython-3.8}/chython/core/test/test_features.py +1 -2
  37. {chython-3.5 → chython-3.8}/chython/core/test/test_magic.py +4 -5
  38. {chython-3.5 → chython-3.8}/chython/core/test/test_monomers.py +14 -0
  39. chython-3.8/chython/core/test/test_nucleotides.py +52 -0
  40. {chython-3.5 → chython-3.8}/chython/core/test/test_r_query.py +1 -1
  41. {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_container.py +16 -121
  42. {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_pach.py +1 -1
  43. {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_passes.py +1 -1
  44. {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_smiles.py +1 -58
  45. {chython-3.5 → chython-3.8}/chython/core/test/test_smarts_read.py +8 -317
  46. chython-3.8/chython/core/test/test_smiles_roundtrip.py +137 -0
  47. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_detached.py +32 -18
  48. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_stereo.py +39 -0
  49. {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_filter.py +16 -0
  50. {chython-3.5 → chython-3.8}/chython/core/test/test_thiele.py +1 -2
  51. {chython-3.5 → chython-3.8}/chython/core/test/test_topology.py +0 -68
  52. {chython-3.5 → chython-3.8}/chython/core/test/test_valence.py +24 -233
  53. {chython-3.5 → chython-3.8}/chython/core/test/test_view_surface.py +1 -1
  54. {chython-3.5 → chython-3.8}/chython/core/valence_rules.tsv +1 -2
  55. {chython-3.5 → chython-3.8}/chython/core/wedge.py +6 -5
  56. {chython-3.5 → chython-3.8}/chython/depict/__init__.py +6 -6
  57. {chython-3.5 → chython-3.8}/chython/depict/_config.py +27 -9
  58. {chython-3.5 → chython-3.8}/chython/depict/bonds.py +28 -3
  59. {chython-3.5 → chython-3.8}/chython/depict/figure.py +25 -9
  60. chython-3.8/chython/depict/layout/cage.py +288 -0
  61. {chython-3.5 → chython-3.8}/chython/depict/layout/cascade.py +262 -58
  62. {chython-3.5 → chython-3.8}/chython/depict/layout/molecule.py +145 -80
  63. chython-3.8/chython/depict/layout/nucleic.py +118 -0
  64. {chython-3.5 → chython-3.8}/chython/depict/layout/peptide.py +265 -37
  65. {chython-3.5 → chython-3.8}/chython/depict/layout/primitive.py +145 -13
  66. {chython-3.5 → chython-3.8}/chython/depict/layout/reaction.py +7 -6
  67. {chython-3.5 → chython-3.8}/chython/depict/layout/relax.py +13 -3
  68. {chython-3.5 → chython-3.8}/chython/depict/layout/review.py +4 -2
  69. {chython-3.5 → chython-3.8}/chython/depict/layout/score.py +2 -1
  70. {chython-3.5 → chython-3.8}/chython/depict/layout/scorecard.py +4 -4
  71. chython-3.8/chython/depict/layout/shapes.py +690 -0
  72. {chython-3.5 → chython-3.8}/chython/depict/peptide.py +16 -2
  73. chython-3.8/chython/depict/test/test_cage.py +215 -0
  74. {chython-3.5 → chython-3.8}/chython/depict/test/test_clean2d.py +97 -6
  75. {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_cascade.py +166 -2
  76. {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_conventions.py +6 -9
  77. {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_env.py +1 -1
  78. {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_primitive.py +66 -1
  79. chython-3.8/chython/depict/test/test_nucleic_layout.py +69 -0
  80. {chython-3.5 → chython-3.8}/chython/depict/test/test_peptide_draw.py +55 -15
  81. {chython-3.5 → chython-3.8}/chython/depict/test/test_peptide_layout.py +160 -51
  82. {chython-3.5 → chython-3.8}/chython/depict/wedge.py +11 -6
  83. {chython-3.5 → chython-3.8}/chython/formats/__init__.py +4 -2
  84. chython-3.8/chython/formats/cdx/__init__.py +91 -0
  85. chython-3.8/chython/formats/cdx/_binary.py +371 -0
  86. chython-3.8/chython/formats/cdx/_build.py +562 -0
  87. chython-3.8/chython/formats/cdx/_cdxml.py +101 -0
  88. chython-3.8/chython/formats/cdx/_errors.py +34 -0
  89. chython-3.8/chython/formats/cdx/_tree.py +60 -0
  90. chython-3.8/chython/formats/cdx/_vocabulary.py +86 -0
  91. chython-3.8/chython/formats/cdx/_write.py +344 -0
  92. chython-3.8/chython/formats/cdx/test/test_cdx.py +390 -0
  93. chython-3.8/chython/formats/cdx/test/test_interop.py +115 -0
  94. chython-3.8/chython/formats/cdx/test/test_reference.py +129 -0
  95. chython-3.8/chython/formats/cdx/vocabulary.tsv +835 -0
  96. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/conftest.py +0 -49
  97. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_fidelity.py +0 -90
  98. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_hydrogens.py +3 -61
  99. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_rdf.py +0 -48
  100. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_v2000.py +6 -84
  101. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_v3000.py +1 -29
  102. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_wedge.py +7 -176
  103. {chython-3.5 → chython-3.8}/chython/formats/test/oracles.py +1 -1
  104. {chython-3.5 → chython-3.8}/chython/formats/test/test_oracles.py +1 -1
  105. chython-3.8/chython/interop/test/__init__.py +0 -0
  106. chython-3.8/chython/polymers/__init__.py +76 -0
  107. chython-3.8/chython/polymers/_assemble.py +138 -0
  108. chython-3.8/chython/polymers/_biln.py +98 -0
  109. chython-3.8/chython/polymers/_decompose.py +538 -0
  110. chython-3.8/chython/polymers/_errors.py +34 -0
  111. chython-3.8/chython/polymers/_graph.py +62 -0
  112. chython-3.8/chython/polymers/_helm.py +250 -0
  113. chython-3.8/chython/polymers/_library.py +461 -0
  114. chython-3.8/chython/polymers/_shape.py +98 -0
  115. chython-3.8/chython/polymers/_write.py +169 -0
  116. chython-3.8/chython/polymers/data/HELMCoreLibrary.json.gz +0 -0
  117. chython-3.8/chython/polymers/data/LICENSE-HELMMonomerSets +21 -0
  118. chython-3.8/chython/polymers/test/__init__.py +0 -0
  119. chython-3.8/chython/polymers/test/_fixtures.py +46 -0
  120. chython-3.8/chython/polymers/test/test_assemble.py +75 -0
  121. chython-3.8/chython/polymers/test/test_canonical.py +108 -0
  122. chython-3.8/chython/polymers/test/test_decompose.py +204 -0
  123. chython-3.8/chython/polymers/test/test_dependency_direction.py +57 -0
  124. chython-3.8/chython/polymers/test/test_facade.py +65 -0
  125. chython-3.8/chython/polymers/test/test_grammar.py +125 -0
  126. chython-3.8/chython/polymers/test/test_index.py +63 -0
  127. chython-3.8/chython/polymers/test/test_library.py +72 -0
  128. chython-3.8/chython/polymers/test/test_polymer_types.py +59 -0
  129. chython-3.8/chython/polymers/test/test_shape.py +62 -0
  130. {chython-3.5 → chython-3.8}/chython/reactions/_enumerate.py +236 -21
  131. {chython-3.5 → chython-3.8}/chython/reactions/_reconstruct.py +178 -25
  132. {chython-3.5 → chython-3.8}/chython/reactions/tables/functional.tsv +7 -7
  133. chython-3.8/chython/reactions/tables/protective.tsv +130 -0
  134. {chython-3.5 → chython-3.8}/chython/reactions/tables/reactions.tsv +119 -198
  135. {chython-3.5 → chython-3.8}/chython/reactions/tables/roles.tsv +12 -6
  136. {chython-3.5 → chython-3.8}/chython/reactions/test/_frozen_ids.py +127 -209
  137. {chython-3.5 → chython-3.8}/chython/reactions/test/test_functional.py +15 -0
  138. {chython-3.5 → chython-3.8}/chython/reactions/test/test_protective.py +46 -1
  139. {chython-3.5 → chython-3.8}/chython/reactions/test/test_reconstruct.py +130 -61
  140. chython-3.8/chython/reactions/test/test_reconstruct_labels.py +328 -0
  141. {chython-3.5 → chython-3.8}/chython/reactions/test/test_retro.py +1 -1
  142. {chython-3.5 → chython-3.8}/chython/reactions/test/test_retro_tables.py +2 -2
  143. {chython-3.5 → chython-3.8}/chython/reactions/test/test_roles.py +64 -4
  144. {chython-3.5 → chython-3.8}/chython/reactions/test/test_tables.py +3 -2
  145. {chython-3.5 → chython-3.8}/chython/test/test_facade_names.py +29 -2
  146. {chython-3.5 → chython-3.8}/chython/test/test_optional_numpy.py +3 -3
  147. {chython-3.5 → chython-3.8}/chython/test/test_stereo_bluebook.py +1 -1
  148. {chython-3.5 → chython-3.8}/chython/test/test_v2_boundary.py +2 -8
  149. {chython-3.5 → chython-3.8}/chython/test/test_writer_posture.py +5 -1
  150. {chython-3.5 → chython-3.8/chython.egg-info}/PKG-INFO +5 -2
  151. {chython-3.5 → chython-3.8}/chython.egg-info/SOURCES.txt +45 -10
  152. {chython-3.5 → chython-3.8}/chython.egg-info/requires.txt +3 -0
  153. {chython-3.5 → chython-3.8}/pyproject.toml +6 -1
  154. chython-3.5/chython/chemistry/test/_oracle.py +0 -49
  155. chython-3.5/chython/core/test/gen_reaction_pach_corpus.py +0 -153
  156. chython-3.5/chython/core/test/oracle.py +0 -707
  157. chython-3.5/chython/core/test/test_oracle.py +0 -238
  158. chython-3.5/chython/core/test/test_reaction_patch_stereo.py +0 -162
  159. chython-3.5/chython/core/test/test_smiles_roundtrip.py +0 -349
  160. chython-3.5/chython/core/test/test_smiles_write_differential.py +0 -879
  161. chython-3.5/chython/core/test/test_stereo_v2_differential.py +0 -235
  162. chython-3.5/chython/depict/layout/shapes.py +0 -332
  163. chython-3.5/chython/interop/test/test_v2_oracle.py +0 -480
  164. chython-3.5/chython/reactions/tables/protective.tsv +0 -128
  165. chython-3.5/chython/reactions/test/test_reconstruct_labels.py +0 -158
  166. {chython-3.5 → chython-3.8}/LICENSE +0 -0
  167. {chython-3.5 → chython-3.8}/MANIFEST.in +0 -0
  168. {chython-3.5 → chython-3.8}/build_inchi.py +0 -0
  169. {chython-3.5 → chython-3.8}/chython/_functions.py +0 -0
  170. {chython-3.5 → chython-3.8}/chython/chemistry/_abbreviations.py +0 -0
  171. {chython-3.5 → chython-3.8}/chython/chemistry/_canonicalize.py +0 -0
  172. {chython-3.5 → chython-3.8}/chython/chemistry/_counts.py +0 -0
  173. {chython-3.5 → chython-3.8}/chython/chemistry/_crippen.py +0 -0
  174. {chython-3.5 → chython-3.8}/chython/chemistry/_hydrogens.py +0 -0
  175. {chython-3.5 → chython-3.8}/chython/chemistry/_implicit.py +0 -0
  176. {chython-3.5 → chython-3.8}/chython/chemistry/_kekule_form.py +0 -0
  177. {chython-3.5 → chython-3.8}/chython/chemistry/_maccs.py +0 -0
  178. {chython-3.5 → chython-3.8}/chython/chemistry/_organometallics.py +0 -0
  179. {chython-3.5 → chython-3.8}/chython/chemistry/_perceive.py +0 -0
  180. {chython-3.5 → chython-3.8}/chython/chemistry/_pharmacophore.py +0 -0
  181. {chython-3.5 → chython-3.8}/chython/chemistry/_protomers.py +0 -0
  182. {chython-3.5 → chython-3.8}/chython/chemistry/_qed.py +0 -0
  183. {chython-3.5 → chython-3.8}/chython/chemistry/_residues.py +0 -0
  184. {chython-3.5 → chython-3.8}/chython/chemistry/_resonance.py +0 -0
  185. {chython-3.5 → chython-3.8}/chython/chemistry/_salts.py +0 -0
  186. {chython-3.5 → chython-3.8}/chython/chemistry/_saturate.py +0 -0
  187. {chython-3.5 → chython-3.8}/chython/chemistry/_smarts.py +0 -0
  188. {chython-3.5 → chython-3.8}/chython/chemistry/_standardize.py +0 -0
  189. {chython-3.5 → chython-3.8}/chython/chemistry/_stereo_audit.py +0 -0
  190. {chython-3.5 → chython-3.8}/chython/chemistry/_tables.py +0 -0
  191. {chython-3.5 → chython-3.8}/chython/chemistry/_tpsa.py +0 -0
  192. {chython-3.5 → chython-3.8}/chython/chemistry/tables/abbreviations.tsv +0 -0
  193. {chython-3.5 → chython-3.8}/chython/chemistry/tables/acids.tsv +0 -0
  194. {chython-3.5 → chython-3.8}/chython/chemistry/tables/covalent_radii.tsv +0 -0
  195. {chython-3.5 → chython-3.8}/chython/chemistry/tables/crippen.tsv +0 -0
  196. {chython-3.5 → chython-3.8}/chython/chemistry/tables/hbond.tsv +0 -0
  197. {chython-3.5 → chython-3.8}/chython/chemistry/tables/maccs.tsv +0 -0
  198. {chython-3.5 → chython-3.8}/chython/chemistry/tables/maccs_corpus.tsv +0 -0
  199. {chython-3.5 → chython-3.8}/chython/chemistry/tables/pharmacophore.tsv +0 -0
  200. {chython-3.5 → chython-3.8}/chython/chemistry/tables/qed_alerts.tsv +0 -0
  201. {chython-3.5 → chython-3.8}/chython/chemistry/tables/residues.tsv +0 -0
  202. {chython-3.5 → chython-3.8}/chython/chemistry/tables/resonance.tsv +0 -0
  203. {chython-3.5 → chython-3.8}/chython/chemistry/tables/rotatable.tsv +0 -0
  204. {chython-3.5 → chython-3.8}/chython/chemistry/tables/salts.tsv +0 -0
  205. {chython-3.5 → chython-3.8}/chython/chemistry/tables/standardize_groups.tsv +0 -0
  206. {chython-3.5 → chython-3.8}/chython/chemistry/tables/standardize_metals.tsv +0 -0
  207. {chython-3.5 → chython-3.8}/chython/chemistry/tables/stereo_audit.tsv +0 -0
  208. {chython-3.5 → chython-3.8}/chython/chemistry/tables/sybyl_types.tsv +0 -0
  209. {chython-3.5 → chython-3.8}/chython/chemistry/tables/tpsa.tsv +0 -0
  210. {chython-3.5 → chython-3.8}/chython/chemistry/test/__init__.py +0 -0
  211. {chython-3.5 → chython-3.8}/chython/chemistry/test/_corpus.py +0 -0
  212. {chython-3.5 → chython-3.8}/chython/chemistry/test/gen_standardize_rules.py +0 -0
  213. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_abbreviations.py +0 -0
  214. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_acids_tsv.py +0 -0
  215. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_canonicalize.py +0 -0
  216. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_canonicalize_atom_order.py +0 -0
  217. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_counts.py +0 -0
  218. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_covalent_radii_tsv.py +0 -0
  219. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_crippen.py +0 -0
  220. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_crippen_tsv.py +0 -0
  221. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_dependency_direction.py +0 -0
  222. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_featurizer_injection.py +0 -0
  223. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_featurizer_tables_lazy.py +0 -0
  224. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_kekule_form.py +0 -0
  225. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_maccs.py +0 -0
  226. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_maccs_corpus.py +0 -0
  227. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_maccs_tsv.py +0 -0
  228. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_organometallics.py +0 -0
  229. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_perceive.py +0 -0
  230. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_pharmacophore.py +0 -0
  231. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_protomers.py +0 -0
  232. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_qed.py +0 -0
  233. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_qed_alerts_tsv.py +0 -0
  234. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_reaction_hydrogen_repair.py +0 -0
  235. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_residues.py +0 -0
  236. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_resonance.py +0 -0
  237. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_resonance_tsv.py +0 -0
  238. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_salts.py +0 -0
  239. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_saturate.py +0 -0
  240. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_groups_port.py +0 -0
  241. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_overvalent_nitrogen.py +0 -0
  242. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_rules_examples.py +0 -0
  243. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_rules_merges.py +0 -0
  244. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_rules_tsv.py +0 -0
  245. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_stereo_audit.py +0 -0
  246. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_tpsa.py +0 -0
  247. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_tpsa_tsv.py +0 -0
  248. {chython-3.5 → chython-3.8}/chython/chemistry/test/test_valence_report.py +0 -0
  249. {chython-3.5 → chython-3.8}/chython/core/RULES.md +0 -0
  250. {chython-3.5 → chython-3.8}/chython/core/__init__.py +0 -0
  251. {chython-3.5 → chython-3.8}/chython/core/_cip.pxi +0 -0
  252. {chython-3.5 → chython-3.8}/chython/core/_core.pyx +0 -0
  253. {chython-3.5 → chython-3.8}/chython/core/_descriptors.pxi +0 -0
  254. {chython-3.5 → chython-3.8}/chython/core/_elements.pxi +0 -0
  255. {chython-3.5 → chython-3.8}/chython/core/_facade.py +0 -0
  256. {chython-3.5 → chython-3.8}/chython/core/_features.pxi +0 -0
  257. {chython-3.5 → chython-3.8}/chython/core/_fingerprints.pxi +0 -0
  258. {chython-3.5 → chython-3.8}/chython/core/_hydrogens.pxi +0 -0
  259. {chython-3.5 → chython-3.8}/chython/core/_inchi.pxi +0 -0
  260. {chython-3.5 → chython-3.8}/chython/core/_isomorphism.pxi +0 -0
  261. {chython-3.5 → chython-3.8}/chython/core/_kekule.pxi +0 -0
  262. {chython-3.5 → chython-3.8}/chython/core/_layout_score.pxi +0 -0
  263. {chython-3.5 → chython-3.8}/chython/core/_log.py +0 -0
  264. {chython-3.5 → chython-3.8}/chython/core/_ml.pxi +0 -0
  265. {chython-3.5 → chython-3.8}/chython/core/_molecule_topology.pxi +0 -0
  266. {chython-3.5 → chython-3.8}/chython/core/_molecule_views.pxi +0 -0
  267. {chython-3.5 → chython-3.8}/chython/core/_morgan.pxi +0 -0
  268. {chython-3.5 → chython-3.8}/chython/core/_pach.pxi +0 -0
  269. {chython-3.5 → chython-3.8}/chython/core/_pach3.pxi +0 -0
  270. {chython-3.5 → chython-3.8}/chython/core/_query_arena.pxi +0 -0
  271. {chython-3.5 → chython-3.8}/chython/core/_query_boxes.pxi +0 -0
  272. {chython-3.5 → chython-3.8}/chython/core/_query_container.pxi +0 -0
  273. {chython-3.5 → chython-3.8}/chython/core/_query_seal.pxi +0 -0
  274. {chython-3.5 → chython-3.8}/chython/core/_reaction_passes.py +0 -0
  275. {chython-3.5 → chython-3.8}/chython/core/_rings.pxi +0 -0
  276. {chython-3.5 → chython-3.8}/chython/core/_smarts_read.pxi +0 -0
  277. {chython-3.5 → chython-3.8}/chython/core/_smiles_read.pxi +0 -0
  278. {chython-3.5 → chython-3.8}/chython/core/_sssr.pxi +0 -0
  279. {chython-3.5 → chython-3.8}/chython/core/_stereo_meaning.pxi +0 -0
  280. {chython-3.5 → chython-3.8}/chython/core/_thiele.pxi +0 -0
  281. {chython-3.5 → chython-3.8}/chython/core/elements.tsv +0 -0
  282. {chython-3.5 → chython-3.8}/chython/core/isotopes.tsv +0 -0
  283. {chython-3.5 → chython-3.8}/chython/core/test/__init__.py +0 -0
  284. {chython-3.5 → chython-3.8}/chython/core/test/arena_v4_corpus.bin.gz +0 -0
  285. {chython-3.5 → chython-3.8}/chython/core/test/bench_ml.py +0 -0
  286. {chython-3.5 → chython-3.8}/chython/core/test/chytorch_oracle.py +0 -0
  287. {chython-3.5 → chython-3.8}/chython/core/test/gen_element_tables.py +0 -0
  288. {chython-3.5 → chython-3.8}/chython/core/test/gen_modeling_view_corpus.py +0 -0
  289. {chython-3.5 → chython-3.8}/chython/core/test/gen_pach3_corpus.py +0 -0
  290. {chython-3.5 → chython-3.8}/chython/core/test/gen_v3_fixtures.py +0 -0
  291. {chython-3.5 → chython-3.8}/chython/core/test/gen_v4_fixtures.py +0 -0
  292. {chython-3.5 → chython-3.8}/chython/core/test/modeling_view_corpus.json.gz +0 -0
  293. {chython-3.5 → chython-3.8}/chython/core/test/modeling_view_corpus.py +0 -0
  294. {chython-3.5 → chython-3.8}/chython/core/test/pach3_corpus.py +0 -0
  295. {chython-3.5 → chython-3.8}/chython/core/test/pach_bond_group_corpus.bin.gz +0 -0
  296. {chython-3.5 → chython-3.8}/chython/core/test/pach_corpus.py +0 -0
  297. {chython-3.5 → chython-3.8}/chython/core/test/pach_v0_corpus.bin.gz +0 -0
  298. {chython-3.5 → chython-3.8}/chython/core/test/pach_v0_native_corpus.bin.gz +0 -0
  299. {chython-3.5 → chython-3.8}/chython/core/test/pach_v2_corpus.bin.gz +0 -0
  300. {chython-3.5 → chython-3.8}/chython/core/test/pach_v3_corpus.bin.gz +0 -0
  301. {chython-3.5 → chython-3.8}/chython/core/test/pach_v4_corpus.bin.gz +0 -0
  302. {chython-3.5 → chython-3.8}/chython/core/test/peptides.py +0 -0
  303. {chython-3.5 → chython-3.8}/chython/core/test/reaction_pach_v2_corpus.bin.gz +0 -0
  304. {chython-3.5 → chython-3.8}/chython/core/test/test_apply_scratch_probe.py +0 -0
  305. {chython-3.5 → chython-3.8}/chython/core/test/test_arena_f60.py +0 -0
  306. {chython-3.5 → chython-3.8}/chython/core/test/test_arena_identity.py +0 -0
  307. {chython-3.5 → chython-3.8}/chython/core/test/test_arena_v3_compat.py +0 -0
  308. {chython-3.5 → chython-3.8}/chython/core/test/test_arena_v4_compat.py +0 -0
  309. {chython-3.5 → chython-3.8}/chython/core/test/test_aromatic_storage.py +0 -0
  310. {chython-3.5 → chython-3.8}/chython/core/test/test_atropisomer_axis.py +0 -0
  311. {chython-3.5 → chython-3.8}/chython/core/test/test_brace_bond_fields.py +0 -0
  312. {chython-3.5 → chython-3.8}/chython/core/test/test_canonical.py +0 -0
  313. {chython-3.5 → chython-3.8}/chython/core/test/test_canonical_groups.py +0 -0
  314. {chython-3.5 → chython-3.8}/chython/core/test/test_canonical_stereogenic.py +0 -0
  315. {chython-3.5 → chython-3.8}/chython/core/test/test_canonicalize_stereo_groups.py +0 -0
  316. {chython-3.5 → chython-3.8}/chython/core/test/test_cip_assign.py +0 -0
  317. {chython-3.5 → chython-3.8}/chython/core/test/test_cip_budget.py +0 -0
  318. {chython-3.5 → chython-3.8}/chython/core/test/test_cip_cases.py +0 -0
  319. {chython-3.5 → chython-3.8}/chython/core/test/test_cip_digraph.py +0 -0
  320. {chython-3.5 → chython-3.8}/chython/core/test/test_cip_ranking.py +0 -0
  321. {chython-3.5 → chython-3.8}/chython/core/test/test_cip_storage.py +0 -0
  322. {chython-3.5 → chython-3.8}/chython/core/test/test_clean_stereo.py +0 -0
  323. {chython-3.5 → chython-3.8}/chython/core/test/test_conformers.py +0 -0
  324. {chython-3.5 → chython-3.8}/chython/core/test/test_container_log.py +0 -0
  325. {chython-3.5 → chython-3.8}/chython/core/test/test_copy_caches.py +0 -0
  326. {chython-3.5 → chython-3.8}/chython/core/test/test_cx_wedges.py +0 -0
  327. {chython-3.5 → chython-3.8}/chython/core/test/test_derive.py +0 -0
  328. {chython-3.5 → chython-3.8}/chython/core/test/test_descriptors.py +0 -0
  329. {chython-3.5 → chython-3.8}/chython/core/test/test_facade.py +0 -0
  330. {chython-3.5 → chython-3.8}/chython/core/test/test_featurizer_injection.py +0 -0
  331. {chython-3.5 → chython-3.8}/chython/core/test/test_fingerprints.py +0 -0
  332. {chython-3.5 → chython-3.8}/chython/core/test/test_geometry.py +0 -0
  333. {chython-3.5 → chython-3.8}/chython/core/test/test_h_unknown.py +0 -0
  334. {chython-3.5 → chython-3.8}/chython/core/test/test_helical_units.py +0 -0
  335. {chython-3.5 → chython-3.8}/chython/core/test/test_hydrogens.py +0 -0
  336. {chython-3.5 → chython-3.8}/chython/core/test/test_identity_memo.py +0 -0
  337. {chython-3.5 → chython-3.8}/chython/core/test/test_inchi.py +0 -0
  338. {chython-3.5 → chython-3.8}/chython/core/test/test_interop_injection.py +0 -0
  339. {chython-3.5 → chython-3.8}/chython/core/test/test_isomorphism.py +0 -0
  340. {chython-3.5 → chython-3.8}/chython/core/test/test_kekule.py +0 -0
  341. {chython-3.5 → chython-3.8}/chython/core/test/test_log.py +0 -0
  342. {chython-3.5 → chython-3.8}/chython/core/test/test_meta.py +0 -0
  343. {chython-3.5 → chython-3.8}/chython/core/test/test_ml_encoding.py +0 -0
  344. {chython-3.5 → chython-3.8}/chython/core/test/test_ml_reaction_transition.py +0 -0
  345. {chython-3.5 → chython-3.8}/chython/core/test/test_ml_state_view.py +0 -0
  346. {chython-3.5 → chython-3.8}/chython/core/test/test_ml_transition_view.py +0 -0
  347. {chython-3.5 → chython-3.8}/chython/core/test/test_ml_unpack_differential.py +0 -0
  348. {chython-3.5 → chython-3.8}/chython/core/test/test_modeling_view_frozen.py +0 -0
  349. {chython-3.5 → chython-3.8}/chython/core/test/test_molecule.py +0 -0
  350. {chython-3.5 → chython-3.8}/chython/core/test/test_morgan.py +0 -0
  351. {chython-3.5 → chython-3.8}/chython/core/test/test_pach.py +0 -0
  352. {chython-3.5 → chython-3.8}/chython/core/test/test_pach3.py +0 -0
  353. {chython-3.5 → chython-3.8}/chython/core/test/test_pack.py +0 -0
  354. {chython-3.5 → chython-3.8}/chython/core/test/test_planar_units.py +0 -0
  355. {chython-3.5 → chython-3.8}/chython/core/test/test_query.py +0 -0
  356. {chython-3.5 → chython-3.8}/chython/core/test/test_r_edit.py +0 -0
  357. {chython-3.5 → chython-3.8}/chython/core/test/test_r_semantics.py +0 -0
  358. {chython-3.5 → chython-3.8}/chython/core/test/test_r_serialisation.py +0 -0
  359. {chython-3.5 → chython-3.8}/chython/core/test/test_r_smirks.py +0 -0
  360. {chython-3.5 → chython-3.8}/chython/core/test/test_r_storage.py +0 -0
  361. {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_identity.py +0 -0
  362. {chython-3.5 → chython-3.8}/chython/core/test/test_rings.py +0 -0
  363. {chython-3.5 → chython-3.8}/chython/core/test/test_rings_c60.py +0 -0
  364. {chython-3.5 → chython-3.8}/chython/core/test/test_set_element.py +0 -0
  365. {chython-3.5 → chython-3.8}/chython/core/test/test_sgroups.py +0 -0
  366. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_r.py +0 -0
  367. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_read.py +0 -0
  368. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_stereo_marks.py +0 -0
  369. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write.py +0 -0
  370. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_aromatic.py +0 -0
  371. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_cis_trans.py +0 -0
  372. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_h_unknown.py +0 -0
  373. {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_sticky.py +0 -0
  374. {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_patch.py +0 -0
  375. {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_read.py +0 -0
  376. {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_report.py +0 -0
  377. {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_stereo.py +0 -0
  378. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_acceptance.py +0 -0
  379. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_anchor_identity.py +0 -0
  380. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_group_meaning.py +0 -0
  381. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_group_signs.py +0 -0
  382. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_group_storage.py +0 -0
  383. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_liveness.py +0 -0
  384. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_owners.py +0 -0
  385. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_parity.py +0 -0
  386. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_perception.py +0 -0
  387. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_query.py +0 -0
  388. {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_units.py +0 -0
  389. {chython-3.5 → chython-3.8}/chython/core/test/test_stereogenicity_symmetry.py +0 -0
  390. {chython-3.5 → chython-3.8}/chython/core/test/test_structure.py +0 -0
  391. {chython-3.5 → chython-3.8}/chython/core/test/test_thiele_atom_order.py +0 -0
  392. {chython-3.5 → chython-3.8}/chython/core/test/test_title.py +0 -0
  393. {chython-3.5 → chython-3.8}/chython/core/test/test_union_stereo.py +0 -0
  394. {chython-3.5 → chython-3.8}/chython/core/test/v3_fixtures.py +0 -0
  395. {chython-3.5 → chython-3.8}/chython/core/test/v4_fixtures.py +0 -0
  396. {chython-3.5 → chython-3.8}/chython/depict/_hooks.py +0 -0
  397. {chython-3.5 → chython-3.8}/chython/depict/colorbar.py +0 -0
  398. {chython-3.5 → chython-3.8}/chython/depict/colormap.py +0 -0
  399. {chython-3.5 → chython-3.8}/chython/depict/field.py +0 -0
  400. {chython-3.5 → chython-3.8}/chython/depict/label.py +0 -0
  401. {chython-3.5 → chython-3.8}/chython/depict/layout/__init__.py +0 -0
  402. {chython-3.5 → chython-3.8}/chython/depict/layout/approved.py +0 -0
  403. {chython-3.5 → chython-3.8}/chython/depict/layout/clean2d.js +0 -0
  404. {chython-3.5 → chython-3.8}/chython/depict/layout/edits.py +0 -0
  405. {chython-3.5 → chython-3.8}/chython/depict/layout/env.py +0 -0
  406. {chython-3.5 → chython-3.8}/chython/depict/layout/features.py +0 -0
  407. {chython-3.5 → chython-3.8}/chython/depict/layout/greedy.py +0 -0
  408. {chython-3.5 → chython-3.8}/chython/depict/layout/lattice.py +0 -0
  409. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/__init__.py +0 -0
  410. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/alphazero.py +0 -0
  411. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/demos.py +0 -0
  412. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/evaluate.py +0 -0
  413. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/judge.py +0 -0
  414. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/mcts.py +0 -0
  415. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/policy.py +0 -0
  416. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/replay.py +0 -0
  417. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/sweep.py +0 -0
  418. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/targets.py +0 -0
  419. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/tensors.py +0 -0
  420. {chython-3.5 → chython-3.8}/chython/depict/layout/learn/train.py +0 -0
  421. {chython-3.5 → chython-3.8}/chython/depict/layout/pose.py +0 -0
  422. {chython-3.5 → chython-3.8}/chython/depict/layout/quality.py +0 -0
  423. {chython-3.5 → chython-3.8}/chython/depict/layout/rings.py +0 -0
  424. {chython-3.5 → chython-3.8}/chython/depict/layout/search.py +0 -0
  425. {chython-3.5 → chython-3.8}/chython/depict/layout/templates.py +0 -0
  426. {chython-3.5 → chython-3.8}/chython/depict/layout/tree.py +0 -0
  427. {chython-3.5 → chython-3.8}/chython/depict/metrics/__init__.py +0 -0
  428. {chython-3.5 → chython-3.8}/chython/depict/metrics/helvetica.tsv +0 -0
  429. {chython-3.5 → chython-3.8}/chython/depict/metrics/times.tsv +0 -0
  430. {chython-3.5 → chython-3.8}/chython/depict/overlay.py +0 -0
  431. {chython-3.5 → chython-3.8}/chython/depict/render/__init__.py +0 -0
  432. {chython-3.5 → chython-3.8}/chython/depict/render/svg.py +0 -0
  433. {chython-3.5 → chython-3.8}/chython/depict/scene.py +0 -0
  434. {chython-3.5 → chython-3.8}/chython/depict/style.py +0 -0
  435. {chython-3.5 → chython-3.8}/chython/depict/test/__init__.py +0 -0
  436. {chython-3.5 → chython-3.8}/chython/depict/test/learn/__init__.py +0 -0
  437. {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_alphazero.py +0 -0
  438. {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_demos.py +0 -0
  439. {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_judge.py +0 -0
  440. {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_mcts.py +0 -0
  441. {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_policy.py +0 -0
  442. {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_replay.py +0 -0
  443. {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_targets.py +0 -0
  444. {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_train.py +0 -0
  445. {chython-3.5 → chython-3.8}/chython/depict/test/test_bonds.py +0 -0
  446. {chython-3.5 → chython-3.8}/chython/depict/test/test_colorbar.py +0 -0
  447. {chython-3.5 → chython-3.8}/chython/depict/test/test_colormap.py +0 -0
  448. {chython-3.5 → chython-3.8}/chython/depict/test/test_field.py +0 -0
  449. {chython-3.5 → chython-3.8}/chython/depict/test/test_figure.py +0 -0
  450. {chython-3.5 → chython-3.8}/chython/depict/test/test_label.py +0 -0
  451. {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_controller.py +0 -0
  452. {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_engine.py +0 -0
  453. {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_relax.py +0 -0
  454. {chython-3.5 → chython-3.8}/chython/depict/test/test_metrics.py +0 -0
  455. {chython-3.5 → chython-3.8}/chython/depict/test/test_overlay.py +0 -0
  456. {chython-3.5 → chython-3.8}/chython/depict/test/test_package.py +0 -0
  457. {chython-3.5 → chython-3.8}/chython/depict/test/test_quality.py +0 -0
  458. {chython-3.5 → chython-3.8}/chython/depict/test/test_r_atom.py +0 -0
  459. {chython-3.5 → chython-3.8}/chython/depict/test/test_review.py +0 -0
  460. {chython-3.5 → chython-3.8}/chython/depict/test/test_scene.py +0 -0
  461. {chython-3.5 → chython-3.8}/chython/depict/test/test_scorecard.py +0 -0
  462. {chython-3.5 → chython-3.8}/chython/depict/test/test_style.py +0 -0
  463. {chython-3.5 → chython-3.8}/chython/depict/test/test_svg.py +0 -0
  464. {chython-3.5 → chython-3.8}/chython/depict/test/test_wedge_draw.py +0 -0
  465. {chython-3.5 → chython-3.8}/chython/depict/test/test_x3dom.py +0 -0
  466. {chython-3.5 → chython-3.8}/chython/depict/x3dom.py +0 -0
  467. {chython-3.5 → chython-3.8}/chython/exceptions.py +0 -0
  468. {chython-3.5 → chython-3.8}/chython/formats/_text.py +0 -0
  469. {chython-3.5/chython/formats/ctfile → chython-3.8/chython/formats/cdx}/test/__init__.py +0 -0
  470. {chython-3.5 → chython-3.8}/chython/formats/ctfile/CTFILE.md +0 -0
  471. {chython-3.5 → chython-3.8}/chython/formats/ctfile/__init__.py +0 -0
  472. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_ctab.py +0 -0
  473. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_errors.py +0 -0
  474. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_facade.py +0 -0
  475. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_hydrogens.py +0 -0
  476. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_rdf.py +0 -0
  477. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_rxn.py +0 -0
  478. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_sdf.py +0 -0
  479. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_sgroup.py +0 -0
  480. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_stream.py +0 -0
  481. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_tokens.py +0 -0
  482. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_v2000.py +0 -0
  483. {chython-3.5 → chython-3.8}/chython/formats/ctfile/_v3000.py +0 -0
  484. {chython-3.5/chython/formats/xml → chython-3.8/chython/formats/ctfile}/test/__init__.py +0 -0
  485. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_aromatic.py +0 -0
  486. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_container_log.py +0 -0
  487. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_data_labels.py +0 -0
  488. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_facade.py +0 -0
  489. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_r_atom.py +0 -0
  490. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_rxn.py +0 -0
  491. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_sdf.py +0 -0
  492. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_sgroup.py +0 -0
  493. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_stereo_drawings.py +0 -0
  494. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_stereo_label.py +0 -0
  495. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_stream.py +0 -0
  496. {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_tokens.py +0 -0
  497. {chython-3.5 → chython-3.8}/chython/formats/mol2.py +0 -0
  498. {chython-3.5 → chython-3.8}/chython/formats/pdb/__init__.py +0 -0
  499. {chython-3.5 → chython-3.8}/chython/formats/pdb/_builder.py +0 -0
  500. {chython-3.5 → chython-3.8}/chython/formats/pdb/_legacy.py +0 -0
  501. {chython-3.5 → chython-3.8}/chython/formats/pdb/_mmcif.py +0 -0
  502. {chython-3.5 → chython-3.8}/chython/formats/pdb/_records.py +0 -0
  503. {chython-3.5 → chython-3.8}/chython/formats/pdb/_star.py +0 -0
  504. {chython-3.5 → chython-3.8}/chython/formats/test/__init__.py +0 -0
  505. {chython-3.5 → chython-3.8}/chython/formats/test/conftest.py +0 -0
  506. {chython-3.5 → chython-3.8}/chython/formats/test/test_conformance.py +0 -0
  507. {chython-3.5 → chython-3.8}/chython/formats/test/test_done_when.py +0 -0
  508. {chython-3.5 → chython-3.8}/chython/formats/test/test_isolation.py +0 -0
  509. {chython-3.5 → chython-3.8}/chython/formats/test/test_log_prefix.py +0 -0
  510. {chython-3.5 → chython-3.8}/chython/formats/test/test_mmcif.py +0 -0
  511. {chython-3.5 → chython-3.8}/chython/formats/test/test_mol2.py +0 -0
  512. {chython-3.5 → chython-3.8}/chython/formats/test/test_no_review_bookkeeping.py +0 -0
  513. {chython-3.5 → chython-3.8}/chython/formats/test/test_pdb.py +0 -0
  514. {chython-3.5 → chython-3.8}/chython/formats/test/test_pdb_builder.py +0 -0
  515. {chython-3.5 → chython-3.8}/chython/formats/test/test_perceive_agreement.py +0 -0
  516. {chython-3.5 → chython-3.8}/chython/formats/test/test_read_only_facades.py +0 -0
  517. {chython-3.5 → chython-3.8}/chython/formats/test/test_xyz.py +0 -0
  518. {chython-3.5 → chython-3.8}/chython/formats/test/test_xyz_builder.py +0 -0
  519. {chython-3.5 → chython-3.8}/chython/formats/xml/__init__.py +0 -0
  520. {chython-3.5 → chython-3.8}/chython/formats/xml/_cml.py +0 -0
  521. {chython-3.5 → chython-3.8}/chython/formats/xml/_dialect.py +0 -0
  522. {chython-3.5 → chython-3.8}/chython/formats/xml/_errors.py +0 -0
  523. {chython-3.5 → chython-3.8}/chython/formats/xml/_facade.py +0 -0
  524. {chython-3.5 → chython-3.8}/chython/formats/xml/_mrv.py +0 -0
  525. {chython-3.5 → chython-3.8}/chython/formats/xml/_tree.py +0 -0
  526. {chython-3.5/chython/interop → chython-3.8/chython/formats/xml}/test/__init__.py +0 -0
  527. {chython-3.5 → chython-3.8}/chython/formats/xml/test/conftest.py +0 -0
  528. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_cml.py +0 -0
  529. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_container_log.py +0 -0
  530. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_dead_stereo_groups.py +0 -0
  531. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_dialect.py +0 -0
  532. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_equivalence.py +0 -0
  533. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_facade.py +0 -0
  534. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_mrv.py +0 -0
  535. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_mrv_census.py +0 -0
  536. {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_tree.py +0 -0
  537. {chython-3.5 → chython-3.8}/chython/formats/xyz.py +0 -0
  538. {chython-3.5 → chython-3.8}/chython/interop/__init__.py +0 -0
  539. {chython-3.5 → chython-3.8}/chython/interop/_cdk.py +0 -0
  540. {chython-3.5 → chython-3.8}/chython/interop/_cdpkit.py +0 -0
  541. {chython-3.5 → chython-3.8}/chython/interop/_indigo.py +0 -0
  542. {chython-3.5 → chython-3.8}/chython/interop/_iupac.py +0 -0
  543. {chython-3.5 → chython-3.8}/chython/interop/_java.py +0 -0
  544. {chython-3.5 → chython-3.8}/chython/interop/_openbabel.py +0 -0
  545. {chython-3.5 → chython-3.8}/chython/interop/_pandas.py +0 -0
  546. {chython-3.5 → chython-3.8}/chython/interop/_rdkit.py +0 -0
  547. {chython-3.5 → chython-3.8}/chython/interop/_records.py +0 -0
  548. {chython-3.5 → chython-3.8}/chython/interop/_stereo.py +0 -0
  549. {chython-3.5 → chython-3.8}/chython/interop/config.py +0 -0
  550. {chython-3.5 → chython-3.8}/chython/interop/conformers.py +0 -0
  551. {chython-3.5 → chython-3.8}/chython/interop/test/conftest.py +0 -0
  552. {chython-3.5 → chython-3.8}/chython/interop/test/test_cdk.py +0 -0
  553. {chython-3.5 → chython-3.8}/chython/interop/test/test_cdpkit.py +0 -0
  554. {chython-3.5 → chython-3.8}/chython/interop/test/test_config.py +0 -0
  555. {chython-3.5 → chython-3.8}/chython/interop/test/test_conformers.py +0 -0
  556. {chython-3.5 → chython-3.8}/chython/interop/test/test_coordinate_honesty.py +0 -0
  557. {chython-3.5 → chython-3.8}/chython/interop/test/test_dispatch.py +0 -0
  558. {chython-3.5 → chython-3.8}/chython/interop/test/test_indigo.py +0 -0
  559. {chython-3.5 → chython-3.8}/chython/interop/test/test_iupac.py +0 -0
  560. {chython-3.5 → chython-3.8}/chython/interop/test/test_log_delivery.py +0 -0
  561. {chython-3.5 → chython-3.8}/chython/interop/test/test_openbabel.py +0 -0
  562. {chython-3.5 → chython-3.8}/chython/interop/test/test_pandas.py +0 -0
  563. {chython-3.5 → chython-3.8}/chython/interop/test/test_rdkit.py +0 -0
  564. {chython-3.5 → chython-3.8}/chython/interop/test/test_stereo.py +0 -0
  565. {chython-3.5 → chython-3.8}/chython/reactions/__init__.py +0 -0
  566. {chython-3.5 → chython-3.8}/chython/reactions/_numbering.py +0 -0
  567. {chython-3.5 → chython-3.8}/chython/reactions/_stickers.py +0 -0
  568. {chython-3.5 → chython-3.8}/chython/reactions/_tables.py +0 -0
  569. {chython-3.5 → chython-3.8}/chython/reactions/attention/__init__.py +0 -0
  570. {chython-3.5 → chython-3.8}/chython/reactions/attention/_assign.py +0 -0
  571. {chython-3.5 → chython-3.8}/chython/reactions/attention/_encode.py +0 -0
  572. {chython-3.5 → chython-3.8}/chython/reactions/attention/_session.py +0 -0
  573. {chython-3.5 → chython-3.8}/chython/reactions/test/__init__.py +0 -0
  574. {chython-3.5 → chython-3.8}/chython/reactions/test/golden_subset.smi +0 -0
  575. {chython-3.5 → chython-3.8}/chython/reactions/test/test_attention.py +0 -0
  576. {chython-3.5 → chython-3.8}/chython/reactions/test/test_attention_assign.py +0 -0
  577. {chython-3.5 → chython-3.8}/chython/reactions/test/test_attention_encode.py +0 -0
  578. {chython-3.5 → chython-3.8}/chython/reactions/test/test_attention_isolation.py +0 -0
  579. {chython-3.5 → chython-3.8}/chython/reactions/test/test_dependency_direction.py +0 -0
  580. {chython-3.5 → chython-3.8}/chython/reactions/test/test_enumerate.py +0 -0
  581. {chython-3.5 → chython-3.8}/chython/reactions/test/test_id_stability.py +0 -0
  582. {chython-3.5 → chython-3.8}/chython/reactions/test/test_numbering.py +0 -0
  583. {chython-3.5 → chython-3.8}/chython/reactions/test/test_probes.py +0 -0
  584. {chython-3.5 → chython-3.8}/chython/reactions/test/test_retro_probes.py +0 -0
  585. {chython-3.5 → chython-3.8}/chython/reactions/test/test_stickers.py +0 -0
  586. {chython-3.5 → chython-3.8}/chython/test/__init__.py +0 -0
  587. {chython-3.5 → chython-3.8}/chython/test/test_code_hygiene.py +0 -0
  588. {chython-3.5 → chython-3.8}/chython/test/test_container_methods.py +0 -0
  589. {chython-3.5 → chython-3.8}/chython/test/test_doc_figures.py +0 -0
  590. {chython-3.5 → chython-3.8}/chython/test/test_doc_references.py +0 -0
  591. {chython-3.5 → chython-3.8}/chython/test/test_doc_samples.py +0 -0
  592. {chython-3.5 → chython-3.8}/chython/test/test_hydrogen_parity.py +0 -0
  593. {chython-3.5 → chython-3.8}/chython/test/test_libinchi_staging.py +0 -0
  594. {chython-3.5 → chython-3.8}/chython/test/test_log_records.py +0 -0
  595. {chython-3.5 → chython-3.8}/chython/test/test_packaging.py +0 -0
  596. {chython-3.5 → chython-3.8}/chython/test/test_performance.py +0 -0
  597. {chython-3.5 → chython-3.8}/chython/test/test_r_atom_integration.py +0 -0
  598. {chython-3.5 → chython-3.8}/chython/test/test_release_build.py +0 -0
  599. {chython-3.5 → chython-3.8}/chython.egg-info/dependency_links.txt +0 -0
  600. {chython-3.5 → chython-3.8}/chython.egg-info/top_level.txt +0 -0
  601. {chython-3.5 → chython-3.8}/setup.cfg +0 -0
  602. {chython-3.5 → chython-3.8}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chython
3
- Version: 3.5
3
+ Version: 3.8
4
4
  Summary: Library for processing molecules and reactions in python way
5
5
  Author-email: Ramil Nugmanov <nougmanoff@protonmail.com>
6
6
  License-Expression: LGPL-3.0-or-later
@@ -34,6 +34,8 @@ Requires-Dist: onnxruntime>=1.16; extra == "mapping"
34
34
  Requires-Dist: chython-rxnmap>=2.0; extra == "mapping"
35
35
  Provides-Extra: rdkit
36
36
  Requires-Dist: rdkit>=2025.9; extra == "rdkit"
37
+ Provides-Extra: v8
38
+ Requires-Dist: mini-racer>=0.12; extra == "v8"
37
39
  Provides-Extra: extra-clean2d
38
40
  Requires-Dist: jpype1>=1.6.0; extra == "extra-clean2d"
39
41
  Requires-Dist: openbabel-wheel>=3.1.1.22; extra == "extra-clean2d"
@@ -64,7 +66,8 @@ Library for processing molecules and reactions in a Python way.
64
66
 
65
67
  **File formats**
66
68
 
67
- - Read and write MDL RDF/RXN and SDF/MOL (V2000 and V3000, including atom parity and enhanced stereo), Marvin MRV, CML, SMILES, and InChI with InChIKey (InChI Trust library)
69
+ - Read and write MDL RDF/RXN and SDF/MOL (V2000 and V3000, including atom parity and enhanced stereo), Marvin MRV, CML, ChemDraw CDX and CDXML, SMILES, and InChI with InChIKey (InChI Trust library)
70
+ - Read and write HELM and BILN biopolymer notations, canonical on write, against the Pistoia HELMCoreLibrary or a monomer library you attach
68
71
  - Read SMARTS and SMIRKS, Tripos MOL2, PDBx/mmCIF, legacy PDB, XYZ, and IUPAC names through OPSIN
69
72
  - Compact binary (de)serialization — `pach` for a wire record, `mol.to_bytes()` for the arena buffer — and full pickle support
70
73
  - A coordinate format hands back a record of atoms and coordinates rather than a molecule, because it states no bond order: `build_molecule()` places the atoms, `perceive_bonds()` reads the connectivity out of a geometry, `saturate()` raises the orders, and all three are calls the caller makes
@@ -18,7 +18,8 @@ Library for processing molecules and reactions in a Python way.
18
18
 
19
19
  **File formats**
20
20
 
21
- - Read and write MDL RDF/RXN and SDF/MOL (V2000 and V3000, including atom parity and enhanced stereo), Marvin MRV, CML, SMILES, and InChI with InChIKey (InChI Trust library)
21
+ - Read and write MDL RDF/RXN and SDF/MOL (V2000 and V3000, including atom parity and enhanced stereo), Marvin MRV, CML, ChemDraw CDX and CDXML, SMILES, and InChI with InChIKey (InChI Trust library)
22
+ - Read and write HELM and BILN biopolymer notations, canonical on write, against the Pistoia HELMCoreLibrary or a monomer library you attach
22
23
  - Read SMARTS and SMIRKS, Tripos MOL2, PDBx/mmCIF, legacy PDB, XYZ, and IUPAC names through OPSIN
23
24
  - Compact binary (de)serialization — `pach` for a wire record, `mol.to_bytes()` for the arena buffer — and full pickle support
24
25
  - A coordinate format hands back a record of atoms and coordinates rather than a molecule, because it states no bond order: `build_molecule()` places the atoms, `perceive_bonds()` reads the connectivity out of a geometry, `saturate()` raises the orders, and all three are calls the caller makes
@@ -20,17 +20,20 @@
20
20
  #
21
21
  """chython's public surface: a facade re-exporting the packages below it.
22
22
 
23
- `__all__` is empty by design. `smarts` is the short spelling of `read_smarts` and the same function
24
- object. `smiles` is bidirectional: a string in reads -- a `>` that is not a dative `->` makes it a
25
- reaction SMILES and the result a `ReactionContainer` -- and a container in writes one. `pach` is the
26
- same door for the wire format, and `unpach`/`unpack` its import half under chython 2's two names.
23
+ `__all__` is empty by design; `__version__` is the installed distribution's. `smarts` is the short
24
+ spelling of `read_smarts` and the same function object. `smiles` is bidirectional: a string in reads -- a
25
+ `>` that is not a dative `->` makes it a reaction SMILES and the result a `ReactionContainer` -- and a
26
+ container in writes one. `pach` is the same door for the wire format, and `unpach`/`unpack` its import
27
+ half under chython 2's two names.
27
28
  """
29
+ from importlib.metadata import PackageNotFoundError as _NotInstalled, version as _version
30
+ from os import PathLike as _PathLike
28
31
  from sys import modules as _modules
29
32
  from types import ModuleType as _ModuleType
30
33
  from .core import *
31
34
  from .core import read_smarts as smarts
32
- from .depict import (Clean2DEngine, DepictStyle, get_chain_layout, get_clean2d_engine, get_depict_style,
33
- get_peptide_layout, set_chain_layout, set_clean2d_engine, set_depict_style, set_peptide_layout)
35
+ from .depict import (Clean2DEngine, DepictStyle, JSRuntime, get_chain_layout, get_clean2d_engine, get_depict_style,
36
+ get_js_runtime, set_chain_layout, set_clean2d_engine, set_depict_style, set_js_runtime)
34
37
  from .formats import *
35
38
  # By full path, not through `formats`' star: `pdb` is that subpackage's name too and the function
36
39
  # would shadow it.
@@ -40,14 +43,15 @@ from .formats.pdb import PDBAtom, PDBBond, PDBRecord, build_molecule, mmcif, pdb
40
43
  from .chemistry import *
41
44
  # Likewise: `_set_reactions_fns` at import time is what makes `mol.react()` and `mol @ other` exist.
42
45
  from .reactions import *
46
+ from .polymers import *
43
47
  from .interop import iupac, patch_pandas
44
48
  from .interop.config import _facade_alias as _interop_facade_alias
45
49
 
46
50
 
47
51
  class _Facade(_ModuleType):
48
- """Gives `chython` itself properties, so `chython.clean2d_engine` and `chython.chain_layout` (alias
49
- `chython.peptide_layout`) forward both the read and the write to their one home in `depict/_config.py`,
50
- validated on the spot.
52
+ """Gives `chython` itself properties, so `chython.clean2d_engine`, `chython.js_runtime` and
53
+ `chython.chain_layout` forward both the read and the write to their one home in `depict/_config.py`,
54
+ validated on the spot, and `chython.monomer_library` to its home in `polymers/_library.py`.
51
55
  """
52
56
  @property
53
57
  def clean2d_engine(self) -> Clean2DEngine:
@@ -66,16 +70,34 @@ class _Facade(_ModuleType):
66
70
  set_chain_layout(flag)
67
71
 
68
72
  @property
69
- def peptide_layout(self) -> bool:
70
- return get_peptide_layout()
73
+ def js_runtime(self) -> JSRuntime:
74
+ return get_js_runtime()
71
75
 
72
- @peptide_layout.setter
73
- def peptide_layout(self, flag: bool):
74
- set_peptide_layout(flag)
76
+ @js_runtime.setter
77
+ def js_runtime(self, runtime: JSRuntime):
78
+ set_js_runtime(runtime)
79
+
80
+ @property
81
+ def monomer_library(self):
82
+ """The HELM/BILN monomer set in use: the shipped public library plus what was attached."""
83
+ return get_monomer_library()
84
+
85
+ @monomer_library.setter
86
+ def monomer_library(self, paths):
87
+ """A path or a sequence of paths of Pistoia JSON libraries, stacked on the shipped one; ``()``
88
+ restores the default."""
89
+ if isinstance(paths, (str, _PathLike)):
90
+ paths = (paths,)
91
+ set_monomer_library(*paths)
75
92
 
76
93
 
77
94
  _modules[__name__].__class__ = _Facade
78
95
 
96
+ try: # the installed distribution's version; None for a bare source tree
97
+ __version__ = _version('chython')
98
+ except _NotInstalled:
99
+ __version__ = None
100
+
79
101
  # `conformer_engine` and `class_paths` live in `chython.interop.config`; aliased here rather than
80
102
  # copied, or `chython.conformer_engine = 'cdpkit'` would be a silent no-op. Must run AFTER the
81
103
  # `__class__` assignment above: `_facade_alias` subclasses whatever class the module currently has, so
@@ -35,7 +35,7 @@ from ._counts import (hydrogen_bond_acceptors_count, hydrogen_bond_donors_count,
35
35
  from ._crippen import crippen_logp, crippen_mr
36
36
  from ._hydrogens import explicify_hydrogens, implicify_hydrogens
37
37
  from ._implicit import calc_implicit, check_valence
38
- from ._isomers import standardize_isomers
38
+ from ._isomers import isomer_forms, standardize_isomers
39
39
  from ._kekule_form import standardize_kekule
40
40
  from ._maccs import maccs_bit_set, maccs_keys
41
41
  from ._perceive import perceive_bonds
@@ -59,7 +59,7 @@ from ._tables import (ACID_ROLES, AbbreviationRow, AcidRow, Endpoint, RESONANCE_
59
59
  from ._tpsa import tpsa
60
60
  from ..core.monomers import PeptideBranch, Peptide, Residue, monomers
61
61
  from ..core._core import (_set_canonicalize_fn, _set_featurizer_fns, _set_hydrogens_fns,
62
- _set_isomers_fn, _set_kekule_form_fn, _set_protomers_fn,
62
+ _set_isomer_forms_fn, _set_isomers_fn, _set_kekule_form_fn, _set_protomers_fn,
63
63
  _set_resonance_fn, _set_salts_fns, _set_standardize_fn,
64
64
  _set_valence_fn)
65
65
 
@@ -81,6 +81,7 @@ _set_standardize_fn(standardize)
81
81
  _set_canonicalize_fn(canonicalize)
82
82
  _set_hydrogens_fns(implicify_hydrogens, explicify_hydrogens)
83
83
  _set_isomers_fn(standardize_isomers)
84
+ _set_isomer_forms_fn(isomer_forms)
84
85
  _set_kekule_form_fn(standardize_kekule)
85
86
  _set_valence_fn(check_valence)
86
87
  _set_salts_fns(split_salts=split_salts, decompose_salts=decompose_salts)
@@ -55,7 +55,7 @@ from math import comb
55
55
  from ..core import INFO, LOST, AutomorphismBudgetExceeded, LogRecord, MoleculeContainer, recording
56
56
 
57
57
 
58
- __all__ = ['standardize_isomers']
58
+ __all__ = ['isomer_forms', 'standardize_isomers']
59
59
 
60
60
 
61
61
  #: Table-qualified, as every rule id must be -- never a bare index. Three and not one: a consumer
@@ -82,6 +82,10 @@ _DONOR = frozenset((8, 16))
82
82
  #: record rather than a silent truncation.
83
83
  _TRIALS_MAX = 512
84
84
 
85
+ #: `isomer_forms()`'s cap on the product over a molecule's systems, the drawn form included. Two
86
+ #: imidazoles and an amidine are 2 x 2 x 2: the cap is what a polyazole is not allowed to multiply into.
87
+ _FORMS_MAX = 16
88
+
85
89
 
86
90
  def _sites(molecule: MoleculeContainer) -> list[int]:
87
91
  """Every atom whose hydrogen or charge the ring decides.
@@ -564,11 +568,12 @@ def _imine_handover(molecule: MoleculeContainer, lines: list) -> bool:
564
568
  ring path keeps a ring's hydrogen count and the amidine path stays out of a ring holding a C=C, so the
565
569
  hydrogen an exocyclic imine took from the ring is handed back here, and both paths then place the rest.
566
570
  The imine nitrogen bears carbon or hydrogen only -- an amidoxime keeps its oxime -- and the ring nitrogen
567
- is an `-NH-` of single bonds. Of two such nitrogens the canonical order picks one, the ring path
571
+ is an `-NH-` of single bonds, and gives its hydrogen once: of the two imines of 1,3-diiminoisoindoline
572
+ one takes it, the other stays an imine. Of two such nitrogens the canonical order picks one, the ring path
568
573
  deciding between them again when the system is one it places. A ring system with no C=C, a cyclic
569
574
  guanidine of a triazinane or creatinine, is the amidine path's and is not touched.
570
575
  """
571
- moves = []
576
+ moves, used = [], set() # a donor gives its hydrogen, and takes its C=N, once
572
577
  positions = None
573
578
  for atoms, _ in _ring_systems(molecule):
574
579
  if not _conjugated_carbon(molecule, atoms):
@@ -582,7 +587,8 @@ def _imine_handover(molecule: MoleculeContainer, lines: list) -> bool:
582
587
  and all(molecule.element_of(y) in (1, 6) for y in molecule.neighbors_of(x) if y != c)]
583
588
  if not imines:
584
589
  continue
585
- donors = [y for y in molecule.neighbors_of(c) if y in atoms and molecule.element_of(y) == 7
590
+ donors = [y for y in molecule.neighbors_of(c) if y in atoms and y not in used
591
+ and molecule.element_of(y) == 7
586
592
  and not molecule.charge_of(y) and not molecule.radical_of(y) and molecule.implicit_h_of(y)
587
593
  and all(molecule.order_of(y, z) == 1 for z in molecule.neighbors_of(y))]
588
594
  if not donors:
@@ -595,6 +601,7 @@ def _imine_handover(molecule: MoleculeContainer, lines: list) -> bool:
595
601
  positions = molecule.atoms_order
596
602
  donors.sort(key=positions.__getitem__)
597
603
  moves.append((c, imines[0], donors[0]))
604
+ used.add(donors[0])
598
605
  if not moves:
599
606
  return False
600
607
  counts = {n: molecule.implicit_h_of(n) for _, x, y in moves for n in (x, y)}
@@ -942,3 +949,153 @@ def standardize_isomers(molecule: MoleculeContainer) -> bool:
942
949
  log.append(LogRecord(rule, atoms, message,
943
950
  LOST if rule in (_RULE_BUDGET, _RULE_REFUSED) else INFO))
944
951
  return changed
952
+
953
+
954
+ # ---------------------------------------------------------------------------------------------------
955
+ # Every placement, not the canonical one: what a reaction template is matched against.
956
+ # ---------------------------------------------------------------------------------------------------
957
+
958
+ def _ring_placements(target: MoleculeContainer, group: list[int]) -> list[dict[int, tuple[int, int]]]:
959
+ """Every hydrogen placement of one ring system as aromatic as the best one, charges as drawn.
960
+
961
+ `_choose`'s enumeration with its first key only: a placement that costs aromaticity -- the quinoid
962
+ imine of a fused pyridopyrimidinedione -- is a different reading of the ring and not a second drawing of
963
+ the one compound. The charges stay where they are, a `+` placement being `standardize_isomers()`'s
964
+ question and never a reactive site of its own.
965
+ """
966
+ hydrogens, _ = _budget(target, group)
967
+ carriers = [n for n in group if len(tuple(target.neighbors_of(n))) == 2]
968
+ if comb(len(carriers), hydrogens) > _TRIALS_MAX:
969
+ return []
970
+ best, out = None, []
971
+ for protonated in combinations(carriers, hydrogens):
972
+ placement = {n: (1 if n in protonated else 0, target.charge_of(n)) for n in group}
973
+ aromatic = _admissible(target, group, placement)
974
+ if aromatic is None:
975
+ continue
976
+ if best is None or aromatic > best:
977
+ best, out = aromatic, [placement]
978
+ elif aromatic == best:
979
+ out.append(placement)
980
+ return out
981
+
982
+
983
+ def _amidine_placements(molecule: MoleculeContainer, unit: list[tuple[int, list[int]]]):
984
+ """Every acceptor assignment of one amidine system as `(states, orders)`, charges as drawn.
985
+
986
+ `_choose_amidines`' matching: each carbon takes one of its sites, no site twice, and no nitrogen is
987
+ asked for a hydrogen it has no room for.
988
+ """
989
+ sites = sorted({n for _, s in unit for n in s})
990
+ charges = {n: molecule.charge_of(n) for n in sites}
991
+ degrees = {n: len(tuple(molecule.neighbors_of(n))) for n in sites}
992
+ trials = 1
993
+ for _, s in unit:
994
+ trials *= len(s)
995
+ if trials > _TRIALS_MAX:
996
+ return []
997
+ out = []
998
+ for choice in product(*(s for _, s in unit)):
999
+ if len(set(choice)) != len(choice):
1000
+ continue
1001
+ accepted = dict(zip((c for c, _ in unit), choice))
1002
+ if any((2 if n in accepted.values() else 3) + charges[n] - degrees[n] < 0 for n in sites):
1003
+ continue
1004
+ out.append(_amidine_edits(molecule, unit, accepted, charges))
1005
+ return out
1006
+
1007
+
1008
+ def isomer_forms(molecule: MoleculeContainer) -> list[MoleculeContainer]:
1009
+ """Every placement of the mobile hydrogens `standardize_isomers()` chooses between, as molecules.
1010
+
1011
+ The drawn form first and unmodified, then the others, at most `_FORMS_MAX` in all. The systems are
1012
+ `standardize_isomers()`'s three: an aromatic ring system, a conjugated ring system stored in its Kekule
1013
+ form, and an amidine or guanidine, each enumerated whole and the molecule's systems combined. A
1014
+ template binds to the atoms it is handed, so `CC1=NNC=C1` alkylated on the nitrogen drawn without its
1015
+ hydrogen is the same compound's other form alkylated on the one drawn with it; this is what lets one
1016
+ row read both.
1017
+
1018
+ A copy each, keeping the atom numbers and map numbers of `molecule`. A form that does not kekulise as
1019
+ a whole, though each system did alone, is not offered. Reads only, and logs nothing.
1020
+ """
1021
+ work, systems = _aromatized(molecule)
1022
+ target = work if work is not None else molecule
1023
+ aromatic = molecule.copy()
1024
+ aromatic.thiele()
1025
+ ringed = {c for c, _ in _amidines(aromatic)}
1026
+ kept = tuple(system for system in systems
1027
+ if not ringed.intersection(system[0]) or _conjugated_carbon(molecule, system[0]))
1028
+ handed_over = {n for system in systems if system not in kept for n in system[0]}
1029
+ systems = kept
1030
+ conjugated = frozenset(n for atoms, _ in _ring_systems(molecule) if _conjugated_carbon(molecule, atoms)
1031
+ for n in atoms)
1032
+ units = _amidine_systems(_amidines(molecule, conjugated.union(n for atoms, _ in systems for n in atoms)))
1033
+ sites = [n for n in _sites(target) if n not in handed_over]
1034
+
1035
+ choices: list[list[tuple[str, object]]] = []
1036
+ for group in (_groups(target, sites) if len(sites) > 1 else ()):
1037
+ if len(group) > 1:
1038
+ placements = _ring_placements(target, group)
1039
+ if len(placements) > 1:
1040
+ choices.append([('ring', p) for p in placements])
1041
+ for unit in units:
1042
+ placements = _amidine_placements(molecule, unit)
1043
+ if len(placements) > 1:
1044
+ choices.append([('amidine', p) for p in placements])
1045
+ if not choices:
1046
+ return [molecule.copy()]
1047
+
1048
+ drawn = molecule.canonical_bytes
1049
+ forms, seen = [molecule.copy()], {drawn}
1050
+ for combination in product(*choices):
1051
+ if len(forms) >= _FORMS_MAX:
1052
+ break
1053
+ form = _form(molecule, work, systems, combination)
1054
+ if form is None:
1055
+ continue
1056
+ key = form.canonical_bytes
1057
+ if key not in seen:
1058
+ seen.add(key)
1059
+ forms.append(form)
1060
+ return forms
1061
+
1062
+
1063
+ def _form(molecule: MoleculeContainer, work, systems, combination) -> MoleculeContainer | None:
1064
+ """One combination of placements written onto a copy, or `None` when the whole has no Kekule form."""
1065
+ states: dict[int, tuple[int, int]] = {}
1066
+ orders: list[tuple[int, int, int]] = []
1067
+ for kind, placement in combination:
1068
+ if kind == 'ring':
1069
+ states.update(placement)
1070
+ else:
1071
+ unit_states, unit_orders = placement
1072
+ states.update(unit_states)
1073
+ orders.extend(unit_orders)
1074
+ ring = {n for kind, p in combination if kind == 'ring' for n in p}
1075
+ if work is not None and ring:
1076
+ probe = work.copy()
1077
+ with probe.edit():
1078
+ for n in ring:
1079
+ probe.set_charge(n, states[n][1])
1080
+ probe.set_hydrogens(n, states[n][0])
1081
+ if probe.kekule(canonical=True).unresolved:
1082
+ return None
1083
+ if any((probe.implicit_h_of(n), probe.charge_of(n)) != states[n] for n in ring):
1084
+ return None
1085
+ orders.extend((u, v, probe.order_of(u, v)) for atoms, rewrite in systems
1086
+ if not atoms.isdisjoint(ring) for u, v in rewrite)
1087
+ form = molecule.copy()
1088
+ labile = [u['anchor'] for u in form.stereo_units()
1089
+ if u['kind'] == 1 and u['parity'] and isinstance(u['owners'], tuple)
1090
+ and any(frozenset(u['owners']) == frozenset((a, b)) for a, b, _ in orders)]
1091
+ with form.edit():
1092
+ for anchor in labile:
1093
+ form.set_parity(anchor, 0)
1094
+ for u, v, order in orders:
1095
+ form.set_order(u, v, order)
1096
+ for n, (hydrogens, charge) in states.items():
1097
+ form.set_charge(n, charge)
1098
+ form.set_hydrogens(n, hydrogens)
1099
+ if work is None and form.copy().kekule(canonical=True).unresolved:
1100
+ return None
1101
+ return form
@@ -18,9 +18,11 @@
18
18
  #
19
19
  """`standardize_isomers`: the placement is a choice, and two spellings must make the same one."""
20
20
  from itertools import permutations, product
21
+
22
+ import pytest
21
23
  from chython.chemistry._canonicalize import canonicalize
22
24
  from chython.chemistry._implicit import check_valence
23
- from chython.chemistry._isomers import standardize_isomers
25
+ from chython.chemistry._isomers import isomer_forms, standardize_isomers
24
26
  from chython.core import INFO, Log, read_smiles
25
27
 
26
28
 
@@ -704,3 +706,49 @@ def test_an_amidine_c_n_with_a_choice_of_acceptor_carries_no_e_z():
704
706
  m = read_smiles(kept)
705
707
  standardize_isomers(m)
706
708
  assert '/' in str(m) or '\\' in str(m), kept
709
+
710
+
711
+ def test_two_exocyclic_imines_share_one_ring_hydrogen():
712
+ """1,3-Diiminoisoindoline: both imines sit beside one ring N-H, which gives its hydrogen once. One imine
713
+ takes it, the other stays: the neutral amino-imino form, the formula kept, the same molecule as that
714
+ tautomer written as such."""
715
+ molecule = read_smiles('c1ccc2C(NC(c2c1)=N)=N')
716
+ formula = molecule.brutto_formula
717
+ assert standardize_isomers(molecule)
718
+ assert molecule.brutto_formula == formula and not check_valence(molecule), str(molecule)
719
+ assert not any(molecule.charge_of(n) for n in molecule.atom_numbers)
720
+ assert converge('c1ccc2C(NC(c2c1)=N)=N', 'NC1=NC(=N)c2ccccc12')[2]
721
+
722
+
723
+ # --- isomer_forms: every placement, the drawn one first --------------------------------------------
724
+
725
+ @pytest.mark.parametrize('smiles, count', [
726
+ ('CC1=NNC=C1', 2), # 3- and 5-methyl-1H-pyrazole
727
+ ('Cc1c[nH]cn1', 2), # 4- and 5-methyl-1H-imidazole
728
+ ('c1nc[nH]n1', 2), # 1H- and 4H-1,2,4-triazole
729
+ ('Cc1nn[nH]n1', 2), # 1H- and 2H-tetrazole
730
+ ('c1ccc2[nH]ncc2c1', 2), # 1H- and 2H-indazole
731
+ ('CC(=N)NC', 2), # the C=N on either nitrogen
732
+ ('CN=C(N)Nc1ccccc1', 3), # a guanidine: the C=N on each of three
733
+ ('c1ccncc1', 1), # nothing mobile
734
+ ('O=c1cc[nH]c(=O)[nH]1', 1), # uracil: both N-H fixed, and an O-H is not this pass
735
+ ])
736
+ def test_isomer_forms_lists_every_placement(smiles, count):
737
+ molecule = read_smiles(smiles)
738
+ canonicalize(molecule)
739
+ forms = isomer_forms(molecule)
740
+ assert len(forms) == count
741
+ assert forms[0].canonical_bytes == molecule.canonical_bytes
742
+ assert len({form.canonical_bytes for form in forms}) == count
743
+ for form in forms:
744
+ assert set(form.atom_numbers) == set(molecule.atom_numbers)
745
+ canonicalize(form)
746
+ assert form == forms[0] # one compound, every way it is drawn
747
+
748
+
749
+ def test_isomer_forms_is_a_container_method_and_reads_only():
750
+ molecule = read_smiles('Cc1c[nH]cn1')
751
+ canonicalize(molecule)
752
+ before = molecule.canonical_bytes
753
+ assert len(molecule.isomer_forms()) == 2
754
+ assert molecule.canonical_bytes == before
@@ -28,7 +28,7 @@ from chython.core import Log, LogRecord, read_reaction_smiles
28
28
 
29
29
 
30
30
  def test_standardize_runs_on_every_side():
31
- """The iron carbonyl is the differential suite's own witness that a patch fires."""
31
+ """The iron carbonyl is a record the standardization patches are known to fire on."""
32
32
  r = read_reaction_smiles('C(=O)[Fe](C=O)C=O>>CC.C(=O)[Fe](C=O)C=O')
33
33
  assert r.standardize() is True
34
34
  assert r.reactants[0].smiles == '[O+]#[C-]~[Fe](~[C-]#[O+])~[C-]#[O+]'
@@ -19,12 +19,10 @@
19
19
  """What `compile_smarts` must get right, stated as behaviour rather than as a token stream.
20
20
 
21
21
  `compile_smarts` calls the core lexer and then numbers the atoms chython 2's way, so most of this
22
- file pins that the TABLES' dialect is still the dialect the tables were written in. chython 2 is
23
- the behaviour oracle; the two deliberate divergences, `z` and `[M]`'s charge, are asserted by name
24
- rather than skipped.
22
+ file pins that the TABLES' dialect is still the dialect the tables were written in. The two
23
+ deliberate divergences from chython 2, `z` and `[M]`'s charge, are asserted by name.
25
24
  """
26
25
  import pytest
27
- from ._oracle import ask, needs_oracle
28
26
  from chython.chemistry._smarts import SmartsSyntaxError, compile_smarts
29
27
  from chython.core import read_smiles
30
28
 
@@ -146,7 +144,6 @@ def test_a_metal_combined_with_a_primitive_chython_2_ignored_now_means_it():
146
144
 
147
145
 
148
146
  def test_an_ordinary_atom_does_default_to_neutral_and_non_radical():
149
- """Measured against chython 2, which agrees -- so this is not a divergence."""
150
147
  assert not _atom_sets('[C]', '[CH3-]')
151
148
  assert len(_atom_sets('[C;-]', '[CH3-]')) == 1
152
149
 
@@ -225,76 +222,6 @@ def test_the_lexer_accepts_what_the_subset_compiler_could_not(text):
225
222
  assert len(numbers) == query.atom_count
226
223
 
227
224
 
228
- # --- the chython 2 oracle ---------------------------------------------------------------------- #
229
-
230
- # (pattern, molecule). Every pattern is drawn from chython 2's own rule tables or is a primitive
231
- # combination they use; every molecule is a public compound.
232
- _DIFFERENTIAL = [
233
- ('[P;D4;x0;z1]', 'CP(C)(C)C'),
234
- # a NEUTRAL sulfide donating to borane: an oxonium salt matches neither engine, since a list of
235
- # elements constrains charge to neutral in both, and the case would compare two empty sets
236
- ('[B;z1]-[O,S;D3;z1]', 'CS(C)B(C)(C)C'),
237
- ('[N;D3;z2;x2;+]([O;D1;-])([O;D1])=C', 'C=[N+]([O-])O'),
238
- ('[O;D1;z1][N;D3;z1][C,N;z1]', 'ON(C)C'),
239
- ('[C;a]', 'c1ccccc1'),
240
- ('[N;a;r5;D2;h1]', 'c1cc[nH]c1'),
241
- ('[C;D1;h3]', 'CC(=O)OC'),
242
- ('[O;D1;z2]=[C;D3;z2]', 'CC(=O)C'),
243
- ('[C;r6]:[C;r6]', 'c1ccccc1'),
244
- ('[N;D1;z1;x0]-[C;z1]', 'NCC'),
245
- ('[C,N,O]', 'NCCO'),
246
- ('[S;D4](=[O;D1])(=[O;D1])([A])[A]', 'CS(=O)(=O)C'),
247
- ('[C;!R]', 'c1ccccc1CC'),
248
- ('[N;D3;z1]([A])([A])[A]', 'CN(C)C'),
249
- ('[Cl,Br,I;D1]', 'ClCCBr'),
250
- ('[C;x1;z2]=[O;D1]', 'CC=O'),
251
- ('[C;D2;z3]#[N;D1]', 'CC#N'),
252
- ]
253
-
254
-
255
- # Reports the matched atom sets of one `pattern<TAB>molecule` per input line.
256
- _SCRIPT = """
257
- from chython import smiles, smarts
258
-
259
- for line in sys.stdin:
260
- pattern, _, source = line.rstrip('\\n').partition('\\t')
261
- if not pattern:
262
- continue
263
- hits = {tuple(sorted(m.values())) for m in smarts(pattern).get_mapping(smiles(source))}
264
- sys.stdout.write('%s\\t%s\\n' % (line.rstrip('\\n'),
265
- ';'.join(','.join(map(str, h)) for h in sorted(hits))))
266
- """
267
-
268
-
269
- @pytest.fixture(scope='module')
270
- def oracle_hits():
271
- """`{(pattern, molecule): {atom sets}}` from the pinned chython 2, in one subprocess."""
272
- stdin = '\n'.join(f'{pattern}\t{molecule}' for pattern, molecule in _DIFFERENTIAL)
273
- hits = {}
274
- for line in ask(_SCRIPT, stdin):
275
- pattern, molecule, sets = line.split('\t')
276
- hits[(pattern, molecule)] = {frozenset(int(n) for n in s.split(',')) for s in
277
- sets.split(';') if s}
278
- assert len(hits) == len(_DIFFERENTIAL)
279
- return hits
280
-
281
-
282
- @needs_oracle
283
- @pytest.mark.parametrize('pattern,molecule', _DIFFERENTIAL)
284
- def test_the_same_smarts_finds_the_same_atoms_as_chython_2(pattern, molecule, oracle_hits):
285
- """chython 2 is the oracle for behaviour. Compare the SET OF MATCHED ATOM SETS: the engines may
286
- enumerate embeddings in different orders and number query atoms differently, and neither is a
287
- behaviour difference. Out of process, because in-process `from chython import smarts` would read
288
- the tree under test rather than chython 2.
289
- """
290
- expected = oracle_hits[(pattern, molecule)]
291
- assert expected, f'chython 2 finds nothing for {pattern!r} on {molecule!r}; useless as a case'
292
- # chython 2 numbers molecule atoms 1..n in parse order and so does the core reader, so the
293
- # two atom-number spaces coincide for a SMILES with no explicit atom maps.
294
- assert _atom_sets(pattern, molecule) == expected
295
-
296
-
297
- @needs_oracle
298
225
  def test_z3_deliberately_diverges_from_chython_2():
299
226
  """The one named behaviour change, asserted rather than left implicit.
300
227
 
@@ -303,7 +230,5 @@ def test_z3_deliberately_diverges_from_chython_2():
303
230
  translating this primitive silently stops matching, so the translation is done once per rule at
304
231
  extraction time and recorded in the knowledge file.
305
232
  """
306
- line, = ask(_SCRIPT, '[C;z3]\tC=C=C')
307
- assert line.split('\t')[2], 'chython 2 calls the allene carbon z3'
308
- assert not _atom_sets('[C;z3]', 'C=C=C'), 'the core does not: z3 is sp and nothing else'
233
+ assert not _atom_sets('[C;z3]', 'C=C=C'), 'an allene carbon is not z3: z3 is sp and nothing else'
309
234
  assert len(_atom_sets('[C;z5]', 'C=C=C')) == 1, 'it is z5 there'
@@ -16,79 +16,18 @@
16
16
  # You should have received a copy of the GNU Lesser General Public License
17
17
  # along with this program; if not, see <https://www.gnu.org/licenses/>.
18
18
  #
19
- """Does each ported rule fire on the same molecules as a pinned out-of-tree chython 2.24, and produce
20
- the same product? A disagreement is not automatically V3 being wrong: triage it and name the
21
- deliberate divergence below rather than relaxing the comparison.
22
-
23
- Version pinning, isolation of the child and skipping when chython 2 is absent live in
24
- `chython.chemistry.test._oracle`, along with the silent ways this comparison can be made worthless.
19
+ """The standardization pass over the drawn-wrong corpus: it repairs, it is idempotent, and the
20
+ dative-bond rules leave the donor neutral.
25
21
  """
26
22
  import pytest
27
23
 
28
- from chython.chemistry.test._oracle import ask, needs_oracle
29
24
  from chython.core import read_smiles
30
25
  from ._corpus import CORPUS
31
26
  import chython.chemistry # noqa: F401
32
27
 
33
28
 
34
- # Run inside the oracle interpreter. Deliberately tiny: everything it prints is data, since analysis
35
- # done there is analysis this repository cannot see or maintain.
36
- _SCRIPT = """
37
- from chython import smiles
38
-
39
- for line in sys.stdin:
40
- line = line.strip()
41
- if not line:
42
- continue
43
- try:
44
- m = smiles(line)
45
- m.standardize()
46
- sys.stdout.write('%s\\t%s\\n' % (line, format(m, 's')))
47
- except Exception as e:
48
- sys.stdout.write('%s\\tERROR %s: %s\\n' % (line, type(e).__name__, e))
49
- """
50
-
51
-
52
- @pytest.fixture(scope='module')
53
- def oracle_answers():
54
- """`{input smiles: standardized smiles}` from the pinned chython 2, in one subprocess."""
55
- answers = dict(line.partition('\t')[::2] for line in ask(_SCRIPT, '\n'.join(CORPUS)))
56
- assert len(answers) == len(CORPUS)
57
- return answers
58
-
59
-
60
- @needs_oracle
61
- def test_the_oracle_is_the_version_the_rules_were_ported_against(oracle_answers):
62
- """Reaching the fixture at all is the assertion: `ask` checks the version and the import path.
63
-
64
- Named so a broken oracle fails once with a reason, not as 79 apparent chemistry regressions.
65
- """
66
- assert oracle_answers
67
-
68
-
69
- @needs_oracle
70
- def test_every_corpus_molecule_standardizes_to_what_chython_2_produces(oracle_answers):
71
- """All 79, compared AS MOLECULES: a string comparison would fail on atom order and on which
72
- resonance partner carries the charge, which are writer differences and not repair differences.
73
- """
74
- disagreements = []
75
- for source, expected in sorted(oracle_answers.items()):
76
- assert not expected.startswith('ERROR'), f'the oracle cannot read its own corpus: {source}'
77
- molecule = read_smiles(source)
78
- molecule.standardize()
79
- got = molecule.smiles
80
- if read_smiles(expected) != read_smiles(got):
81
- disagreements.append(f'{source}\n chython 2: {expected}\n chython 3: {got}')
82
- assert not disagreements, (
83
- f'{len(disagreements)} of {len(CORPUS)} molecules standardize differently. Triage each one '
84
- 'and decide which engine is right -- do not relax this test:\n' + '\n'.join(disagreements))
85
-
86
-
87
- @needs_oracle
88
- def test_the_comparison_can_fail():
89
- """Negative control: a pass that did nothing would agree with the oracle everywhere, so "no
90
- disagreements" is evidence only while something is actually being repaired.
91
- """
29
+ def test_the_pass_repairs_most_of_the_corpus():
30
+ """Every corpus molecule is drawn wrong, so the pass repairs most of them."""
92
31
  changed = 0
93
32
  for source in CORPUS:
94
33
  molecule = read_smiles(source)
@@ -101,11 +40,11 @@ def test_the_comparison_can_fail():
101
40
 
102
41
 
103
42
  def test_the_pass_is_idempotent():
104
- """Standardizing twice must be standardizing once. No oracle needed: a self-consistency.
43
+ """Standardizing twice must be standardizing once.
105
44
 
106
- Catches the `D` translation: the core counts a dative bond in an atom's degree where chython 2
107
- does not, so a rule meaning "four single bonds, therefore a formal charge" can fire on an atom
108
- whose fourth bond the pass itself just made dative.
45
+ Catches the `D` translation: the core counts a dative bond in an atom's degree, so a rule meaning
46
+ "four single bonds, therefore a formal charge" can fire on an atom whose fourth bond the pass
47
+ itself just made dative.
109
48
  """
110
49
  drifting = []
111
50
  for source in CORPUS: