chython 3.7__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 (591) hide show
  1. {chython-3.7/chython.egg-info → chython-3.8}/PKG-INFO +3 -2
  2. {chython-3.7 → chython-3.8}/README.md +2 -1
  3. {chython-3.7 → chython-3.8}/chython/__init__.py +16 -1
  4. {chython-3.7 → chython-3.8}/chython/chemistry/__init__.py +3 -2
  5. {chython-3.7 → chython-3.8}/chython/chemistry/_isomers.py +155 -1
  6. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_isomers.py +37 -1
  7. {chython-3.7 → chython-3.8}/chython/core/_canonical.pxi +25 -11
  8. {chython-3.7 → chython-3.8}/chython/core/_molecule_container.pxi +33 -0
  9. {chython-3.7 → chython-3.8}/chython/core/_smiles_write.pxi +50 -16
  10. {chython-3.7 → chython-3.8}/chython/core/_stereo.pxi +43 -11
  11. {chython-3.7 → chython-3.8}/chython/core/test/test_bridgehead_realisability.py +5 -4
  12. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_write_detached.py +32 -18
  13. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_write_stereo.py +30 -0
  14. {chython-3.7 → chython-3.8}/chython/formats/__init__.py +4 -2
  15. chython-3.8/chython/formats/cdx/__init__.py +91 -0
  16. chython-3.8/chython/formats/cdx/_binary.py +371 -0
  17. chython-3.8/chython/formats/cdx/_build.py +562 -0
  18. chython-3.8/chython/formats/cdx/_cdxml.py +101 -0
  19. chython-3.8/chython/formats/cdx/_errors.py +34 -0
  20. chython-3.8/chython/formats/cdx/_tree.py +60 -0
  21. chython-3.8/chython/formats/cdx/_vocabulary.py +86 -0
  22. chython-3.8/chython/formats/cdx/_write.py +344 -0
  23. chython-3.8/chython/formats/cdx/test/test_cdx.py +390 -0
  24. chython-3.8/chython/formats/cdx/test/test_interop.py +115 -0
  25. chython-3.8/chython/formats/cdx/test/test_reference.py +129 -0
  26. chython-3.8/chython/formats/cdx/vocabulary.tsv +835 -0
  27. chython-3.8/chython/interop/test/__init__.py +0 -0
  28. chython-3.8/chython/polymers/__init__.py +76 -0
  29. chython-3.8/chython/polymers/_assemble.py +138 -0
  30. chython-3.8/chython/polymers/_biln.py +98 -0
  31. chython-3.8/chython/polymers/_decompose.py +538 -0
  32. chython-3.8/chython/polymers/_errors.py +34 -0
  33. chython-3.8/chython/polymers/_graph.py +62 -0
  34. chython-3.8/chython/polymers/_helm.py +250 -0
  35. chython-3.8/chython/polymers/_library.py +461 -0
  36. chython-3.8/chython/polymers/_shape.py +98 -0
  37. chython-3.8/chython/polymers/_write.py +169 -0
  38. chython-3.8/chython/polymers/data/HELMCoreLibrary.json.gz +0 -0
  39. chython-3.8/chython/polymers/data/LICENSE-HELMMonomerSets +21 -0
  40. chython-3.8/chython/polymers/test/__init__.py +0 -0
  41. chython-3.8/chython/polymers/test/_fixtures.py +46 -0
  42. chython-3.8/chython/polymers/test/test_assemble.py +75 -0
  43. chython-3.8/chython/polymers/test/test_canonical.py +108 -0
  44. chython-3.8/chython/polymers/test/test_decompose.py +204 -0
  45. chython-3.8/chython/polymers/test/test_dependency_direction.py +57 -0
  46. chython-3.8/chython/polymers/test/test_facade.py +65 -0
  47. chython-3.8/chython/polymers/test/test_grammar.py +125 -0
  48. chython-3.8/chython/polymers/test/test_index.py +63 -0
  49. chython-3.8/chython/polymers/test/test_library.py +72 -0
  50. chython-3.8/chython/polymers/test/test_polymer_types.py +59 -0
  51. chython-3.8/chython/polymers/test/test_shape.py +62 -0
  52. {chython-3.7 → chython-3.8}/chython/reactions/_enumerate.py +110 -7
  53. {chython-3.7 → chython-3.8}/chython/reactions/_reconstruct.py +51 -12
  54. {chython-3.7 → chython-3.8}/chython/reactions/tables/functional.tsv +1 -2
  55. {chython-3.7 → chython-3.8}/chython/reactions/tables/reactions.tsv +116 -195
  56. {chython-3.7 → chython-3.8}/chython/reactions/test/_frozen_ids.py +110 -199
  57. {chython-3.7 → chython-3.8}/chython/reactions/test/test_reconstruct.py +55 -43
  58. chython-3.8/chython/reactions/test/test_reconstruct_labels.py +328 -0
  59. {chython-3.7 → chython-3.8}/chython/reactions/test/test_retro.py +1 -1
  60. {chython-3.7 → chython-3.8}/chython/reactions/test/test_retro_tables.py +2 -2
  61. {chython-3.7 → chython-3.8}/chython/reactions/test/test_tables.py +3 -2
  62. {chython-3.7 → chython-3.8}/chython/test/test_facade_names.py +23 -2
  63. {chython-3.7 → chython-3.8}/chython/test/test_writer_posture.py +5 -1
  64. {chython-3.7 → chython-3.8/chython.egg-info}/PKG-INFO +3 -2
  65. {chython-3.7 → chython-3.8}/chython.egg-info/SOURCES.txt +37 -0
  66. {chython-3.7 → chython-3.8}/pyproject.toml +3 -1
  67. chython-3.7/chython/reactions/test/test_reconstruct_labels.py +0 -162
  68. {chython-3.7 → chython-3.8}/LICENSE +0 -0
  69. {chython-3.7 → chython-3.8}/MANIFEST.in +0 -0
  70. {chython-3.7 → chython-3.8}/build_inchi.py +0 -0
  71. {chython-3.7 → chython-3.8}/chython/_functions.py +0 -0
  72. {chython-3.7 → chython-3.8}/chython/chemistry/_abbreviations.py +0 -0
  73. {chython-3.7 → chython-3.8}/chython/chemistry/_canonicalize.py +0 -0
  74. {chython-3.7 → chython-3.8}/chython/chemistry/_counts.py +0 -0
  75. {chython-3.7 → chython-3.8}/chython/chemistry/_crippen.py +0 -0
  76. {chython-3.7 → chython-3.8}/chython/chemistry/_hydrogens.py +0 -0
  77. {chython-3.7 → chython-3.8}/chython/chemistry/_implicit.py +0 -0
  78. {chython-3.7 → chython-3.8}/chython/chemistry/_kekule_form.py +0 -0
  79. {chython-3.7 → chython-3.8}/chython/chemistry/_maccs.py +0 -0
  80. {chython-3.7 → chython-3.8}/chython/chemistry/_organometallics.py +0 -0
  81. {chython-3.7 → chython-3.8}/chython/chemistry/_perceive.py +0 -0
  82. {chython-3.7 → chython-3.8}/chython/chemistry/_pharmacophore.py +0 -0
  83. {chython-3.7 → chython-3.8}/chython/chemistry/_protomers.py +0 -0
  84. {chython-3.7 → chython-3.8}/chython/chemistry/_qed.py +0 -0
  85. {chython-3.7 → chython-3.8}/chython/chemistry/_residues.py +0 -0
  86. {chython-3.7 → chython-3.8}/chython/chemistry/_resonance.py +0 -0
  87. {chython-3.7 → chython-3.8}/chython/chemistry/_salts.py +0 -0
  88. {chython-3.7 → chython-3.8}/chython/chemistry/_saturate.py +0 -0
  89. {chython-3.7 → chython-3.8}/chython/chemistry/_smarts.py +0 -0
  90. {chython-3.7 → chython-3.8}/chython/chemistry/_standardize.py +0 -0
  91. {chython-3.7 → chython-3.8}/chython/chemistry/_stereo_audit.py +0 -0
  92. {chython-3.7 → chython-3.8}/chython/chemistry/_tables.py +0 -0
  93. {chython-3.7 → chython-3.8}/chython/chemistry/_tpsa.py +0 -0
  94. {chython-3.7 → chython-3.8}/chython/chemistry/tables/abbreviations.tsv +0 -0
  95. {chython-3.7 → chython-3.8}/chython/chemistry/tables/acids.tsv +0 -0
  96. {chython-3.7 → chython-3.8}/chython/chemistry/tables/covalent_radii.tsv +0 -0
  97. {chython-3.7 → chython-3.8}/chython/chemistry/tables/crippen.tsv +0 -0
  98. {chython-3.7 → chython-3.8}/chython/chemistry/tables/hbond.tsv +0 -0
  99. {chython-3.7 → chython-3.8}/chython/chemistry/tables/maccs.tsv +0 -0
  100. {chython-3.7 → chython-3.8}/chython/chemistry/tables/maccs_corpus.tsv +0 -0
  101. {chython-3.7 → chython-3.8}/chython/chemistry/tables/pharmacophore.tsv +0 -0
  102. {chython-3.7 → chython-3.8}/chython/chemistry/tables/qed_alerts.tsv +0 -0
  103. {chython-3.7 → chython-3.8}/chython/chemistry/tables/residues.tsv +0 -0
  104. {chython-3.7 → chython-3.8}/chython/chemistry/tables/resonance.tsv +0 -0
  105. {chython-3.7 → chython-3.8}/chython/chemistry/tables/rotatable.tsv +0 -0
  106. {chython-3.7 → chython-3.8}/chython/chemistry/tables/salts.tsv +0 -0
  107. {chython-3.7 → chython-3.8}/chython/chemistry/tables/standardize_groups.tsv +0 -0
  108. {chython-3.7 → chython-3.8}/chython/chemistry/tables/standardize_metals.tsv +0 -0
  109. {chython-3.7 → chython-3.8}/chython/chemistry/tables/stereo_audit.tsv +0 -0
  110. {chython-3.7 → chython-3.8}/chython/chemistry/tables/sybyl_types.tsv +0 -0
  111. {chython-3.7 → chython-3.8}/chython/chemistry/tables/tpsa.tsv +0 -0
  112. {chython-3.7 → chython-3.8}/chython/chemistry/test/__init__.py +0 -0
  113. {chython-3.7 → chython-3.8}/chython/chemistry/test/_corpus.py +0 -0
  114. {chython-3.7 → chython-3.8}/chython/chemistry/test/gen_standardize_rules.py +0 -0
  115. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_abbreviations.py +0 -0
  116. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_acids_tsv.py +0 -0
  117. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_canonicalize.py +0 -0
  118. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_canonicalize_atom_order.py +0 -0
  119. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_counts.py +0 -0
  120. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_covalent_radii_tsv.py +0 -0
  121. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_crippen.py +0 -0
  122. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_crippen_tsv.py +0 -0
  123. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_dependency_direction.py +0 -0
  124. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_featurizer_injection.py +0 -0
  125. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_featurizer_tables_lazy.py +0 -0
  126. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_kekule_form.py +0 -0
  127. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_maccs.py +0 -0
  128. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_maccs_corpus.py +0 -0
  129. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_maccs_tsv.py +0 -0
  130. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_organometallics.py +0 -0
  131. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_perceive.py +0 -0
  132. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_pharmacophore.py +0 -0
  133. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_protomers.py +0 -0
  134. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_qed.py +0 -0
  135. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_qed_alerts_tsv.py +0 -0
  136. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_reaction_hydrogen_repair.py +0 -0
  137. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_reaction_passes.py +0 -0
  138. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_residues.py +0 -0
  139. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_resonance.py +0 -0
  140. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_resonance_tsv.py +0 -0
  141. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_salts.py +0 -0
  142. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_saturate.py +0 -0
  143. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_smarts.py +0 -0
  144. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_standardize_corpus.py +0 -0
  145. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_standardize_groups_port.py +0 -0
  146. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_standardize_overvalent_nitrogen.py +0 -0
  147. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_standardize_rules_examples.py +0 -0
  148. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_standardize_rules_merges.py +0 -0
  149. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_standardize_rules_tsv.py +0 -0
  150. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_stereo_audit.py +0 -0
  151. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_thiele_is_single_purpose.py +0 -0
  152. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_tpsa.py +0 -0
  153. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_tpsa_tsv.py +0 -0
  154. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_valence_report.py +0 -0
  155. {chython-3.7 → chython-3.8}/chython/chemistry/test/test_z_translation.py +0 -0
  156. {chython-3.7 → chython-3.8}/chython/core/RULES.md +0 -0
  157. {chython-3.7 → chython-3.8}/chython/core/__init__.py +0 -0
  158. {chython-3.7 → chython-3.8}/chython/core/_cip.pxi +0 -0
  159. {chython-3.7 → chython-3.8}/chython/core/_core.pyx +0 -0
  160. {chython-3.7 → chython-3.8}/chython/core/_descriptors.pxi +0 -0
  161. {chython-3.7 → chython-3.8}/chython/core/_elements.pxi +0 -0
  162. {chython-3.7 → chython-3.8}/chython/core/_facade.py +0 -0
  163. {chython-3.7 → chython-3.8}/chython/core/_features.pxi +0 -0
  164. {chython-3.7 → chython-3.8}/chython/core/_fingerprints.pxi +0 -0
  165. {chython-3.7 → chython-3.8}/chython/core/_hydrogens.pxi +0 -0
  166. {chython-3.7 → chython-3.8}/chython/core/_inchi.pxi +0 -0
  167. {chython-3.7 → chython-3.8}/chython/core/_isomorphism.pxi +0 -0
  168. {chython-3.7 → chython-3.8}/chython/core/_kekule.pxi +0 -0
  169. {chython-3.7 → chython-3.8}/chython/core/_layout_score.pxi +0 -0
  170. {chython-3.7 → chython-3.8}/chython/core/_log.py +0 -0
  171. {chython-3.7 → chython-3.8}/chython/core/_ml.pxi +0 -0
  172. {chython-3.7 → chython-3.8}/chython/core/_molecule_arena.pxi +0 -0
  173. {chython-3.7 → chython-3.8}/chython/core/_molecule_topology.pxi +0 -0
  174. {chython-3.7 → chython-3.8}/chython/core/_molecule_views.pxi +0 -0
  175. {chython-3.7 → chython-3.8}/chython/core/_morgan.pxi +0 -0
  176. {chython-3.7 → chython-3.8}/chython/core/_pach.pxi +0 -0
  177. {chython-3.7 → chython-3.8}/chython/core/_pach3.pxi +0 -0
  178. {chython-3.7 → chython-3.8}/chython/core/_query_arena.pxi +0 -0
  179. {chython-3.7 → chython-3.8}/chython/core/_query_boxes.pxi +0 -0
  180. {chython-3.7 → chython-3.8}/chython/core/_query_container.pxi +0 -0
  181. {chython-3.7 → chython-3.8}/chython/core/_query_seal.pxi +0 -0
  182. {chython-3.7 → chython-3.8}/chython/core/_reaction_passes.py +0 -0
  183. {chython-3.7 → chython-3.8}/chython/core/_rings.pxi +0 -0
  184. {chython-3.7 → chython-3.8}/chython/core/_smarts_read.pxi +0 -0
  185. {chython-3.7 → chython-3.8}/chython/core/_smiles_read.pxi +0 -0
  186. {chython-3.7 → chython-3.8}/chython/core/_smirks_patch.pxi +0 -0
  187. {chython-3.7 → chython-3.8}/chython/core/_smirks_read.pxi +0 -0
  188. {chython-3.7 → chython-3.8}/chython/core/_sssr.pxi +0 -0
  189. {chython-3.7 → chython-3.8}/chython/core/_stereo_meaning.pxi +0 -0
  190. {chython-3.7 → chython-3.8}/chython/core/_thiele.pxi +0 -0
  191. {chython-3.7 → chython-3.8}/chython/core/_valence.pxi +0 -0
  192. {chython-3.7 → chython-3.8}/chython/core/chains.py +0 -0
  193. {chython-3.7 → chython-3.8}/chython/core/elements.tsv +0 -0
  194. {chython-3.7 → chython-3.8}/chython/core/isotopes.tsv +0 -0
  195. {chython-3.7 → chython-3.8}/chython/core/monomers.py +0 -0
  196. {chython-3.7 → chython-3.8}/chython/core/nucleotides.py +0 -0
  197. {chython-3.7 → chython-3.8}/chython/core/reaction.py +0 -0
  198. {chython-3.7 → chython-3.8}/chython/core/test/__init__.py +0 -0
  199. {chython-3.7 → chython-3.8}/chython/core/test/arena_v4_corpus.bin.gz +0 -0
  200. {chython-3.7 → chython-3.8}/chython/core/test/bench_ml.py +0 -0
  201. {chython-3.7 → chython-3.8}/chython/core/test/chytorch_oracle.py +0 -0
  202. {chython-3.7 → chython-3.8}/chython/core/test/gen_element_tables.py +0 -0
  203. {chython-3.7 → chython-3.8}/chython/core/test/gen_modeling_view_corpus.py +0 -0
  204. {chython-3.7 → chython-3.8}/chython/core/test/gen_pach3_corpus.py +0 -0
  205. {chython-3.7 → chython-3.8}/chython/core/test/gen_v3_fixtures.py +0 -0
  206. {chython-3.7 → chython-3.8}/chython/core/test/gen_v4_fixtures.py +0 -0
  207. {chython-3.7 → chython-3.8}/chython/core/test/gen_valence_rules.py +0 -0
  208. {chython-3.7 → chython-3.8}/chython/core/test/modeling_view_corpus.json.gz +0 -0
  209. {chython-3.7 → chython-3.8}/chython/core/test/modeling_view_corpus.py +0 -0
  210. {chython-3.7 → chython-3.8}/chython/core/test/pach3_corpus.py +0 -0
  211. {chython-3.7 → chython-3.8}/chython/core/test/pach_bond_group_corpus.bin.gz +0 -0
  212. {chython-3.7 → chython-3.8}/chython/core/test/pach_corpus.py +0 -0
  213. {chython-3.7 → chython-3.8}/chython/core/test/pach_v0_corpus.bin.gz +0 -0
  214. {chython-3.7 → chython-3.8}/chython/core/test/pach_v0_native_corpus.bin.gz +0 -0
  215. {chython-3.7 → chython-3.8}/chython/core/test/pach_v2_corpus.bin.gz +0 -0
  216. {chython-3.7 → chython-3.8}/chython/core/test/pach_v3_corpus.bin.gz +0 -0
  217. {chython-3.7 → chython-3.8}/chython/core/test/pach_v4_corpus.bin.gz +0 -0
  218. {chython-3.7 → chython-3.8}/chython/core/test/peptides.py +0 -0
  219. {chython-3.7 → chython-3.8}/chython/core/test/reaction_pach_corpus.py +0 -0
  220. {chython-3.7 → chython-3.8}/chython/core/test/reaction_pach_v2_corpus.bin.gz +0 -0
  221. {chython-3.7 → chython-3.8}/chython/core/test/test_aggregates.py +0 -0
  222. {chython-3.7 → chython-3.8}/chython/core/test/test_alternative_spellings.py +0 -0
  223. {chython-3.7 → chython-3.8}/chython/core/test/test_apply_scratch_probe.py +0 -0
  224. {chython-3.7 → chython-3.8}/chython/core/test/test_arena_f60.py +0 -0
  225. {chython-3.7 → chython-3.8}/chython/core/test/test_arena_identity.py +0 -0
  226. {chython-3.7 → chython-3.8}/chython/core/test/test_arena_v3_compat.py +0 -0
  227. {chython-3.7 → chython-3.8}/chython/core/test/test_arena_v4_compat.py +0 -0
  228. {chython-3.7 → chython-3.8}/chython/core/test/test_aromatic_storage.py +0 -0
  229. {chython-3.7 → chython-3.8}/chython/core/test/test_atropisomer_axis.py +0 -0
  230. {chython-3.7 → chython-3.8}/chython/core/test/test_brace_bond_fields.py +0 -0
  231. {chython-3.7 → chython-3.8}/chython/core/test/test_canonical.py +0 -0
  232. {chython-3.7 → chython-3.8}/chython/core/test/test_canonical_groups.py +0 -0
  233. {chython-3.7 → chython-3.8}/chython/core/test/test_canonical_mirror.py +0 -0
  234. {chython-3.7 → chython-3.8}/chython/core/test/test_canonical_stereogenic.py +0 -0
  235. {chython-3.7 → chython-3.8}/chython/core/test/test_canonicalize_stereo_groups.py +0 -0
  236. {chython-3.7 → chython-3.8}/chython/core/test/test_chains.py +0 -0
  237. {chython-3.7 → chython-3.8}/chython/core/test/test_cip_assign.py +0 -0
  238. {chython-3.7 → chython-3.8}/chython/core/test/test_cip_budget.py +0 -0
  239. {chython-3.7 → chython-3.8}/chython/core/test/test_cip_cases.py +0 -0
  240. {chython-3.7 → chython-3.8}/chython/core/test/test_cip_digraph.py +0 -0
  241. {chython-3.7 → chython-3.8}/chython/core/test/test_cip_ranking.py +0 -0
  242. {chython-3.7 → chython-3.8}/chython/core/test/test_cip_storage.py +0 -0
  243. {chython-3.7 → chython-3.8}/chython/core/test/test_clean_isotopes_and_coordinate_bonds.py +0 -0
  244. {chython-3.7 → chython-3.8}/chython/core/test/test_clean_stereo.py +0 -0
  245. {chython-3.7 → chython-3.8}/chython/core/test/test_conformers.py +0 -0
  246. {chython-3.7 → chython-3.8}/chython/core/test/test_container_log.py +0 -0
  247. {chython-3.7 → chython-3.8}/chython/core/test/test_copy_caches.py +0 -0
  248. {chython-3.7 → chython-3.8}/chython/core/test/test_core_isolation.py +0 -0
  249. {chython-3.7 → chython-3.8}/chython/core/test/test_cx_wedges.py +0 -0
  250. {chython-3.7 → chython-3.8}/chython/core/test/test_dead_stereo_groups.py +0 -0
  251. {chython-3.7 → chython-3.8}/chython/core/test/test_derive.py +0 -0
  252. {chython-3.7 → chython-3.8}/chython/core/test/test_descriptors.py +0 -0
  253. {chython-3.7 → chython-3.8}/chython/core/test/test_element_tables.py +0 -0
  254. {chython-3.7 → chython-3.8}/chython/core/test/test_enrich.py +0 -0
  255. {chython-3.7 → chython-3.8}/chython/core/test/test_facade.py +0 -0
  256. {chython-3.7 → chython-3.8}/chython/core/test/test_features.py +0 -0
  257. {chython-3.7 → chython-3.8}/chython/core/test/test_featurizer_injection.py +0 -0
  258. {chython-3.7 → chython-3.8}/chython/core/test/test_fingerprints.py +0 -0
  259. {chython-3.7 → chython-3.8}/chython/core/test/test_geometry.py +0 -0
  260. {chython-3.7 → chython-3.8}/chython/core/test/test_h_unknown.py +0 -0
  261. {chython-3.7 → chython-3.8}/chython/core/test/test_helical_units.py +0 -0
  262. {chython-3.7 → chython-3.8}/chython/core/test/test_hydrogens.py +0 -0
  263. {chython-3.7 → chython-3.8}/chython/core/test/test_identity_memo.py +0 -0
  264. {chython-3.7 → chython-3.8}/chython/core/test/test_inchi.py +0 -0
  265. {chython-3.7 → chython-3.8}/chython/core/test/test_interop_injection.py +0 -0
  266. {chython-3.7 → chython-3.8}/chython/core/test/test_isomorphism.py +0 -0
  267. {chython-3.7 → chython-3.8}/chython/core/test/test_kekule.py +0 -0
  268. {chython-3.7 → chython-3.8}/chython/core/test/test_log.py +0 -0
  269. {chython-3.7 → chython-3.8}/chython/core/test/test_magic.py +0 -0
  270. {chython-3.7 → chython-3.8}/chython/core/test/test_meta.py +0 -0
  271. {chython-3.7 → chython-3.8}/chython/core/test/test_ml_encoding.py +0 -0
  272. {chython-3.7 → chython-3.8}/chython/core/test/test_ml_reaction_transition.py +0 -0
  273. {chython-3.7 → chython-3.8}/chython/core/test/test_ml_state_view.py +0 -0
  274. {chython-3.7 → chython-3.8}/chython/core/test/test_ml_transition_view.py +0 -0
  275. {chython-3.7 → chython-3.8}/chython/core/test/test_ml_unpack_differential.py +0 -0
  276. {chython-3.7 → chython-3.8}/chython/core/test/test_modeling_view_frozen.py +0 -0
  277. {chython-3.7 → chython-3.8}/chython/core/test/test_molecule.py +0 -0
  278. {chython-3.7 → chython-3.8}/chython/core/test/test_monomers.py +0 -0
  279. {chython-3.7 → chython-3.8}/chython/core/test/test_morgan.py +0 -0
  280. {chython-3.7 → chython-3.8}/chython/core/test/test_nucleotides.py +0 -0
  281. {chython-3.7 → chython-3.8}/chython/core/test/test_pach.py +0 -0
  282. {chython-3.7 → chython-3.8}/chython/core/test/test_pach3.py +0 -0
  283. {chython-3.7 → chython-3.8}/chython/core/test/test_pack.py +0 -0
  284. {chython-3.7 → chython-3.8}/chython/core/test/test_planar_units.py +0 -0
  285. {chython-3.7 → chython-3.8}/chython/core/test/test_query.py +0 -0
  286. {chython-3.7 → chython-3.8}/chython/core/test/test_r_edit.py +0 -0
  287. {chython-3.7 → chython-3.8}/chython/core/test/test_r_query.py +0 -0
  288. {chython-3.7 → chython-3.8}/chython/core/test/test_r_semantics.py +0 -0
  289. {chython-3.7 → chython-3.8}/chython/core/test/test_r_serialisation.py +0 -0
  290. {chython-3.7 → chython-3.8}/chython/core/test/test_r_smirks.py +0 -0
  291. {chython-3.7 → chython-3.8}/chython/core/test/test_r_storage.py +0 -0
  292. {chython-3.7 → chython-3.8}/chython/core/test/test_reaction_container.py +0 -0
  293. {chython-3.7 → chython-3.8}/chython/core/test/test_reaction_identity.py +0 -0
  294. {chython-3.7 → chython-3.8}/chython/core/test/test_reaction_pach.py +0 -0
  295. {chython-3.7 → chython-3.8}/chython/core/test/test_reaction_passes.py +0 -0
  296. {chython-3.7 → chython-3.8}/chython/core/test/test_reaction_smiles.py +0 -0
  297. {chython-3.7 → chython-3.8}/chython/core/test/test_rings.py +0 -0
  298. {chython-3.7 → chython-3.8}/chython/core/test/test_rings_c60.py +0 -0
  299. {chython-3.7 → chython-3.8}/chython/core/test/test_set_element.py +0 -0
  300. {chython-3.7 → chython-3.8}/chython/core/test/test_sgroups.py +0 -0
  301. {chython-3.7 → chython-3.8}/chython/core/test/test_smarts_read.py +0 -0
  302. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_r.py +0 -0
  303. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_read.py +0 -0
  304. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_roundtrip.py +0 -0
  305. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_stereo_marks.py +0 -0
  306. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_write.py +0 -0
  307. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_write_aromatic.py +0 -0
  308. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_write_cis_trans.py +0 -0
  309. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_write_h_unknown.py +0 -0
  310. {chython-3.7 → chython-3.8}/chython/core/test/test_smiles_write_sticky.py +0 -0
  311. {chython-3.7 → chython-3.8}/chython/core/test/test_smirks_filter.py +0 -0
  312. {chython-3.7 → chython-3.8}/chython/core/test/test_smirks_patch.py +0 -0
  313. {chython-3.7 → chython-3.8}/chython/core/test/test_smirks_read.py +0 -0
  314. {chython-3.7 → chython-3.8}/chython/core/test/test_smirks_report.py +0 -0
  315. {chython-3.7 → chython-3.8}/chython/core/test/test_smirks_stereo.py +0 -0
  316. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_acceptance.py +0 -0
  317. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_anchor_identity.py +0 -0
  318. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_group_meaning.py +0 -0
  319. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_group_signs.py +0 -0
  320. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_group_storage.py +0 -0
  321. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_liveness.py +0 -0
  322. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_owners.py +0 -0
  323. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_parity.py +0 -0
  324. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_perception.py +0 -0
  325. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_query.py +0 -0
  326. {chython-3.7 → chython-3.8}/chython/core/test/test_stereo_units.py +0 -0
  327. {chython-3.7 → chython-3.8}/chython/core/test/test_stereogenicity_symmetry.py +0 -0
  328. {chython-3.7 → chython-3.8}/chython/core/test/test_structure.py +0 -0
  329. {chython-3.7 → chython-3.8}/chython/core/test/test_thiele.py +0 -0
  330. {chython-3.7 → chython-3.8}/chython/core/test/test_thiele_atom_order.py +0 -0
  331. {chython-3.7 → chython-3.8}/chython/core/test/test_title.py +0 -0
  332. {chython-3.7 → chython-3.8}/chython/core/test/test_topology.py +0 -0
  333. {chython-3.7 → chython-3.8}/chython/core/test/test_union_stereo.py +0 -0
  334. {chython-3.7 → chython-3.8}/chython/core/test/test_valence.py +0 -0
  335. {chython-3.7 → chython-3.8}/chython/core/test/test_view_surface.py +0 -0
  336. {chython-3.7 → chython-3.8}/chython/core/test/v3_fixtures.py +0 -0
  337. {chython-3.7 → chython-3.8}/chython/core/test/v4_fixtures.py +0 -0
  338. {chython-3.7 → chython-3.8}/chython/core/valence_rules.tsv +0 -0
  339. {chython-3.7 → chython-3.8}/chython/core/wedge.py +0 -0
  340. {chython-3.7 → chython-3.8}/chython/depict/__init__.py +0 -0
  341. {chython-3.7 → chython-3.8}/chython/depict/_config.py +0 -0
  342. {chython-3.7 → chython-3.8}/chython/depict/_hooks.py +0 -0
  343. {chython-3.7 → chython-3.8}/chython/depict/bonds.py +0 -0
  344. {chython-3.7 → chython-3.8}/chython/depict/colorbar.py +0 -0
  345. {chython-3.7 → chython-3.8}/chython/depict/colormap.py +0 -0
  346. {chython-3.7 → chython-3.8}/chython/depict/field.py +0 -0
  347. {chython-3.7 → chython-3.8}/chython/depict/figure.py +0 -0
  348. {chython-3.7 → chython-3.8}/chython/depict/label.py +0 -0
  349. {chython-3.7 → chython-3.8}/chython/depict/layout/__init__.py +0 -0
  350. {chython-3.7 → chython-3.8}/chython/depict/layout/approved.py +0 -0
  351. {chython-3.7 → chython-3.8}/chython/depict/layout/cage.py +0 -0
  352. {chython-3.7 → chython-3.8}/chython/depict/layout/cascade.py +0 -0
  353. {chython-3.7 → chython-3.8}/chython/depict/layout/clean2d.js +0 -0
  354. {chython-3.7 → chython-3.8}/chython/depict/layout/edits.py +0 -0
  355. {chython-3.7 → chython-3.8}/chython/depict/layout/env.py +0 -0
  356. {chython-3.7 → chython-3.8}/chython/depict/layout/features.py +0 -0
  357. {chython-3.7 → chython-3.8}/chython/depict/layout/greedy.py +0 -0
  358. {chython-3.7 → chython-3.8}/chython/depict/layout/lattice.py +0 -0
  359. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/__init__.py +0 -0
  360. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/alphazero.py +0 -0
  361. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/demos.py +0 -0
  362. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/evaluate.py +0 -0
  363. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/judge.py +0 -0
  364. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/mcts.py +0 -0
  365. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/policy.py +0 -0
  366. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/replay.py +0 -0
  367. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/sweep.py +0 -0
  368. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/targets.py +0 -0
  369. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/tensors.py +0 -0
  370. {chython-3.7 → chython-3.8}/chython/depict/layout/learn/train.py +0 -0
  371. {chython-3.7 → chython-3.8}/chython/depict/layout/molecule.py +0 -0
  372. {chython-3.7 → chython-3.8}/chython/depict/layout/nucleic.py +0 -0
  373. {chython-3.7 → chython-3.8}/chython/depict/layout/peptide.py +0 -0
  374. {chython-3.7 → chython-3.8}/chython/depict/layout/pose.py +0 -0
  375. {chython-3.7 → chython-3.8}/chython/depict/layout/primitive.py +0 -0
  376. {chython-3.7 → chython-3.8}/chython/depict/layout/quality.py +0 -0
  377. {chython-3.7 → chython-3.8}/chython/depict/layout/reaction.py +0 -0
  378. {chython-3.7 → chython-3.8}/chython/depict/layout/relax.py +0 -0
  379. {chython-3.7 → chython-3.8}/chython/depict/layout/review.py +0 -0
  380. {chython-3.7 → chython-3.8}/chython/depict/layout/rings.py +0 -0
  381. {chython-3.7 → chython-3.8}/chython/depict/layout/score.py +0 -0
  382. {chython-3.7 → chython-3.8}/chython/depict/layout/scorecard.py +0 -0
  383. {chython-3.7 → chython-3.8}/chython/depict/layout/search.py +0 -0
  384. {chython-3.7 → chython-3.8}/chython/depict/layout/shapes.py +0 -0
  385. {chython-3.7 → chython-3.8}/chython/depict/layout/templates.py +0 -0
  386. {chython-3.7 → chython-3.8}/chython/depict/layout/tree.py +0 -0
  387. {chython-3.7 → chython-3.8}/chython/depict/metrics/__init__.py +0 -0
  388. {chython-3.7 → chython-3.8}/chython/depict/metrics/helvetica.tsv +0 -0
  389. {chython-3.7 → chython-3.8}/chython/depict/metrics/times.tsv +0 -0
  390. {chython-3.7 → chython-3.8}/chython/depict/overlay.py +0 -0
  391. {chython-3.7 → chython-3.8}/chython/depict/peptide.py +0 -0
  392. {chython-3.7 → chython-3.8}/chython/depict/render/__init__.py +0 -0
  393. {chython-3.7 → chython-3.8}/chython/depict/render/svg.py +0 -0
  394. {chython-3.7 → chython-3.8}/chython/depict/scene.py +0 -0
  395. {chython-3.7 → chython-3.8}/chython/depict/style.py +0 -0
  396. {chython-3.7 → chython-3.8}/chython/depict/test/__init__.py +0 -0
  397. {chython-3.7 → chython-3.8}/chython/depict/test/learn/__init__.py +0 -0
  398. {chython-3.7 → chython-3.8}/chython/depict/test/learn/test_alphazero.py +0 -0
  399. {chython-3.7 → chython-3.8}/chython/depict/test/learn/test_demos.py +0 -0
  400. {chython-3.7 → chython-3.8}/chython/depict/test/learn/test_judge.py +0 -0
  401. {chython-3.7 → chython-3.8}/chython/depict/test/learn/test_mcts.py +0 -0
  402. {chython-3.7 → chython-3.8}/chython/depict/test/learn/test_policy.py +0 -0
  403. {chython-3.7 → chython-3.8}/chython/depict/test/learn/test_replay.py +0 -0
  404. {chython-3.7 → chython-3.8}/chython/depict/test/learn/test_targets.py +0 -0
  405. {chython-3.7 → chython-3.8}/chython/depict/test/learn/test_train.py +0 -0
  406. {chython-3.7 → chython-3.8}/chython/depict/test/test_bonds.py +0 -0
  407. {chython-3.7 → chython-3.8}/chython/depict/test/test_cage.py +0 -0
  408. {chython-3.7 → chython-3.8}/chython/depict/test/test_clean2d.py +0 -0
  409. {chython-3.7 → chython-3.8}/chython/depict/test/test_colorbar.py +0 -0
  410. {chython-3.7 → chython-3.8}/chython/depict/test/test_colormap.py +0 -0
  411. {chython-3.7 → chython-3.8}/chython/depict/test/test_field.py +0 -0
  412. {chython-3.7 → chython-3.8}/chython/depict/test/test_figure.py +0 -0
  413. {chython-3.7 → chython-3.8}/chython/depict/test/test_label.py +0 -0
  414. {chython-3.7 → chython-3.8}/chython/depict/test/test_layout_cascade.py +0 -0
  415. {chython-3.7 → chython-3.8}/chython/depict/test/test_layout_controller.py +0 -0
  416. {chython-3.7 → chython-3.8}/chython/depict/test/test_layout_conventions.py +0 -0
  417. {chython-3.7 → chython-3.8}/chython/depict/test/test_layout_engine.py +0 -0
  418. {chython-3.7 → chython-3.8}/chython/depict/test/test_layout_env.py +0 -0
  419. {chython-3.7 → chython-3.8}/chython/depict/test/test_layout_primitive.py +0 -0
  420. {chython-3.7 → chython-3.8}/chython/depict/test/test_layout_relax.py +0 -0
  421. {chython-3.7 → chython-3.8}/chython/depict/test/test_metrics.py +0 -0
  422. {chython-3.7 → chython-3.8}/chython/depict/test/test_nucleic_layout.py +0 -0
  423. {chython-3.7 → chython-3.8}/chython/depict/test/test_overlay.py +0 -0
  424. {chython-3.7 → chython-3.8}/chython/depict/test/test_package.py +0 -0
  425. {chython-3.7 → chython-3.8}/chython/depict/test/test_peptide_draw.py +0 -0
  426. {chython-3.7 → chython-3.8}/chython/depict/test/test_peptide_layout.py +0 -0
  427. {chython-3.7 → chython-3.8}/chython/depict/test/test_quality.py +0 -0
  428. {chython-3.7 → chython-3.8}/chython/depict/test/test_r_atom.py +0 -0
  429. {chython-3.7 → chython-3.8}/chython/depict/test/test_review.py +0 -0
  430. {chython-3.7 → chython-3.8}/chython/depict/test/test_scene.py +0 -0
  431. {chython-3.7 → chython-3.8}/chython/depict/test/test_scorecard.py +0 -0
  432. {chython-3.7 → chython-3.8}/chython/depict/test/test_style.py +0 -0
  433. {chython-3.7 → chython-3.8}/chython/depict/test/test_svg.py +0 -0
  434. {chython-3.7 → chython-3.8}/chython/depict/test/test_wedge_draw.py +0 -0
  435. {chython-3.7 → chython-3.8}/chython/depict/test/test_x3dom.py +0 -0
  436. {chython-3.7 → chython-3.8}/chython/depict/wedge.py +0 -0
  437. {chython-3.7 → chython-3.8}/chython/depict/x3dom.py +0 -0
  438. {chython-3.7 → chython-3.8}/chython/exceptions.py +0 -0
  439. {chython-3.7 → chython-3.8}/chython/formats/_text.py +0 -0
  440. {chython-3.7/chython/formats/ctfile → chython-3.8/chython/formats/cdx}/test/__init__.py +0 -0
  441. {chython-3.7 → chython-3.8}/chython/formats/ctfile/CTFILE.md +0 -0
  442. {chython-3.7 → chython-3.8}/chython/formats/ctfile/__init__.py +0 -0
  443. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_ctab.py +0 -0
  444. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_errors.py +0 -0
  445. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_facade.py +0 -0
  446. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_hydrogens.py +0 -0
  447. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_rdf.py +0 -0
  448. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_rxn.py +0 -0
  449. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_sdf.py +0 -0
  450. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_sgroup.py +0 -0
  451. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_stream.py +0 -0
  452. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_tokens.py +0 -0
  453. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_v2000.py +0 -0
  454. {chython-3.7 → chython-3.8}/chython/formats/ctfile/_v3000.py +0 -0
  455. {chython-3.7/chython/formats/xml → chython-3.8/chython/formats/ctfile}/test/__init__.py +0 -0
  456. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/conftest.py +0 -0
  457. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_aromatic.py +0 -0
  458. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_container_log.py +0 -0
  459. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_data_labels.py +0 -0
  460. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_facade.py +0 -0
  461. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_fidelity.py +0 -0
  462. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_hydrogens.py +0 -0
  463. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_r_atom.py +0 -0
  464. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_rdf.py +0 -0
  465. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_rxn.py +0 -0
  466. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_sdf.py +0 -0
  467. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_sgroup.py +0 -0
  468. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_stereo_drawings.py +0 -0
  469. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_stereo_label.py +0 -0
  470. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_stream.py +0 -0
  471. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_tokens.py +0 -0
  472. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_v2000.py +0 -0
  473. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_v3000.py +0 -0
  474. {chython-3.7 → chython-3.8}/chython/formats/ctfile/test/test_wedge.py +0 -0
  475. {chython-3.7 → chython-3.8}/chython/formats/mol2.py +0 -0
  476. {chython-3.7 → chython-3.8}/chython/formats/pdb/__init__.py +0 -0
  477. {chython-3.7 → chython-3.8}/chython/formats/pdb/_builder.py +0 -0
  478. {chython-3.7 → chython-3.8}/chython/formats/pdb/_legacy.py +0 -0
  479. {chython-3.7 → chython-3.8}/chython/formats/pdb/_mmcif.py +0 -0
  480. {chython-3.7 → chython-3.8}/chython/formats/pdb/_records.py +0 -0
  481. {chython-3.7 → chython-3.8}/chython/formats/pdb/_star.py +0 -0
  482. {chython-3.7 → chython-3.8}/chython/formats/test/__init__.py +0 -0
  483. {chython-3.7 → chython-3.8}/chython/formats/test/conftest.py +0 -0
  484. {chython-3.7 → chython-3.8}/chython/formats/test/oracles.py +0 -0
  485. {chython-3.7 → chython-3.8}/chython/formats/test/test_conformance.py +0 -0
  486. {chython-3.7 → chython-3.8}/chython/formats/test/test_done_when.py +0 -0
  487. {chython-3.7 → chython-3.8}/chython/formats/test/test_isolation.py +0 -0
  488. {chython-3.7 → chython-3.8}/chython/formats/test/test_log_prefix.py +0 -0
  489. {chython-3.7 → chython-3.8}/chython/formats/test/test_mmcif.py +0 -0
  490. {chython-3.7 → chython-3.8}/chython/formats/test/test_mol2.py +0 -0
  491. {chython-3.7 → chython-3.8}/chython/formats/test/test_no_review_bookkeeping.py +0 -0
  492. {chython-3.7 → chython-3.8}/chython/formats/test/test_oracles.py +0 -0
  493. {chython-3.7 → chython-3.8}/chython/formats/test/test_pdb.py +0 -0
  494. {chython-3.7 → chython-3.8}/chython/formats/test/test_pdb_builder.py +0 -0
  495. {chython-3.7 → chython-3.8}/chython/formats/test/test_perceive_agreement.py +0 -0
  496. {chython-3.7 → chython-3.8}/chython/formats/test/test_read_only_facades.py +0 -0
  497. {chython-3.7 → chython-3.8}/chython/formats/test/test_xyz.py +0 -0
  498. {chython-3.7 → chython-3.8}/chython/formats/test/test_xyz_builder.py +0 -0
  499. {chython-3.7 → chython-3.8}/chython/formats/xml/__init__.py +0 -0
  500. {chython-3.7 → chython-3.8}/chython/formats/xml/_cml.py +0 -0
  501. {chython-3.7 → chython-3.8}/chython/formats/xml/_dialect.py +0 -0
  502. {chython-3.7 → chython-3.8}/chython/formats/xml/_errors.py +0 -0
  503. {chython-3.7 → chython-3.8}/chython/formats/xml/_facade.py +0 -0
  504. {chython-3.7 → chython-3.8}/chython/formats/xml/_mrv.py +0 -0
  505. {chython-3.7 → chython-3.8}/chython/formats/xml/_tree.py +0 -0
  506. {chython-3.7/chython/interop → chython-3.8/chython/formats/xml}/test/__init__.py +0 -0
  507. {chython-3.7 → chython-3.8}/chython/formats/xml/test/conftest.py +0 -0
  508. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_cml.py +0 -0
  509. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_container_log.py +0 -0
  510. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_dead_stereo_groups.py +0 -0
  511. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_dialect.py +0 -0
  512. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_equivalence.py +0 -0
  513. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_facade.py +0 -0
  514. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_mrv.py +0 -0
  515. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_mrv_census.py +0 -0
  516. {chython-3.7 → chython-3.8}/chython/formats/xml/test/test_tree.py +0 -0
  517. {chython-3.7 → chython-3.8}/chython/formats/xyz.py +0 -0
  518. {chython-3.7 → chython-3.8}/chython/interop/__init__.py +0 -0
  519. {chython-3.7 → chython-3.8}/chython/interop/_cdk.py +0 -0
  520. {chython-3.7 → chython-3.8}/chython/interop/_cdpkit.py +0 -0
  521. {chython-3.7 → chython-3.8}/chython/interop/_indigo.py +0 -0
  522. {chython-3.7 → chython-3.8}/chython/interop/_iupac.py +0 -0
  523. {chython-3.7 → chython-3.8}/chython/interop/_java.py +0 -0
  524. {chython-3.7 → chython-3.8}/chython/interop/_openbabel.py +0 -0
  525. {chython-3.7 → chython-3.8}/chython/interop/_pandas.py +0 -0
  526. {chython-3.7 → chython-3.8}/chython/interop/_rdkit.py +0 -0
  527. {chython-3.7 → chython-3.8}/chython/interop/_records.py +0 -0
  528. {chython-3.7 → chython-3.8}/chython/interop/_stereo.py +0 -0
  529. {chython-3.7 → chython-3.8}/chython/interop/config.py +0 -0
  530. {chython-3.7 → chython-3.8}/chython/interop/conformers.py +0 -0
  531. {chython-3.7 → chython-3.8}/chython/interop/test/conftest.py +0 -0
  532. {chython-3.7 → chython-3.8}/chython/interop/test/test_cdk.py +0 -0
  533. {chython-3.7 → chython-3.8}/chython/interop/test/test_cdpkit.py +0 -0
  534. {chython-3.7 → chython-3.8}/chython/interop/test/test_config.py +0 -0
  535. {chython-3.7 → chython-3.8}/chython/interop/test/test_conformers.py +0 -0
  536. {chython-3.7 → chython-3.8}/chython/interop/test/test_coordinate_honesty.py +0 -0
  537. {chython-3.7 → chython-3.8}/chython/interop/test/test_dispatch.py +0 -0
  538. {chython-3.7 → chython-3.8}/chython/interop/test/test_indigo.py +0 -0
  539. {chython-3.7 → chython-3.8}/chython/interop/test/test_iupac.py +0 -0
  540. {chython-3.7 → chython-3.8}/chython/interop/test/test_log_delivery.py +0 -0
  541. {chython-3.7 → chython-3.8}/chython/interop/test/test_openbabel.py +0 -0
  542. {chython-3.7 → chython-3.8}/chython/interop/test/test_pandas.py +0 -0
  543. {chython-3.7 → chython-3.8}/chython/interop/test/test_rdkit.py +0 -0
  544. {chython-3.7 → chython-3.8}/chython/interop/test/test_stereo.py +0 -0
  545. {chython-3.7 → chython-3.8}/chython/reactions/__init__.py +0 -0
  546. {chython-3.7 → chython-3.8}/chython/reactions/_numbering.py +0 -0
  547. {chython-3.7 → chython-3.8}/chython/reactions/_stickers.py +0 -0
  548. {chython-3.7 → chython-3.8}/chython/reactions/_tables.py +0 -0
  549. {chython-3.7 → chython-3.8}/chython/reactions/attention/__init__.py +0 -0
  550. {chython-3.7 → chython-3.8}/chython/reactions/attention/_assign.py +0 -0
  551. {chython-3.7 → chython-3.8}/chython/reactions/attention/_encode.py +0 -0
  552. {chython-3.7 → chython-3.8}/chython/reactions/attention/_session.py +0 -0
  553. {chython-3.7 → chython-3.8}/chython/reactions/tables/protective.tsv +0 -0
  554. {chython-3.7 → chython-3.8}/chython/reactions/tables/roles.tsv +0 -0
  555. {chython-3.7 → chython-3.8}/chython/reactions/test/__init__.py +0 -0
  556. {chython-3.7 → chython-3.8}/chython/reactions/test/golden_subset.smi +0 -0
  557. {chython-3.7 → chython-3.8}/chython/reactions/test/test_attention.py +0 -0
  558. {chython-3.7 → chython-3.8}/chython/reactions/test/test_attention_assign.py +0 -0
  559. {chython-3.7 → chython-3.8}/chython/reactions/test/test_attention_encode.py +0 -0
  560. {chython-3.7 → chython-3.8}/chython/reactions/test/test_attention_isolation.py +0 -0
  561. {chython-3.7 → chython-3.8}/chython/reactions/test/test_dependency_direction.py +0 -0
  562. {chython-3.7 → chython-3.8}/chython/reactions/test/test_enumerate.py +0 -0
  563. {chython-3.7 → chython-3.8}/chython/reactions/test/test_functional.py +0 -0
  564. {chython-3.7 → chython-3.8}/chython/reactions/test/test_id_stability.py +0 -0
  565. {chython-3.7 → chython-3.8}/chython/reactions/test/test_numbering.py +0 -0
  566. {chython-3.7 → chython-3.8}/chython/reactions/test/test_probes.py +0 -0
  567. {chython-3.7 → chython-3.8}/chython/reactions/test/test_protective.py +0 -0
  568. {chython-3.7 → chython-3.8}/chython/reactions/test/test_retro_probes.py +0 -0
  569. {chython-3.7 → chython-3.8}/chython/reactions/test/test_roles.py +0 -0
  570. {chython-3.7 → chython-3.8}/chython/reactions/test/test_stickers.py +0 -0
  571. {chython-3.7 → chython-3.8}/chython/test/__init__.py +0 -0
  572. {chython-3.7 → chython-3.8}/chython/test/test_code_hygiene.py +0 -0
  573. {chython-3.7 → chython-3.8}/chython/test/test_container_methods.py +0 -0
  574. {chython-3.7 → chython-3.8}/chython/test/test_doc_figures.py +0 -0
  575. {chython-3.7 → chython-3.8}/chython/test/test_doc_references.py +0 -0
  576. {chython-3.7 → chython-3.8}/chython/test/test_doc_samples.py +0 -0
  577. {chython-3.7 → chython-3.8}/chython/test/test_hydrogen_parity.py +0 -0
  578. {chython-3.7 → chython-3.8}/chython/test/test_libinchi_staging.py +0 -0
  579. {chython-3.7 → chython-3.8}/chython/test/test_log_records.py +0 -0
  580. {chython-3.7 → chython-3.8}/chython/test/test_optional_numpy.py +0 -0
  581. {chython-3.7 → chython-3.8}/chython/test/test_packaging.py +0 -0
  582. {chython-3.7 → chython-3.8}/chython/test/test_performance.py +0 -0
  583. {chython-3.7 → chython-3.8}/chython/test/test_r_atom_integration.py +0 -0
  584. {chython-3.7 → chython-3.8}/chython/test/test_release_build.py +0 -0
  585. {chython-3.7 → chython-3.8}/chython/test/test_stereo_bluebook.py +0 -0
  586. {chython-3.7 → chython-3.8}/chython/test/test_v2_boundary.py +0 -0
  587. {chython-3.7 → chython-3.8}/chython.egg-info/dependency_links.txt +0 -0
  588. {chython-3.7 → chython-3.8}/chython.egg-info/requires.txt +0 -0
  589. {chython-3.7 → chython-3.8}/chython.egg-info/top_level.txt +0 -0
  590. {chython-3.7 → chython-3.8}/setup.cfg +0 -0
  591. {chython-3.7 → chython-3.8}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: chython
3
- Version: 3.7
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
@@ -66,7 +66,8 @@ Library for processing molecules and reactions in a Python way.
66
66
 
67
67
  **File formats**
68
68
 
69
- - 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
70
71
  - Read SMARTS and SMIRKS, Tripos MOL2, PDBx/mmCIF, legacy PDB, XYZ, and IUPAC names through OPSIN
71
72
  - Compact binary (de)serialization — `pach` for a wire record, `mol.to_bytes()` for the arena buffer — and full pickle support
72
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
@@ -27,6 +27,7 @@ container in writes one. `pach` is the same door for the wire format, and `unpa
27
27
  half under chython 2's two names.
28
28
  """
29
29
  from importlib.metadata import PackageNotFoundError as _NotInstalled, version as _version
30
+ from os import PathLike as _PathLike
30
31
  from sys import modules as _modules
31
32
  from types import ModuleType as _ModuleType
32
33
  from .core import *
@@ -42,6 +43,7 @@ from .formats.pdb import PDBAtom, PDBBond, PDBRecord, build_molecule, mmcif, pdb
42
43
  from .chemistry import *
43
44
  # Likewise: `_set_reactions_fns` at import time is what makes `mol.react()` and `mol @ other` exist.
44
45
  from .reactions import *
46
+ from .polymers import *
45
47
  from .interop import iupac, patch_pandas
46
48
  from .interop.config import _facade_alias as _interop_facade_alias
47
49
 
@@ -49,7 +51,7 @@ from .interop.config import _facade_alias as _interop_facade_alias
49
51
  class _Facade(_ModuleType):
50
52
  """Gives `chython` itself properties, so `chython.clean2d_engine`, `chython.js_runtime` and
51
53
  `chython.chain_layout` forward both the read and the write to their one home in `depict/_config.py`,
52
- validated on the spot.
54
+ validated on the spot, and `chython.monomer_library` to its home in `polymers/_library.py`.
53
55
  """
54
56
  @property
55
57
  def clean2d_engine(self) -> Clean2DEngine:
@@ -75,6 +77,19 @@ class _Facade(_ModuleType):
75
77
  def js_runtime(self, runtime: JSRuntime):
76
78
  set_js_runtime(runtime)
77
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)
92
+
78
93
 
79
94
  _modules[__name__].__class__ = _Facade
80
95
 
@@ -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.
@@ -945,3 +949,153 @@ def standardize_isomers(molecule: MoleculeContainer) -> bool:
945
949
  log.append(LogRecord(rule, atoms, message,
946
950
  LOST if rule in (_RULE_BUDGET, _RULE_REFUSED) else INFO))
947
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
 
@@ -716,3 +718,37 @@ def test_two_exocyclic_imines_share_one_ring_hydrogen():
716
718
  assert molecule.brutto_formula == formula and not check_valence(molecule), str(molecule)
717
719
  assert not any(molecule.charge_of(n) for n in molecule.atom_numbers)
718
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
@@ -164,8 +164,9 @@ cdef canon_prepare_fn _canon_prepare_hook = NULL
164
164
  # CANON_GROUPS_STORED adds a third word per member, its stored byte, so the id orders too. With
165
165
  # `colour` (n words, zeroed by the caller) it writes at every named atom `2 * byte + single + 1`,
166
166
  # `single` 1 for a member named on one atom, and CANON_GROUP_CLASH where two keys name one atom.
167
- # * `_canon_group_span_hook(structure, mode, comp)` is True when one collection has members in two
168
- # components; the record is then searched whole, since a per-component key cannot see the link.
167
+ # * `_canon_group_block_hook(structure, mode, comp, k)` merges in `comp` the components one collection
168
+ # has members in and returns the block count: a per-component key cannot see that link, so a block
169
+ # is searched whole and only the blocks are split.
169
170
  # * `_canon_group_phase_hook(structure, mode, pos, digits, flip)` puts each AND collection's
170
171
  # parity digits in one phase, since inverting every member of one is the same statement. With
171
172
  # `pos` (discrete, 1-based) the collection's first-positioned member with a readable digit is made
@@ -187,13 +188,13 @@ cdef enum:
187
188
 
188
189
  ctypedef size_t (*canon_group_fn)(Structure structure, uint32_t mode, uint32_t *pos, uint64_t *out,
189
190
  uint32_t *colour) noexcept nogil
190
- ctypedef bint (*canon_group_span_fn)(Structure structure, uint32_t mode,
191
- const uint32_t *comp) noexcept nogil
191
+ ctypedef Py_ssize_t (*canon_group_block_fn)(Structure structure, uint32_t mode, uint32_t *comp,
192
+ uint32_t k) noexcept nogil
192
193
  ctypedef void (*canon_group_phase_fn)(Structure structure, uint32_t mode, uint32_t *pos, uint32_t *digits,
193
194
  uint8_t *flip) noexcept nogil
194
195
 
195
196
  cdef canon_group_fn _canon_group_hook = NULL
196
- cdef canon_group_span_fn _canon_group_span_hook = NULL
197
+ cdef canon_group_block_fn _canon_group_block_hook = NULL
197
198
  cdef canon_group_phase_fn _canon_group_phase_hook = NULL
198
199
 
199
200
 
@@ -842,7 +843,13 @@ cdef int mol_automorphisms(Structure structure, uint32_t *seed,
842
843
  # discrete, in exchange for the column above; a single-atom component -- the counter-ion, and water once
843
844
  # its hydrogens are implicit -- is special-cased below and pays none of it.
844
845
  #
845
- # SOUND BECAUSE AN AUTOMORPHISM CARRIES COMPONENTS ONTO COMPONENTS. No automorphism relates two atoms
846
+ # A COLLECTION LINKING TWO COMPONENTS MAKES THEM ONE BLOCK (`_canon_group_block_hook`): the block is
847
+ # searched whole, since a per-component key cannot see the link, and every other component is still its
848
+ # own block. Two stereocentres in one `&1` across 400 nitroethanes: 17.2 s as one search, per block
849
+ # below.
850
+ #
851
+ # SOUND BECAUSE AN AUTOMORPHISM CARRIES COMPONENTS ONTO COMPONENTS, and one preserving the collections
852
+ # carries blocks onto blocks. No automorphism relates two atoms
846
853
  # whose components have different certificates, so the pairs a whole-record search spends its budget
847
854
  # refuting are exactly the ones this never asks about. The block order is a function of the multiset of
848
855
  # component certificates, hence of the record; ties are isomorphic components, which is a freedom the
@@ -1529,7 +1536,12 @@ cdef int _canon_order(Structure structure, uint32_t *seed, uint32_t *order_out,
1529
1536
  k = label_components(structure, comp)
1530
1537
  if k < 0:
1531
1538
  raise MemoryError('component labelling failed to allocate')
1532
- if k > 1 and not (ctx.group_len and _canon_group_span_hook(structure, ctx.groups, comp)):
1539
+ if k > 1 and ctx.group_len:
1540
+ with nogil:
1541
+ k = _canon_group_block_hook(structure, ctx.groups, comp, <uint32_t> k)
1542
+ if k < 0:
1543
+ raise MemoryError('canonical order block labelling failed to allocate')
1544
+ if k > 1:
1533
1545
  return _canon_order_split(structure, seed, order_out, flags_out, budget, stereo,
1534
1546
  ctx.groups if ctx.group_len else CANON_GROUPS_NONE,
1535
1547
  comp, <uint32_t> k)
@@ -1658,9 +1670,11 @@ cdef void _canon_key_sort(uint32_t k, const uint64_t *keys, const uint32_t *koff
1658
1670
  cdef int _canon_order_split(Structure structure, uint32_t *seed, uint32_t *order_out,
1659
1671
  uint32_t *flags_out, uint32_t budget, bint stereo, uint32_t groups,
1660
1672
  const uint32_t *comp, uint32_t k) except -1:
1661
- """`_canon_order` for a record of `k` > 1 connected components: each component's own order, blocked.
1673
+ """`_canon_order` for a record of `k` > 1 blocks: each block's own order, laid end to end.
1662
1674
 
1663
- `comp` is `label_components`' output. Contract identical to `_canon_order`'s -- `order_out` receives
1675
+ `comp` is `label_components`' output, merged by `_canon_group_block_hook` under a `groups` mode, so a
1676
+ block is one component or the components one collection links -- below, "component" means a block.
1677
+ Contract identical to `_canon_order`'s -- `order_out` receives
1664
1678
  a permutation of 0 .. atom_count - 1, `flags_out[0]` gets CANON_ASYMMETRIC only when the whole
1665
1679
  record's group is trivial, and a truncated search writes nothing and raises. The fragment comment
1666
1680
  above holds the soundness argument and the one thing this moves.
@@ -1675,8 +1689,8 @@ cdef int _canon_order_split(Structure structure, uint32_t *seed, uint32_t *order
1675
1689
 
1676
1690
  UNDER A `groups` MODE each component is searched with its own collections, which
1677
1691
  `structure_component_graph` carries, and its group tail is a SECONDARY key (`_canon_key_pair_cmp`).
1678
- The caller has already routed a record whose collection spans two components to the whole-record
1679
- search, so every collection here is local to one component.
1692
+ A collection spanning two components has merged them into one block, so every collection here is
1693
+ local to one block, and that block's own `_canon_order` searches it whole.
1680
1694
 
1681
1695
  EACH COMPONENT GETS THE FULL NODE BUDGET. A budget bounds ONE extremal search and each component is
1682
1696
  its own search; sharing one across components would make a component's labelling depend on how many
@@ -772,6 +772,28 @@ cdef object _isomers_fn():
772
772
  return _isomers_impl
773
773
 
774
774
 
775
+ cdef object _isomer_forms_impl = None
776
+
777
+
778
+ def _set_isomer_forms_fn(fn):
779
+ """Register the isomer-form enumerator. `chython.chemistry` calls this at its own init.
780
+
781
+ `fn` must have signature `fn(molecule) -> list[MoleculeContainer]` and must not mutate `molecule`.
782
+ A setter of its own beside `_set_isomers_fn`: one CHOOSES a placement and the other LISTS them, and
783
+ `chython.reactions` reaches the list through the container without importing its sibling.
784
+ """
785
+ global _isomer_forms_impl
786
+ _isomer_forms_impl = fn
787
+
788
+
789
+ cdef object _isomer_forms_fn():
790
+ global _isomer_forms_impl
791
+ if _isomer_forms_impl is None:
792
+ raise ImportError('isomer forms are implemented in `chython.chemistry`, which registers '
793
+ 'them on import; `import chython.chemistry` (or `import chython`) first.')
794
+ return _isomer_forms_impl
795
+
796
+
775
797
  cdef object _kekule_form_impl = None
776
798
 
777
799
 
@@ -7767,6 +7789,17 @@ cdef class MoleculeContainer:
7767
7789
  """
7768
7790
  return _isomers_fn()(self)
7769
7791
 
7792
+ def isomer_forms(self):
7793
+ """Every placement of the mobile hydrogens `standardize_isomers()` chooses between, as copies.
7794
+
7795
+ The drawn form first, then the others: the annular N-H of an azole, the N-H of a Kekule lactam
7796
+ system, the C=N of an amidine or guanidine, combined over the molecule's systems and capped. Each is
7797
+ a copy keeping this molecule's atom and map numbers. A reaction template binds the atoms it is
7798
+ handed, so the corpus is matched against every form and one row reaches either nitrogen of
7799
+ `CC1=NNC=C1`. Reads only. The body lives in `chython.chemistry` and arrives by registration.
7800
+ """
7801
+ return _isomer_forms_fn()(self)
7802
+
7770
7803
  def standardize_kekule(self):
7771
7804
  """Store the Kekule form whose double bonds sit inside the small rings. Did any order move?
7772
7805
 
@@ -1513,10 +1513,10 @@ cdef void smw_ring_tokens(Structure structure, smw_scratch_t *s,
1513
1513
  # does not reach here -- it is about which END of a closure carries the token, and a
1514
1514
  # fragment has only one end of this bond to speak for.
1515
1515
  #
1516
- # DIRECTION 0: spec §13.4. A cis/trans configuration across a cut is refused in
1517
- # `smw_directions` and reported, so there is nothing to write and no chance of writing a
1518
- # `/` whose partner is in another string.
1519
- smw_bond(b, &edges[he], smw_both_lowercase(atoms, ptr, edges, u, edges[he].to, o), 0, o)
1516
+ # A direction here is this end's alone (`smw_cut_takes_direction`): the other fragment
1517
+ # writes the same attachment without one, so the joined closure carries one token.
1518
+ smw_bond(b, &edges[he], smw_both_lowercase(atoms, ptr, edges, u, edges[he].to, o),
1519
+ s.he_dir[he], o)
1520
1520
  smw_closure_number(b, s.he_close[he])
1521
1521
  continue
1522
1522
  if s.he_kind[he] != SMW_HE_CLOSURE:
@@ -1991,6 +1991,36 @@ cdef inline int smw_dir_offer(smw_scratch_t *s, uint32_t frm, uint32_t he, uint8
1991
1991
  return 0
1992
1992
 
1993
1993
 
1994
+ cdef inline bint smw_cut_takes_direction(Structure structure, smw_scratch_t *s, uint32_t *ptr,
1995
+ halfedge_t *edges, uint32_t t, uint32_t r) noexcept nogil:
1996
+ """Whether the bond from terminal `t` to its dropped reference `r` can carry `t`'s `/` or `\\`.
1997
+
1998
+ Only a named cut is written (`%NN`), and only one end of it may carry a direction: the token at
1999
+ `t` alone fixes the bond, and the other fragment writes the attachment plain. Refused when `r` is
2000
+ itself a terminal of a configured cis/trans unit referencing `t` -- `F/C=C/C=C/F` cut at its middle
2001
+ bond -- since the other fragment would then write a direction on the same bond too.
2002
+ """
2003
+ cdef halfedge_t *e = csr_find_at(ptr, edges, t, r)
2004
+ cdef stereo_unit_t *units
2005
+ cdef uint32_t k, far, base
2006
+ if e is NULL or s.he_kind[<uint32_t> (e - edges)] != SMW_HE_ATTACH:
2007
+ return False
2008
+ units = structure_stereo_units(structure)
2009
+ for k in range(structure_stereo_unit_count(structure)):
2010
+ if units[k].kind != SU_CIS_TRANS or not structure_parity_at(structure, units[k].anchor):
2011
+ continue
2012
+ far = stereo_unit_partner(structure, &units[k])
2013
+ if units[k].anchor == r:
2014
+ base = 0
2015
+ elif far == r:
2016
+ base = 2
2017
+ else:
2018
+ continue
2019
+ if units[k].refs[base] == t or units[k].refs[base + 1] == t:
2020
+ return False
2021
+ return True
2022
+
2023
+
1994
2024
  cdef void smw_directions(Structure structure, smw_scratch_t *s, smw_opts_t *o) noexcept nogil:
1995
2025
  """Fill `he_dir` with the `/` and `\\` tokens, and `lost` with the units that got none.
1996
2026
 
@@ -2077,12 +2107,10 @@ cdef void smw_directions(Structure structure, smw_scratch_t *s, smw_opts_t *o) n
2077
2107
  continue
2078
2108
  far = stereo_unit_partner(structure, u)
2079
2109
  if far == SU_NO_REF or s.dropped[far]:
2080
- # A CIS/TRANS UNIT DOES NOT SURVIVE A CUT (spec §13.4), and the dropped partner is one of
2081
- # the two ways it can be split. Unlike a tetrahedral sign, which is four positions at ONE
2082
- # atom and so is entirely inside whichever fragment holds that atom, `/` and `\` are two
2083
- # tokens on two different bonds whose meaning is their relation -- and after a join the
2084
- # reader has no way to relate a token in one string to a token in another. Refused and
2085
- # REPORTED, because this half is a real loss of this fragment's own coverage.
2110
+ # A CUT THROUGH THE DOUBLE BOND SPLITS THE UNIT (spec §13.4): `/` and `\` are two tokens
2111
+ # whose meaning is their relation, and here they would sit in two strings. A cut at a
2112
+ # REFERENCE keeps both terminals, and its token goes on the attachment (below). Refused
2113
+ # and REPORTED, because this half is a real loss of this fragment's own coverage.
2086
2114
  s.lost[i] = 1
2087
2115
  s.nlost += 1
2088
2116
  continue
@@ -2099,12 +2127,13 @@ cdef void smw_directions(Structure structure, smw_scratch_t *s, smw_opts_t *o) n
2099
2127
  for k in range(4):
2100
2128
  if u.refs[k] == SU_NO_REF:
2101
2129
  continue
2102
- if s.dropped[u.refs[k]]:
2130
+ if s.dropped[u.refs[k]] and \
2131
+ not smw_cut_takes_direction(structure, s, ptr, edges, i if k < 2 else far, u.refs[k]):
2103
2132
  # The second way a cut splits this unit: the terminals are both here but a REFERENCE
2104
- # atom is not, so one of the two tokens would have to go on a bond this string does not
2105
- # contain. Refused for the whole unit even when the other reference at that terminal
2106
- # is retained: the frame is refs[0] against refs[2] and re-seating it onto a different
2107
- # pair is a change of frame, not a smaller version of the same claim.
2133
+ # atom is not. A named cut is written as `%NN`, and the token goes there (spec §13.4);
2134
+ # any other dropped bond is not in the string. Refused for the whole unit even when the
2135
+ # other reference at that terminal is retained: the frame is refs[0] against refs[2]
2136
+ # and re-seating it onto a different pair is a change of frame.
2108
2137
  bad = 1
2109
2138
  break
2110
2139
  e = csr_find_at(ptr, edges, i if k < 2 else far, u.refs[k])
@@ -2455,7 +2484,10 @@ cdef tuple smw_tail_parts(Structure structure, smw_scratch_t *s, dict groups, di
2455
2484
  `MoleculeContainer.aliases`, keyed by stable id.
2456
2485
  """
2457
2486
  cdef atom_t *atoms = structure.atoms()
2458
- cdef uint8_t *sg = structure_stereo_groups(structure)
2487
+ # NULL for an absent segment: the zero page it would resolve to is ZERO_PAGE_SIZE bytes, shorter
2488
+ # than a 4097-atom molecule's row, and reading past it writes another object's bytes as groups.
2489
+ cdef uint8_t *sg = (structure_stereo_groups(structure) if structure_has(structure, SEG_STEREO_GROUPS)
2490
+ else NULL)
2459
2491
  cdef uint32_t idx, u
2460
2492
  cdef list radicals = []
2461
2493
  cdef list abs_atoms = []
@@ -2472,6 +2504,8 @@ cdef tuple smw_tail_parts(Structure structure, smw_scratch_t *s, dict groups, di
2472
2504
  if aliases:
2473
2505
  labels[idx] = aliases.get(atoms[u].n)
2474
2506
  if groups is None:
2507
+ if sg is NULL:
2508
+ continue
2475
2509
  kind = sg_kind(sg[smw_group_source(structure, s, u)])
2476
2510
  number = sg_group(sg[smw_group_source(structure, s, u)])
2477
2511
  else:
@@ -7141,34 +7141,66 @@ cdef size_t _canon_group_tail(Structure structure, uint32_t mode, uint32_t *pos,
7141
7141
  return stride * count
7142
7142
 
7143
7143
 
7144
- cdef bint _canon_group_spans(Structure structure, uint32_t mode, const uint32_t *comp) noexcept nogil:
7145
- """`_canon_group_span_hook`: does one collection the mode counts have members in two components?
7146
- ABS never does: it states each member on its own."""
7144
+ cdef Py_ssize_t _canon_group_blocks(Structure structure, uint32_t mode, uint32_t *comp,
7145
+ uint32_t k) noexcept nogil:
7146
+ """`_canon_group_block_hook`: merge in place every set of components one collection the mode counts
7147
+ has members in, and return the block count; -1 when the scratch cannot be allocated.
7148
+
7149
+ A block is numbered by its lowest slot, as `label_components` numbers a component, so `comp` is
7150
+ untouched and `k` returned when no collection spans two components. ABS never spans: it states
7151
+ each member on its own. On `C[C@H](O)CC.CC.C[C@H](O)CC |&1:1,7|` the two alcohols are block 0
7152
+ and ethane block 1."""
7147
7153
  cdef uint32_t n = structure.header.atom_count
7148
7154
  cdef uint8_t *sg
7149
7155
  cdef atom_t *atoms
7150
7156
  cdef uint32_t *ptr
7151
7157
  cdef halfedge_t *edges
7152
- cdef uint32_t i, oa = 0, ob = 0
7158
+ cdef uint32_t *parent
7159
+ cdef uint32_t i, a, b, oa = 0, ob = 0, blocks = 0
7160
+ cdef uint32_t NONE = 0xFFFFFFFF
7153
7161
  cdef uint32_t where[256]
7162
+ cdef bint merged = False
7154
7163
  if mode == CANON_GROUPS_NONE or n == 0 or not structure_has(structure, SEG_STEREO_GROUPS):
7155
- return False
7164
+ return k
7156
7165
  sg = structure_stereo_groups(structure)
7157
7166
  atoms = structure.atoms()
7158
7167
  ptr = csr_ptr(structure)
7159
7168
  edges = csr_edges(structure)
7169
+ parent = <uint32_t *> malloc(<size_t> 2 * k * sizeof(uint32_t))
7170
+ if parent is NULL:
7171
+ return -1
7172
+ for i in range(k):
7173
+ parent[i] = i
7160
7174
  for i in range(256):
7161
- where[i] = <uint32_t> 0xFFFFFFFF
7175
+ where[i] = NONE
7162
7176
  for i in range(n):
7163
7177
  if not sg[i] or sg_kind(sg[i]) == SG_KIND_ABS:
7164
7178
  continue
7165
7179
  if not _canon_group_member(structure, atoms, ptr, edges, sg, mode, i, &oa, &ob):
7166
7180
  continue
7167
- if where[sg[i]] == <uint32_t> 0xFFFFFFFF:
7181
+ if where[sg[i]] == NONE:
7168
7182
  where[sg[i]] = comp[oa]
7169
- elif where[sg[i]] != comp[oa]:
7170
- return True
7171
- return False
7183
+ continue
7184
+ a = _uf_find(parent, where[sg[i]])
7185
+ b = _uf_find(parent, comp[oa])
7186
+ if a != b:
7187
+ parent[a if a > b else b] = a if a < b else b
7188
+ merged = True
7189
+ if not merged:
7190
+ free(parent)
7191
+ return k
7192
+ # dense ids in order of each block's lowest component, hence of its lowest slot
7193
+ for i in range(k):
7194
+ parent[k + i] = NONE
7195
+ for i in range(k):
7196
+ a = _uf_find(parent, i)
7197
+ if parent[k + a] == NONE:
7198
+ parent[k + a] = blocks
7199
+ blocks += 1
7200
+ for i in range(n):
7201
+ comp[i] = parent[k + _uf_find(parent, comp[i])]
7202
+ free(parent)
7203
+ return blocks
7172
7204
 
7173
7205
 
7174
7206
  cdef void _canon_group_phase(Structure structure, uint32_t mode, uint32_t *pos, uint32_t *digits,
@@ -7291,7 +7323,7 @@ cdef void _canon_group_phase(Structure structure, uint32_t mode, uint32_t *pos,
7291
7323
  _canon_stereo_hook = _canon_stereo_digits
7292
7324
  _canon_prepare_hook = _canon_stereo_prepare
7293
7325
  _canon_group_hook = _canon_group_tail
7294
- _canon_group_span_hook = _canon_group_spans
7326
+ _canon_group_block_hook = _canon_group_blocks
7295
7327
  _canon_group_phase_hook = _canon_group_phase
7296
7328
 
7297
7329