chython 1.68__tar.gz → 3.0__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.0/LICENSE +165 -0
- chython-3.0/MANIFEST.in +14 -0
- chython-3.0/PKG-INFO +203 -0
- chython-3.0/README.md +157 -0
- chython-3.0/build_inchi.py +141 -0
- chython-3.0/chython/__init__.py +68 -0
- {chython-1.68 → chython-3.0}/chython/_functions.py +46 -2
- chython-3.0/chython/chemistry/__init__.py +86 -0
- chython-3.0/chython/chemistry/_abbreviations.py +127 -0
- chython-3.0/chython/chemistry/_canonicalize.py +152 -0
- chython-3.0/chython/chemistry/_counts.py +81 -0
- chython-3.0/chython/chemistry/_crippen.py +93 -0
- chython-3.0/chython/chemistry/_hydrogens.py +174 -0
- chython-3.0/chython/chemistry/_implicit.py +87 -0
- chython-3.0/chython/chemistry/_isomers.py +564 -0
- chython-3.0/chython/chemistry/_maccs.py +156 -0
- chython-3.0/chython/chemistry/_perceive.py +164 -0
- chython-3.0/chython/chemistry/_pharmacophore.py +83 -0
- chython-3.0/chython/chemistry/_protomers.py +215 -0
- chython-3.0/chython/chemistry/_qed.py +137 -0
- chython-3.0/chython/chemistry/_residues.py +192 -0
- chython-3.0/chython/chemistry/_resonance.py +393 -0
- chython-3.0/chython/chemistry/_salts.py +308 -0
- chython-3.0/chython/chemistry/_saturate.py +472 -0
- chython-3.0/chython/chemistry/_smarts.py +75 -0
- chython-3.0/chython/chemistry/_standardize.py +149 -0
- chython-3.0/chython/chemistry/_tables.py +1139 -0
- chython-3.0/chython/chemistry/_tpsa.py +69 -0
- chython-3.0/chython/chemistry/tables/abbreviations.tsv +93 -0
- chython-3.0/chython/chemistry/tables/acids.tsv +37 -0
- chython-3.0/chython/chemistry/tables/covalent_radii.tsv +109 -0
- chython-3.0/chython/chemistry/tables/crippen.tsv +146 -0
- chython-3.0/chython/chemistry/tables/hbond.tsv +29 -0
- chython-3.0/chython/chemistry/tables/maccs.tsv +218 -0
- chython-3.0/chython/chemistry/tables/maccs_corpus.tsv +342 -0
- chython-3.0/chython/chemistry/tables/pharmacophore.tsv +21 -0
- chython-3.0/chython/chemistry/tables/qed_alerts.tsv +86 -0
- chython-3.0/chython/chemistry/tables/residues.tsv +119 -0
- chython-3.0/chython/chemistry/tables/resonance.tsv +58 -0
- chython-3.0/chython/chemistry/tables/rotatable.tsv +11 -0
- chython-3.0/chython/chemistry/tables/salts.tsv +162 -0
- chython-3.0/chython/chemistry/tables/standardize_groups.tsv +165 -0
- chython-3.0/chython/chemistry/tables/standardize_metals.tsv +41 -0
- chython-3.0/chython/chemistry/tables/sybyl_types.tsv +75 -0
- chython-3.0/chython/chemistry/tables/tpsa.tsv +56 -0
- {chython-1.68/chython/algorithms/tautomers → chython-3.0/chython/chemistry}/test/__init__.py +1 -1
- chython-3.0/chython/chemistry/test/_corpus.py +110 -0
- chython-3.0/chython/chemistry/test/_oracle.py +49 -0
- chython-3.0/chython/chemistry/test/gen_standardize_rules.py +538 -0
- chython-3.0/chython/chemistry/test/test_abbreviations.py +231 -0
- chython-3.0/chython/chemistry/test/test_acids_tsv.py +121 -0
- chython-3.0/chython/chemistry/test/test_canonicalize.py +606 -0
- chython-3.0/chython/chemistry/test/test_counts.py +221 -0
- chython-3.0/chython/chemistry/test/test_covalent_radii_tsv.py +179 -0
- chython-3.0/chython/chemistry/test/test_crippen.py +159 -0
- chython-3.0/chython/chemistry/test/test_crippen_tsv.py +168 -0
- chython-3.0/chython/chemistry/test/test_dependency_direction.py +164 -0
- chython-3.0/chython/chemistry/test/test_featurizer_injection.py +100 -0
- chython-3.0/chython/chemistry/test/test_featurizer_tables_lazy.py +80 -0
- chython-3.0/chython/chemistry/test/test_isomers.py +390 -0
- chython-3.0/chython/chemistry/test/test_maccs.py +135 -0
- chython-3.0/chython/chemistry/test/test_maccs_corpus.py +74 -0
- chython-3.0/chython/chemistry/test/test_maccs_tsv.py +123 -0
- chython-3.0/chython/chemistry/test/test_perceive.py +226 -0
- chython-3.0/chython/chemistry/test/test_pharmacophore.py +236 -0
- chython-3.0/chython/chemistry/test/test_protomers.py +229 -0
- chython-3.0/chython/chemistry/test/test_qed.py +128 -0
- chython-3.0/chython/chemistry/test/test_qed_alerts_tsv.py +102 -0
- chython-3.0/chython/chemistry/test/test_reaction_hydrogen_repair.py +78 -0
- chython-3.0/chython/chemistry/test/test_reaction_passes.py +158 -0
- chython-3.0/chython/chemistry/test/test_residues.py +532 -0
- chython-3.0/chython/chemistry/test/test_resonance.py +288 -0
- chython-3.0/chython/chemistry/test/test_resonance_tsv.py +95 -0
- chython-3.0/chython/chemistry/test/test_salts.py +565 -0
- chython-3.0/chython/chemistry/test/test_saturate.py +737 -0
- chython-3.0/chython/chemistry/test/test_smarts.py +309 -0
- chython-3.0/chython/chemistry/test/test_standardize_differential.py +165 -0
- chython-3.0/chython/chemistry/test/test_standardize_groups_port.py +371 -0
- chython-3.0/chython/chemistry/test/test_standardize_overvalent_nitrogen.py +157 -0
- chython-3.0/chython/chemistry/test/test_standardize_rules_examples.py +170 -0
- chython-3.0/chython/chemistry/test/test_standardize_rules_merges.py +187 -0
- chython-3.0/chython/chemistry/test/test_standardize_rules_tsv.py +266 -0
- chython-3.0/chython/chemistry/test/test_thiele_is_single_purpose.py +133 -0
- chython-3.0/chython/chemistry/test/test_tpsa.py +136 -0
- chython-3.0/chython/chemistry/test/test_tpsa_tsv.py +134 -0
- chython-3.0/chython/chemistry/test/test_valence_report.py +131 -0
- chython-3.0/chython/chemistry/test/test_z_translation.py +178 -0
- chython-3.0/chython/core/RULES.md +1046 -0
- chython-3.0/chython/core/__init__.py +151 -0
- chython-3.0/chython/core/_canonical.pxi +1677 -0
- chython-3.0/chython/core/_core.pyx +164 -0
- chython-3.0/chython/core/_descriptors.pxi +1189 -0
- chython-3.0/chython/core/_elements.pxi +597 -0
- chython-3.0/chython/core/_facade.py +183 -0
- chython-3.0/chython/core/_features.pxi +447 -0
- chython-3.0/chython/core/_fingerprints.pxi +491 -0
- chython-3.0/chython/core/_hydrogens.pxi +557 -0
- chython-3.0/chython/core/_inchi.pxi +1266 -0
- chython-3.0/chython/core/_isomorphism.pxi +1138 -0
- chython-3.0/chython/core/_kekule.pxi +1757 -0
- chython-3.0/chython/core/_log.py +268 -0
- chython-3.0/chython/core/_ml.pxi +993 -0
- chython-3.0/chython/core/_molecule_arena.pxi +3051 -0
- chython-3.0/chython/core/_molecule_container.pxi +7431 -0
- chython-3.0/chython/core/_molecule_topology.pxi +339 -0
- chython-3.0/chython/core/_molecule_views.pxi +488 -0
- chython-3.0/chython/core/_morgan.pxi +226 -0
- chython-3.0/chython/core/_pach.pxi +1527 -0
- chython-3.0/chython/core/_pach3.pxi +1282 -0
- chython-3.0/chython/core/_query_arena.pxi +349 -0
- chython-3.0/chython/core/_query_boxes.pxi +879 -0
- chython-3.0/chython/core/_query_container.pxi +715 -0
- chython-3.0/chython/core/_query_seal.pxi +1855 -0
- chython-3.0/chython/core/_reaction_passes.py +606 -0
- chython-3.0/chython/core/_rings.pxi +956 -0
- chython-3.0/chython/core/_smarts_read.pxi +1211 -0
- chython-3.0/chython/core/_smiles_read.pxi +2885 -0
- chython-3.0/chython/core/_smiles_write.pxi +3610 -0
- chython-3.0/chython/core/_smirks_patch.pxi +1271 -0
- chython-3.0/chython/core/_smirks_read.pxi +1414 -0
- chython-3.0/chython/core/_sssr.pxi +75 -0
- chython-3.0/chython/core/_stereo.pxi +3613 -0
- chython-3.0/chython/core/_thiele.pxi +674 -0
- chython-3.0/chython/core/_valence.pxi +1153 -0
- chython-3.0/chython/core/elements.tsv +167 -0
- chython-3.0/chython/core/isotopes.tsv +475 -0
- chython-3.0/chython/core/reaction.py +1213 -0
- {chython-1.68/chython/reactor → chython-3.0/chython/core}/test/__init__.py +1 -2
- chython-3.0/chython/core/test/arena_v4_corpus.bin.gz +0 -0
- chython-3.0/chython/core/test/bench_ml.py +123 -0
- chython-3.0/chython/core/test/chytorch_oracle.py +162 -0
- chython-3.0/chython/core/test/gen_element_tables.py +339 -0
- chython-3.0/chython/core/test/gen_modeling_view_corpus.py +55 -0
- chython-3.0/chython/core/test/gen_pach3_corpus.py +49 -0
- chython-3.0/chython/core/test/gen_reaction_pach_corpus.py +153 -0
- chython-3.0/chython/core/test/gen_v3_fixtures.py +250 -0
- chython-3.0/chython/core/test/gen_v4_fixtures.py +116 -0
- chython-3.0/chython/core/test/gen_valence_rules.py +761 -0
- chython-3.0/chython/core/test/modeling_view_corpus.json.gz +0 -0
- chython-3.0/chython/core/test/modeling_view_corpus.py +108 -0
- chython-3.0/chython/core/test/oracle.py +707 -0
- chython-3.0/chython/core/test/pach3_corpus.py +169 -0
- chython-3.0/chython/core/test/pach_corpus.py +108 -0
- chython-3.0/chython/core/test/pach_v0_corpus.bin.gz +0 -0
- chython-3.0/chython/core/test/pach_v0_native_corpus.bin.gz +0 -0
- chython-3.0/chython/core/test/pach_v2_corpus.bin.gz +0 -0
- chython-3.0/chython/core/test/pach_v3_corpus.bin.gz +0 -0
- chython-3.0/chython/core/test/pach_v4_corpus.bin.gz +0 -0
- chython-3.0/chython/core/test/reaction_pach_corpus.py +97 -0
- chython-3.0/chython/core/test/reaction_pach_v2_corpus.bin.gz +0 -0
- chython-3.0/chython/core/test/test_aggregates.py +199 -0
- chython-3.0/chython/core/test/test_alternative_spellings.py +191 -0
- chython-3.0/chython/core/test/test_apply_scratch_probe.py +235 -0
- chython-3.0/chython/core/test/test_arena_f60.py +143 -0
- chython-3.0/chython/core/test/test_arena_identity.py +367 -0
- chython-3.0/chython/core/test/test_arena_v3_compat.py +392 -0
- chython-3.0/chython/core/test/test_arena_v4_compat.py +100 -0
- chython-3.0/chython/core/test/test_aromatic_storage.py +643 -0
- chython-3.0/chython/core/test/test_canonical.py +634 -0
- chython-3.0/chython/core/test/test_canonical_mirror.py +503 -0
- chython-3.0/chython/core/test/test_cip_storage.py +720 -0
- chython-3.0/chython/core/test/test_clean_isotopes_and_coordinate_bonds.py +207 -0
- chython-3.0/chython/core/test/test_clean_stereo.py +253 -0
- chython-3.0/chython/core/test/test_conformers.py +704 -0
- chython-3.0/chython/core/test/test_container_log.py +96 -0
- chython-3.0/chython/core/test/test_copy_caches.py +139 -0
- chython-3.0/chython/core/test/test_derive.py +177 -0
- chython-3.0/chython/core/test/test_descriptors.py +1457 -0
- chython-3.0/chython/core/test/test_element_tables.py +470 -0
- chython-3.0/chython/core/test/test_facade.py +288 -0
- chython-3.0/chython/core/test/test_features.py +675 -0
- chython-3.0/chython/core/test/test_featurizer_injection.py +52 -0
- chython-3.0/chython/core/test/test_fingerprints.py +620 -0
- chython-3.0/chython/core/test/test_geometry.py +216 -0
- chython-3.0/chython/core/test/test_h_unknown.py +458 -0
- chython-3.0/chython/core/test/test_hydrogens.py +320 -0
- chython-3.0/chython/core/test/test_inchi.py +797 -0
- chython-3.0/chython/core/test/test_interop_injection.py +125 -0
- chython-3.0/chython/core/test/test_isomorphism.py +1073 -0
- chython-3.0/chython/core/test/test_kekule.py +1201 -0
- chython-3.0/chython/core/test/test_log.py +300 -0
- chython-3.0/chython/core/test/test_magic.py +792 -0
- chython-3.0/chython/core/test/test_meta.py +76 -0
- chython-3.0/chython/core/test/test_ml_encoding.py +151 -0
- chython-3.0/chython/core/test/test_ml_reaction_transition.py +288 -0
- chython-3.0/chython/core/test/test_ml_state_view.py +263 -0
- chython-3.0/chython/core/test/test_ml_transition_view.py +180 -0
- chython-3.0/chython/core/test/test_ml_unpack_differential.py +125 -0
- chython-3.0/chython/core/test/test_modeling_view_frozen.py +86 -0
- chython-3.0/chython/core/test/test_molecule.py +1138 -0
- chython-3.0/chython/core/test/test_morgan.py +387 -0
- chython-3.0/chython/core/test/test_no_chython_two_imports.py +223 -0
- chython-3.0/chython/core/test/test_oracle.py +238 -0
- chython-3.0/chython/core/test/test_pach.py +994 -0
- chython-3.0/chython/core/test/test_pach3.py +1395 -0
- chython-3.0/chython/core/test/test_pack.py +821 -0
- chython-3.0/chython/core/test/test_query.py +1456 -0
- chython-3.0/chython/core/test/test_r_edit.py +92 -0
- chython-3.0/chython/core/test/test_r_query.py +72 -0
- chython-3.0/chython/core/test/test_r_semantics.py +308 -0
- chython-3.0/chython/core/test/test_r_serialisation.py +73 -0
- chython-3.0/chython/core/test/test_r_smirks.py +118 -0
- chython-3.0/chython/core/test/test_r_storage.py +205 -0
- chython-3.0/chython/core/test/test_reaction_container.py +489 -0
- chython-3.0/chython/core/test/test_reaction_identity.py +217 -0
- chython-3.0/chython/core/test/test_reaction_pach.py +780 -0
- chython-3.0/chython/core/test/test_reaction_passes.py +346 -0
- chython-3.0/chython/core/test/test_reaction_patch_stereo.py +162 -0
- chython-3.0/chython/core/test/test_reaction_smiles.py +333 -0
- chython-3.0/chython/core/test/test_rings.py +812 -0
- chython-3.0/chython/core/test/test_rings_c60.py +60 -0
- chython-3.0/chython/core/test/test_set_element.py +156 -0
- chython-3.0/chython/core/test/test_sgroups.py +607 -0
- chython-3.0/chython/core/test/test_smarts_read.py +1135 -0
- chython-3.0/chython/core/test/test_smiles_r.py +161 -0
- chython-3.0/chython/core/test/test_smiles_read.py +1193 -0
- chython-3.0/chython/core/test/test_smiles_roundtrip.py +345 -0
- chython-3.0/chython/core/test/test_smiles_write.py +721 -0
- chython-3.0/chython/core/test/test_smiles_write_aromatic.py +361 -0
- chython-3.0/chython/core/test/test_smiles_write_cis_trans.py +960 -0
- chython-3.0/chython/core/test/test_smiles_write_detached.py +674 -0
- chython-3.0/chython/core/test/test_smiles_write_differential.py +814 -0
- chython-3.0/chython/core/test/test_smiles_write_h_unknown.py +373 -0
- chython-3.0/chython/core/test/test_smiles_write_stereo.py +559 -0
- chython-3.0/chython/core/test/test_smiles_write_sticky.py +441 -0
- chython-3.0/chython/core/test/test_smirks_filter.py +215 -0
- chython-3.0/chython/core/test/test_smirks_patch.py +547 -0
- chython-3.0/chython/core/test/test_smirks_read.py +491 -0
- chython-3.0/chython/core/test/test_smirks_report.py +73 -0
- chython-3.0/chython/core/test/test_smirks_stereo.py +986 -0
- chython-3.0/chython/core/test/test_stereo_acceptance.py +583 -0
- chython-3.0/chython/core/test/test_stereo_parity.py +2135 -0
- chython-3.0/chython/core/test/test_stereo_perception.py +1453 -0
- chython-3.0/chython/core/test/test_stereo_query.py +1694 -0
- chython-3.0/chython/core/test/test_stereo_units.py +1192 -0
- chython-3.0/chython/core/test/test_stereo_v2_differential.py +226 -0
- chython-3.0/chython/core/test/test_structure.py +318 -0
- chython-3.0/chython/core/test/test_thiele.py +698 -0
- chython-3.0/chython/core/test/test_title.py +110 -0
- chython-3.0/chython/core/test/test_topology.py +405 -0
- chython-3.0/chython/core/test/test_union_stereo.py +167 -0
- chython-3.0/chython/core/test/test_valence.py +756 -0
- chython-3.0/chython/core/test/test_view_surface.py +320 -0
- chython-3.0/chython/core/test/v3_fixtures.py +221 -0
- chython-3.0/chython/core/test/v4_fixtures.py +33 -0
- chython-3.0/chython/core/valence_rules.tsv +1089 -0
- chython-3.0/chython/core/wedge.py +1510 -0
- chython-3.0/chython/depict/__init__.py +52 -0
- chython-3.0/chython/depict/_config.py +78 -0
- chython-3.0/chython/depict/_hooks.py +41 -0
- chython-3.0/chython/depict/bonds.py +671 -0
- chython-3.0/chython/depict/colorbar.py +145 -0
- chython-3.0/chython/depict/colormap.py +302 -0
- chython-3.0/chython/depict/field.py +686 -0
- chython-3.0/chython/depict/figure.py +300 -0
- chython-3.0/chython/depict/label.py +500 -0
- {chython-1.68/chython/algorithms/aromatics → chython-3.0/chython/depict/layout}/__init__.py +8 -7
- chython-3.0/chython/depict/layout/clean2d.js +3 -0
- chython-3.0/chython/depict/layout/molecule.py +466 -0
- chython-3.0/chython/depict/layout/reaction.py +118 -0
- chython-3.0/chython/depict/metrics/__init__.py +161 -0
- chython-3.0/chython/depict/metrics/helvetica.tsv +332 -0
- chython-3.0/chython/depict/metrics/times.tsv +332 -0
- chython-3.0/chython/depict/overlay.py +752 -0
- {chython-1.68/chython/algorithms/fingerprints → chython-3.0/chython/depict/render}/__init__.py +8 -8
- chython-3.0/chython/depict/render/svg.py +216 -0
- chython-3.0/chython/depict/scene.py +526 -0
- chython-3.0/chython/depict/style.py +457 -0
- {chython-1.68/chython/algorithms → chython-3.0/chython/depict/test}/__init__.py +1 -1
- chython-3.0/chython/depict/test/test_bonds.py +1223 -0
- chython-3.0/chython/depict/test/test_clean2d.py +713 -0
- chython-3.0/chython/depict/test/test_colorbar.py +276 -0
- chython-3.0/chython/depict/test/test_colormap.py +201 -0
- chython-3.0/chython/depict/test/test_field.py +519 -0
- chython-3.0/chython/depict/test/test_figure.py +957 -0
- chython-3.0/chython/depict/test/test_label.py +803 -0
- chython-3.0/chython/depict/test/test_metrics.py +178 -0
- chython-3.0/chython/depict/test/test_overlay.py +469 -0
- chython-3.0/chython/depict/test/test_package.py +276 -0
- chython-3.0/chython/depict/test/test_r_atom.py +80 -0
- chython-3.0/chython/depict/test/test_scene.py +341 -0
- chython-3.0/chython/depict/test/test_style.py +228 -0
- chython-3.0/chython/depict/test/test_svg.py +358 -0
- chython-3.0/chython/depict/test/test_wedge_draw.py +1049 -0
- chython-3.0/chython/depict/test/test_x3dom.py +179 -0
- chython-3.0/chython/depict/wedge.py +383 -0
- chython-3.0/chython/depict/x3dom.py +372 -0
- {chython-1.68 → chython-3.0}/chython/exceptions.py +41 -25
- chython-3.0/chython/formats/__init__.py +68 -0
- chython-1.68/chython/algorithms/standardize/__init__.py → chython-3.0/chython/formats/_text.py +12 -9
- chython-3.0/chython/formats/ctfile/CTFILE.md +646 -0
- chython-3.0/chython/formats/ctfile/__init__.py +53 -0
- chython-3.0/chython/formats/ctfile/_ctab.py +481 -0
- chython-3.0/chython/formats/ctfile/_errors.py +40 -0
- chython-3.0/chython/formats/ctfile/_facade.py +164 -0
- chython-3.0/chython/formats/ctfile/_hydrogens.py +504 -0
- chython-3.0/chython/formats/ctfile/_rdf.py +688 -0
- chython-3.0/chython/formats/ctfile/_rxn.py +389 -0
- chython-3.0/chython/formats/ctfile/_sdf.py +245 -0
- chython-3.0/chython/formats/ctfile/_sgroup.py +546 -0
- chython-3.0/chython/formats/ctfile/_stream.py +307 -0
- chython-3.0/chython/formats/ctfile/_tokens.py +321 -0
- chython-3.0/chython/formats/ctfile/_v2000.py +958 -0
- chython-3.0/chython/formats/ctfile/_v3000.py +848 -0
- chython-3.0/chython/formats/ctfile/test/__init__.py +0 -0
- chython-3.0/chython/formats/ctfile/test/conftest.py +112 -0
- chython-3.0/chython/formats/ctfile/test/test_aromatic.py +345 -0
- chython-3.0/chython/formats/ctfile/test/test_container_log.py +229 -0
- chython-3.0/chython/formats/ctfile/test/test_data_labels.py +180 -0
- chython-3.0/chython/formats/ctfile/test/test_facade.py +341 -0
- chython-3.0/chython/formats/ctfile/test/test_fidelity.py +529 -0
- chython-3.0/chython/formats/ctfile/test/test_hydrogens.py +887 -0
- chython-3.0/chython/formats/ctfile/test/test_r_atom.py +330 -0
- chython-3.0/chython/formats/ctfile/test/test_rdf.py +1605 -0
- chython-3.0/chython/formats/ctfile/test/test_rxn.py +404 -0
- chython-3.0/chython/formats/ctfile/test/test_sdf.py +300 -0
- chython-3.0/chython/formats/ctfile/test/test_sgroup.py +436 -0
- chython-3.0/chython/formats/ctfile/test/test_stream.py +379 -0
- chython-3.0/chython/formats/ctfile/test/test_tokens.py +272 -0
- chython-3.0/chython/formats/ctfile/test/test_v2000.py +608 -0
- chython-3.0/chython/formats/ctfile/test/test_v3000.py +746 -0
- chython-3.0/chython/formats/ctfile/test/test_wedge.py +2274 -0
- chython-3.0/chython/formats/mol2.py +812 -0
- chython-3.0/chython/formats/pdb/__init__.py +36 -0
- chython-3.0/chython/formats/pdb/_builder.py +632 -0
- chython-3.0/chython/formats/pdb/_legacy.py +519 -0
- chython-3.0/chython/formats/pdb/_mmcif.py +666 -0
- chython-3.0/chython/formats/pdb/_records.py +242 -0
- chython-3.0/chython/formats/pdb/_star.py +453 -0
- {chython-1.68/chython/algorithms/stereo → chython-3.0/chython/formats/test}/__init__.py +1 -6
- chython-3.0/chython/formats/test/conftest.py +76 -0
- chython-3.0/chython/formats/test/oracles.py +1995 -0
- chython-3.0/chython/formats/test/test_conformance.py +638 -0
- chython-3.0/chython/formats/test/test_done_when.py +84 -0
- chython-3.0/chython/formats/test/test_isolation.py +100 -0
- chython-3.0/chython/formats/test/test_log_prefix.py +199 -0
- chython-3.0/chython/formats/test/test_mmcif.py +1084 -0
- chython-3.0/chython/formats/test/test_mol2.py +1360 -0
- chython-3.0/chython/formats/test/test_no_review_bookkeeping.py +96 -0
- chython-3.0/chython/formats/test/test_oracles.py +133 -0
- chython-3.0/chython/formats/test/test_pdb.py +726 -0
- chython-3.0/chython/formats/test/test_pdb_builder.py +924 -0
- chython-3.0/chython/formats/test/test_perceive_agreement.py +116 -0
- chython-3.0/chython/formats/test/test_read_only_facades.py +96 -0
- chython-3.0/chython/formats/test/test_xyz.py +869 -0
- chython-3.0/chython/formats/test/test_xyz_builder.py +149 -0
- chython-3.0/chython/formats/xml/__init__.py +50 -0
- chython-3.0/chython/formats/xml/_cml.py +972 -0
- chython-3.0/chython/formats/xml/_dialect.py +958 -0
- chython-3.0/chython/formats/xml/_errors.py +46 -0
- chython-3.0/chython/formats/xml/_facade.py +77 -0
- chython-3.0/chython/formats/xml/_mrv.py +1243 -0
- chython-3.0/chython/formats/xml/_tree.py +315 -0
- chython-3.0/chython/formats/xml/test/__init__.py +0 -0
- chython-3.0/chython/formats/xml/test/conftest.py +79 -0
- chython-3.0/chython/formats/xml/test/test_cml.py +1282 -0
- chython-3.0/chython/formats/xml/test/test_container_log.py +112 -0
- chython-3.0/chython/formats/xml/test/test_dialect.py +729 -0
- chython-3.0/chython/formats/xml/test/test_equivalence.py +346 -0
- chython-3.0/chython/formats/xml/test/test_facade.py +96 -0
- chython-3.0/chython/formats/xml/test/test_mrv.py +1250 -0
- chython-3.0/chython/formats/xml/test/test_mrv_census.py +459 -0
- chython-3.0/chython/formats/xml/test/test_tree.py +355 -0
- chython-3.0/chython/formats/xyz.py +520 -0
- chython-3.0/chython/interop/__init__.py +179 -0
- chython-3.0/chython/interop/_cdk.py +527 -0
- chython-3.0/chython/interop/_cdpkit.py +191 -0
- chython-3.0/chython/interop/_indigo.py +322 -0
- chython-3.0/chython/interop/_iupac.py +94 -0
- chython-3.0/chython/interop/_java.py +65 -0
- chython-3.0/chython/interop/_openbabel.py +334 -0
- chython-1.68/chython/utils/__init__.py → chython-3.0/chython/interop/_pandas.py +19 -23
- chython-3.0/chython/interop/_rdkit.py +638 -0
- chython-3.0/chython/interop/_records.py +62 -0
- chython-3.0/chython/interop/_stereo.py +140 -0
- chython-3.0/chython/interop/config.py +93 -0
- chython-3.0/chython/interop/conformers.py +143 -0
- chython-3.0/chython/interop/test/__init__.py +0 -0
- chython-3.0/chython/interop/test/conftest.py +79 -0
- chython-3.0/chython/interop/test/test_cdk.py +358 -0
- chython-3.0/chython/interop/test/test_cdpkit.py +458 -0
- chython-3.0/chython/interop/test/test_config.py +181 -0
- chython-3.0/chython/interop/test/test_conformers.py +248 -0
- chython-3.0/chython/interop/test/test_coordinate_honesty.py +55 -0
- chython-3.0/chython/interop/test/test_dispatch.py +189 -0
- chython-3.0/chython/interop/test/test_indigo.py +553 -0
- chython-3.0/chython/interop/test/test_iupac.py +147 -0
- chython-3.0/chython/interop/test/test_log_delivery.py +189 -0
- chython-3.0/chython/interop/test/test_openbabel.py +429 -0
- chython-3.0/chython/interop/test/test_pandas.py +105 -0
- chython-3.0/chython/interop/test/test_rdkit.py +860 -0
- chython-3.0/chython/interop/test/test_stereo.py +143 -0
- chython-3.0/chython/interop/test/test_v2_oracle.py +480 -0
- chython-3.0/chython/reactions/__init__.py +62 -0
- chython-3.0/chython/reactions/_enumerate.py +447 -0
- chython-3.0/chython/reactions/_numbering.py +102 -0
- chython-3.0/chython/reactions/_reconstruct.py +415 -0
- chython-3.0/chython/reactions/_stickers.py +169 -0
- chython-3.0/chython/reactions/_tables.py +513 -0
- chython-3.0/chython/reactions/attention/__init__.py +137 -0
- chython-3.0/chython/reactions/attention/_assign.py +102 -0
- chython-3.0/chython/reactions/attention/_encode.py +176 -0
- chython-3.0/chython/reactions/attention/_session.py +91 -0
- chython-3.0/chython/reactions/tables/functional.tsv +310 -0
- chython-3.0/chython/reactions/tables/protective.tsv +138 -0
- chython-3.0/chython/reactions/tables/reactions.tsv +427 -0
- chython-3.0/chython/reactions/tables/roles.tsv +93 -0
- chython-3.0/chython/reactions/test/__init__.py +18 -0
- chython-3.0/chython/reactions/test/_frozen_ids.py +776 -0
- chython-3.0/chython/reactions/test/gen_corpus_glossary.py +146 -0
- chython-3.0/chython/reactions/test/golden_subset.smi +32 -0
- chython-3.0/chython/reactions/test/test_attention.py +380 -0
- chython-3.0/chython/reactions/test/test_attention_assign.py +174 -0
- chython-3.0/chython/reactions/test/test_attention_encode.py +223 -0
- chython-3.0/chython/reactions/test/test_attention_isolation.py +212 -0
- chython-3.0/chython/reactions/test/test_corpus_glossary.py +91 -0
- chython-3.0/chython/reactions/test/test_dependency_direction.py +166 -0
- chython-3.0/chython/reactions/test/test_enumerate.py +451 -0
- chython-3.0/chython/reactions/test/test_functional.py +55 -0
- chython-3.0/chython/reactions/test/test_id_stability.py +147 -0
- chython-3.0/chython/reactions/test/test_numbering.py +107 -0
- chython-3.0/chython/reactions/test/test_probes.py +90 -0
- chython-3.0/chython/reactions/test/test_protective.py +560 -0
- chython-3.0/chython/reactions/test/test_reconstruct.py +456 -0
- chython-3.0/chython/reactions/test/test_roles.py +140 -0
- chython-3.0/chython/reactions/test/test_stickers.py +221 -0
- chython-3.0/chython/reactions/test/test_tables.py +421 -0
- {chython-1.68/chython/algorithms/mapping → chython-3.0/chython/test}/__init__.py +6 -10
- chython-3.0/chython/test/test_code_hygiene.py +184 -0
- chython-3.0/chython/test/test_container_methods.py +200 -0
- chython-3.0/chython/test/test_doc_figures.py +196 -0
- chython-3.0/chython/test/test_doc_references.py +163 -0
- chython-3.0/chython/test/test_doc_samples.py +256 -0
- chython-3.0/chython/test/test_facade_names.py +198 -0
- chython-3.0/chython/test/test_hydrogen_parity.py +315 -0
- chython-3.0/chython/test/test_libinchi_staging.py +253 -0
- chython-3.0/chython/test/test_log_records.py +84 -0
- chython-3.0/chython/test/test_optional_numpy.py +239 -0
- chython-3.0/chython/test/test_packaging.py +271 -0
- chython-3.0/chython/test/test_performance.py +515 -0
- chython-3.0/chython/test/test_r_atom_integration.py +88 -0
- chython-3.0/chython/test/test_release_build.py +210 -0
- chython-3.0/chython/test/test_stereo_bluebook.py +713 -0
- chython-3.0/chython/test/test_v2_boundary.py +358 -0
- chython-3.0/chython.egg-info/PKG-INFO +203 -0
- chython-3.0/chython.egg-info/SOURCES.txt +450 -0
- chython-3.0/chython.egg-info/dependency_links.txt +1 -0
- chython-3.0/chython.egg-info/requires.txt +25 -0
- chython-3.0/chython.egg-info/top_level.txt +1 -0
- chython-3.0/pyproject.toml +194 -0
- chython-3.0/setup.cfg +4 -0
- chython-3.0/setup.py +191 -0
- chython-1.68/INCHI/libinchi.dll +0 -0
- chython-1.68/INCHI/libinchi.dynlib +0 -0
- chython-1.68/INCHI/libinchi.so +0 -0
- chython-1.68/PKG-INFO +0 -82
- chython-1.68/README.rst +0 -56
- chython-1.68/chython/__init__.py +0 -31
- chython-1.68/chython/algorithms/_isomorphism.c +0 -30100
- chython-1.68/chython/algorithms/_isomorphism.pyx +0 -158
- chython-1.68/chython/algorithms/aromatics/_rules.py +0 -110
- chython-1.68/chython/algorithms/aromatics/kekule.py +0 -521
- chython-1.68/chython/algorithms/aromatics/thiele.py +0 -233
- chython-1.68/chython/algorithms/calculate2d/__init__.py +0 -208
- chython-1.68/chython/algorithms/calculate2d/clean2d.js +0 -1
- chython-1.68/chython/algorithms/depict.py +0 -533
- chython-1.68/chython/algorithms/fingerprints/linear.py +0 -153
- chython-1.68/chython/algorithms/fingerprints/morgan.py +0 -99
- chython-1.68/chython/algorithms/isomorphism.py +0 -587
- chython-1.68/chython/algorithms/mapping/_groups.py +0 -94
- chython-1.68/chython/algorithms/mapping/_reactions.py +0 -72
- chython-1.68/chython/algorithms/mapping/attention.py +0 -207
- chython-1.68/chython/algorithms/mapping/fixmapper.py +0 -84
- chython-1.68/chython/algorithms/mapping/groups.py +0 -137
- chython-1.68/chython/algorithms/mcs.py +0 -202
- chython-1.68/chython/algorithms/morgan.py +0 -84
- chython-1.68/chython/algorithms/rings.py +0 -566
- chython-1.68/chython/algorithms/smiles.py +0 -615
- chython-1.68/chython/algorithms/standardize/_charged.py +0 -115
- chython-1.68/chython/algorithms/standardize/_groups.py +0 -1049
- chython-1.68/chython/algorithms/standardize/_metal_organics.py +0 -189
- chython-1.68/chython/algorithms/standardize/_reagents.py +0 -44
- chython-1.68/chython/algorithms/standardize/_salts.py +0 -68
- chython-1.68/chython/algorithms/standardize/molecule.py +0 -509
- chython-1.68/chython/algorithms/standardize/reaction.py +0 -433
- chython-1.68/chython/algorithms/standardize/resonance.py +0 -187
- chython-1.68/chython/algorithms/standardize/salts.py +0 -135
- chython-1.68/chython/algorithms/standardize/saturation.py +0 -372
- chython-1.68/chython/algorithms/stereo/graph.py +0 -449
- chython-1.68/chython/algorithms/stereo/molecule.py +0 -809
- chython-1.68/chython/algorithms/tautomers/__init__.py +0 -239
- chython-1.68/chython/algorithms/tautomers/_acid.py +0 -59
- chython-1.68/chython/algorithms/tautomers/_base.py +0 -112
- chython-1.68/chython/algorithms/tautomers/_keto_enol.py +0 -107
- chython-1.68/chython/algorithms/tautomers/acid_base.py +0 -201
- chython-1.68/chython/algorithms/tautomers/heteroarenes.py +0 -103
- chython-1.68/chython/algorithms/tautomers/keto_enol.py +0 -142
- chython-1.68/chython/algorithms/tautomers/test/test_tautomers.py +0 -80
- chython-1.68/chython/algorithms/x3dom.py +0 -350
- chython-1.68/chython/containers/__init__.py +0 -28
- chython-1.68/chython/containers/_cpack.c +0 -28340
- chython-1.68/chython/containers/_cpack.pyx +0 -211
- chython-1.68/chython/containers/_pack.c +0 -10171
- chython-1.68/chython/containers/_pack.pyx +0 -272
- chython-1.68/chython/containers/_unpack.c +0 -29422
- chython-1.68/chython/containers/_unpack.pyx +0 -335
- chython-1.68/chython/containers/bonds.py +0 -258
- chython-1.68/chython/containers/cgr.py +0 -153
- chython-1.68/chython/containers/graph.py +0 -300
- chython-1.68/chython/containers/molecule.py +0 -1144
- chython-1.68/chython/containers/query.py +0 -329
- chython-1.68/chython/containers/reaction.py +0 -334
- chython-1.68/chython/files/MRVrw.py +0 -531
- chython-1.68/chython/files/PDBrw.py +0 -250
- chython-1.68/chython/files/RDFrw.py +0 -298
- chython-1.68/chython/files/SDFrw.py +0 -222
- chython-1.68/chython/files/__init__.py +0 -29
- chython-1.68/chython/files/_convert.py +0 -105
- chython-1.68/chython/files/_mapping.py +0 -109
- chython-1.68/chython/files/_mdl/__init__.py +0 -25
- chython-1.68/chython/files/_mdl/emol.py +0 -211
- chython-1.68/chython/files/_mdl/erxn.py +0 -67
- chython-1.68/chython/files/_mdl/mol.py +0 -160
- chython-1.68/chython/files/_mdl/read.py +0 -225
- chython-1.68/chython/files/_mdl/rxn.py +0 -67
- chython-1.68/chython/files/_mdl/stereo.py +0 -95
- chython-1.68/chython/files/_mdl/write.py +0 -173
- chython-1.68/chython/files/_xyz.c +0 -26818
- chython-1.68/chython/files/_xyz.pyx +0 -74
- chython-1.68/chython/files/daylight/__init__.py +0 -24
- chython-1.68/chython/files/daylight/parser.py +0 -162
- chython-1.68/chython/files/daylight/smarts.py +0 -121
- chython-1.68/chython/files/daylight/smiles.py +0 -324
- chython-1.68/chython/files/daylight/tokenize.py +0 -401
- chython-1.68/chython/files/inchi.py +0 -574
- chython-1.68/chython/files/xyz.py +0 -85
- chython-1.68/chython/periodictable/__init__.py +0 -59
- chython-1.68/chython/periodictable/element/__init__.py +0 -27
- chython-1.68/chython/periodictable/element/core.py +0 -118
- chython-1.68/chython/periodictable/element/dynamic.py +0 -100
- chython-1.68/chython/periodictable/element/element.py +0 -366
- chython-1.68/chython/periodictable/element/query.py +0 -318
- chython-1.68/chython/periodictable/groupI.py +0 -220
- chython-1.68/chython/periodictable/groupII.py +0 -199
- chython-1.68/chython/periodictable/groupIII.py +0 -1026
- chython-1.68/chython/periodictable/groupIV.py +0 -194
- chython-1.68/chython/periodictable/groupIX.py +0 -180
- chython-1.68/chython/periodictable/groupV.py +0 -176
- chython-1.68/chython/periodictable/groupVI.py +0 -167
- chython-1.68/chython/periodictable/groupVII.py +0 -146
- chython-1.68/chython/periodictable/groupVIII.py +0 -145
- chython-1.68/chython/periodictable/groupX.py +0 -146
- chython-1.68/chython/periodictable/groupXI.py +0 -146
- chython-1.68/chython/periodictable/groupXII.py +0 -142
- chython-1.68/chython/periodictable/groupXIII.py +0 -207
- chython-1.68/chython/periodictable/groupXIV.py +0 -213
- chython-1.68/chython/periodictable/groupXV.py +0 -219
- chython-1.68/chython/periodictable/groupXVI.py +0 -400
- chython-1.68/chython/periodictable/groupXVII.py +0 -263
- chython-1.68/chython/periodictable/groupXVIII.py +0 -232
- chython-1.68/chython/periodictable/groups.py +0 -90
- chython-1.68/chython/periodictable/periods.py +0 -46
- chython-1.68/chython/reactor/__init__.py +0 -24
- chython-1.68/chython/reactor/base.py +0 -265
- chython-1.68/chython/reactor/deprotection.py +0 -543
- chython-1.68/chython/reactor/reactions.py +0 -162
- chython-1.68/chython/reactor/reactor.py +0 -166
- chython-1.68/chython/reactor/test/test_deprotection.py +0 -55
- chython-1.68/chython/reactor/transformer.py +0 -59
- chython-1.68/chython/utils/free_wilson.py +0 -114
- chython-1.68/chython/utils/functional_groups.py +0 -53
- chython-1.68/chython/utils/grid.py +0 -123
- chython-1.68/chython/utils/rdkit.py +0 -189
- chython-1.68/chython/utils/retro.py +0 -133
- chython-1.68/chython/utils/svg.py +0 -57
- chython-1.68/setup.py +0 -105
chython-3.0/LICENSE
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
chython-3.0/MANIFEST.in
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# What an sdist needs beyond the installed package, i.e. what it takes to BUILD rather than to run.
|
|
2
|
+
#
|
|
3
|
+
# `setup.py` cythonizes from source, so the .pyx modules and the .pxi layers they include must be in
|
|
4
|
+
# the sdist or an install from it cannot compile. `build_inchi.py` likewise: setup.py imports it.
|
|
5
|
+
recursive-include chython *.pyx *.pxi
|
|
6
|
+
include build_inchi.py
|
|
7
|
+
|
|
8
|
+
# Generated C is excluded on purpose. It is checked in for the developer loop, but shipping it lets
|
|
9
|
+
# an sdist install compile a stale translation unit against fresh .pyx sources without saying so.
|
|
10
|
+
recursive-exclude chython *.c
|
|
11
|
+
|
|
12
|
+
# Nor do built artefacts belong in a source distribution -- that is the failure the migration away
|
|
13
|
+
# from the copy-back build removed, and an sdist is the other door into it.
|
|
14
|
+
recursive-exclude chython *.so *.pyd *.dylib *.dll
|
chython-3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: chython
|
|
3
|
+
Version: 3.0
|
|
4
|
+
Summary: Library for processing molecules and reactions in python way
|
|
5
|
+
Author-email: Ramil Nugmanov <nougmanoff@protonmail.com>
|
|
6
|
+
License-Expression: LGPL-3.0-or-later
|
|
7
|
+
Project-URL: homepage, https://github.com/chython/chython
|
|
8
|
+
Project-URL: documentation, https://chython.readthedocs.io
|
|
9
|
+
Classifier: Environment :: Plugins
|
|
10
|
+
Classifier: Intended Audience :: Science/Research
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering
|
|
20
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
21
|
+
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
22
|
+
Classifier: Topic :: Software Development
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
24
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Requires-Dist: quickjs-ng>=0.16
|
|
29
|
+
Provides-Extra: ml
|
|
30
|
+
Requires-Dist: numpy>=1.21.0; extra == "ml"
|
|
31
|
+
Provides-Extra: mapping
|
|
32
|
+
Requires-Dist: numpy>=1.21.0; extra == "mapping"
|
|
33
|
+
Requires-Dist: onnxruntime>=1.16; extra == "mapping"
|
|
34
|
+
Requires-Dist: chython-rxnmap>=2.0; extra == "mapping"
|
|
35
|
+
Provides-Extra: rdkit
|
|
36
|
+
Requires-Dist: rdkit>=2025.9; extra == "rdkit"
|
|
37
|
+
Provides-Extra: extra-clean2d
|
|
38
|
+
Requires-Dist: jpype1>=1.6.0; extra == "extra-clean2d"
|
|
39
|
+
Requires-Dist: openbabel-wheel>=3.1.1.22; extra == "extra-clean2d"
|
|
40
|
+
Requires-Dist: epam.indigo>=1.45; extra == "extra-clean2d"
|
|
41
|
+
Provides-Extra: extra-clean3d
|
|
42
|
+
Requires-Dist: cdpkit>=1.2.3; extra == "extra-clean3d"
|
|
43
|
+
Provides-Extra: iupac
|
|
44
|
+
Requires-Dist: openclatura>=0.2; python_version >= "3.11" and extra == "iupac"
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
|
|
47
|
+
<p align="center">
|
|
48
|
+
<img src="docs/logo256.png" width="256" alt="chython logo"/>
|
|
49
|
+
</p>
|
|
50
|
+
|
|
51
|
+
<h1 align="center">Chython [ˈkʌɪθ(ə)n]</h1>
|
|
52
|
+
|
|
53
|
+
<p align="center">
|
|
54
|
+
<a href="https://pypi.org/project/chython/"><img src="https://img.shields.io/pypi/v/chython.svg" alt="PyPI version"/></a>
|
|
55
|
+
<a href="https://pypi.org/project/chython/"><img src="https://img.shields.io/pypi/pyversions/chython.svg" alt="Python versions"/></a>
|
|
56
|
+
<a href="https://github.com/chython/chython/blob/master/LICENSE"><img src="https://img.shields.io/pypi/l/chython.svg" alt="License: LGPLv3"/></a>
|
|
57
|
+
<a href="https://chython.readthedocs.io"><img src="https://img.shields.io/readthedocs/chython.svg" alt="Documentation"/></a>
|
|
58
|
+
<a href="https://app.codecov.io/gh/chython/chython"><img src="https://img.shields.io/codecov/c/github/chython/chython/master?label=python%20coverage" alt="Coverage of the Python layers"/></a>
|
|
59
|
+
</p>
|
|
60
|
+
|
|
61
|
+
Library for processing molecules and reactions in a Python way.
|
|
62
|
+
|
|
63
|
+
## Features
|
|
64
|
+
|
|
65
|
+
**File formats**
|
|
66
|
+
|
|
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)
|
|
68
|
+
- Read SMARTS and SMIRKS, Tripos MOL2, PDBx/mmCIF, legacy PDB, XYZ, and IUPAC names through OPSIN
|
|
69
|
+
- Compact binary (de)serialization — `pach` for a wire record, `mol.to_bytes()` for the arena buffer — and full pickle support
|
|
70
|
+
- 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
|
|
71
|
+
|
|
72
|
+
**Input is unreliable by default**
|
|
73
|
+
|
|
74
|
+
A reader stores and logs what a file says — an illegal valence, a nonsense charge, an underivable
|
|
75
|
+
hydrogen count — and never rejects a record for being chemically wrong. Repair is a pipeline you run
|
|
76
|
+
afterwards: `kekule()`, `standardize()`, `fix_resonance()`, `thiele()`.
|
|
77
|
+
|
|
78
|
+
**Toolkit interoperability**
|
|
79
|
+
|
|
80
|
+
Conversions build the target structure directly from the graph, so atom order matches
|
|
81
|
+
`atoms()` and stereo is carried over without needing a 2D layout. Each toolkit has one callable in
|
|
82
|
+
`chython.interop` that dispatches on its argument, and the export direction is also a container method.
|
|
83
|
+
|
|
84
|
+
| Toolkit | API | Requires |
|
|
85
|
+
|---------|-----|----------|
|
|
86
|
+
| RDKit | `mol.to_rdkit()`, `rxn.to_rdkit()`, `chython.interop.rdkit()` both ways | extra `rdkit` |
|
|
87
|
+
| Open Babel | `mol.to_openbabel()` | extra `extra-clean2d` |
|
|
88
|
+
| Indigo | `mol.to_indigo()` | extra `extra-clean2d` |
|
|
89
|
+
| CDK | `mol.to_cdk()` | extra `extra-clean2d` + `cdk.jar` (`CDK_PATH`) |
|
|
90
|
+
| CDPKit | `mol.to_cdpkit()`, and 3D conformers (`conformer_engine = 'cdpkit'`) | extra `extra-clean3d` |
|
|
91
|
+
|
|
92
|
+
RDKit is the only one of the five with a reaction form.
|
|
93
|
+
|
|
94
|
+
Allene stereo is not portable through any of these toolkits. Indigo additionally omits
|
|
95
|
+
cis-trans, which it derives from 2D coordinates.
|
|
96
|
+
|
|
97
|
+
**IUPAC names, both directions**
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
from chython import iupac
|
|
101
|
+
|
|
102
|
+
mol = iupac('ethanol') # name -> structure, via OPSIN
|
|
103
|
+
mol.iupac # 'ethanol' -- structure -> name, via openclatura
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`iupac()` needs JPype and `opsin.jar` (`OPSIN_PATH`); the `.iupac` property needs the
|
|
107
|
+
`iupac` extra (Python >= 3.11) and returns `None` when the structure cannot be named.
|
|
108
|
+
|
|
109
|
+
**Molecules**
|
|
110
|
+
|
|
111
|
+
- Atoms and bonds in one contiguous buffer, addressed by an id that survives editing; edits go through
|
|
112
|
+
an explicit session (`with mol.edit() as e:`) and derived data is recomputed on seal
|
|
113
|
+
- Standardize, canonicalize, kekulize/aromatize, repair resonance forms, neutralize, put a mobile
|
|
114
|
+
hydrogen and charge where the canonical order says, check valences
|
|
115
|
+
- Split and decompose salts, expand contracted groups, derive implicit hydrogen counts
|
|
116
|
+
- Many 3D models per molecule in one conformer store
|
|
117
|
+
- Tetrahedral, cis-trans, allene, atropisomer and helical stereo, with CIP labels
|
|
118
|
+
- Descriptors: TPSA, Crippen logP and MR, hydrogen-bond donors and acceptors, rotatable bonds, ring
|
|
119
|
+
counts, Bertz CT, Randić and Zagreb indices
|
|
120
|
+
- The 166 MACCS structural keys, one-based, and QED with its three published weight sets — both state
|
|
121
|
+
what they transcribe and neither claims parity with another implementation's bits or score
|
|
122
|
+
- Morgan and linear fingerprints with Tanimoto similarity, as hash sets, folded bit vectors or count
|
|
123
|
+
vectors, and the graph matrices and distance-derived descriptors — extra `ml`
|
|
124
|
+
- A molecule or a mapped reaction as `int32` arrays for a model: `mol.state_view()`,
|
|
125
|
+
`rxn.transition_view()` — extra `ml`
|
|
126
|
+
|
|
127
|
+
**Search**
|
|
128
|
+
|
|
129
|
+
- Subgraph isomorphism
|
|
130
|
+
- SMARTS parser with chython-specific query semantics, including component grouping for intramolecular
|
|
131
|
+
patterns
|
|
132
|
+
|
|
133
|
+
**Reactions**
|
|
134
|
+
|
|
135
|
+
- Template application from SMIRKS: `mol.react(template)`, or `mol @ other` for a two-component join
|
|
136
|
+
- Reaction enumeration over the shipped reaction corpus
|
|
137
|
+
- Functional and protective group detection and deprotection, with the whole corpus in the docs
|
|
138
|
+
- Sticky fragment / linker enumeration for combinatorial reassembly
|
|
139
|
+
- Atom-to-atom mapping reconstruction against a template corpus: `rxn.reconstruct_mapping()`
|
|
140
|
+
- Reaction-level standardization: each molecule pass once per molecule, plus the passes a loop cannot do
|
|
141
|
+
|
|
142
|
+
**Depiction**
|
|
143
|
+
|
|
144
|
+
- 2D coordinate generation, default [SmilesDrawer](https://github.com/reymond-group/smilesDrawer), switchable to RDKit/CDK/Open Babel/Indigo (`clean2d_engine`)
|
|
145
|
+
- SVG and SVGZ output with Jupyter support, and scalar data overlaid on the same scene
|
|
146
|
+
- 3D: a stored conformer as an X3DOM document (`mol.depict3d()`) or a notebook widget (`mol.view3d()`)
|
|
147
|
+
- 3D conformer generation with RDKit or CDPKit (`conformer_engine`)
|
|
148
|
+
|
|
149
|
+
Full documentation can be found [here](https://chython.readthedocs.io).
|
|
150
|
+
|
|
151
|
+
## Install
|
|
152
|
+
|
|
153
|
+
Only Python 3.10+.
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
pip install chython
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The default 2D layout backend needs no extra: its JS engine (QuickJS) is a required dependency and
|
|
160
|
+
costs under 2.5 MB.
|
|
161
|
+
|
|
162
|
+
A plain install has **no numpy**, and that is deliberate — the base install is about 7.5 MB of runtime
|
|
163
|
+
files, small enough for a serverless bundle. Reading and writing every format, `standardize()`,
|
|
164
|
+
`kekule()`, `thiele()`, `canonicalize()`, stereo, substructure matching, template application and
|
|
165
|
+
depiction all work without it. What needs `chython[ml]` is the surface that answers a numpy array: the
|
|
166
|
+
fingerprints, `atom_invariants`, `adjacency_matrix`, `distance_matrix`, the distance-derived graph
|
|
167
|
+
descriptors, `pharmacophore_invariants`, `maccs_keys()`/`maccs_bit_set()` and the ML views. Each of
|
|
168
|
+
those raises an `ImportError` naming the extra when you call it, so nothing fails at import time.
|
|
169
|
+
|
|
170
|
+
Optional extras, combinable (`chython[rdkit,iupac]`):
|
|
171
|
+
|
|
172
|
+
| Extra | Enables |
|
|
173
|
+
|-------|---------|
|
|
174
|
+
| `ml` | numpy, and with it fingerprints, atom invariants, the graph matrices, the descriptors built on them and the ML views |
|
|
175
|
+
| `rdkit` | RDKit conversion both ways, RDKit 2D layout and 3D conformers |
|
|
176
|
+
| `iupac` | `molecule.iupac` name generation (Python >= 3.11) |
|
|
177
|
+
| `extra-clean2d` | CDK, Open Babel and Indigo backends (CDK also needs `cdk.jar`) |
|
|
178
|
+
| `extra-clean3d` | CDPKit conformer engine |
|
|
179
|
+
|
|
180
|
+
## CGRtools
|
|
181
|
+
|
|
182
|
+
Chython is a fork of [CGRtools](https://github.com/stsouko/CGRtools).
|
|
183
|
+
|
|
184
|
+
## Copyright
|
|
185
|
+
|
|
186
|
+
- 2014-2026 Ramil Nugmanov <nougmanoff@protonmail.com> main developer
|
|
187
|
+
|
|
188
|
+
## Contributors
|
|
189
|
+
|
|
190
|
+
CGRtools contributors are included too.
|
|
191
|
+
|
|
192
|
+
- Adelia Fatykhova <adelik21979@gmail.com>
|
|
193
|
+
- Aigul Khakimova
|
|
194
|
+
- Aleksandr Sizov <murkyrussian@gmail.com>
|
|
195
|
+
- Alexandre Varnek <varnek@unistra.fr>
|
|
196
|
+
- Dinar Batyrshin <batyrshin-dinar@mail.ru>
|
|
197
|
+
- Dmitrij Zanadvornykh <zandmitrij@gmail.com>
|
|
198
|
+
- Philippe Gantzer
|
|
199
|
+
- Ravil Mukhametgaleev <sonic-mc@mail.ru>
|
|
200
|
+
- Tagir Akhmetshin <tagirshin@gmail.com>
|
|
201
|
+
- Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
202
|
+
- Timur Madzhidov <tmadzhidov@gmail.com>
|
|
203
|
+
- Zarina Ibragimova
|
chython-3.0/README.md
ADDED
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/logo256.png" width="256" alt="chython logo"/>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Chython [ˈkʌɪθ(ə)n]</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<a href="https://pypi.org/project/chython/"><img src="https://img.shields.io/pypi/v/chython.svg" alt="PyPI version"/></a>
|
|
9
|
+
<a href="https://pypi.org/project/chython/"><img src="https://img.shields.io/pypi/pyversions/chython.svg" alt="Python versions"/></a>
|
|
10
|
+
<a href="https://github.com/chython/chython/blob/master/LICENSE"><img src="https://img.shields.io/pypi/l/chython.svg" alt="License: LGPLv3"/></a>
|
|
11
|
+
<a href="https://chython.readthedocs.io"><img src="https://img.shields.io/readthedocs/chython.svg" alt="Documentation"/></a>
|
|
12
|
+
<a href="https://app.codecov.io/gh/chython/chython"><img src="https://img.shields.io/codecov/c/github/chython/chython/master?label=python%20coverage" alt="Coverage of the Python layers"/></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
Library for processing molecules and reactions in a Python way.
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
**File formats**
|
|
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)
|
|
22
|
+
- Read SMARTS and SMIRKS, Tripos MOL2, PDBx/mmCIF, legacy PDB, XYZ, and IUPAC names through OPSIN
|
|
23
|
+
- Compact binary (de)serialization — `pach` for a wire record, `mol.to_bytes()` for the arena buffer — and full pickle support
|
|
24
|
+
- 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
|
|
25
|
+
|
|
26
|
+
**Input is unreliable by default**
|
|
27
|
+
|
|
28
|
+
A reader stores and logs what a file says — an illegal valence, a nonsense charge, an underivable
|
|
29
|
+
hydrogen count — and never rejects a record for being chemically wrong. Repair is a pipeline you run
|
|
30
|
+
afterwards: `kekule()`, `standardize()`, `fix_resonance()`, `thiele()`.
|
|
31
|
+
|
|
32
|
+
**Toolkit interoperability**
|
|
33
|
+
|
|
34
|
+
Conversions build the target structure directly from the graph, so atom order matches
|
|
35
|
+
`atoms()` and stereo is carried over without needing a 2D layout. Each toolkit has one callable in
|
|
36
|
+
`chython.interop` that dispatches on its argument, and the export direction is also a container method.
|
|
37
|
+
|
|
38
|
+
| Toolkit | API | Requires |
|
|
39
|
+
|---------|-----|----------|
|
|
40
|
+
| RDKit | `mol.to_rdkit()`, `rxn.to_rdkit()`, `chython.interop.rdkit()` both ways | extra `rdkit` |
|
|
41
|
+
| Open Babel | `mol.to_openbabel()` | extra `extra-clean2d` |
|
|
42
|
+
| Indigo | `mol.to_indigo()` | extra `extra-clean2d` |
|
|
43
|
+
| CDK | `mol.to_cdk()` | extra `extra-clean2d` + `cdk.jar` (`CDK_PATH`) |
|
|
44
|
+
| CDPKit | `mol.to_cdpkit()`, and 3D conformers (`conformer_engine = 'cdpkit'`) | extra `extra-clean3d` |
|
|
45
|
+
|
|
46
|
+
RDKit is the only one of the five with a reaction form.
|
|
47
|
+
|
|
48
|
+
Allene stereo is not portable through any of these toolkits. Indigo additionally omits
|
|
49
|
+
cis-trans, which it derives from 2D coordinates.
|
|
50
|
+
|
|
51
|
+
**IUPAC names, both directions**
|
|
52
|
+
|
|
53
|
+
```python
|
|
54
|
+
from chython import iupac
|
|
55
|
+
|
|
56
|
+
mol = iupac('ethanol') # name -> structure, via OPSIN
|
|
57
|
+
mol.iupac # 'ethanol' -- structure -> name, via openclatura
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`iupac()` needs JPype and `opsin.jar` (`OPSIN_PATH`); the `.iupac` property needs the
|
|
61
|
+
`iupac` extra (Python >= 3.11) and returns `None` when the structure cannot be named.
|
|
62
|
+
|
|
63
|
+
**Molecules**
|
|
64
|
+
|
|
65
|
+
- Atoms and bonds in one contiguous buffer, addressed by an id that survives editing; edits go through
|
|
66
|
+
an explicit session (`with mol.edit() as e:`) and derived data is recomputed on seal
|
|
67
|
+
- Standardize, canonicalize, kekulize/aromatize, repair resonance forms, neutralize, put a mobile
|
|
68
|
+
hydrogen and charge where the canonical order says, check valences
|
|
69
|
+
- Split and decompose salts, expand contracted groups, derive implicit hydrogen counts
|
|
70
|
+
- Many 3D models per molecule in one conformer store
|
|
71
|
+
- Tetrahedral, cis-trans, allene, atropisomer and helical stereo, with CIP labels
|
|
72
|
+
- Descriptors: TPSA, Crippen logP and MR, hydrogen-bond donors and acceptors, rotatable bonds, ring
|
|
73
|
+
counts, Bertz CT, Randić and Zagreb indices
|
|
74
|
+
- The 166 MACCS structural keys, one-based, and QED with its three published weight sets — both state
|
|
75
|
+
what they transcribe and neither claims parity with another implementation's bits or score
|
|
76
|
+
- Morgan and linear fingerprints with Tanimoto similarity, as hash sets, folded bit vectors or count
|
|
77
|
+
vectors, and the graph matrices and distance-derived descriptors — extra `ml`
|
|
78
|
+
- A molecule or a mapped reaction as `int32` arrays for a model: `mol.state_view()`,
|
|
79
|
+
`rxn.transition_view()` — extra `ml`
|
|
80
|
+
|
|
81
|
+
**Search**
|
|
82
|
+
|
|
83
|
+
- Subgraph isomorphism
|
|
84
|
+
- SMARTS parser with chython-specific query semantics, including component grouping for intramolecular
|
|
85
|
+
patterns
|
|
86
|
+
|
|
87
|
+
**Reactions**
|
|
88
|
+
|
|
89
|
+
- Template application from SMIRKS: `mol.react(template)`, or `mol @ other` for a two-component join
|
|
90
|
+
- Reaction enumeration over the shipped reaction corpus
|
|
91
|
+
- Functional and protective group detection and deprotection, with the whole corpus in the docs
|
|
92
|
+
- Sticky fragment / linker enumeration for combinatorial reassembly
|
|
93
|
+
- Atom-to-atom mapping reconstruction against a template corpus: `rxn.reconstruct_mapping()`
|
|
94
|
+
- Reaction-level standardization: each molecule pass once per molecule, plus the passes a loop cannot do
|
|
95
|
+
|
|
96
|
+
**Depiction**
|
|
97
|
+
|
|
98
|
+
- 2D coordinate generation, default [SmilesDrawer](https://github.com/reymond-group/smilesDrawer), switchable to RDKit/CDK/Open Babel/Indigo (`clean2d_engine`)
|
|
99
|
+
- SVG and SVGZ output with Jupyter support, and scalar data overlaid on the same scene
|
|
100
|
+
- 3D: a stored conformer as an X3DOM document (`mol.depict3d()`) or a notebook widget (`mol.view3d()`)
|
|
101
|
+
- 3D conformer generation with RDKit or CDPKit (`conformer_engine`)
|
|
102
|
+
|
|
103
|
+
Full documentation can be found [here](https://chython.readthedocs.io).
|
|
104
|
+
|
|
105
|
+
## Install
|
|
106
|
+
|
|
107
|
+
Only Python 3.10+.
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
pip install chython
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
The default 2D layout backend needs no extra: its JS engine (QuickJS) is a required dependency and
|
|
114
|
+
costs under 2.5 MB.
|
|
115
|
+
|
|
116
|
+
A plain install has **no numpy**, and that is deliberate — the base install is about 7.5 MB of runtime
|
|
117
|
+
files, small enough for a serverless bundle. Reading and writing every format, `standardize()`,
|
|
118
|
+
`kekule()`, `thiele()`, `canonicalize()`, stereo, substructure matching, template application and
|
|
119
|
+
depiction all work without it. What needs `chython[ml]` is the surface that answers a numpy array: the
|
|
120
|
+
fingerprints, `atom_invariants`, `adjacency_matrix`, `distance_matrix`, the distance-derived graph
|
|
121
|
+
descriptors, `pharmacophore_invariants`, `maccs_keys()`/`maccs_bit_set()` and the ML views. Each of
|
|
122
|
+
those raises an `ImportError` naming the extra when you call it, so nothing fails at import time.
|
|
123
|
+
|
|
124
|
+
Optional extras, combinable (`chython[rdkit,iupac]`):
|
|
125
|
+
|
|
126
|
+
| Extra | Enables |
|
|
127
|
+
|-------|---------|
|
|
128
|
+
| `ml` | numpy, and with it fingerprints, atom invariants, the graph matrices, the descriptors built on them and the ML views |
|
|
129
|
+
| `rdkit` | RDKit conversion both ways, RDKit 2D layout and 3D conformers |
|
|
130
|
+
| `iupac` | `molecule.iupac` name generation (Python >= 3.11) |
|
|
131
|
+
| `extra-clean2d` | CDK, Open Babel and Indigo backends (CDK also needs `cdk.jar`) |
|
|
132
|
+
| `extra-clean3d` | CDPKit conformer engine |
|
|
133
|
+
|
|
134
|
+
## CGRtools
|
|
135
|
+
|
|
136
|
+
Chython is a fork of [CGRtools](https://github.com/stsouko/CGRtools).
|
|
137
|
+
|
|
138
|
+
## Copyright
|
|
139
|
+
|
|
140
|
+
- 2014-2026 Ramil Nugmanov <nougmanoff@protonmail.com> main developer
|
|
141
|
+
|
|
142
|
+
## Contributors
|
|
143
|
+
|
|
144
|
+
CGRtools contributors are included too.
|
|
145
|
+
|
|
146
|
+
- Adelia Fatykhova <adelik21979@gmail.com>
|
|
147
|
+
- Aigul Khakimova
|
|
148
|
+
- Aleksandr Sizov <murkyrussian@gmail.com>
|
|
149
|
+
- Alexandre Varnek <varnek@unistra.fr>
|
|
150
|
+
- Dinar Batyrshin <batyrshin-dinar@mail.ru>
|
|
151
|
+
- Dmitrij Zanadvornykh <zandmitrij@gmail.com>
|
|
152
|
+
- Philippe Gantzer
|
|
153
|
+
- Ravil Mukhametgaleev <sonic-mc@mail.ru>
|
|
154
|
+
- Tagir Akhmetshin <tagirshin@gmail.com>
|
|
155
|
+
- Timur Gimadiev <timur.gimadiev@gmail.com>
|
|
156
|
+
- Timur Madzhidov <tmadzhidov@gmail.com>
|
|
157
|
+
- Zarina Ibragimova
|