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.
- {chython-3.5/chython.egg-info → chython-3.8}/PKG-INFO +5 -2
- {chython-3.5 → chython-3.8}/README.md +2 -1
- {chython-3.5 → chython-3.8}/chython/__init__.py +36 -14
- {chython-3.5 → chython-3.8}/chython/chemistry/__init__.py +3 -2
- {chython-3.5 → chython-3.8}/chython/chemistry/_isomers.py +161 -4
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_isomers.py +49 -1
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_reaction_passes.py +1 -1
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_smarts.py +3 -78
- chython-3.5/chython/chemistry/test/test_standardize_differential.py → chython-3.8/chython/chemistry/test/test_standardize_corpus.py +8 -69
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_thiele_is_single_purpose.py +5 -37
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_z_translation.py +6 -72
- {chython-3.5 → chython-3.8}/chython/core/_canonical.pxi +25 -11
- {chython-3.5 → chython-3.8}/chython/core/_molecule_arena.pxi +3 -4
- {chython-3.5 → chython-3.8}/chython/core/_molecule_container.pxi +49 -9
- {chython-3.5 → chython-3.8}/chython/core/_smiles_write.pxi +50 -16
- {chython-3.5 → chython-3.8}/chython/core/_smirks_patch.pxi +5 -3
- {chython-3.5 → chython-3.8}/chython/core/_smirks_read.pxi +8 -2
- {chython-3.5 → chython-3.8}/chython/core/_stereo.pxi +187 -11
- {chython-3.5 → chython-3.8}/chython/core/_valence.pxi +3 -4
- {chython-3.5 → chython-3.8}/chython/core/chains.py +22 -8
- {chython-3.5 → chython-3.8}/chython/core/monomers.py +46 -0
- chython-3.8/chython/core/nucleotides.py +106 -0
- {chython-3.5 → chython-3.8}/chython/core/reaction.py +5 -5
- {chython-3.5 → chython-3.8}/chython/core/test/gen_valence_rules.py +26 -202
- {chython-3.5 → chython-3.8}/chython/core/test/reaction_pach_corpus.py +5 -9
- {chython-3.5 → chython-3.8}/chython/core/test/test_aggregates.py +3 -51
- {chython-3.5 → chython-3.8}/chython/core/test/test_alternative_spellings.py +0 -64
- {chython-3.5 → chython-3.8}/chython/core/test/test_bridgehead_realisability.py +5 -4
- {chython-3.5 → chython-3.8}/chython/core/test/test_canonical_mirror.py +7 -25
- {chython-3.5 → chython-3.8}/chython/core/test/test_chains.py +12 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_clean_isotopes_and_coordinate_bonds.py +2 -79
- chython-3.5/chython/core/test/test_no_chython_two_imports.py → chython-3.8/chython/core/test/test_core_isolation.py +15 -49
- {chython-3.5 → chython-3.8}/chython/core/test/test_dead_stereo_groups.py +43 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_element_tables.py +1 -102
- {chython-3.5 → chython-3.8}/chython/core/test/test_enrich.py +13 -1
- {chython-3.5 → chython-3.8}/chython/core/test/test_features.py +1 -2
- {chython-3.5 → chython-3.8}/chython/core/test/test_magic.py +4 -5
- {chython-3.5 → chython-3.8}/chython/core/test/test_monomers.py +14 -0
- chython-3.8/chython/core/test/test_nucleotides.py +52 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_r_query.py +1 -1
- {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_container.py +16 -121
- {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_pach.py +1 -1
- {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_passes.py +1 -1
- {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_smiles.py +1 -58
- {chython-3.5 → chython-3.8}/chython/core/test/test_smarts_read.py +8 -317
- chython-3.8/chython/core/test/test_smiles_roundtrip.py +137 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_detached.py +32 -18
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_stereo.py +39 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_filter.py +16 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_thiele.py +1 -2
- {chython-3.5 → chython-3.8}/chython/core/test/test_topology.py +0 -68
- {chython-3.5 → chython-3.8}/chython/core/test/test_valence.py +24 -233
- {chython-3.5 → chython-3.8}/chython/core/test/test_view_surface.py +1 -1
- {chython-3.5 → chython-3.8}/chython/core/valence_rules.tsv +1 -2
- {chython-3.5 → chython-3.8}/chython/core/wedge.py +6 -5
- {chython-3.5 → chython-3.8}/chython/depict/__init__.py +6 -6
- {chython-3.5 → chython-3.8}/chython/depict/_config.py +27 -9
- {chython-3.5 → chython-3.8}/chython/depict/bonds.py +28 -3
- {chython-3.5 → chython-3.8}/chython/depict/figure.py +25 -9
- chython-3.8/chython/depict/layout/cage.py +288 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/cascade.py +262 -58
- {chython-3.5 → chython-3.8}/chython/depict/layout/molecule.py +145 -80
- chython-3.8/chython/depict/layout/nucleic.py +118 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/peptide.py +265 -37
- {chython-3.5 → chython-3.8}/chython/depict/layout/primitive.py +145 -13
- {chython-3.5 → chython-3.8}/chython/depict/layout/reaction.py +7 -6
- {chython-3.5 → chython-3.8}/chython/depict/layout/relax.py +13 -3
- {chython-3.5 → chython-3.8}/chython/depict/layout/review.py +4 -2
- {chython-3.5 → chython-3.8}/chython/depict/layout/score.py +2 -1
- {chython-3.5 → chython-3.8}/chython/depict/layout/scorecard.py +4 -4
- chython-3.8/chython/depict/layout/shapes.py +690 -0
- {chython-3.5 → chython-3.8}/chython/depict/peptide.py +16 -2
- chython-3.8/chython/depict/test/test_cage.py +215 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_clean2d.py +97 -6
- {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_cascade.py +166 -2
- {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_conventions.py +6 -9
- {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_env.py +1 -1
- {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_primitive.py +66 -1
- chython-3.8/chython/depict/test/test_nucleic_layout.py +69 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_peptide_draw.py +55 -15
- {chython-3.5 → chython-3.8}/chython/depict/test/test_peptide_layout.py +160 -51
- {chython-3.5 → chython-3.8}/chython/depict/wedge.py +11 -6
- {chython-3.5 → chython-3.8}/chython/formats/__init__.py +4 -2
- chython-3.8/chython/formats/cdx/__init__.py +91 -0
- chython-3.8/chython/formats/cdx/_binary.py +371 -0
- chython-3.8/chython/formats/cdx/_build.py +562 -0
- chython-3.8/chython/formats/cdx/_cdxml.py +101 -0
- chython-3.8/chython/formats/cdx/_errors.py +34 -0
- chython-3.8/chython/formats/cdx/_tree.py +60 -0
- chython-3.8/chython/formats/cdx/_vocabulary.py +86 -0
- chython-3.8/chython/formats/cdx/_write.py +344 -0
- chython-3.8/chython/formats/cdx/test/test_cdx.py +390 -0
- chython-3.8/chython/formats/cdx/test/test_interop.py +115 -0
- chython-3.8/chython/formats/cdx/test/test_reference.py +129 -0
- chython-3.8/chython/formats/cdx/vocabulary.tsv +835 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/conftest.py +0 -49
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_fidelity.py +0 -90
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_hydrogens.py +3 -61
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_rdf.py +0 -48
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_v2000.py +6 -84
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_v3000.py +1 -29
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_wedge.py +7 -176
- {chython-3.5 → chython-3.8}/chython/formats/test/oracles.py +1 -1
- {chython-3.5 → chython-3.8}/chython/formats/test/test_oracles.py +1 -1
- chython-3.8/chython/interop/test/__init__.py +0 -0
- chython-3.8/chython/polymers/__init__.py +76 -0
- chython-3.8/chython/polymers/_assemble.py +138 -0
- chython-3.8/chython/polymers/_biln.py +98 -0
- chython-3.8/chython/polymers/_decompose.py +538 -0
- chython-3.8/chython/polymers/_errors.py +34 -0
- chython-3.8/chython/polymers/_graph.py +62 -0
- chython-3.8/chython/polymers/_helm.py +250 -0
- chython-3.8/chython/polymers/_library.py +461 -0
- chython-3.8/chython/polymers/_shape.py +98 -0
- chython-3.8/chython/polymers/_write.py +169 -0
- chython-3.8/chython/polymers/data/HELMCoreLibrary.json.gz +0 -0
- chython-3.8/chython/polymers/data/LICENSE-HELMMonomerSets +21 -0
- chython-3.8/chython/polymers/test/__init__.py +0 -0
- chython-3.8/chython/polymers/test/_fixtures.py +46 -0
- chython-3.8/chython/polymers/test/test_assemble.py +75 -0
- chython-3.8/chython/polymers/test/test_canonical.py +108 -0
- chython-3.8/chython/polymers/test/test_decompose.py +204 -0
- chython-3.8/chython/polymers/test/test_dependency_direction.py +57 -0
- chython-3.8/chython/polymers/test/test_facade.py +65 -0
- chython-3.8/chython/polymers/test/test_grammar.py +125 -0
- chython-3.8/chython/polymers/test/test_index.py +63 -0
- chython-3.8/chython/polymers/test/test_library.py +72 -0
- chython-3.8/chython/polymers/test/test_polymer_types.py +59 -0
- chython-3.8/chython/polymers/test/test_shape.py +62 -0
- {chython-3.5 → chython-3.8}/chython/reactions/_enumerate.py +236 -21
- {chython-3.5 → chython-3.8}/chython/reactions/_reconstruct.py +178 -25
- {chython-3.5 → chython-3.8}/chython/reactions/tables/functional.tsv +7 -7
- chython-3.8/chython/reactions/tables/protective.tsv +130 -0
- {chython-3.5 → chython-3.8}/chython/reactions/tables/reactions.tsv +119 -198
- {chython-3.5 → chython-3.8}/chython/reactions/tables/roles.tsv +12 -6
- {chython-3.5 → chython-3.8}/chython/reactions/test/_frozen_ids.py +127 -209
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_functional.py +15 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_protective.py +46 -1
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_reconstruct.py +130 -61
- chython-3.8/chython/reactions/test/test_reconstruct_labels.py +328 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_retro.py +1 -1
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_retro_tables.py +2 -2
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_roles.py +64 -4
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_tables.py +3 -2
- {chython-3.5 → chython-3.8}/chython/test/test_facade_names.py +29 -2
- {chython-3.5 → chython-3.8}/chython/test/test_optional_numpy.py +3 -3
- {chython-3.5 → chython-3.8}/chython/test/test_stereo_bluebook.py +1 -1
- {chython-3.5 → chython-3.8}/chython/test/test_v2_boundary.py +2 -8
- {chython-3.5 → chython-3.8}/chython/test/test_writer_posture.py +5 -1
- {chython-3.5 → chython-3.8/chython.egg-info}/PKG-INFO +5 -2
- {chython-3.5 → chython-3.8}/chython.egg-info/SOURCES.txt +45 -10
- {chython-3.5 → chython-3.8}/chython.egg-info/requires.txt +3 -0
- {chython-3.5 → chython-3.8}/pyproject.toml +6 -1
- chython-3.5/chython/chemistry/test/_oracle.py +0 -49
- chython-3.5/chython/core/test/gen_reaction_pach_corpus.py +0 -153
- chython-3.5/chython/core/test/oracle.py +0 -707
- chython-3.5/chython/core/test/test_oracle.py +0 -238
- chython-3.5/chython/core/test/test_reaction_patch_stereo.py +0 -162
- chython-3.5/chython/core/test/test_smiles_roundtrip.py +0 -349
- chython-3.5/chython/core/test/test_smiles_write_differential.py +0 -879
- chython-3.5/chython/core/test/test_stereo_v2_differential.py +0 -235
- chython-3.5/chython/depict/layout/shapes.py +0 -332
- chython-3.5/chython/interop/test/test_v2_oracle.py +0 -480
- chython-3.5/chython/reactions/tables/protective.tsv +0 -128
- chython-3.5/chython/reactions/test/test_reconstruct_labels.py +0 -158
- {chython-3.5 → chython-3.8}/LICENSE +0 -0
- {chython-3.5 → chython-3.8}/MANIFEST.in +0 -0
- {chython-3.5 → chython-3.8}/build_inchi.py +0 -0
- {chython-3.5 → chython-3.8}/chython/_functions.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_abbreviations.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_canonicalize.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_counts.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_crippen.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_hydrogens.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_implicit.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_kekule_form.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_maccs.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_organometallics.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_perceive.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_pharmacophore.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_protomers.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_qed.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_residues.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_resonance.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_salts.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_saturate.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_smarts.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_standardize.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_stereo_audit.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_tables.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/_tpsa.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/abbreviations.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/acids.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/covalent_radii.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/crippen.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/hbond.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/maccs.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/maccs_corpus.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/pharmacophore.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/qed_alerts.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/residues.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/resonance.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/rotatable.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/salts.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/standardize_groups.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/standardize_metals.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/stereo_audit.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/sybyl_types.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/tables/tpsa.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/_corpus.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/gen_standardize_rules.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_abbreviations.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_acids_tsv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_canonicalize.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_canonicalize_atom_order.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_counts.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_covalent_radii_tsv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_crippen.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_crippen_tsv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_dependency_direction.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_featurizer_injection.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_featurizer_tables_lazy.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_kekule_form.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_maccs.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_maccs_corpus.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_maccs_tsv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_organometallics.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_perceive.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_pharmacophore.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_protomers.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_qed.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_qed_alerts_tsv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_reaction_hydrogen_repair.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_residues.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_resonance.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_resonance_tsv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_salts.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_saturate.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_groups_port.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_overvalent_nitrogen.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_rules_examples.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_rules_merges.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_standardize_rules_tsv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_stereo_audit.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_tpsa.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_tpsa_tsv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/chemistry/test/test_valence_report.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/RULES.md +0 -0
- {chython-3.5 → chython-3.8}/chython/core/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_cip.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_core.pyx +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_descriptors.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_elements.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_facade.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_features.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_fingerprints.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_hydrogens.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_inchi.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_isomorphism.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_kekule.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_layout_score.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_log.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_ml.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_molecule_topology.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_molecule_views.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_morgan.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_pach.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_pach3.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_query_arena.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_query_boxes.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_query_container.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_query_seal.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_reaction_passes.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_rings.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_smarts_read.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_smiles_read.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_sssr.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_stereo_meaning.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/_thiele.pxi +0 -0
- {chython-3.5 → chython-3.8}/chython/core/elements.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/core/isotopes.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/arena_v4_corpus.bin.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/bench_ml.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/chytorch_oracle.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/gen_element_tables.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/gen_modeling_view_corpus.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/gen_pach3_corpus.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/gen_v3_fixtures.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/gen_v4_fixtures.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/modeling_view_corpus.json.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/modeling_view_corpus.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/pach3_corpus.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/pach_bond_group_corpus.bin.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/pach_corpus.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/pach_v0_corpus.bin.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/pach_v0_native_corpus.bin.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/pach_v2_corpus.bin.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/pach_v3_corpus.bin.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/pach_v4_corpus.bin.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/peptides.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/reaction_pach_v2_corpus.bin.gz +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_apply_scratch_probe.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_arena_f60.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_arena_identity.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_arena_v3_compat.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_arena_v4_compat.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_aromatic_storage.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_atropisomer_axis.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_brace_bond_fields.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_canonical.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_canonical_groups.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_canonical_stereogenic.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_canonicalize_stereo_groups.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_cip_assign.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_cip_budget.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_cip_cases.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_cip_digraph.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_cip_ranking.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_cip_storage.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_clean_stereo.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_conformers.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_container_log.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_copy_caches.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_cx_wedges.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_derive.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_descriptors.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_facade.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_featurizer_injection.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_fingerprints.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_geometry.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_h_unknown.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_helical_units.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_hydrogens.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_identity_memo.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_inchi.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_interop_injection.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_isomorphism.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_kekule.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_log.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_meta.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_ml_encoding.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_ml_reaction_transition.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_ml_state_view.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_ml_transition_view.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_ml_unpack_differential.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_modeling_view_frozen.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_molecule.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_morgan.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_pach.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_pach3.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_pack.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_planar_units.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_query.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_r_edit.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_r_semantics.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_r_serialisation.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_r_smirks.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_r_storage.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_reaction_identity.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_rings.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_rings_c60.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_set_element.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_sgroups.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_r.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_read.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_stereo_marks.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_aromatic.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_cis_trans.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_h_unknown.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smiles_write_sticky.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_patch.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_read.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_report.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_smirks_stereo.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_acceptance.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_anchor_identity.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_group_meaning.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_group_signs.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_group_storage.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_liveness.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_owners.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_parity.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_perception.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_query.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereo_units.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_stereogenicity_symmetry.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_structure.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_thiele_atom_order.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_title.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/test_union_stereo.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/v3_fixtures.py +0 -0
- {chython-3.5 → chython-3.8}/chython/core/test/v4_fixtures.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/_hooks.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/colorbar.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/colormap.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/field.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/label.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/approved.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/clean2d.js +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/edits.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/env.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/features.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/greedy.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/lattice.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/alphazero.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/demos.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/evaluate.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/judge.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/mcts.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/policy.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/replay.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/sweep.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/targets.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/tensors.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/learn/train.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/pose.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/quality.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/rings.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/search.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/templates.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/layout/tree.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/metrics/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/metrics/helvetica.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/metrics/times.tsv +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/overlay.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/render/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/render/svg.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/scene.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/style.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_alphazero.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_demos.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_judge.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_mcts.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_policy.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_replay.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_targets.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/learn/test_train.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_bonds.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_colorbar.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_colormap.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_field.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_figure.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_label.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_controller.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_engine.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_layout_relax.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_metrics.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_overlay.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_package.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_quality.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_r_atom.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_review.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_scene.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_scorecard.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_style.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_svg.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_wedge_draw.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/test/test_x3dom.py +0 -0
- {chython-3.5 → chython-3.8}/chython/depict/x3dom.py +0 -0
- {chython-3.5 → chython-3.8}/chython/exceptions.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/_text.py +0 -0
- {chython-3.5/chython/formats/ctfile → chython-3.8/chython/formats/cdx}/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/CTFILE.md +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_ctab.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_errors.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_facade.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_hydrogens.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_rdf.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_rxn.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_sdf.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_sgroup.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_stream.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_tokens.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_v2000.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/_v3000.py +0 -0
- {chython-3.5/chython/formats/xml → chython-3.8/chython/formats/ctfile}/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_aromatic.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_container_log.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_data_labels.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_facade.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_r_atom.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_rxn.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_sdf.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_sgroup.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_stereo_drawings.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_stereo_label.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_stream.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/ctfile/test/test_tokens.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/mol2.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/pdb/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/pdb/_builder.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/pdb/_legacy.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/pdb/_mmcif.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/pdb/_records.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/pdb/_star.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/conftest.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_conformance.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_done_when.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_isolation.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_log_prefix.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_mmcif.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_mol2.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_no_review_bookkeeping.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_pdb.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_pdb_builder.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_perceive_agreement.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_read_only_facades.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_xyz.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/test/test_xyz_builder.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/_cml.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/_dialect.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/_errors.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/_facade.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/_mrv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/_tree.py +0 -0
- {chython-3.5/chython/interop → chython-3.8/chython/formats/xml}/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/conftest.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_cml.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_container_log.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_dead_stereo_groups.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_dialect.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_equivalence.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_facade.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_mrv.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_mrv_census.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xml/test/test_tree.py +0 -0
- {chython-3.5 → chython-3.8}/chython/formats/xyz.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_cdk.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_cdpkit.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_indigo.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_iupac.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_java.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_openbabel.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_pandas.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_rdkit.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_records.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/_stereo.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/config.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/conformers.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/conftest.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_cdk.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_cdpkit.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_config.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_conformers.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_coordinate_honesty.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_dispatch.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_indigo.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_iupac.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_log_delivery.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_openbabel.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_pandas.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_rdkit.py +0 -0
- {chython-3.5 → chython-3.8}/chython/interop/test/test_stereo.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/_numbering.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/_stickers.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/_tables.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/attention/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/attention/_assign.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/attention/_encode.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/attention/_session.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/golden_subset.smi +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_attention.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_attention_assign.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_attention_encode.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_attention_isolation.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_dependency_direction.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_enumerate.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_id_stability.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_numbering.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_probes.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_retro_probes.py +0 -0
- {chython-3.5 → chython-3.8}/chython/reactions/test/test_stickers.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/__init__.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_code_hygiene.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_container_methods.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_doc_figures.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_doc_references.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_doc_samples.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_hydrogen_parity.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_libinchi_staging.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_log_records.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_packaging.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_performance.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_r_atom_integration.py +0 -0
- {chython-3.5 → chython-3.8}/chython/test/test_release_build.py +0 -0
- {chython-3.5 → chython-3.8}/chython.egg-info/dependency_links.txt +0 -0
- {chython-3.5 → chython-3.8}/chython.egg-info/top_level.txt +0 -0
- {chython-3.5 → chython-3.8}/setup.cfg +0 -0
- {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.
|
|
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
|
|
24
|
-
object. `smiles` is bidirectional: a string in reads -- a
|
|
25
|
-
reaction SMILES and the result a `ReactionContainer` -- and a
|
|
26
|
-
same door for the wire format, and `unpach`/`unpack` its import
|
|
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
|
-
|
|
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
|
|
49
|
-
`chython.
|
|
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
|
|
70
|
-
return
|
|
73
|
+
def js_runtime(self) -> JSRuntime:
|
|
74
|
+
return get_js_runtime()
|
|
71
75
|
|
|
72
|
-
@
|
|
73
|
-
def
|
|
74
|
-
|
|
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
|
|
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
|
|
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
|
|
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.
|
|
23
|
-
|
|
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
|
-
|
|
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
|
-
"""
|
|
20
|
-
|
|
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
|
-
|
|
35
|
-
|
|
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.
|
|
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
|
|
107
|
-
|
|
108
|
-
|
|
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:
|