synkit 0.0.15__tar.gz → 0.0.17__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.
- {synkit-0.0.15 → synkit-0.0.17}/PKG-INFO +1 -1
- synkit-0.0.17/pyproject.toml +56 -0
- synkit-0.0.17/synkit/Data/aldol.json.gz +1 -0
- synkit-0.0.17/synkit/Data/paracetamol.json.gz +1 -0
- synkit-0.0.15/.github/dependabot.yml +0 -10
- synkit-0.0.15/.github/workflows/build-doc.yml +0 -35
- synkit-0.0.15/.github/workflows/conda-forge-publish.yml +0 -109
- synkit-0.0.15/.github/workflows/docker-publish.yml +0 -46
- synkit-0.0.15/.github/workflows/publish-package.yml +0 -49
- synkit-0.0.15/.github/workflows/test-and-lint.yml +0 -68
- synkit-0.0.15/.github/workflows/verify-pypi-install.yml +0 -59
- synkit-0.0.15/.readthedocs.yml +0 -24
- synkit-0.0.15/Data/Figure/synkit.png +0 -0
- synkit-0.0.15/Data/Testcase/Compose/ComposeRule/data.txt +0 -0
- synkit-0.0.15/Data/Testcase/Compose/SingleRule/R0/0.gml +0 -17
- synkit-0.0.15/Data/Testcase/Compose/SingleRule/R0/1.gml +0 -17
- synkit-0.0.15/Data/Testcase/Compose/SingleRule/R0/2.gml +0 -17
- synkit-0.0.15/Dockerfile +0 -45
- synkit-0.0.15/Test/Chem/Fingerprint/test_fp_calculator.py +0 -69
- synkit-0.0.15/Test/Chem/Fingerprint/test_smiles_featurizer.py +0 -85
- synkit-0.0.15/Test/Chem/Fingerprint/test_transformation_fp.py +0 -56
- synkit-0.0.15/Test/Chem/Molecule/test_standardize.py +0 -90
- synkit-0.0.15/Test/Chem/Reaction/test_aam_validator.py +0 -97
- synkit-0.0.15/Test/Chem/Reaction/test_balance_checker.py +0 -120
- synkit-0.0.15/Test/Chem/Reaction/test_canon_rsmi.py +0 -56
- synkit-0.0.15/Test/Chem/Reaction/test_cleanning.py +0 -26
- synkit-0.0.15/Test/Chem/Reaction/test_deionize.py +0 -52
- synkit-0.0.15/Test/Chem/Reaction/test_fix_aam.py +0 -66
- synkit-0.0.15/Test/Chem/Reaction/test_neutralize.py +0 -160
- synkit-0.0.15/Test/Chem/Reaction/test_radical_wildcard.py +0 -51
- synkit-0.0.15/Test/Chem/Reaction/test_standardize.py +0 -58
- synkit-0.0.15/Test/Chem/Reaction/test_tautomerize.py +0 -63
- synkit-0.0.15/Test/Chem/test_utils.py +0 -127
- synkit-0.0.15/Test/Graph/Context/test_hier_context.py +0 -173
- synkit-0.0.15/Test/Graph/Context/test_radius_expand.py +0 -108
- synkit-0.0.15/Test/Graph/Feature/test_graph_descriptors.py +0 -195
- synkit-0.0.15/Test/Graph/Feature/test_graph_fps.py +0 -59
- synkit-0.0.15/Test/Graph/Feature/test_graph_signature.py +0 -101
- synkit-0.0.15/Test/Graph/Feature/test_hash_fps.py +0 -52
- synkit-0.0.15/Test/Graph/Feature/test_morgan_fps.py +0 -39
- synkit-0.0.15/Test/Graph/Feature/test_path_fps.py +0 -40
- synkit-0.0.15/Test/Graph/Hydrogen/test_graph_hydrogen.py +0 -59
- synkit-0.0.15/Test/Graph/Hydrogen/test_hcomplete.py +0 -77
- synkit-0.0.15/Test/Graph/Hydrogen/test_misc.py +0 -92
- synkit-0.0.15/Test/Graph/ITS/test_its_construction.py +0 -51
- synkit-0.0.15/Test/Graph/ITS/test_its_expand.py +0 -28
- synkit-0.0.15/Test/Graph/ITS/test_its_relabel.py +0 -61
- synkit-0.0.15/Test/Graph/ITS/test_normalize_aam.py +0 -65
- synkit-0.0.15/Test/Graph/MTG/test_group_comp.py +0 -52
- synkit-0.0.15/Test/Graph/MTG/test_groupoid.py +0 -181
- synkit-0.0.15/Test/Graph/MTG/test_mtg.py +0 -37
- synkit-0.0.15/Test/Graph/Matcher/test_batch_cluster.py +0 -109
- synkit-0.0.15/Test/Graph/Matcher/test_graph_cluster.py +0 -139
- synkit-0.0.15/Test/Graph/Matcher/test_graph_matcher.py +0 -158
- synkit-0.0.15/Test/Graph/Matcher/test_graph_morphism.py +0 -71
- synkit-0.0.15/Test/Graph/Matcher/test_subgraph_matcher.py +0 -136
- synkit-0.0.15/Test/Graph/Wildcard/test_radwc.py +0 -55
- synkit-0.0.15/Test/Graph/Wildcard/test_wildcard.py +0 -81
- synkit-0.0.15/Test/Graph/test_canon_graph.py +0 -90
- synkit-0.0.15/Test/Graph/test_syn_graph.py +0 -69
- synkit-0.0.15/Test/IO/combinatorial/test_smarts_expander.py +0 -38
- synkit-0.0.15/Test/IO/combinatorial/test_smarts_generalizer.py +0 -62
- synkit-0.0.15/Test/IO/combinatorial/test_smarts_to_graph.py +0 -85
- synkit-0.0.15/Test/IO/test_chemical_converter.py +0 -272
- synkit-0.0.15/Test/IO/test_dg_to_gml.py +0 -58
- synkit-0.0.15/Test/IO/test_gml_to_nx.py +0 -135
- synkit-0.0.15/Test/IO/test_graph_to_mol.py +0 -59
- synkit-0.0.15/Test/IO/test_mol_to_graph.py +0 -49
- synkit-0.0.15/Test/IO/test_nx_to_gml.py +0 -101
- synkit-0.0.15/Test/Rule/Apply/test_reactor_rule.py +0 -63
- synkit-0.0.15/Test/Rule/Apply/test_retro_reactor.py +0 -47
- synkit-0.0.15/Test/Rule/Apply/test_rule_matcher.py +0 -94
- synkit-0.0.15/Test/Rule/Apply/test_rule_rbl.py +0 -56
- synkit-0.0.15/Test/Rule/Compose/test_rule_compose.py +0 -59
- synkit-0.0.15/Test/Rule/Compose/test_valance_constrain.py +0 -112
- synkit-0.0.15/Test/Rule/Modify/test_molecule_rule.py +0 -148
- synkit-0.0.15/Test/Rule/Modify/test_rule_utils.py +0 -201
- synkit-0.0.15/Test/Rule/test_syn_rule.py +0 -99
- synkit-0.0.15/Test/Synthesis/CRN/test_crn.py +0 -54
- synkit-0.0.15/Test/Synthesis/CRN/test_mod_crn.py +0 -50
- synkit-0.0.15/Test/Synthesis/MSR/__init__.py +0 -0
- synkit-0.0.15/Test/Synthesis/MSR/test_multi_steps.py +0 -76
- synkit-0.0.15/Test/Synthesis/MSR/test_path_finder.py +0 -94
- synkit-0.0.15/Test/Synthesis/Reactor/__init__.py +0 -0
- synkit-0.0.15/Test/Synthesis/Reactor/test_imba_engine.py +0 -94
- synkit-0.0.15/Test/Synthesis/Reactor/test_mod_aam.py +0 -166
- synkit-0.0.15/Test/Synthesis/Reactor/test_mod_reactor.py +0 -153
- synkit-0.0.15/Test/Synthesis/Reactor/test_partial_engine.py +0 -48
- synkit-0.0.15/Test/Synthesis/Reactor/test_rbl_reactor.py +0 -52
- synkit-0.0.15/Test/Synthesis/Reactor/test_strategy.py +0 -42
- synkit-0.0.15/Test/Synthesis/__init__.py +0 -0
- synkit-0.0.15/Test/Synthesis/test_reactor_utils.py +0 -97
- synkit-0.0.15/Test/Vis/__init__.py +0 -0
- synkit-0.0.15/Test/Vis/test_embedding.py +0 -50
- synkit-0.0.15/Test/__init__.py +0 -0
- synkit-0.0.15/build-doc.sh +0 -31
- synkit-0.0.15/doc/api.rst +0 -257
- synkit-0.0.15/doc/changelog.rst +0 -76
- synkit-0.0.15/doc/chem.rst +0 -69
- synkit-0.0.15/doc/conf.py +0 -48
- synkit-0.0.15/doc/figures/aldol.png +0 -0
- synkit-0.0.15/doc/figures/aldol_its.png +0 -0
- synkit-0.0.15/doc/figures/context.png +0 -0
- synkit-0.0.15/doc/figures/mtg.png +0 -0
- synkit-0.0.15/doc/figures/mtg_mechanism.png +0 -0
- synkit-0.0.15/doc/getting_started.rst +0 -118
- synkit-0.0.15/doc/graph.rst +0 -340
- synkit-0.0.15/doc/index.rst +0 -16
- synkit-0.0.15/doc/io.rst +0 -163
- synkit-0.0.15/doc/reference.rst +0 -6
- synkit-0.0.15/doc/refs.bib +0 -29
- synkit-0.0.15/doc/requirements.txt +0 -3
- synkit-0.0.15/doc/rule.rst +0 -2
- synkit-0.0.15/doc/synthesis.rst +0 -195
- synkit-0.0.15/environment.yml +0 -9
- synkit-0.0.15/lint.sh +0 -34
- synkit-0.0.15/pyproject.toml +0 -45
- synkit-0.0.15/pytest.sh +0 -3
- synkit-0.0.15/recipe/meta.yaml +0 -37
- synkit-0.0.15/requirements.txt +0 -8
- synkit-0.0.15/synkit/Chem/Cluster/__init__.py +0 -0
- synkit-0.0.15/synkit/Chem/Fingerprint/__init__.py +0 -0
- synkit-0.0.15/synkit/Chem/Molecule/__init__.py +0 -0
- synkit-0.0.15/synkit/Data/__init__.py +0 -0
- synkit-0.0.15/synkit/Graph/Context/__init__.py +0 -0
- synkit-0.0.15/synkit/Graph/Feature/Fingerprint/__init__.py +0 -0
- synkit-0.0.15/synkit/Graph/Hyrogen/__init__.py +0 -0
- synkit-0.0.15/synkit/Graph/MTG/__init__.py +0 -0
- synkit-0.0.15/synkit/Graph/Wildcard/__init__.py +0 -0
- synkit-0.0.15/synkit/Rule/Apply/__init__.py +0 -0
- synkit-0.0.15/synkit/Rule/Compose/__init__.py +0 -0
- synkit-0.0.15/synkit/Rule/Modify/__init__.py +0 -0
- synkit-0.0.15/synkit/Synthesis/CRN/__init__.py +0 -0
- synkit-0.0.15/synkit/Synthesis/MSR/__init__.py +0 -0
- synkit-0.0.15/synkit/Synthesis/Metrics/__init__.py +0 -0
- synkit-0.0.15/synkit/Synthesis/Reactor/__init__.py +0 -0
- synkit-0.0.15/synkit/Synthesis/__init__.py +0 -0
- synkit-0.0.15/synkit/Utils/__init__.py +0 -0
- synkit-0.0.15/synkit/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/.gitignore +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/LICENSE +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/README.md +0 -0
- {synkit-0.0.15/Test/Chem/Fingerprint → synkit-0.0.17/synkit/Chem/Cluster}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Cluster/butina.py +0 -0
- {synkit-0.0.15/Test/Chem/Molecule → synkit-0.0.17/synkit/Chem/Fingerprint}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Fingerprint/fp_calculator.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Fingerprint/smiles_featurizer.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Fingerprint/transformation_fp.py +0 -0
- {synkit-0.0.15/Test/Chem/Reaction → synkit-0.0.17/synkit/Chem/Molecule}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Molecule/standardize.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/aam_validator.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/balance_check.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/canon_rsmi.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/cleaning.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/deionize.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/fix_aam.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/neutralize.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/radical_wildcard.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/standardize.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/Reaction/tautomerize.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Chem/utils.py +0 -0
- {synkit-0.0.15/Test/Chem → synkit-0.0.17/synkit/Data}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Data/gen_partial_aam.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Canon/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Canon/canon_algs.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Canon/canon_graph.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Canon/nauty.py +0 -0
- {synkit-0.0.15/Test → synkit-0.0.17/synkit}/Graph/Context/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Context/hier_context.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Context/radius_expand.py +0 -0
- {synkit-0.0.15/Test/Graph/Feature → synkit-0.0.17/synkit/Graph/Feature/Fingerprint}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/Fingerprint/wl_rxn_fps.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/graph_descriptors.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/graph_fps.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/graph_signature.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/hash_fps.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/morgan_fps.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/path_fps.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Feature/wl_hash.py +0 -0
- {synkit-0.0.15/Test/Graph/Hydrogen → synkit-0.0.17/synkit/Graph/Hyrogen}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Hyrogen/_misc.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Hyrogen/hcomplete.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Hyrogen/hextend.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/its_builder.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/its_construction.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/its_decompose.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/its_destruction.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/its_expand.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/its_relabel.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/normalize_aam.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/ITS/partial_its.py +0 -0
- {synkit-0.0.15/Test/Graph/ITS → synkit-0.0.17/synkit/Graph/MTG}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/MTG/group_comp.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/MTG/groupoid.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/MTG/mcs_matcher.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/MTG/mtg.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/MTG/mtg_explore.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/MTG/utils.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/batch_cluster.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/graph_cluster.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/graph_matcher.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/graph_morphism.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/mcs_matcher.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/multi_turbo_iso.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/partial_matcher.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/sing.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/subgraph_matcher.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Matcher/turbo_iso.py +0 -0
- {synkit-0.0.15/Test/Graph/MTG → synkit-0.0.17/synkit/Graph/Wildcard}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Wildcard/fuse_graph.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Wildcard/radwc.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/Wildcard/wildcard.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/canon_graph.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/syn_graph.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Graph/utils.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/chem_converter.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/combinatorial/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/combinatorial/gml_to_graph.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/combinatorial/graph_to_gml.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/combinatorial/graph_to_smarts.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/combinatorial/smarts_expander.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/combinatorial/smarts_generalizer.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/combinatorial/smarts_to_graph.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/data_io.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/data_process.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/debug.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/dg_to_gml.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/gml_to_nx.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/graph_to_mol.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/mol_to_graph.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/nx_to_gml.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/IO/smiles_to_id.py +0 -0
- {synkit-0.0.15/Test/Graph/Matcher → synkit-0.0.17/synkit/Rule/Apply}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Apply/reactor_rule.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Apply/retro_reactor.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Apply/rule_matcher.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Apply/rule_rbl.py +0 -0
- {synkit-0.0.15/Test/Graph/Wildcard → synkit-0.0.17/synkit/Rule/Compose}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Compose/compose_rule.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Compose/rule_compose.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Compose/rule_mapping.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Compose/seq_comp.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Compose/valence_constrain.py +0 -0
- {synkit-0.0.15/Test/Graph → synkit-0.0.17/synkit/Rule/Modify}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Modify/implict_rule.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Modify/longest_path.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Modify/molecule_rule.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Modify/prune_templates.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Modify/rule_utils.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/Modify/strip_rule.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Rule/syn_rule.py +0 -0
- {synkit-0.0.15/Test/IO → synkit-0.0.17/synkit/Synthesis/CRN}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/CRN/crn.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/CRN/dcrn.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/CRN/mod_crn.py +0 -0
- {synkit-0.0.15/Test/IO/combinatorial → synkit-0.0.17/synkit/Synthesis/MSR}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/MSR/multi_steps.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/MSR/path_finder.py +0 -0
- {synkit-0.0.15/Test/Rule/Apply → synkit-0.0.17/synkit/Synthesis/Metrics}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Metrics/_base.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Metrics/_plot.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Metrics/_ranking.py +0 -0
- {synkit-0.0.15/Test/Rule/Compose → synkit-0.0.17/synkit/Synthesis/Reactor}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/batch_reactor.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/benchmark.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/imba_engine.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/mod_aam.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/mod_reactor.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/partial_engine.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/post_syn.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/rbl_engine.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/rule_filter.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/single_predictor.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/strategy.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/Reactor/syn_reactor.py +0 -0
- {synkit-0.0.15/Test/Rule/Modify → synkit-0.0.17/synkit/Synthesis}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Synthesis/reactor_utils.py +0 -0
- {synkit-0.0.15/Test/Rule → synkit-0.0.17/synkit/Utils}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Utils/utils.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Vis/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Vis/chemical_space.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Vis/embedding.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Vis/graph_visualizer.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Vis/pdf_writer.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Vis/rule_vis.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/Vis/rxn_vis.py +0 -0
- {synkit-0.0.15/Test/Synthesis/CRN → synkit-0.0.17/synkit}/__init__.py +0 -0
- {synkit-0.0.15 → synkit-0.0.17}/synkit/examples.py +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "synkit"
|
|
7
|
+
version = "0.0.17"
|
|
8
|
+
description = "Utility for reaction modeling using graph grammar"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
long-description = { file = "CHANGELOG.md" }
|
|
11
|
+
long-description-content-type = "text/markdown"
|
|
12
|
+
requires-python = ">=3.11"
|
|
13
|
+
license = { text = "MIT" }
|
|
14
|
+
license-files = ["LICENSE"]
|
|
15
|
+
authors = [
|
|
16
|
+
{ name = "Tieu Long Phan", email = "tieu@bioinf.uni-leipzig.de" }
|
|
17
|
+
]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"License :: OSI Approved :: MIT License",
|
|
21
|
+
"Operating System :: OS Independent",
|
|
22
|
+
]
|
|
23
|
+
dependencies = [
|
|
24
|
+
"scikit-learn>=1.4.0",
|
|
25
|
+
"pandas>=1.5.3",
|
|
26
|
+
"rdkit>=2025.3.1",
|
|
27
|
+
"networkx>=3.3",
|
|
28
|
+
"seaborn>=0.13.2",
|
|
29
|
+
"requests>=2.32.3",
|
|
30
|
+
"regex>=2024.11.6",
|
|
31
|
+
]
|
|
32
|
+
|
|
33
|
+
[project.optional-dependencies]
|
|
34
|
+
all = ["numpy>=2.2.0", "torch>=2.2.0"]
|
|
35
|
+
docs = [
|
|
36
|
+
"sphinx>=6.0",
|
|
37
|
+
"sphinx-rtd-theme",
|
|
38
|
+
"sphinxcontrib-bibtex",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
homepage = "https://github.com/TieuLongPhan/SynKit"
|
|
43
|
+
source = "https://github.com/TieuLongPhan/SynKit"
|
|
44
|
+
issues = "https://github.com/TieuLongPhan/SynKit/issues"
|
|
45
|
+
documentation = "https://tieulongphan.github.io/SynKit/"
|
|
46
|
+
|
|
47
|
+
[tool.hatch.build]
|
|
48
|
+
# ship your code as normal
|
|
49
|
+
packages = ["synkit"]
|
|
50
|
+
|
|
51
|
+
# Force-include the entire Data directory (recursively)
|
|
52
|
+
[tool.hatch.build.targets.wheel.force-include]
|
|
53
|
+
"synkit/Data" = "synkit/Data"
|
|
54
|
+
|
|
55
|
+
[tool.hatch.build.targets.sdist.force-include]
|
|
56
|
+
"synkit/Data" = "synkit/Data"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"R-id": "Mech-1", "reaction": "[CH3:1][CH:2]=[O:3].[CH:4]([H:7])([H:8])[CH:5]=[O:6]>>[CH3:1][CH:2]=[CH:4][CH:5]=[O:6].[O:3]([H:7])([H:8])", "mechanisms": [{"mech_name": "Aldol reaction (base cat)", "steps": [{"description": "Base abstracts H from substrate", "smart_string": "[CH:4]([H:7])([H:8])[CH:5]=[O:6].[*-:9]>>[CH-:4]([H:8])[CH:5]=[O:6].[*:9][H:7]", "step": 1, "step_gml": "rule [\n ruleID \"2\"\n left [\n ]\n context [\n ]\n right [\n ]\n]", "step_dfs": null, "step_smart": ">>", "step_desc": "Base abstracts H from substrate"}, {"description": "Nucleophilic addition fro substrate", "smart_string": "[CH3:1][CH:2]=[O:3].[CH-:4]([H:8])[CH:5]=[O:6]>>[CH3:1][CH:2]([O-:3])[CH:4]([H:8])[CH:5]=[O:6]", "step": 2, "step_gml": "rule [\n ruleID \"2\"\n left [\n edge [ source 1 target 2 label \"=\" ]\n node [ id 2 label \"O\" ]\n node [ id 3 label \"C-\" ]\n ]\n context [\n node [ id 1 label \"C\" ]\n ]\n right [\n edge [ source 1 target 2 label \"-\" ]\n edge [ source 1 target 3 label \"-\" ]\n node [ id 2 label \"O-\" ]\n node [ id 3 label \"C\" ]\n ]\n]", "step_dfs": null, "step_smart": "[CH2:1]=[O:2].[CH3-:3]>>[CH2:1]([O-:2])[CH3:3]", "step_desc": "Nucleophilic addition fro substrate"}, {"description": "Neutralize substrate", "smart_string": "[CH3:1][CH:2]([O-:3])[CH:4]([H:8])[CH:5]=[O:6].[*:9][H:7]>>[CH3:1][CH:2]([O:3][H:7])[CH:4]([H:8])[CH:5]=[O:6].[*-:9]", "step": 3, "step_gml": "rule [\n ruleID \"2\"\n left [\n ]\n context [\n ]\n right [\n ]\n]", "step_dfs": null, "step_smart": ">>", "step_desc": "Neutralize substrate"}, {"description": "Base abstracts H from substrate", "smart_string": "[CH3:1][CH:2]([O:3][H:7])[CH:4]([H:8])[CH:5]=[O:6].[*-:9]>>[CH3:1][CH:2]([O:3][H:7])[CH-:4][CH:5]=[O:6].[*:9][H:8]", "step": 4, "step_gml": "rule [\n ruleID \"2\"\n left [\n ]\n context [\n ]\n right [\n ]\n]", "step_dfs": null, "step_smart": ">>", "step_desc": "Base abstracts H from substrate"}, {"description": "Elimination Unimolecular Conjugate Base", "smart_string": "[CH3:1][CH:2]([O:3][H:7])[CH-:4][CH:5]=[O:6]>>[CH3:1][CH:2]=[CH:4][CH:5]=[O:6].[O-:3][H:7]", "step": 5, "step_gml": "rule [\n ruleID \"2\"\n left [\n edge [ source 1 target 2 label \"-\" ]\n edge [ source 1 target 3 label \"-\" ]\n node [ id 2 label \"O\" ]\n node [ id 3 label \"C-\" ]\n ]\n context [\n node [ id 1 label \"C\" ]\n ]\n right [\n edge [ source 1 target 3 label \"=\" ]\n node [ id 2 label \"O-\" ]\n node [ id 3 label \"C\" ]\n ]\n]", "step_dfs": null, "step_smart": "[CH2:1]([OH:2])[CH2-:3]>>[CH2:1]=[CH2:3].[OH-:2]", "step_desc": "Elimination Unimolecular Conjugate Base"}, {"description": "Neutralize Hydroxide", "smart_string": "[O-:3][H:7].[*:9][H:8]>>[O:3]([H:7])([H:8]).[*-:9]", "step": 6, "step_gml": "rule [\n ruleID \"2\"\n left [\n ]\n context [\n ]\n right [\n ]\n]", "step_dfs": null, "step_smart": ">>", "step_desc": "Neutralize Hydroxide"}], "cat": "[*-]"}, {"mech_name": "Aldol reaction (neutral cat)", "steps": [{"description": "Tautomerization of substrate", "smart_string": "[CH:4]([H:7])([H:8])[CH:5]=[O:6]>>[CH:4]([H:8])=[CH:5][O:6]([H:7])", "step": 1, "step_gml": "rule [\n ruleID \"2\"\n left [\n edge [ source 1 target 2 label \"-\" ]\n edge [ source 2 target 3 label \"=\" ]\n ]\n context [\n node [ id 1 label \"C\" ]\n node [ id 2 label \"C\" ]\n node [ id 3 label \"O\" ]\n ]\n right [\n edge [ source 1 target 2 label \"=\" ]\n edge [ source 2 target 3 label \"-\" ]\n ]\n]", "step_dfs": null, "step_smart": "[CH3:1][CH:2]=[O:3]>>[CH2:1]=[CH:2][OH:3]", "step_desc": "Tautomerization of substrate"}, {"description": "Nucleophilic addition from substrate", "smart_string": "[CH3:1][CH:2]=[O:3].[CH:4]([H:8])=[CH:5][O:6]([H:7])>>[CH3:1][CH:2]([O:3][H:7])[CH:4]([H:8])[CH:5]=[O:6]", "step": 2, "step_gml": "rule [\n ruleID \"2\"\n left [\n edge [ source 1 target 2 label \"=\" ]\n edge [ source 3 target 4 label \"=\" ]\n edge [ source 4 target 5 label \"-\" ]\n ]\n context [\n node [ id 1 label \"C\" ]\n node [ id 2 label \"O\" ]\n node [ id 3 label \"C\" ]\n node [ id 4 label \"C\" ]\n node [ id 5 label \"O\" ]\n ]\n right [\n edge [ source 1 target 2 label \"-\" ]\n edge [ source 1 target 3 label \"-\" ]\n edge [ source 3 target 4 label \"-\" ]\n edge [ source 4 target 5 label \"=\" ]\n ]\n]", "step_dfs": null, "step_smart": "[CH2:1]=[O:2].[CH2:3]=[CH:4][OH:5]>>[CH2:1]([OH:2])[CH2:3][CH:4]=[O:5]", "step_desc": "Nucleophilic addition from substrate"}, {"description": "Tautomerization of substrate", "smart_string": "[CH3:1][CH:2]([O:3][H:7])[CH:4]([H:8])[CH:5]=[O:6]>>[CH3:1][CH:2]([O:3][H:7])[CH:4]=[CH:5][O:6]([H:8])", "step": 3, "step_gml": "rule [\n ruleID \"2\"\n left [\n edge [ source 1 target 2 label \"-\" ]\n edge [ source 2 target 3 label \"=\" ]\n ]\n context [\n node [ id 1 label \"C\" ]\n node [ id 2 label \"C\" ]\n node [ id 3 label \"O\" ]\n ]\n right [\n edge [ source 1 target 2 label \"=\" ]\n edge [ source 2 target 3 label \"-\" ]\n ]\n]", "step_dfs": null, "step_smart": "[CH3:1][CH:2]=[O:3]>>[CH2:1]=[CH:2][OH:3]", "step_desc": "Tautomerization of substrate"}, {"description": "Elimination", "smart_string": "[CH3:1][CH:2]([O:3][H:7])[CH:4]=[CH:5][O:6]([H:8])>>[CH3:1][CH:2]=[CH:4][CH:5]=[O:6].[O:3]([H:7])([H:8])", "step": 4, "step_gml": "rule [\n ruleID \"2\"\n left [\n edge [ source 1 target 2 label \"-\" ]\n edge [ source 1 target 3 label \"-\" ]\n edge [ source 3 target 4 label \"=\" ]\n edge [ source 4 target 5 label \"-\" ]\n ]\n context [\n node [ id 1 label \"C\" ]\n node [ id 2 label \"O\" ]\n node [ id 3 label \"C\" ]\n node [ id 4 label \"C\" ]\n node [ id 5 label \"O\" ]\n ]\n right [\n edge [ source 1 target 3 label \"=\" ]\n edge [ source 3 target 4 label \"-\" ]\n edge [ source 4 target 5 label \"=\" ]\n ]\n]", "step_dfs": null, "step_smart": "[CH2:1]([OH:2])[CH:3]=[CH:4][OH:5]>>[CH2:1]=[CH:3][CH:4]=[O:5].[OH2:2]", "step_desc": "Elimination"}], "cat": ""}, {"mech_name": "Aldol reaction (acid cat)", "steps": [{"description": "Tautomerization of substrate with acid cat", "smart_string": "[CH:4]([H:7])([H:8])[CH:5]=[O:6].[H+:9]>>[CH:4]([H:8])=[CH:5][O:6]([H:9]).[H+:7]", "step": 1}, {"description": "Nucleophilic addition from substrate", "smart_string": "[CH3:1][CH:2]=[O:3].[CH:4]([H:8])=[CH:5][O:6]([H:9]).[H+:7]>>[CH3:1][CH:2]([O:3][H:7])[CH:4]([H:8])[CH:5]=[O:6].[H+:9]", "step": 2}, {"description": "Tautomerization of substrate with acid cat", "smart_string": "[CH3:1][CH:2]([O:3][H:7])[CH:4]([H:8])[CH:5]=[O:6].[H+:9]>>[CH3:1][CH:2]([O:3][H:7])[CH:4]=[CH:5][O:6]([H:9]).[H+:8]", "step": 3}, {"description": "Elimination", "smart_string": "[CH3:1][CH:2]([O:3][H:7])[CH:4]=[CH:5][O:6]([H:9]).[H+:8]>>[CH3:1][CH:2]=[CH:4][CH:5]=[O:6].[H+:9].[O:3]([H:7])([H:8])", "step": 4}], "cat": "[H+]"}]}]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
[{"R-id": 1, "aam": "[c:4]1([H:11])[cH:5][cH:6][cH:7][cH:8][cH:9]1.[CH3:1][CH:2]([CH3:3])[Cl:10]>>[CH3:1][CH:2]([CH3:3])[c:4]1[cH:5][cH:6][cH:7][cH:8][cH:9]1.[H:11][Cl:10]"}, {"R-id": 2, "aam": "[CH3:1][C:2]([H:12])([CH3:3])[c:6]1[cH:7][cH:8][cH:9][cH:10][cH:11]1.[O:4]=[O:5]>>[CH3:1][C:2]([CH3:3])([O:4][O:5][H:12])[c:6]1[cH:7][cH:8][cH:9][cH:10][cH:11]1"}, {"R-id": 3, "aam": "[CH3:8][C:9]([CH3:11])([O:10][OH:1])[c:2]1[cH:3][cH:4][cH:5][cH:6][cH:7]1>>[OH:1][c:2]1[cH:3][cH:4][cH:5][cH:6][cH:7]1.[CH3:8][C:9](=[O:10])[CH3:11]"}, {"R-id": 4, "aam": "[H:12][O:4][c:5]1[cH:6][cH:7][cH:8][cH:9][cH:10]1.[CH3:1][C:2](=[O:3])[Cl:11]>>[CH3:1][C:2](=[O:3])[O:4][c:5]1[cH:6][cH:7][cH:8][cH:9][cH:10]1.[Cl:11][H:12]"}, {"R-id": 5, "aam": "[CH3:11][C:9](=[O:10])[O:8][c:7]1[cH:6][cH:5][c:4]([H:15])[cH:13][cH:12]1.[O:1]=[N+:2]([O-:3])[OH:14]>>[O:1]=[N+:2]([O-:3])[c:4]1[cH:5][cH:6][c:7]([O:8][C:9](=[O:10])[CH3:11])[cH:12][cH:13]1.[OH:14][H:15]"}, {"R-id": 6, "aam": "[O:12]=[N+:1]([O-:13])[c:2]1[cH:3][cH:4][c:5]([O:6][C:7](=[O:8])[CH3:9])[cH:10][cH:11]1.[H:14][H:15].[H:16][H:18].[H:17][H:19]>>[N:1]([H:18])([H:19])[c:2]1[cH:3][cH:4][c:5]([O:6][C:7](=[O:8])[CH3:9])[cH:10][cH:11]1.[H:14][O:12][H:15].[H:16][O:13][H:17]"}, {"R-id": 7, "aam": "[NH2:1][c:2]1[cH:3][cH:4][c:5]([O:6][C:10](=[O:11])[CH3:9])[cH:7][cH:8]1.[OH:12][H:13]>>[NH2:1][c:2]1[cH:3][cH:4][c:5]([O:6][H:13])[cH:7][cH:8]1.[CH3:9][C:10](=[O:11])[OH:12]"}, {"R-id": 8, "aam": "[H:13][NH:4][c:5]1[cH:6][cH:7][c:8]([OH:9])[cH:10][cH:11]1.[CH3:1][C:2](=[O:3])[Cl:12]>>[CH3:1][C:2](=[O:3])[NH:4][c:5]1[cH:6][cH:7][c:8]([OH:9])[cH:10][cH:11]1.[Cl:12][H:13]"}, {"R-id": 9, "aam": "[CH3:19][C:17](=[O:18])[NH:16][c:13]1[cH:12][cH:11][c:10]([O:9][H:21])[cH:15][cH:14]1.[CH3:1][CH2:2][N:3]([CH2:4][CH3:5])[CH2:6][C:7](=[O:8])[Cl:20]>>[CH3:1][CH2:2][N:3]([CH2:4][CH3:5])[CH2:6][C:7](=[O:8])[O:9][C:10]1=[CH:11][CH:12]=[C:13]([NH:16][C:17](=[O:18])[CH3:19])[CH:14]=[CH:15]1.[Cl:20][H:21]"}]
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
# .github/dependabot.yml
|
|
2
|
-
version: 2
|
|
3
|
-
updates:
|
|
4
|
-
- package-ecosystem: "pip"
|
|
5
|
-
directory: "/" # location of requirements.txt or pyproject.toml
|
|
6
|
-
target-branch: "staging" # open PRs against staging instead of main
|
|
7
|
-
schedule:
|
|
8
|
-
interval: "weekly" # check for updates once a week
|
|
9
|
-
open-pull-requests-limit: 5 # max concurrent Dependabot PRs
|
|
10
|
-
rebase-strategy: "auto" # auto-rebase PRs when they fall out of date
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
name: Build documentation for GitHub Pages
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- main
|
|
7
|
-
|
|
8
|
-
workflow_dispatch: # Enable manual action trigger
|
|
9
|
-
|
|
10
|
-
env:
|
|
11
|
-
PYTHONPATH: .
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
build_documentation_for_github_pages:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
steps:
|
|
17
|
-
- uses: actions/checkout@v3
|
|
18
|
-
with:
|
|
19
|
-
fetch-depth: 0
|
|
20
|
-
- uses: actions/setup-python@v4
|
|
21
|
-
with:
|
|
22
|
-
python-version: '3.11'
|
|
23
|
-
cache: 'pip' # caching pip dependencies
|
|
24
|
-
- run: pip install -r requirements.txt
|
|
25
|
-
- run: pip install sphinx sphinx-rtd-theme
|
|
26
|
-
- run: pip install sphinxcontrib-bibtex
|
|
27
|
-
- run: python3 -m sphinx ./doc docs
|
|
28
|
-
- name: publish doc
|
|
29
|
-
shell: bash
|
|
30
|
-
run: |
|
|
31
|
-
git config user.name "GitHub Action"
|
|
32
|
-
git config user.email "no@mail.tmp"
|
|
33
|
-
git add -f docs/
|
|
34
|
-
git commit -m "Doc build"
|
|
35
|
-
git push --force "https://github.com/TieuLongPhan/SynKit.git" `git subtree split --prefix docs/ main`:gh-pages
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
name: Publish to conda-forge
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
|
-
push:
|
|
7
|
-
branches: [refactor]
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
build:
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
outputs:
|
|
16
|
-
pkg_paths: ${{ steps.build.outputs.paths }}
|
|
17
|
-
steps:
|
|
18
|
-
- name: Checkout code
|
|
19
|
-
uses: actions/checkout@v3
|
|
20
|
-
with:
|
|
21
|
-
fetch-depth: 0
|
|
22
|
-
|
|
23
|
-
- name: Setup Miniconda
|
|
24
|
-
uses: conda-incubator/setup-miniconda@v2
|
|
25
|
-
with:
|
|
26
|
-
channels: conda-forge
|
|
27
|
-
auto-update-conda: true
|
|
28
|
-
auto-activate-base: true
|
|
29
|
-
|
|
30
|
-
- name: Create & activate build env
|
|
31
|
-
shell: bash -l {0}
|
|
32
|
-
run: |
|
|
33
|
-
conda create -n build python=3.11 'conda-build>=3.21' -c conda-forge -y
|
|
34
|
-
conda activate build
|
|
35
|
-
|
|
36
|
-
- id: build
|
|
37
|
-
name: Build conda package
|
|
38
|
-
shell: bash -l {0}
|
|
39
|
-
env:
|
|
40
|
-
GITHUB_RUN_NUMBER: ${{ github.run_number }}
|
|
41
|
-
run: |
|
|
42
|
-
conda activate build
|
|
43
|
-
rm -rf conda-bld && mkdir conda-bld
|
|
44
|
-
|
|
45
|
-
conda-build recipe --output-folder ./conda-bld
|
|
46
|
-
|
|
47
|
-
echo "DEBUG: Built files:"
|
|
48
|
-
find conda-bld -type f \( -name "*.conda" -o -name "*.tar.bz2" \) -print
|
|
49
|
-
|
|
50
|
-
files=$(find conda-bld -type f \( -name "*.conda" -o -name "*.tar.bz2" \) -print | tr '\n' ' ')
|
|
51
|
-
echo "paths=$files" >> $GITHUB_OUTPUT
|
|
52
|
-
|
|
53
|
-
- name: Upload built packages as artifact
|
|
54
|
-
uses: actions/upload-artifact@v4
|
|
55
|
-
with:
|
|
56
|
-
name: conda-packages
|
|
57
|
-
path: conda-bld/
|
|
58
|
-
|
|
59
|
-
publish_release:
|
|
60
|
-
needs: build
|
|
61
|
-
if: github.event_name == 'release'
|
|
62
|
-
runs-on: ubuntu-latest
|
|
63
|
-
steps:
|
|
64
|
-
- name: Download built packages
|
|
65
|
-
uses: actions/download-artifact@v4
|
|
66
|
-
with:
|
|
67
|
-
name: conda-packages
|
|
68
|
-
path: conda-bld
|
|
69
|
-
|
|
70
|
-
- name: Install Anaconda Client
|
|
71
|
-
run: python3 -m pip install --upgrade anaconda-client
|
|
72
|
-
|
|
73
|
-
- name: Upload to conda-forge / main
|
|
74
|
-
env:
|
|
75
|
-
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
|
|
76
|
-
run: |
|
|
77
|
-
for pkg in ${{ needs.build.outputs.pkg_paths }}; do
|
|
78
|
-
anaconda -t "$ANACONDA_TOKEN" upload \
|
|
79
|
-
--user tieulongphan \
|
|
80
|
-
--label main \
|
|
81
|
-
--no-progress \
|
|
82
|
-
"$pkg"
|
|
83
|
-
done
|
|
84
|
-
|
|
85
|
-
publish_beta:
|
|
86
|
-
needs: build
|
|
87
|
-
if: github.event_name == 'push' && github.ref == 'refs/heads/refactor'
|
|
88
|
-
runs-on: ubuntu-latest
|
|
89
|
-
steps:
|
|
90
|
-
- name: Download built packages
|
|
91
|
-
uses: actions/download-artifact@v4
|
|
92
|
-
with:
|
|
93
|
-
name: conda-packages
|
|
94
|
-
path: conda-bld
|
|
95
|
-
|
|
96
|
-
- name: Install Anaconda Client
|
|
97
|
-
run: python3 -m pip install --upgrade anaconda-client
|
|
98
|
-
|
|
99
|
-
- name: Upload to conda-forge / beta
|
|
100
|
-
env:
|
|
101
|
-
ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }}
|
|
102
|
-
run: |
|
|
103
|
-
for pkg in ${{ needs.build.outputs.pkg_paths }}; do
|
|
104
|
-
anaconda -t "$ANACONDA_TOKEN" upload \
|
|
105
|
-
--user tieulongphan \
|
|
106
|
-
--label beta \
|
|
107
|
-
--no-progress \
|
|
108
|
-
"$pkg"
|
|
109
|
-
done
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# .github/workflows/docker-publish.yml
|
|
2
|
-
name: Publish SynKit Docker Package
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
push:
|
|
6
|
-
# Fire on semver tags for real releases…
|
|
7
|
-
tags:
|
|
8
|
-
- 'v*.*.*'
|
|
9
|
-
# …and on any push to the refractor branch for testing
|
|
10
|
-
branches:
|
|
11
|
-
- 'staging'
|
|
12
|
-
|
|
13
|
-
jobs:
|
|
14
|
-
build-and-push:
|
|
15
|
-
runs-on: ubuntu-latest
|
|
16
|
-
permissions:
|
|
17
|
-
contents: read
|
|
18
|
-
packages: write
|
|
19
|
-
id-token: write
|
|
20
|
-
|
|
21
|
-
steps:
|
|
22
|
-
- name: Check out repository
|
|
23
|
-
uses: actions/checkout@v3
|
|
24
|
-
|
|
25
|
-
- name: Set up QEMU (optional, for multi‑arch)
|
|
26
|
-
uses: docker/setup-qemu-action@v3
|
|
27
|
-
|
|
28
|
-
- name: Set up Docker Buildx
|
|
29
|
-
uses: docker/setup-buildx-action@v2
|
|
30
|
-
|
|
31
|
-
- name: Log in to Docker Hub
|
|
32
|
-
uses: docker/login-action@v2
|
|
33
|
-
with:
|
|
34
|
-
username: ${{ secrets.DOCKERHUB_USER }}
|
|
35
|
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
36
|
-
|
|
37
|
-
- name: Build and push Docker image
|
|
38
|
-
uses: docker/build-push-action@v4
|
|
39
|
-
with:
|
|
40
|
-
context: .
|
|
41
|
-
file: Dockerfile
|
|
42
|
-
platforms: linux/amd64,linux/arm64
|
|
43
|
-
push: true
|
|
44
|
-
tags: |
|
|
45
|
-
tieulongphan/synkit:${{ github.ref_name }}
|
|
46
|
-
tieulongphan/synkit:latest
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
name: PyPI publish
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
release:
|
|
5
|
-
types: [published]
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
name: Build package
|
|
13
|
-
runs-on: ubuntu-latest
|
|
14
|
-
steps:
|
|
15
|
-
- name: Checkout
|
|
16
|
-
uses: actions/checkout@v3
|
|
17
|
-
- name: Set up Python
|
|
18
|
-
uses: actions/setup-python@v3
|
|
19
|
-
with:
|
|
20
|
-
python-version: '3.x'
|
|
21
|
-
- name: Install dependencies
|
|
22
|
-
run: |
|
|
23
|
-
python -m pip install --upgrade pip
|
|
24
|
-
pip install build
|
|
25
|
-
- name: Build package
|
|
26
|
-
run: python -m build
|
|
27
|
-
- name: Upload artifact
|
|
28
|
-
uses: actions/upload-artifact@v4
|
|
29
|
-
with:
|
|
30
|
-
name: package
|
|
31
|
-
path: dist/
|
|
32
|
-
|
|
33
|
-
publish:
|
|
34
|
-
name: Upload release to PyPI
|
|
35
|
-
needs: build
|
|
36
|
-
runs-on: ubuntu-latest
|
|
37
|
-
environment:
|
|
38
|
-
name: pypi
|
|
39
|
-
url: https://pypi.org/p/synkit
|
|
40
|
-
permissions:
|
|
41
|
-
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
|
|
42
|
-
steps:
|
|
43
|
-
- name: Download artifact
|
|
44
|
-
uses: actions/download-artifact@v4
|
|
45
|
-
with:
|
|
46
|
-
name: package
|
|
47
|
-
path: dist/
|
|
48
|
-
- name: Publish package to PyPI
|
|
49
|
-
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
name: Test & Lint
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: [ "main", "partialits", "staging", "refractor" ]
|
|
6
|
-
pull_request:
|
|
7
|
-
branches: [ "main" ]
|
|
8
|
-
|
|
9
|
-
permissions:
|
|
10
|
-
contents: read
|
|
11
|
-
|
|
12
|
-
jobs:
|
|
13
|
-
test-lint:
|
|
14
|
-
strategy:
|
|
15
|
-
fail-fast: false
|
|
16
|
-
matrix:
|
|
17
|
-
os: [ubuntu-latest, macos-latest, windows-latest]
|
|
18
|
-
|
|
19
|
-
runs-on: ${{ matrix.os }}
|
|
20
|
-
|
|
21
|
-
steps:
|
|
22
|
-
# 0) Check out the code
|
|
23
|
-
- uses: actions/checkout@v3
|
|
24
|
-
|
|
25
|
-
# 1) Install Miniconda (downloaded — the “bundled” version was removed)
|
|
26
|
-
- name: Set up Miniconda
|
|
27
|
-
uses: conda-incubator/setup-miniconda@v2
|
|
28
|
-
with:
|
|
29
|
-
miniconda-version: "latest" # <<–‑‑ mandatory or the action fails
|
|
30
|
-
python-version: "3.11"
|
|
31
|
-
auto-update-conda: true
|
|
32
|
-
environment-file: environment.yml
|
|
33
|
-
activate-environment: synkit-env
|
|
34
|
-
use-mamba: true # optional, just faster
|
|
35
|
-
|
|
36
|
-
# 2) Extra Linux‑only dependency: mod ≥ 0.17
|
|
37
|
-
- name: Install mod (Linux only)
|
|
38
|
-
if: matrix.os == 'ubuntu-latest'
|
|
39
|
-
run: conda run -n synkit-env conda install -c jakobandersen -c conda-forge "mod>=0.17" -y
|
|
40
|
-
|
|
41
|
-
# 3) Optional extra project deps via pip (requirements.txt)
|
|
42
|
-
- name: Install project requirements
|
|
43
|
-
if: hashFiles('requirements.txt') != ''
|
|
44
|
-
run: conda run -n synkit-env pip install -r requirements.txt
|
|
45
|
-
|
|
46
|
-
# 4a) Lint on Linux/macOS
|
|
47
|
-
- name: Lint (Unix)
|
|
48
|
-
if: matrix.os != 'windows-latest'
|
|
49
|
-
shell: bash -l {0}
|
|
50
|
-
run: |
|
|
51
|
-
conda activate synkit-env
|
|
52
|
-
bash lint.sh
|
|
53
|
-
|
|
54
|
-
# 4b) Lint on Windows
|
|
55
|
-
- name: Lint (Windows)
|
|
56
|
-
if: matrix.os == 'windows-latest'
|
|
57
|
-
shell: bash -l {0}
|
|
58
|
-
run: |
|
|
59
|
-
conda activate synkit-env
|
|
60
|
-
bash lint.sh
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
# 5) Test
|
|
64
|
-
- name: Test
|
|
65
|
-
shell: bash -l {0}
|
|
66
|
-
run: |
|
|
67
|
-
conda activate synkit-env
|
|
68
|
-
bash pytest.sh
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# .github/workflows/verify-synkit-pypi-install.yml
|
|
2
|
-
name: Verify SynKit PyPI install
|
|
3
|
-
|
|
4
|
-
on:
|
|
5
|
-
workflow_dispatch:
|
|
6
|
-
inputs:
|
|
7
|
-
branches:
|
|
8
|
-
type: string
|
|
9
|
-
required: true
|
|
10
|
-
default: refractor
|
|
11
|
-
|
|
12
|
-
# Scheduled test every Monday at 03:00 UTC
|
|
13
|
-
schedule:
|
|
14
|
-
- cron: '0 3 * * 1'
|
|
15
|
-
|
|
16
|
-
jobs:
|
|
17
|
-
verify:
|
|
18
|
-
runs-on: ubuntu-latest
|
|
19
|
-
|
|
20
|
-
steps:
|
|
21
|
-
- name: Setup Python
|
|
22
|
-
uses: actions/setup-python@v4
|
|
23
|
-
with:
|
|
24
|
-
python-version: '3.x'
|
|
25
|
-
|
|
26
|
-
- name: Create & activate virtualenv, upgrade pip, install SynKit
|
|
27
|
-
run: |
|
|
28
|
-
python -m venv venv
|
|
29
|
-
source venv/bin/activate
|
|
30
|
-
python -m pip install --upgrade pip
|
|
31
|
-
pip install synkit[all]
|
|
32
|
-
|
|
33
|
-
- name: Show installed SynKit version
|
|
34
|
-
run: |
|
|
35
|
-
source venv/bin/activate
|
|
36
|
-
python -c "import importlib.metadata as m; print('SynKit version:', m.version('synkit'))"
|
|
37
|
-
|
|
38
|
-
- name: Write smoke-test script
|
|
39
|
-
run: |
|
|
40
|
-
cat << 'EOF' > test_synkit.py
|
|
41
|
-
from synkit.IO import rsmi_to_rsmarts
|
|
42
|
-
|
|
43
|
-
template = (
|
|
44
|
-
'[C:2]=[O:3].[C:4]([H:7])[H:8]'
|
|
45
|
-
'>>'
|
|
46
|
-
'[C:2]=[C:4].[O:3]([H:7])[H:8]'
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
smart = rsmi_to_rsmarts(template)
|
|
50
|
-
print("Reaction SMARTS:", smart)
|
|
51
|
-
EOF
|
|
52
|
-
|
|
53
|
-
- name: Run smoke-test
|
|
54
|
-
run: |
|
|
55
|
-
source venv/bin/activate
|
|
56
|
-
python test_synkit.py
|
|
57
|
-
|
|
58
|
-
- name: Success message
|
|
59
|
-
run: echo "✅ synkit[all] installed and smoke-test passed"
|
synkit-0.0.15/.readthedocs.yml
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Read the Docs configuration file
|
|
2
|
-
# https://docs.readthedocs.io/en/stable/config-file/v2.html
|
|
3
|
-
|
|
4
|
-
# 1) Tell RTD this is v2 of the schema
|
|
5
|
-
version: 2
|
|
6
|
-
|
|
7
|
-
# 2) Pick your build image and interpreter
|
|
8
|
-
build:
|
|
9
|
-
os: ubuntu-22.04
|
|
10
|
-
tools:
|
|
11
|
-
python: "3.11"
|
|
12
|
-
|
|
13
|
-
# 3) Install your package + any doc-only extras
|
|
14
|
-
python:
|
|
15
|
-
install:
|
|
16
|
-
- method: pip
|
|
17
|
-
path: .
|
|
18
|
-
extra_requirements:
|
|
19
|
-
- docs
|
|
20
|
-
|
|
21
|
-
# 4) Point Sphinx at your conf.py and choose HTML
|
|
22
|
-
sphinx:
|
|
23
|
-
configuration: doc/conf.py
|
|
24
|
-
builder: html
|
|
Binary file
|
|
File without changes
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
rule [
|
|
2
|
-
ruleID "0"
|
|
3
|
-
left [
|
|
4
|
-
edge [ source 1 target 2 label "-" ]
|
|
5
|
-
edge [ source 3 target 4 label "-" ]
|
|
6
|
-
]
|
|
7
|
-
context [
|
|
8
|
-
node [ id 1 label "H" ]
|
|
9
|
-
node [ id 2 label "N" ]
|
|
10
|
-
node [ id 3 label "C" ]
|
|
11
|
-
node [ id 4 label "Br" ]
|
|
12
|
-
]
|
|
13
|
-
right [
|
|
14
|
-
edge [ source 1 target 4 label "-" ]
|
|
15
|
-
edge [ source 2 target 3 label "-" ]
|
|
16
|
-
]
|
|
17
|
-
]
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
rule [
|
|
2
|
-
ruleID "1"
|
|
3
|
-
left [
|
|
4
|
-
edge [ source 1 target 2 label "-" ]
|
|
5
|
-
edge [ source 3 target 4 label "-" ]
|
|
6
|
-
]
|
|
7
|
-
context [
|
|
8
|
-
node [ id 1 label "Br" ]
|
|
9
|
-
node [ id 2 label "C" ]
|
|
10
|
-
node [ id 3 label "O" ]
|
|
11
|
-
node [ id 4 label "H" ]
|
|
12
|
-
]
|
|
13
|
-
right [
|
|
14
|
-
edge [ source 1 target 4 label "-" ]
|
|
15
|
-
edge [ source 2 target 3 label "-" ]
|
|
16
|
-
]
|
|
17
|
-
]
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
rule [
|
|
2
|
-
ruleID "2"
|
|
3
|
-
left [
|
|
4
|
-
edge [ source 1 target 2 label "-" ]
|
|
5
|
-
edge [ source 3 target 4 label "-" ]
|
|
6
|
-
]
|
|
7
|
-
context [
|
|
8
|
-
node [ id 1 label "C" ]
|
|
9
|
-
node [ id 2 label "Cl" ]
|
|
10
|
-
node [ id 3 label "N" ]
|
|
11
|
-
node [ id 4 label "H" ]
|
|
12
|
-
]
|
|
13
|
-
right [
|
|
14
|
-
edge [ source 1 target 3 label "-" ]
|
|
15
|
-
edge [ source 2 target 4 label "-" ]
|
|
16
|
-
]
|
|
17
|
-
]
|
synkit-0.0.15/Dockerfile
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
############################################
|
|
2
|
-
# STAGE 1: Build your package wheel
|
|
3
|
-
############################################
|
|
4
|
-
FROM python:3.11-slim AS builder
|
|
5
|
-
|
|
6
|
-
# 1. Install system build tools (for any C extensions)
|
|
7
|
-
RUN apt-get update \
|
|
8
|
-
&& apt-get install -y --no-install-recommends build-essential \
|
|
9
|
-
&& rm -rf /var/lib/apt/lists/*
|
|
10
|
-
|
|
11
|
-
# 2. Upgrade pip/setuptools/wheel and install PEP 517 tooling + Hatchling backend
|
|
12
|
-
RUN pip install --upgrade pip setuptools wheel \
|
|
13
|
-
&& pip install --no-cache-dir build hatchling
|
|
14
|
-
|
|
15
|
-
# 3. Set working directory inside builder
|
|
16
|
-
WORKDIR /build
|
|
17
|
-
|
|
18
|
-
# 4. Copy project metadata (including README so Hatchling can find it)
|
|
19
|
-
COPY pyproject.toml README.md ./
|
|
20
|
-
# If you have a lockfile, uncomment:
|
|
21
|
-
# COPY poetry.lock ./
|
|
22
|
-
|
|
23
|
-
# 5. Copy your library source
|
|
24
|
-
COPY synkit/ ./synkit
|
|
25
|
-
|
|
26
|
-
# 6. Build the wheel
|
|
27
|
-
RUN python -m build --wheel --no-isolation
|
|
28
|
-
|
|
29
|
-
############################################
|
|
30
|
-
# STAGE 2: Create the “release” image
|
|
31
|
-
############################################
|
|
32
|
-
FROM python:3.11-slim
|
|
33
|
-
|
|
34
|
-
# 7. Set a clean workdir
|
|
35
|
-
WORKDIR /opt/synkit
|
|
36
|
-
|
|
37
|
-
# 8. Copy in the built wheel from the builder stage
|
|
38
|
-
COPY --from=builder /build/dist/*.whl ./
|
|
39
|
-
|
|
40
|
-
# 9. Install your package (and its dependencies), then remove the wheel
|
|
41
|
-
RUN pip install --no-cache-dir *.whl \
|
|
42
|
-
&& rm *.whl
|
|
43
|
-
|
|
44
|
-
# 10. Sanity check: print the installed synkit version
|
|
45
|
-
CMD ["python", "-c", "import importlib.metadata as m; print(m.version('synkit'))"]
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import io
|
|
2
|
-
import unittest
|
|
3
|
-
from contextlib import redirect_stdout
|
|
4
|
-
|
|
5
|
-
from synkit.Chem.Fingerprint.fp_calculator import FPCalculator
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class TestFPCalculator(unittest.TestCase):
|
|
9
|
-
def setUp(self):
|
|
10
|
-
# Sample single reaction dict
|
|
11
|
-
self.single = {"rsmi": "CCO>>CC=O"}
|
|
12
|
-
# List of dicts for parallel
|
|
13
|
-
self.batch = [
|
|
14
|
-
{"rsmi": "CCO>>CC=O"},
|
|
15
|
-
{"rsmi": "CC(Cl)C>>CCCl"},
|
|
16
|
-
]
|
|
17
|
-
self.rsmi_key = "rsmi"
|
|
18
|
-
self.fp_type = "ecfp4"
|
|
19
|
-
self.calc = FPCalculator(n_jobs=2, verbose=0)
|
|
20
|
-
|
|
21
|
-
def test_constructor_assigns_attributes(self):
|
|
22
|
-
self.assertEqual(self.calc.n_jobs, 2)
|
|
23
|
-
self.assertEqual(self.calc.verbose, 0)
|
|
24
|
-
|
|
25
|
-
def test_validate_fp_type_accepts_supported(self):
|
|
26
|
-
# Should not raise
|
|
27
|
-
for ft in FPCalculator.VALID_FP_TYPES:
|
|
28
|
-
self.calc._validate_fp_type(ft)
|
|
29
|
-
|
|
30
|
-
def test_validate_fp_type_rejects_unsupported(self):
|
|
31
|
-
with self.assertRaises(ValueError):
|
|
32
|
-
self.calc._validate_fp_type("invalid_fp")
|
|
33
|
-
|
|
34
|
-
def test_dict_process_missing_key_raises(self):
|
|
35
|
-
with self.assertRaises(ValueError):
|
|
36
|
-
FPCalculator.dict_process({}, self.rsmi_key, fp_type=self.fp_type)
|
|
37
|
-
|
|
38
|
-
def test_dict_process_adds_fingerprint(self):
|
|
39
|
-
data = {"rsmi": "CCO>>CC=O"}
|
|
40
|
-
out = FPCalculator.dict_process(data, "rsmi", fp_type="ecfp4")
|
|
41
|
-
self.assertIn("ecfp4", out)
|
|
42
|
-
# Check it's a list/vector (not None)
|
|
43
|
-
self.assertIsNotNone(out["ecfp4"])
|
|
44
|
-
|
|
45
|
-
def test_parallel_process_returns_list_of_dicts(self):
|
|
46
|
-
results = self.calc.parallel_process(self.batch, "rsmi", fp_type="ecfp4")
|
|
47
|
-
self.assertIsInstance(results, list)
|
|
48
|
-
self.assertEqual(len(results), 2)
|
|
49
|
-
for d in results:
|
|
50
|
-
self.assertIn("ecfp4", d)
|
|
51
|
-
|
|
52
|
-
def test_str_and_help_output(self):
|
|
53
|
-
s = str(self.calc)
|
|
54
|
-
self.assertIn("FPCalculator", s)
|
|
55
|
-
buf = io.StringIO()
|
|
56
|
-
with redirect_stdout(buf):
|
|
57
|
-
self.calc.help()
|
|
58
|
-
help_out = buf.getvalue()
|
|
59
|
-
|
|
60
|
-
# The help text starts with this exact line
|
|
61
|
-
self.assertIn(
|
|
62
|
-
"FPCalculator supports the following fingerprint types:", help_out
|
|
63
|
-
)
|
|
64
|
-
# And lists our parallel jobs config
|
|
65
|
-
self.assertIn(f"Configured for {self.calc.n_jobs} parallel jobs", help_out)
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
if __name__ == "__main__":
|
|
69
|
-
unittest.main()
|