chython 3.1__tar.gz → 3.3__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.1/chython.egg-info → chython-3.3}/PKG-INFO +1 -1
- {chython-3.1 → chython-3.3}/chython/chemistry/__init__.py +14 -9
- {chython-3.1 → chython-3.3}/chython/chemistry/_canonicalize.py +54 -25
- {chython-3.1 → chython-3.3}/chython/chemistry/_implicit.py +3 -1
- {chython-3.1 → chython-3.3}/chython/chemistry/_isomers.py +301 -121
- chython-3.3/chython/chemistry/_kekule_form.py +341 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_organometallics.py +4 -4
- chython-3.3/chython/chemistry/_salts.py +679 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_standardize.py +15 -7
- {chython-3.1 → chython-3.3}/chython/chemistry/_tables.py +71 -36
- chython-3.3/chython/chemistry/tables/salts.tsv +185 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_isomers.py +250 -0
- chython-3.3/chython/chemistry/test/test_kekule_form.py +217 -0
- chython-3.3/chython/chemistry/test/test_salts.py +1095 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_valence_report.py +20 -0
- {chython-3.1 → chython-3.3}/chython/core/RULES.md +5 -3
- chython-3.3/chython/core/_cip.pxi +804 -0
- {chython-3.1 → chython-3.3}/chython/core/_core.pyx +4 -0
- {chython-3.1 → chython-3.3}/chython/core/_facade.py +6 -4
- {chython-3.1 → chython-3.3}/chython/core/_isomorphism.pxi +17 -10
- {chython-3.1 → chython-3.3}/chython/core/_kekule.pxi +5 -0
- {chython-3.1 → chython-3.3}/chython/core/_molecule_arena.pxi +24 -1
- {chython-3.1 → chython-3.3}/chython/core/_molecule_container.pxi +1353 -74
- {chython-3.1 → chython-3.3}/chython/core/_molecule_views.pxi +26 -2
- {chython-3.1 → chython-3.3}/chython/core/_pach.pxi +144 -66
- {chython-3.1 → chython-3.3}/chython/core/_pach3.pxi +301 -102
- {chython-3.1 → chython-3.3}/chython/core/_query_boxes.pxi +18 -0
- {chython-3.1 → chython-3.3}/chython/core/_smiles_write.pxi +161 -29
- {chython-3.1 → chython-3.3}/chython/core/_stereo.pxi +542 -77
- {chython-3.1 → chython-3.3}/chython/core/_thiele.pxi +97 -25
- {chython-3.1 → chython-3.3}/chython/core/_valence.pxi +29 -1
- {chython-3.1 → chython-3.3}/chython/core/reaction.py +61 -21
- {chython-3.1 → chython-3.3}/chython/core/test/gen_pach3_corpus.py +21 -1
- {chython-3.1 → chython-3.3}/chython/core/test/pach3_corpus.py +104 -3
- chython-3.3/chython/core/test/pach_bond_group_corpus.bin.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_apply_scratch_probe.py +9 -8
- {chython-3.1 → chython-3.3}/chython/core/test/test_arena_identity.py +26 -1
- {chython-3.1 → chython-3.3}/chython/core/test/test_arena_v4_compat.py +7 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_aromatic_storage.py +10 -13
- chython-3.3/chython/core/test/test_cip_assign.py +88 -0
- chython-3.3/chython/core/test/test_cip_cases.py +107 -0
- chython-3.3/chython/core/test/test_cip_digraph.py +91 -0
- chython-3.3/chython/core/test/test_cip_ranking.py +108 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_cip_storage.py +120 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_clean_stereo.py +129 -25
- {chython-3.1 → chython-3.3}/chython/core/test/test_conformers.py +4 -3
- chython-3.3/chython/core/test/test_enrich.py +432 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_facade.py +5 -2
- {chython-3.1 → chython-3.3}/chython/core/test/test_geometry.py +101 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_isomorphism.py +51 -1
- {chython-3.1 → chython-3.3}/chython/core/test/test_kekule.py +30 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_magic.py +100 -1
- {chython-3.1 → chython-3.3}/chython/core/test/test_pach.py +58 -10
- {chython-3.1 → chython-3.3}/chython/core/test/test_pach3.py +275 -25
- {chython-3.1 → chython-3.3}/chython/core/test/test_pack.py +41 -1
- {chython-3.1 → chython-3.3}/chython/core/test/test_reaction_pach.py +22 -8
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_write.py +53 -2
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_write_detached.py +40 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_write_stereo.py +198 -2
- {chython-3.1 → chython-3.3}/chython/core/test/test_smirks_stereo.py +12 -9
- chython-3.3/chython/core/test/test_stereo_anchor_identity.py +152 -0
- chython-3.3/chython/core/test/test_stereo_group_storage.py +234 -0
- chython-3.3/chython/core/test/test_stereo_owners.py +145 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_stereo_perception.py +76 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_stereo_query.py +25 -13
- {chython-3.1 → chython-3.3}/chython/core/test/test_thiele.py +119 -3
- chython-3.3/chython/core/test/test_union_stereo.py +291 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_valence.py +40 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_view_surface.py +86 -0
- {chython-3.1 → chython-3.3}/chython/depict/label.py +21 -8
- {chython-3.1 → chython-3.3}/chython/depict/layout/molecule.py +33 -5
- {chython-3.1 → chython-3.3}/chython/depict/style.py +1 -1
- {chython-3.1 → chython-3.3}/chython/depict/test/test_clean2d.py +13 -4
- {chython-3.1 → chython-3.3}/chython/depict/test/test_figure.py +29 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_label.py +47 -0
- {chython-3.1 → chython-3.3}/chython/formats/__init__.py +5 -2
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/CTFILE.md +27 -8
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/__init__.py +3 -1
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_ctab.py +73 -5
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_sgroup.py +161 -5
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_stream.py +2 -4
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_v2000.py +6 -5
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_v3000.py +155 -38
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_fidelity.py +18 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_rdf.py +11 -6
- chython-3.3/chython/formats/ctfile/test/test_stereo_label.py +326 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_v2000.py +35 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_v3000.py +254 -1
- {chython-3.1 → chython-3.3}/chython/formats/test/test_log_prefix.py +4 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/_mrv.py +7 -2
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/test_mrv.py +22 -0
- chython-3.3/chython/reactions/_reconstruct.py +880 -0
- {chython-3.1 → chython-3.3}/chython/reactions/_stickers.py +4 -4
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_reconstruct.py +227 -0
- {chython-3.1 → chython-3.3}/chython/test/test_container_methods.py +8 -3
- {chython-3.1 → chython-3.3}/chython/test/test_performance.py +67 -0
- chython-3.3/chython/test/test_writer_posture.py +265 -0
- {chython-3.1 → chython-3.3/chython.egg-info}/PKG-INFO +1 -1
- {chython-3.1 → chython-3.3}/chython.egg-info/SOURCES.txt +15 -1
- {chython-3.1 → chython-3.3}/pyproject.toml +4 -2
- chython-3.1/chython/chemistry/_salts.py +0 -308
- chython-3.1/chython/chemistry/tables/salts.tsv +0 -163
- chython-3.1/chython/chemistry/test/test_salts.py +0 -565
- chython-3.1/chython/core/test/test_union_stereo.py +0 -167
- chython-3.1/chython/reactions/_reconstruct.py +0 -415
- {chython-3.1 → chython-3.3}/LICENSE +0 -0
- {chython-3.1 → chython-3.3}/MANIFEST.in +0 -0
- {chython-3.1 → chython-3.3}/README.md +0 -0
- {chython-3.1 → chython-3.3}/build_inchi.py +0 -0
- {chython-3.1 → chython-3.3}/chython/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/_functions.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_abbreviations.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_counts.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_crippen.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_hydrogens.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_maccs.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_perceive.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_pharmacophore.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_protomers.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_qed.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_residues.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_resonance.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_saturate.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_smarts.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/_tpsa.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/abbreviations.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/acids.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/covalent_radii.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/crippen.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/hbond.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/maccs.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/maccs_corpus.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/pharmacophore.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/qed_alerts.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/residues.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/resonance.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/rotatable.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/standardize_groups.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/standardize_metals.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/sybyl_types.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/tables/tpsa.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/_corpus.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/_oracle.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/gen_standardize_rules.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_abbreviations.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_acids_tsv.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_canonicalize.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_counts.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_covalent_radii_tsv.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_crippen.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_crippen_tsv.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_dependency_direction.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_featurizer_injection.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_featurizer_tables_lazy.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_maccs.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_maccs_corpus.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_maccs_tsv.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_organometallics.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_perceive.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_pharmacophore.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_protomers.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_qed.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_qed_alerts_tsv.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_reaction_hydrogen_repair.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_reaction_passes.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_residues.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_resonance.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_resonance_tsv.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_saturate.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_smarts.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_standardize_differential.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_standardize_groups_port.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_standardize_overvalent_nitrogen.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_standardize_rules_examples.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_standardize_rules_merges.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_standardize_rules_tsv.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_thiele_is_single_purpose.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_tpsa.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_tpsa_tsv.py +0 -0
- {chython-3.1 → chython-3.3}/chython/chemistry/test/test_z_translation.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_canonical.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_descriptors.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_elements.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_features.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_fingerprints.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_hydrogens.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_inchi.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_log.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_ml.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_molecule_topology.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_morgan.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_query_arena.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_query_container.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_query_seal.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_reaction_passes.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_rings.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_smarts_read.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_smiles_read.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_smirks_patch.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_smirks_read.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/_sssr.pxi +0 -0
- {chython-3.1 → chython-3.3}/chython/core/elements.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/core/isotopes.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/arena_v4_corpus.bin.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/bench_ml.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/chytorch_oracle.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/gen_element_tables.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/gen_modeling_view_corpus.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/gen_reaction_pach_corpus.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/gen_v3_fixtures.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/gen_v4_fixtures.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/gen_valence_rules.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/modeling_view_corpus.json.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/modeling_view_corpus.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/oracle.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/pach_corpus.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/pach_v0_corpus.bin.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/pach_v0_native_corpus.bin.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/pach_v2_corpus.bin.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/pach_v3_corpus.bin.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/pach_v4_corpus.bin.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/reaction_pach_corpus.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/reaction_pach_v2_corpus.bin.gz +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_aggregates.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_alternative_spellings.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_arena_f60.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_arena_v3_compat.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_canonical.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_canonical_mirror.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_clean_isotopes_and_coordinate_bonds.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_container_log.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_copy_caches.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_derive.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_descriptors.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_element_tables.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_features.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_featurizer_injection.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_fingerprints.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_h_unknown.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_hydrogens.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_inchi.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_interop_injection.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_log.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_meta.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_ml_encoding.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_ml_reaction_transition.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_ml_state_view.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_ml_transition_view.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_ml_unpack_differential.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_modeling_view_frozen.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_molecule.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_morgan.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_no_chython_two_imports.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_oracle.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_query.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_r_edit.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_r_query.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_r_semantics.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_r_serialisation.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_r_smirks.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_r_storage.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_reaction_container.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_reaction_identity.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_reaction_passes.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_reaction_patch_stereo.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_reaction_smiles.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_rings.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_rings_c60.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_set_element.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_sgroups.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smarts_read.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_r.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_read.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_roundtrip.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_write_aromatic.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_write_cis_trans.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_write_differential.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_write_h_unknown.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smiles_write_sticky.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smirks_filter.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smirks_patch.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smirks_read.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_smirks_report.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_stereo_acceptance.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_stereo_parity.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_stereo_units.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_stereo_v2_differential.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_structure.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_title.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/test_topology.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/v3_fixtures.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/test/v4_fixtures.py +0 -0
- {chython-3.1 → chython-3.3}/chython/core/valence_rules.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/core/wedge.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/_config.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/_hooks.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/bonds.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/colorbar.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/colormap.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/field.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/figure.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/layout/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/layout/clean2d.js +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/layout/reaction.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/metrics/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/metrics/helvetica.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/metrics/times.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/overlay.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/render/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/render/svg.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/scene.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_bonds.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_colorbar.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_colormap.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_field.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_metrics.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_overlay.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_package.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_r_atom.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_scene.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_style.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_svg.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_wedge_draw.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/test/test_x3dom.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/wedge.py +0 -0
- {chython-3.1 → chython-3.3}/chython/depict/x3dom.py +0 -0
- {chython-3.1 → chython-3.3}/chython/exceptions.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/_text.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_errors.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_facade.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_hydrogens.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_rdf.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_rxn.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_sdf.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/_tokens.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/conftest.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_aromatic.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_container_log.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_data_labels.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_facade.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_hydrogens.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_r_atom.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_rxn.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_sdf.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_sgroup.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_stream.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_tokens.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/ctfile/test/test_wedge.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/mol2.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/pdb/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/pdb/_builder.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/pdb/_legacy.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/pdb/_mmcif.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/pdb/_records.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/pdb/_star.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/conftest.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/oracles.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_conformance.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_done_when.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_isolation.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_mmcif.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_mol2.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_no_review_bookkeeping.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_oracles.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_pdb.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_pdb_builder.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_perceive_agreement.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_read_only_facades.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_xyz.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/test/test_xyz_builder.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/_cml.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/_dialect.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/_errors.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/_facade.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/_tree.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/conftest.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/test_cml.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/test_container_log.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/test_dialect.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/test_equivalence.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/test_facade.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/test_mrv_census.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xml/test/test_tree.py +0 -0
- {chython-3.1 → chython-3.3}/chython/formats/xyz.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_cdk.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_cdpkit.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_indigo.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_iupac.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_java.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_openbabel.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_pandas.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_rdkit.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_records.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/_stereo.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/config.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/conformers.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/conftest.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_cdk.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_cdpkit.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_config.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_conformers.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_coordinate_honesty.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_dispatch.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_indigo.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_iupac.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_log_delivery.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_openbabel.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_pandas.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_rdkit.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_stereo.py +0 -0
- {chython-3.1 → chython-3.3}/chython/interop/test/test_v2_oracle.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/_enumerate.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/_numbering.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/_tables.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/attention/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/attention/_assign.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/attention/_encode.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/attention/_session.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/tables/functional.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/tables/protective.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/tables/reactions.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/tables/roles.tsv +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/_frozen_ids.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/gen_corpus_glossary.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/golden_subset.smi +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_attention.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_attention_assign.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_attention_encode.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_attention_isolation.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_corpus_glossary.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_dependency_direction.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_enumerate.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_functional.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_id_stability.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_numbering.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_probes.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_protective.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_roles.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_stickers.py +0 -0
- {chython-3.1 → chython-3.3}/chython/reactions/test/test_tables.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/__init__.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_code_hygiene.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_doc_figures.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_doc_references.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_doc_samples.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_facade_names.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_hydrogen_parity.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_libinchi_staging.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_log_records.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_optional_numpy.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_packaging.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_r_atom_integration.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_release_build.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_stereo_bluebook.py +0 -0
- {chython-3.1 → chython-3.3}/chython/test/test_v2_boundary.py +0 -0
- {chython-3.1 → chython-3.3}/chython.egg-info/dependency_links.txt +0 -0
- {chython-3.1 → chython-3.3}/chython.egg-info/requires.txt +0 -0
- {chython-3.1 → chython-3.3}/chython.egg-info/top_level.txt +0 -0
- {chython-3.1 → chython-3.3}/setup.cfg +0 -0
- {chython-3.1 → chython-3.3}/setup.py +0 -0
|
@@ -36,6 +36,7 @@ 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
38
|
from ._isomers import standardize_isomers
|
|
39
|
+
from ._kekule_form import standardize_kekule
|
|
39
40
|
from ._maccs import maccs_bit_set, maccs_keys
|
|
40
41
|
from ._perceive import perceive_bonds
|
|
41
42
|
from ._pharmacophore import pharmacophore_invariants
|
|
@@ -44,23 +45,25 @@ from ._qed import alert_count, qed, qed_properties
|
|
|
44
45
|
from ._residues import (RESIDUE_KINDS, ResidueTemplate, normalize_atom_name, residue_template,
|
|
45
46
|
residue_templates)
|
|
46
47
|
from ._resonance import fix_resonance
|
|
47
|
-
from ._salts import SaltComposition, decompose_salts, split_salts
|
|
48
|
+
from ._salts import ComponentRow, DEFAULT_STABILIZER_CLASSES, SaltComposition, decompose_salts, split_salts
|
|
48
49
|
from ._saturate import saturate
|
|
49
50
|
from ._smarts import SmartsSyntaxError, compile_smarts
|
|
50
51
|
from ._standardize import LogRecord, standardize
|
|
51
|
-
from ._tables import (ACID_ROLES, AbbreviationRow, AcidRow, Endpoint, RESONANCE_ROLES, Rule,
|
|
52
|
-
|
|
53
|
-
acids_table_text, groups_rules,
|
|
52
|
+
from ._tables import (ACID_ROLES, AbbreviationRow, AcidRow, Endpoint, RESONANCE_ROLES, Rule,
|
|
53
|
+
SALT_CLASSES, SALT_MATCHES, SaltRow, abbreviation_row, abbreviations_rows,
|
|
54
|
+
acids_rules, acids_rules_by_role, acids_table_text, groups_rules,
|
|
54
55
|
metals_rules, read_table, resonance_rules, resonance_rules_by_role,
|
|
55
|
-
resonance_table_text, salts_rows,
|
|
56
|
+
resonance_table_text, salts_rows, salts_rows_by_klass, salts_species_keys,
|
|
56
57
|
salts_table_text, standardize_rules)
|
|
57
58
|
from ._tpsa import tpsa
|
|
58
59
|
from ..core._core import (_set_canonicalize_fn, _set_featurizer_fns, _set_hydrogens_fns,
|
|
59
|
-
_set_isomers_fn,
|
|
60
|
-
_set_standardize_fn,
|
|
60
|
+
_set_isomers_fn, _set_kekule_form_fn, _set_protomers_fn,
|
|
61
|
+
_set_resonance_fn, _set_salts_fns, _set_standardize_fn,
|
|
62
|
+
_set_valence_fn)
|
|
61
63
|
|
|
62
64
|
|
|
63
|
-
__all__ = ['ACID_ROLES', 'AbbreviationRow', '
|
|
65
|
+
__all__ = ['ACID_ROLES', 'AbbreviationRow', 'ComponentRow', 'DEFAULT_STABILIZER_CLASSES',
|
|
66
|
+
'LogRecord', 'SALT_CLASSES', 'SALT_MATCHES', 'SaltComposition',
|
|
64
67
|
'abbreviation_row', 'abbreviations_rows', 'alert_count',
|
|
65
68
|
'calc_implicit', 'canonicalize', 'check_valence', 'crippen_logp', 'crippen_mr',
|
|
66
69
|
'decompose_salts', 'expand_abbreviations', 'explicify_hydrogens', 'fix_resonance',
|
|
@@ -68,12 +71,14 @@ __all__ = ['ACID_ROLES', 'AbbreviationRow', 'LogRecord', 'SALT_ROLES', 'SaltComp
|
|
|
68
71
|
'hydrogen_bond_donors_count', 'implicify_hydrogens', 'maccs_bit_set', 'maccs_keys',
|
|
69
72
|
'neutralize', 'perceive_bonds', 'pharmacophore_invariants', 'qed', 'qed_properties',
|
|
70
73
|
'rotatable_bonds_count',
|
|
71
|
-
'saturate', 'split_salts', 'standardize', 'standardize_isomers',
|
|
74
|
+
'saturate', 'split_salts', 'standardize', 'standardize_isomers',
|
|
75
|
+
'standardize_kekule', 'tpsa']
|
|
72
76
|
|
|
73
77
|
_set_standardize_fn(standardize)
|
|
74
78
|
_set_canonicalize_fn(canonicalize)
|
|
75
79
|
_set_hydrogens_fns(implicify_hydrogens, explicify_hydrogens)
|
|
76
80
|
_set_isomers_fn(standardize_isomers)
|
|
81
|
+
_set_kekule_form_fn(standardize_kekule)
|
|
77
82
|
_set_valence_fn(check_valence)
|
|
78
83
|
_set_salts_fns(split_salts=split_salts, decompose_salts=decompose_salts)
|
|
79
84
|
_set_protomers_fn(neutralize)
|
|
@@ -18,16 +18,18 @@
|
|
|
18
18
|
#
|
|
19
19
|
"""`canonicalize()` -- the pre-pass that makes `canonical_bytes` a compound identity rather than a
|
|
20
20
|
drawing identity, so equal compounds hash equal and a corpus deduplicates by hash. The stage order
|
|
21
|
-
is a correctness constraint, not taste: `kekule()`, `
|
|
22
|
-
`neutralize()`, `
|
|
23
|
-
`keep_kekule=True`. Each ordering pair is justified at its numbered step
|
|
21
|
+
is a correctness constraint, not taste: `kekule()`, `validate_stereo()`, `standardize()`,
|
|
22
|
+
`implicify_hydrogens()`, `neutralize()`, `standardize_kekule()`, `thiele()`, `standardize_isomers()`, and
|
|
23
|
+
`kekule()` again only under `keep_kekule=True`. Each ordering pair is justified at its numbered step
|
|
24
|
+
below.
|
|
24
25
|
|
|
25
|
-
The order alone is not enough, because the last stage can unblock the
|
|
26
|
+
The order alone is not enough, because the last stage can unblock the third one: a `tautomer` row
|
|
26
27
|
wanting a free ring nitrogen cannot fire while the mobile hydrogen sits on it, and the placement is
|
|
27
|
-
what moves that hydrogen off. So steps
|
|
28
|
+
what moves that hydrogen off. So steps 3 to 8 run to a fixed point rather than once -- step 9.
|
|
28
29
|
"""
|
|
29
30
|
from ._hydrogens import implicify_hydrogens
|
|
30
31
|
from ._isomers import standardize_isomers
|
|
32
|
+
from ._kekule_form import standardize_kekule
|
|
31
33
|
from ._protomers import neutralize
|
|
32
34
|
from ._standardize import standardize
|
|
33
35
|
from ..core import LOST, LogRecord, MoleculeContainer, recording
|
|
@@ -38,7 +40,7 @@ __all__ = ['canonicalize']
|
|
|
38
40
|
|
|
39
41
|
_RULE_ROUNDS = 'canonicalize:rounds'
|
|
40
42
|
|
|
41
|
-
#: How many times steps
|
|
43
|
+
#: How many times steps 3 to 8 may be re-run before the pipeline gives up and says so. Every shape
|
|
42
44
|
#: measured converges in two, and the loop cannot cycle in principle: the `tautomer` rows move a
|
|
43
45
|
#: hydrogen from oxygen or sulfur to nitrogen and never back, and the placement stage never makes an
|
|
44
46
|
#: oxygen or a sulfur a site. The cap is here so a rule table that breaks either half is reported as
|
|
@@ -62,13 +64,16 @@ def canonicalize(molecule: MoleculeContainer, *, fix_tautomers: bool = True,
|
|
|
62
64
|
needing the aromatic form.
|
|
63
65
|
|
|
64
66
|
CHARGES ARE PAIRED OFF, not preserved atom by atom: glycine's zwitterion and its neutral drawing
|
|
65
|
-
share a key, because step
|
|
67
|
+
share a key, because step 5 runs `neutralize()`. `neutralize()` leaves the NET charge untouched, so
|
|
66
68
|
sodium acetate stays sodium acetate -- there is no proton in it to move -- while ammonium acetate
|
|
67
69
|
becomes acetic acid and ammonia, both drawings of one salt.
|
|
68
70
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
71
|
+
`standardize()` moves the net charge wherever a drawing omitted one: the organometallic completion
|
|
72
|
+
charges a metal nobody drew a halide for; `fix_salt_charges()` pairs each free metal with the acid
|
|
73
|
+
that belongs to it, deprotonating the acid and charging the metal only when it arrives neutral -- a
|
|
74
|
+
metal already drawn charged takes the proton and the total falls. Both say so in the log, and
|
|
75
|
+
`neutralize()` two steps later leaves the repair alone: `acids.tsv`'s rows are charged sites only,
|
|
76
|
+
so a sodium cation is no donor to any of them.
|
|
72
77
|
"""
|
|
73
78
|
# A refusal at the answer boundary, which is the only place one belongs. `smiles()` returns
|
|
74
79
|
# whichever container its string describes, so a `>>` in a structure column arrives here as a
|
|
@@ -79,7 +84,7 @@ def canonicalize(molecule: MoleculeContainer, *, fix_tautomers: bool = True,
|
|
|
79
84
|
f'{type(molecule).__name__}; a ReactionContainer has its own canonicalize(), '
|
|
80
85
|
f'which runs this pass on each of its molecules')
|
|
81
86
|
|
|
82
|
-
# the bool is measured, not accumulated: steps 1 and
|
|
87
|
+
# the bool is measured, not accumulated: steps 1 and 6 are a round trip, so summing the stages'
|
|
83
88
|
# own flags would report a change through both ends of a no-op on an already-canonical molecule.
|
|
84
89
|
before = molecule.canonical_bytes
|
|
85
90
|
|
|
@@ -92,43 +97,64 @@ def canonicalize(molecule: MoleculeContainer, *, fix_tautomers: bool = True,
|
|
|
92
97
|
# event already reported. `check_valence()` is still how those atoms are found.
|
|
93
98
|
molecule.kekule()
|
|
94
99
|
|
|
95
|
-
# 2.
|
|
100
|
+
# 2. Drop the parities the constitution does not justify, on the localised form and before step 6
|
|
101
|
+
# hides a bond order behind an aromatic one. A cis/trans sign on a double bond an alternating
|
|
102
|
+
# cycle can move states which Kekule form was drawn, not the compound's geometry, and it enters
|
|
103
|
+
# `canonical_bytes` whether or not the unit is stereogenic -- so the two bond-shift drawings of
|
|
104
|
+
# 1,2-dimethylcyclooctatetraene keep two keys until it is gone. The report is not recorded: the
|
|
105
|
+
# parities it names are the reader's own input and `validate_stereo()` returns them to a caller
|
|
106
|
+
# that wants them.
|
|
107
|
+
molecule.validate_stereo()
|
|
108
|
+
|
|
109
|
+
# 3. Repair the drawing.
|
|
96
110
|
standardize(molecule, fix_tautomers=fix_tautomers)
|
|
97
111
|
|
|
98
|
-
#
|
|
112
|
+
# 4. Explicit hydrogens are a `canonical_bytes` difference, so they have to go.
|
|
99
113
|
implicify_hydrogens(molecule)
|
|
100
114
|
|
|
101
|
-
#
|
|
102
|
-
# hash equal. AFTER step
|
|
115
|
+
# 5. Pair off the charges an acid/base row can pair off, so a zwitterion and its neutral drawing
|
|
116
|
+
# hash equal. AFTER step 4, because `acids.tsv` reads implicit hydrogens: a cation drawn with
|
|
103
117
|
# hydrogen ATOMS is invisible to it until they have been folded in. `keep_charge` stays at its
|
|
104
118
|
# default -- the net charge is part of the compound, so a canonical form may move a proton but
|
|
105
119
|
# never create or destroy one. A quaternary ammonium keeps its counterion: it has no proton to
|
|
106
120
|
# give, so the pass finds no donor and declines.
|
|
107
121
|
neutralize(molecule)
|
|
108
122
|
|
|
109
|
-
#
|
|
123
|
+
# 6. Which Kekule form, decided before step 7 reads one. `thiele()` refuses a candidate ring whose
|
|
124
|
+
# atom holds its double bond outside the ring, so a compound with several Kekule forms has one
|
|
125
|
+
# aromatic form per form until this stage picks between them; a ring too big for `thiele()` to
|
|
126
|
+
# consider gets a canonical alternation here instead, nothing later collapsing its two. AFTER
|
|
127
|
+
# step 3, whose group rules are written against the orders the drawing carried, and after step 2,
|
|
128
|
+
# whose parities would otherwise pin the very bond this stage moves.
|
|
129
|
+
standardize_kekule(molecule)
|
|
130
|
+
|
|
131
|
+
# 7. Back to the aromatic form, which is the representation callers compare. Ahead of step 8,
|
|
110
132
|
# because a mobile hydrogen is a property of the aromatic form: step 1's definite orders already
|
|
111
133
|
# say where the hydrogen is, leaving the placement stage nothing to choose.
|
|
112
134
|
# `result.refused` is not recorded on top of the pass's own records either, and for the same
|
|
113
135
|
# reason -- with the severity the aromatiser itself states, which is `REFUSED` and not a loss.
|
|
114
136
|
molecule.thiele()
|
|
115
137
|
|
|
116
|
-
#
|
|
138
|
+
# 8. Canonical placement of mobile hydrogens and charges -- what makes the two N-H forms of
|
|
117
139
|
# 4-methylimidazole hash equal. Not gated by `fix_tautomers`: that flag withholds local repair
|
|
118
140
|
# rules, and this picks which of two valid drawings to keep rather than repairing one.
|
|
119
141
|
moved = standardize_isomers(molecule)
|
|
120
142
|
|
|
121
|
-
#
|
|
143
|
+
# 9. Steps 3 to 8 again, while the placement keeps unblocking a repair. `Oc1[nH]cnc2nncc1-2` is
|
|
122
144
|
# the shape: its mobile hydrogen sits on the one ring nitrogen the hydroxy-azine rows need free,
|
|
123
|
-
# so step
|
|
145
|
+
# so step 3 declines, and by the time step 8 has moved it the repair is behind us -- the drawing
|
|
124
146
|
# kept its hydroxy form and the same compound drawn the other way got the oxo form and a
|
|
125
147
|
# different key. Only the placement is re-entered from, since it is the one stage that can put
|
|
126
148
|
# the molecule back into a shape an earlier stage would have acted on.
|
|
127
149
|
#
|
|
128
150
|
# `kekule()` leads, and not for the reason step 1 does: the `tautomer` rows are written against
|
|
129
|
-
# definite bond orders, so on the aromatic form step
|
|
130
|
-
# re-running step
|
|
131
|
-
# which is the only thing that can hand it a charged site it has not already seen.
|
|
151
|
+
# definite bond orders, so on the aromatic form step 7 left behind they match nothing at all and
|
|
152
|
+
# re-running step 3 would be a guaranteed no-op. Step 5 is re-entered only behind a repair,
|
|
153
|
+
# which is the only thing that can hand it a charged site it has not already seen. Step 6 rides
|
|
154
|
+
# with the aromatisation and not with the repair: the kekulisation above is free to come back with
|
|
155
|
+
# a different Kekule form than the one it was handed, which is the form step 7 would then read.
|
|
156
|
+
# Step 2 is not re-entered: the parities it can justify are a property of the constitution, which
|
|
157
|
+
# no stage from here on changes.
|
|
132
158
|
for _ in range(_ROUNDS_MAX):
|
|
133
159
|
if not moved:
|
|
134
160
|
break
|
|
@@ -137,7 +163,8 @@ def canonicalize(molecule: MoleculeContainer, *, fix_tautomers: bool = True,
|
|
|
137
163
|
if changed:
|
|
138
164
|
implicify_hydrogens(molecule)
|
|
139
165
|
neutralize(molecule)
|
|
140
|
-
molecule
|
|
166
|
+
standardize_kekule(molecule)
|
|
167
|
+
molecule.thiele() # unconditional: step 6's form is what a caller compares, and
|
|
141
168
|
if not changed: # the kekulisation above has to be undone either way
|
|
142
169
|
break
|
|
143
170
|
moved = standardize_isomers(molecule)
|
|
@@ -148,8 +175,10 @@ def canonicalize(molecule: MoleculeContainer, *, fix_tautomers: bool = True,
|
|
|
148
175
|
f'this molecule is not a fixed point and two drawings of it may not '
|
|
149
176
|
f'share a key', LOST))
|
|
150
177
|
|
|
151
|
-
#
|
|
152
|
-
#
|
|
178
|
+
# 10. `keep_kekule` undoes step 7 rather than skipping it: skipping 7 would skip 8 with it, and the
|
|
179
|
+
# flag would then decide which tautomer the caller gets. Step 6 is not re-run behind it and
|
|
180
|
+
# would have nothing to do: an aromatic ring is unwound into a ring holding every double bond it
|
|
181
|
+
# has room for, and which of its alternations comes back is the kekuliser's answer to give.
|
|
153
182
|
if keep_kekule:
|
|
154
183
|
molecule.kekule()
|
|
155
184
|
|
|
@@ -82,6 +82,8 @@ def check_valence(molecule: MoleculeContainer) -> list[tuple[int, str]]:
|
|
|
82
82
|
Merging them is how a coverage hole gets mistaken for bad input, so they stay apart.
|
|
83
83
|
|
|
84
84
|
An aromatic atom is a violation only when neither Kekule reading has a row, since a claim about
|
|
85
|
-
the molecule must survive every form the ring could take.
|
|
85
|
+
the molecule must survive every form the ring could take. A hydrogen is read the same way,
|
|
86
|
+
drawn or counted: `[H][Ca][H]` and the `[CaH2]` that `canonicalize()` folds it into are one
|
|
87
|
+
compound and get one verdict. Never raises and never edits.
|
|
86
88
|
"""
|
|
87
89
|
return valence_report(molecule)
|