From 7c82f62f40a778d4764838034a76cb90ff7822fe Mon Sep 17 00:00:00 2001 From: Klaus Weinbauer Date: Thu, 11 Apr 2024 17:09:01 +0200 Subject: [PATCH 1/5] rename module --- Docs/Paper_fig/figures.py | 6 +-- README.md | 4 +- Scripts/result_evaluation.py | 4 +- Scripts/validation_set_interface.py | 2 +- Test/SynChemImputer/test_appeal_reaction.py | 2 +- Test/SynChemImputer/test_peroxide_imputer.py | 2 +- .../MissingGraph/test_find_graph_dict.py | 2 +- .../MissingGraph/test_find_missing_graphs.py | 4 +- .../MissingGraph/test_molcurator.py | 2 +- .../MissingGraph/test_uncertainty_graph.py | 2 +- .../SubStructure/test_extract_common_mcs.py | 2 +- .../SubStructure/test_mcs_graph_detector.py | 2 +- .../SubStructure/test_mcs_process.py | 4 +- .../test_substructure_analyzer.py | 2 +- Test/SynMCSImputer/test_merge.py | 10 ++--- Test/SynMCSImputer/test_model.py | 14 +++--- Test/SynMCSImputer/test_rules.py | 4 +- Test/SynMCSImputer/test_structure.py | 2 +- Test/SynMCSImputer/test_utils.py | 2 +- .../SynProcessor/test_check_carbon_balance.py | 2 +- Test/SynProcessor/test_rmsi_comparator.py | 2 +- Test/SynProcessor/test_rmsi_decomposer.py | 2 +- Test/SynProcessor/test_rmsi_processing.py | 2 +- .../SynRuleImputer/test_auto_extract_rules.py | 2 +- .../test_auto_extract_smiles.py | 2 +- Test/SynRuleImputer/test_rule_constraint.py | 2 +- Test/SynRuleImputer/test_rule_data_manager.py | 2 +- .../test_synthetic_rule_imputer.py | 2 +- .../test_synthetic_rule_matcher.py | 2 +- Test/SynUtils/test_chem_utils.py | 2 +- Test/SynUtils/test_functional_group_utils.py | 2 +- Test/SynVis/test_reaction_visualizer.py | 2 +- synrbl.py | 2 +- {SynRBL => synrbl}/SynAnalysis/__init__.py | 0 .../SynAnalysis/analysis_process.py | 4 +- .../SynAnalysis/analysis_utils.py | 0 .../SynAnalysis/eda_analysis.py | 0 .../SynAnalysis/feature_analysis.py | 0 .../SynAnalysis/scoring_function.dump | Bin {SynRBL => synrbl}/SynAnalysis/visualizer.py | 0 {SynRBL => synrbl}/SynChemImputer/__init__.py | 0 .../SynChemImputer/appel_reaction.py | 0 .../functional_group_checker.py | 0 .../SynChemImputer/peroxide_imputer.py | 0 {SynRBL => synrbl}/SynCmd/__init__.py | 0 {SynRBL => synrbl}/SynCmd/cmd_benchmark.py | 4 +- {SynRBL => synrbl}/SynCmd/cmd_run.py | 2 +- {SynRBL => synrbl}/SynCmd/logging.py | 0 .../SynMCSImputer/MissingGraph/__init__.py | 0 .../MissingGraph/find_graph_dict.py | 4 +- .../MissingGraph/find_missing_graphs.py | 4 +- .../SynMCSImputer/MissingGraph/molcurator.py | 0 .../MissingGraph/refinement_uncertainty.py | 0 .../MissingGraph/uncertainty_graph.py | 0 .../SynMCSImputer/SubStructure/__init__.py | 0 .../SubStructure/extract_common_mcs.py | 0 .../SubStructure/mcs_graph_detector.py | 2 +- .../SynMCSImputer/SubStructure/mcs_process.py | 2 +- .../SubStructure/substructure_analyzer.py | 0 {SynRBL => synrbl}/SynMCSImputer/__init__.py | 0 .../SynMCSImputer/compound_rules.json | 0 .../SynMCSImputer/expand_rules.json | 0 {SynRBL => synrbl}/SynMCSImputer/merge.py | 0 .../SynMCSImputer/merge_rules.json | 0 .../SynMCSImputer/merge_rules_example.json | 0 {SynRBL => synrbl}/SynMCSImputer/model.py | 6 +-- {SynRBL => synrbl}/SynMCSImputer/rules.py | 40 +++++++++--------- {SynRBL => synrbl}/SynMCSImputer/structure.py | 0 {SynRBL => synrbl}/SynMCSImputer/utils.py | 0 {SynRBL => synrbl}/SynProcessor/__init__.py | 0 .../SynProcessor/check_carbon_balance.py | 0 .../SynProcessor/rsmi_both_side_process.py | 0 .../SynProcessor/rsmi_comparator.py | 0 .../SynProcessor/rsmi_decomposer.py | 0 .../SynProcessor/rsmi_processing.py | 2 +- {SynRBL => synrbl}/SynRuleImputer/__init__.py | 0 .../SynRuleImputer/auto_extract_rules.py | 2 +- .../SynRuleImputer/auto_extract_smiles.py | 0 .../SynRuleImputer/rule_data_manager.py | 2 +- .../SynRuleImputer/rules_manager.json.gz | 0 .../synthetic_rule_constraint.py | 0 .../SynRuleImputer/synthetic_rule_imputer.py | 2 +- .../SynRuleImputer/synthetic_rule_matcher.py | 4 +- {SynRBL => synrbl}/SynUtils/__init__.py | 0 {SynRBL => synrbl}/SynUtils/chem_utils.py | 2 +- {SynRBL => synrbl}/SynUtils/common.py | 0 {SynRBL => synrbl}/SynUtils/data_utils.py | 0 .../SynUtils/functional_group_utils.py | 0 {SynRBL => synrbl}/SynUtils/rsmi_utils.py | 0 {SynRBL => synrbl}/SynVis/__init__.py | 0 {SynRBL => synrbl}/SynVis/mcs_visualizer.py | 0 .../SynVis/reaction_visualizer.py | 0 {SynRBL => synrbl}/__init__.py | 0 {SynRBL => synrbl}/confidence_prediction.py | 8 ++-- {SynRBL => synrbl}/main.py | 12 +++--- {SynRBL => synrbl}/mcs.py | 6 +-- {SynRBL => synrbl}/postprocess.py | 4 +- {SynRBL => synrbl}/preprocess.py | 2 +- {SynRBL => synrbl}/rsmi_utils.py | 0 {SynRBL => synrbl}/rule_based.py | 14 +++--- synrbl/synrbl.py | 17 ++++++++ synrbl_pilot.py | 4 +- 102 files changed, 133 insertions(+), 116 deletions(-) rename {SynRBL => synrbl}/SynAnalysis/__init__.py (100%) rename {SynRBL => synrbl}/SynAnalysis/analysis_process.py (97%) rename {SynRBL => synrbl}/SynAnalysis/analysis_utils.py (100%) rename {SynRBL => synrbl}/SynAnalysis/eda_analysis.py (100%) rename {SynRBL => synrbl}/SynAnalysis/feature_analysis.py (100%) rename {SynRBL => synrbl}/SynAnalysis/scoring_function.dump (100%) rename {SynRBL => synrbl}/SynAnalysis/visualizer.py (100%) rename {SynRBL => synrbl}/SynChemImputer/__init__.py (100%) rename {SynRBL => synrbl}/SynChemImputer/appel_reaction.py (100%) rename {SynRBL => synrbl}/SynChemImputer/functional_group_checker.py (100%) rename {SynRBL => synrbl}/SynChemImputer/peroxide_imputer.py (100%) rename {SynRBL => synrbl}/SynCmd/__init__.py (100%) rename {SynRBL => synrbl}/SynCmd/cmd_benchmark.py (98%) rename {SynRBL => synrbl}/SynCmd/cmd_run.py (99%) rename {SynRBL => synrbl}/SynCmd/logging.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/MissingGraph/__init__.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/MissingGraph/find_graph_dict.py (98%) rename {SynRBL => synrbl}/SynMCSImputer/MissingGraph/find_missing_graphs.py (98%) rename {SynRBL => synrbl}/SynMCSImputer/MissingGraph/molcurator.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/MissingGraph/refinement_uncertainty.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/MissingGraph/uncertainty_graph.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/SubStructure/__init__.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/SubStructure/extract_common_mcs.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/SubStructure/mcs_graph_detector.py (99%) rename {SynRBL => synrbl}/SynMCSImputer/SubStructure/mcs_process.py (97%) rename {SynRBL => synrbl}/SynMCSImputer/SubStructure/substructure_analyzer.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/__init__.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/compound_rules.json (100%) rename {SynRBL => synrbl}/SynMCSImputer/expand_rules.json (100%) rename {SynRBL => synrbl}/SynMCSImputer/merge.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/merge_rules.json (100%) rename {SynRBL => synrbl}/SynMCSImputer/merge_rules_example.json (100%) rename {SynRBL => synrbl}/SynMCSImputer/model.py (96%) rename {SynRBL => synrbl}/SynMCSImputer/rules.py (96%) rename {SynRBL => synrbl}/SynMCSImputer/structure.py (100%) rename {SynRBL => synrbl}/SynMCSImputer/utils.py (100%) rename {SynRBL => synrbl}/SynProcessor/__init__.py (100%) rename {SynRBL => synrbl}/SynProcessor/check_carbon_balance.py (100%) rename {SynRBL => synrbl}/SynProcessor/rsmi_both_side_process.py (100%) rename {SynRBL => synrbl}/SynProcessor/rsmi_comparator.py (100%) rename {SynRBL => synrbl}/SynProcessor/rsmi_decomposer.py (100%) rename {SynRBL => synrbl}/SynProcessor/rsmi_processing.py (99%) rename {SynRBL => synrbl}/SynRuleImputer/__init__.py (100%) rename {SynRBL => synrbl}/SynRuleImputer/auto_extract_rules.py (97%) rename {SynRBL => synrbl}/SynRuleImputer/auto_extract_smiles.py (100%) rename {SynRBL => synrbl}/SynRuleImputer/rule_data_manager.py (99%) rename {SynRBL => synrbl}/SynRuleImputer/rules_manager.json.gz (100%) rename {SynRBL => synrbl}/SynRuleImputer/synthetic_rule_constraint.py (100%) rename {SynRBL => synrbl}/SynRuleImputer/synthetic_rule_imputer.py (98%) rename {SynRBL => synrbl}/SynRuleImputer/synthetic_rule_matcher.py (98%) rename {SynRBL => synrbl}/SynUtils/__init__.py (100%) rename {SynRBL => synrbl}/SynUtils/chem_utils.py (99%) rename {SynRBL => synrbl}/SynUtils/common.py (100%) rename {SynRBL => synrbl}/SynUtils/data_utils.py (100%) rename {SynRBL => synrbl}/SynUtils/functional_group_utils.py (100%) rename {SynRBL => synrbl}/SynUtils/rsmi_utils.py (100%) rename {SynRBL => synrbl}/SynVis/__init__.py (100%) rename {SynRBL => synrbl}/SynVis/mcs_visualizer.py (100%) rename {SynRBL => synrbl}/SynVis/reaction_visualizer.py (100%) rename {SynRBL => synrbl}/__init__.py (100%) rename {SynRBL => synrbl}/confidence_prediction.py (92%) rename {SynRBL => synrbl}/main.py (91%) rename {SynRBL => synrbl}/mcs.py (93%) rename {SynRBL => synrbl}/postprocess.py (94%) rename {SynRBL => synrbl}/preprocess.py (93%) rename {SynRBL => synrbl}/rsmi_utils.py (100%) rename {SynRBL => synrbl}/rule_based.py (92%) create mode 100644 synrbl/synrbl.py diff --git a/Docs/Paper_fig/figures.py b/Docs/Paper_fig/figures.py index 4529bc3..5243bd1 100644 --- a/Docs/Paper_fig/figures.py +++ b/Docs/Paper_fig/figures.py @@ -1,8 +1,8 @@ import matplotlib.pyplot as plt -from SynRBL.SynVis import ReactionVisualizer -from SynRBL.rsmi_utils import load_database -from SynRBL.SynUtils.chem_utils import remove_atom_mapping +from synrbl.SynVis import ReactionVisualizer +from synrbl.rsmi_utils import load_database +from synrbl.SynUtils.chem_utils import remove_atom_mapping def clear_atom_nums(dataset): diff --git a/README.md b/README.md index 991bb76..5903b88 100644 --- a/README.md +++ b/README.md @@ -90,13 +90,13 @@ To install and set up the SynRBL framework, follow these steps. Please ensure yo After installation, you can verify that SynRBL is correctly installed by running a simple test or checking the package version. ```python - python -c "import SynRBL; print(SynRBL.__version__)" + python -c "import synrbl; print(synrbl.__version__)" ``` ## Usage ```python - from SynRBL import SynRBL + from synrbl import Balancer ``` diff --git a/Scripts/result_evaluation.py b/Scripts/result_evaluation.py index 3963589..8b42679 100644 --- a/Scripts/result_evaluation.py +++ b/Scripts/result_evaluation.py @@ -6,9 +6,9 @@ import rdkit.Chem.rdChemReactions as rdChemReactions import rdkit.Chem.Draw.rdMolDraw2D as rdMolDraw2D from PIL import Image -from SynRBL.SynUtils.chem_utils import normalize_smiles, remove_atom_mapping +from synrbl.SynUtils.chem_utils import normalize_smiles, remove_atom_mapping -import Scripts.validation_set_interface as db +import scripts.validation_set_interface as db def get_reaction_img(smiles): diff --git a/Scripts/validation_set_interface.py b/Scripts/validation_set_interface.py index 5b5229d..7bd7fa3 100644 --- a/Scripts/validation_set_interface.py +++ b/Scripts/validation_set_interface.py @@ -2,7 +2,7 @@ import json import pandas as pd -from SynRBL.SynUtils.chem_utils import normalize_smiles +from synrbl.SynUtils.chem_utils import normalize_smiles _FILE_NAME = "dataset" diff --git a/Test/SynChemImputer/test_appeal_reaction.py b/Test/SynChemImputer/test_appeal_reaction.py index b9a9add..ba5b076 100644 --- a/Test/SynChemImputer/test_appeal_reaction.py +++ b/Test/SynChemImputer/test_appeal_reaction.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynChemImputer.appel_reaction import ( +from synrbl.SynChemImputer.appel_reaction import ( AppelReaction, ) # Make sure to import your class correctly diff --git a/Test/SynChemImputer/test_peroxide_imputer.py b/Test/SynChemImputer/test_peroxide_imputer.py index ecb6a33..73dd609 100644 --- a/Test/SynChemImputer/test_peroxide_imputer.py +++ b/Test/SynChemImputer/test_peroxide_imputer.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynChemImputer.peroxide_imputer import ( +from synrbl.SynChemImputer.peroxide_imputer import ( PeroxidGroupImputer, ) # Replace with the actual module name diff --git a/Test/SynMCSImputer/MissingGraph/test_find_graph_dict.py b/Test/SynMCSImputer/MissingGraph/test_find_graph_dict.py index 397a78f..2c60972 100644 --- a/Test/SynMCSImputer/MissingGraph/test_find_graph_dict.py +++ b/Test/SynMCSImputer/MissingGraph/test_find_graph_dict.py @@ -1,6 +1,6 @@ import unittest from rdkit import Chem -from SynRBL.SynMCSImputer.MissingGraph.find_graph_dict import ( +from synrbl.SynMCSImputer.MissingGraph.find_graph_dict import ( find_single_graph, find_single_graph_parallel, convert_smiles_to_mols, diff --git a/Test/SynMCSImputer/MissingGraph/test_find_missing_graphs.py b/Test/SynMCSImputer/MissingGraph/test_find_missing_graphs.py index 208ffdd..3f05d37 100644 --- a/Test/SynMCSImputer/MissingGraph/test_find_missing_graphs.py +++ b/Test/SynMCSImputer/MissingGraph/test_find_missing_graphs.py @@ -2,8 +2,8 @@ import copy from rdkit import Chem -from SynRBL.SynMCSImputer.SubStructure.substructure_analyzer import SubstructureAnalyzer -from SynRBL.SynMCSImputer.MissingGraph.find_missing_graphs import FindMissingGraphs +from synrbl.SynMCSImputer.SubStructure.substructure_analyzer import SubstructureAnalyzer +from synrbl.SynMCSImputer.MissingGraph.find_missing_graphs import FindMissingGraphs class TestFindMissingGraphs(unittest.TestCase): diff --git a/Test/SynMCSImputer/MissingGraph/test_molcurator.py b/Test/SynMCSImputer/MissingGraph/test_molcurator.py index 5da14ce..97fa644 100644 --- a/Test/SynMCSImputer/MissingGraph/test_molcurator.py +++ b/Test/SynMCSImputer/MissingGraph/test_molcurator.py @@ -1,7 +1,7 @@ import unittest from rdkit import Chem -from SynRBL.SynMCSImputer.MissingGraph.molcurator import MoleculeCurator +from synrbl.SynMCSImputer.MissingGraph.molcurator import MoleculeCurator class TestMoleculeCurator(unittest.TestCase): diff --git a/Test/SynMCSImputer/MissingGraph/test_uncertainty_graph.py b/Test/SynMCSImputer/MissingGraph/test_uncertainty_graph.py index b9d9dac..94cf454 100644 --- a/Test/SynMCSImputer/MissingGraph/test_uncertainty_graph.py +++ b/Test/SynMCSImputer/MissingGraph/test_uncertainty_graph.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynMCSImputer.MissingGraph.uncertainty_graph import GraphMissingUncertainty +from synrbl.SynMCSImputer.MissingGraph.uncertainty_graph import GraphMissingUncertainty class TestGraphMissingUncertainty(unittest.TestCase): diff --git a/Test/SynMCSImputer/SubStructure/test_extract_common_mcs.py b/Test/SynMCSImputer/SubStructure/test_extract_common_mcs.py index ca78a12..b5e3983 100644 --- a/Test/SynMCSImputer/SubStructure/test_extract_common_mcs.py +++ b/Test/SynMCSImputer/SubStructure/test_extract_common_mcs.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynMCSImputer.SubStructure.extract_common_mcs import ExtractMCS +from synrbl.SynMCSImputer.SubStructure.extract_common_mcs import ExtractMCS class TestExtractMCS(unittest.TestCase): diff --git a/Test/SynMCSImputer/SubStructure/test_mcs_graph_detector.py b/Test/SynMCSImputer/SubStructure/test_mcs_graph_detector.py index 54f770d..d978fb5 100644 --- a/Test/SynMCSImputer/SubStructure/test_mcs_graph_detector.py +++ b/Test/SynMCSImputer/SubStructure/test_mcs_graph_detector.py @@ -2,7 +2,7 @@ from rdkit import Chem -from SynRBL.SynMCSImputer.SubStructure.mcs_graph_detector import MCSMissingGraphAnalyzer +from synrbl.SynMCSImputer.SubStructure.mcs_graph_detector import MCSMissingGraphAnalyzer class TestMCSMissingGraphAnalyzer(unittest.TestCase): diff --git a/Test/SynMCSImputer/SubStructure/test_mcs_process.py b/Test/SynMCSImputer/SubStructure/test_mcs_process.py index be6bd47..1ec0885 100644 --- a/Test/SynMCSImputer/SubStructure/test_mcs_process.py +++ b/Test/SynMCSImputer/SubStructure/test_mcs_process.py @@ -2,7 +2,7 @@ from pathlib import Path from unittest.mock import patch -from SynRBL.SynMCSImputer.SubStructure.mcs_process import single_mcs +from synrbl.SynMCSImputer.SubStructure.mcs_process import single_mcs class TestMCSFunctions(unittest.TestCase): @@ -26,7 +26,7 @@ def setUp(self): ] @patch( - "SynRBL.SynMCSImputer.SubStructure.mcs_graph_detector.MCSMissingGraphAnalyzer.fit" + "synrbl.SynMCSImputer.SubStructure.mcs_graph_detector.MCSMissingGraphAnalyzer.fit" ) def test_single_mcs(self, mock_fit): # Mocking MCSMissingGraphAnalyzer.fit to return predefined values diff --git a/Test/SynMCSImputer/SubStructure/test_substructure_analyzer.py b/Test/SynMCSImputer/SubStructure/test_substructure_analyzer.py index a80aa09..52c91f3 100644 --- a/Test/SynMCSImputer/SubStructure/test_substructure_analyzer.py +++ b/Test/SynMCSImputer/SubStructure/test_substructure_analyzer.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynMCSImputer.SubStructure.substructure_analyzer import SubstructureAnalyzer +from synrbl.SynMCSImputer.SubStructure.substructure_analyzer import SubstructureAnalyzer from rdkit import Chem diff --git a/Test/SynMCSImputer/test_merge.py b/Test/SynMCSImputer/test_merge.py index 765168d..d247b38 100644 --- a/Test/SynMCSImputer/test_merge.py +++ b/Test/SynMCSImputer/test_merge.py @@ -1,8 +1,8 @@ import unittest import unittest.mock as mock -import SynRBL.SynMCSImputer.merge as merge -from SynRBL.SynMCSImputer.structure import Compound, CompoundSet +import synrbl.SynMCSImputer.merge as merge +from synrbl.SynMCSImputer.structure import Compound, CompoundSet class DummyMergeRule: @@ -28,7 +28,7 @@ def apply(self): class TestMergeBoundary(unittest.TestCase): - @mock.patch("SynRBL.SynMCSImputer.merge.MergeRule") + @mock.patch("synrbl.SynMCSImputer.merge.MergeRule") def test_no_rule_found(self, m_MergeRule): rule = mock.MagicMock() rule.can_apply.return_value = False @@ -89,7 +89,7 @@ def test_phosphor_bond3(self): class TestExpansion(unittest.TestCase): - @mock.patch("SynRBL.SynMCSImputer.merge.ExpandRule") + @mock.patch("synrbl.SynMCSImputer.merge.ExpandRule") def test_simple_expansion(self, m_ExpandRule): m_ExpandRule.get_all = mock.MagicMock(return_value=[DummyExpandRule()]) c = Compound("C") @@ -98,7 +98,7 @@ def test_simple_expansion(self, m_ExpandRule): self.assertEqual("O", cm.smiles) # type: ignore self.assertEqual(1, len(cm.boundaries)) # type: ignore - @mock.patch("SynRBL.SynMCSImputer.merge.ExpandRule") + @mock.patch("synrbl.SynMCSImputer.merge.ExpandRule") def test_rule_apply_check(self, m_ExpandRule): m_ExpandRule.get_all = mock.MagicMock( return_value=[ diff --git a/Test/SynMCSImputer/test_model.py b/Test/SynMCSImputer/test_model.py index 772c0c7..b22c13a 100644 --- a/Test/SynMCSImputer/test_model.py +++ b/Test/SynMCSImputer/test_model.py @@ -2,7 +2,7 @@ import unittest.mock as mock import rdkit.Chem.rdmolfiles as rdmolfiles -from SynRBL.SynMCSImputer.model import impute_reaction, build_compounds +from synrbl.SynMCSImputer.model import impute_reaction, build_compounds class TestBuildCompound(unittest.TestCase): @@ -84,9 +84,9 @@ def _reac_dict( "issue": issue, } - @mock.patch("SynRBL.SynMCSImputer.model.is_carbon_balanced") - @mock.patch("SynRBL.SynMCSImputer.model.merge") - @mock.patch("SynRBL.SynMCSImputer.model.build_compounds") + @mock.patch("synrbl.SynMCSImputer.model.is_carbon_balanced") + @mock.patch("synrbl.SynMCSImputer.model.merge") + @mock.patch("synrbl.SynMCSImputer.model.build_compounds") def test_successful_imputation(self, m_bc, m_merge, _): old_reaction = "A>>B" @@ -121,9 +121,9 @@ def test_successful_imputation(self, m_bc, m_merge, _): self.assertEqual(1, len(rules)) self.assertEqual(m_rule.name, rules[0]) - @mock.patch("SynRBL.SynMCSImputer.model.is_carbon_balanced") - @mock.patch("SynRBL.SynMCSImputer.model.merge") - @mock.patch("SynRBL.SynMCSImputer.model.build_compounds") + @mock.patch("synrbl.SynMCSImputer.model.is_carbon_balanced") + @mock.patch("synrbl.SynMCSImputer.model.merge") + @mock.patch("synrbl.SynMCSImputer.model.build_compounds") def test_carbon_check_fails(self, m_bc, m_merge, m_cec): old_reaction = "A>>B" diff --git a/Test/SynMCSImputer/test_rules.py b/Test/SynMCSImputer/test_rules.py index 6fffec6..7018e3a 100644 --- a/Test/SynMCSImputer/test_rules.py +++ b/Test/SynMCSImputer/test_rules.py @@ -1,7 +1,7 @@ import unittest -from SynRBL.SynMCSImputer.structure import Compound -from SynRBL.SynMCSImputer.rules import ( +from synrbl.SynMCSImputer.structure import Compound +from synrbl.SynMCSImputer.rules import ( Action, Property, FunctionalGroupProperty, diff --git a/Test/SynMCSImputer/test_structure.py b/Test/SynMCSImputer/test_structure.py index 6c010cd..700f9b3 100644 --- a/Test/SynMCSImputer/test_structure.py +++ b/Test/SynMCSImputer/test_structure.py @@ -1,6 +1,6 @@ import unittest import rdkit.Chem.rdmolfiles as rdmolfiles -import SynRBL.SynMCSImputer.structure as structure +import synrbl.SynMCSImputer.structure as structure class TestCompound(unittest.TestCase): diff --git a/Test/SynMCSImputer/test_utils.py b/Test/SynMCSImputer/test_utils.py index b150209..65996b9 100644 --- a/Test/SynMCSImputer/test_utils.py +++ b/Test/SynMCSImputer/test_utils.py @@ -1,7 +1,7 @@ import unittest import rdkit.Chem.rdmolfiles as rdmolfiles -from SynRBL.SynMCSImputer.utils import check_atom_dict, InvalidAtomDict +from synrbl.SynMCSImputer.utils import check_atom_dict, InvalidAtomDict class TestCheckAtoms(unittest.TestCase): diff --git a/Test/SynProcessor/test_check_carbon_balance.py b/Test/SynProcessor/test_check_carbon_balance.py index fe833e3..34db2a6 100644 --- a/Test/SynProcessor/test_check_carbon_balance.py +++ b/Test/SynProcessor/test_check_carbon_balance.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynProcessor.check_carbon_balance import CheckCarbonBalance +from synrbl.SynProcessor.check_carbon_balance import CheckCarbonBalance class TestCheckCarbonBalance(unittest.TestCase): diff --git a/Test/SynProcessor/test_rmsi_comparator.py b/Test/SynProcessor/test_rmsi_comparator.py index a64b43f..e04dbe7 100644 --- a/Test/SynProcessor/test_rmsi_comparator.py +++ b/Test/SynProcessor/test_rmsi_comparator.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynProcessor import RSMIComparator +from synrbl.SynProcessor import RSMIComparator class TestRSMIComparator(unittest.TestCase): diff --git a/Test/SynProcessor/test_rmsi_decomposer.py b/Test/SynProcessor/test_rmsi_decomposer.py index f1c3f18..03b7273 100644 --- a/Test/SynProcessor/test_rmsi_decomposer.py +++ b/Test/SynProcessor/test_rmsi_decomposer.py @@ -1,7 +1,7 @@ import unittest import pandas as pd -from SynRBL.SynProcessor.rsmi_decomposer import RSMIDecomposer +from synrbl.SynProcessor.rsmi_decomposer import RSMIDecomposer class TestRSMIDecomposer(unittest.TestCase): diff --git a/Test/SynProcessor/test_rmsi_processing.py b/Test/SynProcessor/test_rmsi_processing.py index 103eea8..125a056 100644 --- a/Test/SynProcessor/test_rmsi_processing.py +++ b/Test/SynProcessor/test_rmsi_processing.py @@ -1,7 +1,7 @@ import unittest import pandas as pd -from SynRBL.SynProcessor import RSMIProcessing +from synrbl.SynProcessor import RSMIProcessing class TestRSMIProcessing(unittest.TestCase): diff --git a/Test/SynRuleImputer/test_auto_extract_rules.py b/Test/SynRuleImputer/test_auto_extract_rules.py index 632846c..cd2caad 100644 --- a/Test/SynRuleImputer/test_auto_extract_rules.py +++ b/Test/SynRuleImputer/test_auto_extract_rules.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynRuleImputer import AutomaticRulesExtraction +from synrbl.SynRuleImputer import AutomaticRulesExtraction class TestAutomaticRulesExtraction(unittest.TestCase): diff --git a/Test/SynRuleImputer/test_auto_extract_smiles.py b/Test/SynRuleImputer/test_auto_extract_smiles.py index 03526db..30890f1 100644 --- a/Test/SynRuleImputer/test_auto_extract_smiles.py +++ b/Test/SynRuleImputer/test_auto_extract_smiles.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynRuleImputer import AutomaticSmilesExtraction +from synrbl.SynRuleImputer import AutomaticSmilesExtraction class TestAutomaticSmilesExtraction(unittest.TestCase): diff --git a/Test/SynRuleImputer/test_rule_constraint.py b/Test/SynRuleImputer/test_rule_constraint.py index 80fa26a..7152d83 100644 --- a/Test/SynRuleImputer/test_rule_constraint.py +++ b/Test/SynRuleImputer/test_rule_constraint.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynRuleImputer import RuleConstraint +from synrbl.SynRuleImputer import RuleConstraint class TestRuleConstraint(unittest.TestCase): diff --git a/Test/SynRuleImputer/test_rule_data_manager.py b/Test/SynRuleImputer/test_rule_data_manager.py index 67e5e4a..b4c7e94 100644 --- a/Test/SynRuleImputer/test_rule_data_manager.py +++ b/Test/SynRuleImputer/test_rule_data_manager.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynRuleImputer import RuleImputeManager +from synrbl.SynRuleImputer import RuleImputeManager class TestRuleImputeManager(unittest.TestCase): diff --git a/Test/SynRuleImputer/test_synthetic_rule_imputer.py b/Test/SynRuleImputer/test_synthetic_rule_imputer.py index 7d808ab..a7d0040 100644 --- a/Test/SynRuleImputer/test_synthetic_rule_imputer.py +++ b/Test/SynRuleImputer/test_synthetic_rule_imputer.py @@ -2,7 +2,7 @@ from rdkit import Chem -from SynRBL.SynRuleImputer import SyntheticRuleImputer +from synrbl.SynRuleImputer import SyntheticRuleImputer # not fixed diff --git a/Test/SynRuleImputer/test_synthetic_rule_matcher.py b/Test/SynRuleImputer/test_synthetic_rule_matcher.py index f32ebcd..b917e85 100644 --- a/Test/SynRuleImputer/test_synthetic_rule_matcher.py +++ b/Test/SynRuleImputer/test_synthetic_rule_matcher.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynRuleImputer import SyntheticRuleMatcher +from synrbl.SynRuleImputer import SyntheticRuleMatcher class TestSyntheticRuleMatcher(unittest.TestCase): diff --git a/Test/SynUtils/test_chem_utils.py b/Test/SynUtils/test_chem_utils.py index 1bc821c..cd99de4 100644 --- a/Test/SynUtils/test_chem_utils.py +++ b/Test/SynUtils/test_chem_utils.py @@ -1,6 +1,6 @@ import unittest import itertools -from SynRBL.SynUtils.chem_utils import remove_atom_mapping, normalize_smiles +from synrbl.SynUtils.chem_utils import remove_atom_mapping, normalize_smiles class TestRemoveAtomMapping(unittest.TestCase): diff --git a/Test/SynUtils/test_functional_group_utils.py b/Test/SynUtils/test_functional_group_utils.py index 88da6e9..79c5d71 100644 --- a/Test/SynUtils/test_functional_group_utils.py +++ b/Test/SynUtils/test_functional_group_utils.py @@ -1,6 +1,6 @@ import unittest import rdkit.Chem.rdmolfiles as rdmolfiles -import SynRBL.SynUtils.functional_group_utils as fgutils +import synrbl.SynUtils.functional_group_utils as fgutils class TestReduce(unittest.TestCase): diff --git a/Test/SynVis/test_reaction_visualizer.py b/Test/SynVis/test_reaction_visualizer.py index f2d76d7..9f5af4e 100644 --- a/Test/SynVis/test_reaction_visualizer.py +++ b/Test/SynVis/test_reaction_visualizer.py @@ -1,6 +1,6 @@ import unittest -from SynRBL.SynVis import ReactionVisualizer +from synrbl.SynVis import ReactionVisualizer from PIL import Image diff --git a/synrbl.py b/synrbl.py index c8f41a8..baed7fd 100644 --- a/synrbl.py +++ b/synrbl.py @@ -1,5 +1,5 @@ import logging -import SynRBL.SynCmd as cmd +import synrbl.SynCmd as cmd if __name__ == "__main__": logger = logging.getLogger("SynRBL") diff --git a/SynRBL/SynAnalysis/__init__.py b/synrbl/SynAnalysis/__init__.py similarity index 100% rename from SynRBL/SynAnalysis/__init__.py rename to synrbl/SynAnalysis/__init__.py diff --git a/SynRBL/SynAnalysis/analysis_process.py b/synrbl/SynAnalysis/analysis_process.py similarity index 97% rename from SynRBL/SynAnalysis/analysis_process.py rename to synrbl/SynAnalysis/analysis_process.py index ec849f6..b52d9cb 100644 --- a/SynRBL/SynAnalysis/analysis_process.py +++ b/synrbl/SynAnalysis/analysis_process.py @@ -1,7 +1,7 @@ import pandas as pd -from SynRBL.rsmi_utils import load_database -from SynRBL.SynAnalysis.analysis_utils import ( +from synrbl.rsmi_utils import load_database +from synrbl.SynAnalysis.analysis_utils import ( remove_atom_mapping_from_reaction_smiles, calculate_chemical_properties, count_boundary_atoms_products_and_calculate_changes, diff --git a/SynRBL/SynAnalysis/analysis_utils.py b/synrbl/SynAnalysis/analysis_utils.py similarity index 100% rename from SynRBL/SynAnalysis/analysis_utils.py rename to synrbl/SynAnalysis/analysis_utils.py diff --git a/SynRBL/SynAnalysis/eda_analysis.py b/synrbl/SynAnalysis/eda_analysis.py similarity index 100% rename from SynRBL/SynAnalysis/eda_analysis.py rename to synrbl/SynAnalysis/eda_analysis.py diff --git a/SynRBL/SynAnalysis/feature_analysis.py b/synrbl/SynAnalysis/feature_analysis.py similarity index 100% rename from SynRBL/SynAnalysis/feature_analysis.py rename to synrbl/SynAnalysis/feature_analysis.py diff --git a/SynRBL/SynAnalysis/scoring_function.dump b/synrbl/SynAnalysis/scoring_function.dump similarity index 100% rename from SynRBL/SynAnalysis/scoring_function.dump rename to synrbl/SynAnalysis/scoring_function.dump diff --git a/SynRBL/SynAnalysis/visualizer.py b/synrbl/SynAnalysis/visualizer.py similarity index 100% rename from SynRBL/SynAnalysis/visualizer.py rename to synrbl/SynAnalysis/visualizer.py diff --git a/SynRBL/SynChemImputer/__init__.py b/synrbl/SynChemImputer/__init__.py similarity index 100% rename from SynRBL/SynChemImputer/__init__.py rename to synrbl/SynChemImputer/__init__.py diff --git a/SynRBL/SynChemImputer/appel_reaction.py b/synrbl/SynChemImputer/appel_reaction.py similarity index 100% rename from SynRBL/SynChemImputer/appel_reaction.py rename to synrbl/SynChemImputer/appel_reaction.py diff --git a/SynRBL/SynChemImputer/functional_group_checker.py b/synrbl/SynChemImputer/functional_group_checker.py similarity index 100% rename from SynRBL/SynChemImputer/functional_group_checker.py rename to synrbl/SynChemImputer/functional_group_checker.py diff --git a/SynRBL/SynChemImputer/peroxide_imputer.py b/synrbl/SynChemImputer/peroxide_imputer.py similarity index 100% rename from SynRBL/SynChemImputer/peroxide_imputer.py rename to synrbl/SynChemImputer/peroxide_imputer.py diff --git a/SynRBL/SynCmd/__init__.py b/synrbl/SynCmd/__init__.py similarity index 100% rename from SynRBL/SynCmd/__init__.py rename to synrbl/SynCmd/__init__.py diff --git a/SynRBL/SynCmd/cmd_benchmark.py b/synrbl/SynCmd/cmd_benchmark.py similarity index 98% rename from SynRBL/SynCmd/cmd_benchmark.py rename to synrbl/SynCmd/cmd_benchmark.py index 23b3925..ed02276 100644 --- a/SynRBL/SynCmd/cmd_benchmark.py +++ b/synrbl/SynCmd/cmd_benchmark.py @@ -2,8 +2,8 @@ import logging import pandas as pd -from SynRBL import Balancer -from SynRBL.SynUtils.chem_utils import normalize_smiles +from synrbl import Balancer +from synrbl.SynUtils.chem_utils import normalize_smiles logger = logging.getLogger(__name__) diff --git a/SynRBL/SynCmd/cmd_run.py b/synrbl/SynCmd/cmd_run.py similarity index 99% rename from SynRBL/SynCmd/cmd_run.py rename to synrbl/SynCmd/cmd_run.py index 910cbb7..8c23edb 100644 --- a/SynRBL/SynCmd/cmd_run.py +++ b/synrbl/SynCmd/cmd_run.py @@ -2,7 +2,7 @@ import logging import pandas as pd -from SynRBL import Balancer +from synrbl import Balancer logger = logging.getLogger(__name__) diff --git a/SynRBL/SynCmd/logging.py b/synrbl/SynCmd/logging.py similarity index 100% rename from SynRBL/SynCmd/logging.py rename to synrbl/SynCmd/logging.py diff --git a/SynRBL/SynMCSImputer/MissingGraph/__init__.py b/synrbl/SynMCSImputer/MissingGraph/__init__.py similarity index 100% rename from SynRBL/SynMCSImputer/MissingGraph/__init__.py rename to synrbl/SynMCSImputer/MissingGraph/__init__.py diff --git a/SynRBL/SynMCSImputer/MissingGraph/find_graph_dict.py b/synrbl/SynMCSImputer/MissingGraph/find_graph_dict.py similarity index 98% rename from SynRBL/SynMCSImputer/MissingGraph/find_graph_dict.py rename to synrbl/SynMCSImputer/MissingGraph/find_graph_dict.py index b80df7c..d655d4f 100644 --- a/SynRBL/SynMCSImputer/MissingGraph/find_graph_dict.py +++ b/synrbl/SynMCSImputer/MissingGraph/find_graph_dict.py @@ -4,8 +4,8 @@ from rdkit.rdBase import BlockLogs from joblib import Parallel, delayed from typing import List -from SynRBL.SynMCSImputer.MissingGraph.find_missing_graphs import FindMissingGraphs -from SynRBL.SynMCSImputer.MissingGraph.uncertainty_graph import GraphMissingUncertainty +from synrbl.SynMCSImputer.MissingGraph.find_missing_graphs import FindMissingGraphs +from synrbl.SynMCSImputer.MissingGraph.uncertainty_graph import GraphMissingUncertainty def find_single_graph(mcs_mol_list, sorted_reactants_mol_list): diff --git a/SynRBL/SynMCSImputer/MissingGraph/find_missing_graphs.py b/synrbl/SynMCSImputer/MissingGraph/find_missing_graphs.py similarity index 98% rename from SynRBL/SynMCSImputer/MissingGraph/find_missing_graphs.py rename to synrbl/SynMCSImputer/MissingGraph/find_missing_graphs.py index 56f89ca..b4429e9 100644 --- a/SynRBL/SynMCSImputer/MissingGraph/find_missing_graphs.py +++ b/synrbl/SynMCSImputer/MissingGraph/find_missing_graphs.py @@ -1,8 +1,8 @@ import copy from rdkit import Chem -from SynRBL.SynMCSImputer.SubStructure.substructure_analyzer import SubstructureAnalyzer -from SynRBL.SynMCSImputer.MissingGraph.molcurator import MoleculeCurator +from synrbl.SynMCSImputer.SubStructure.substructure_analyzer import SubstructureAnalyzer +from synrbl.SynMCSImputer.MissingGraph.molcurator import MoleculeCurator from typing import List, Dict, Optional, Tuple diff --git a/SynRBL/SynMCSImputer/MissingGraph/molcurator.py b/synrbl/SynMCSImputer/MissingGraph/molcurator.py similarity index 100% rename from SynRBL/SynMCSImputer/MissingGraph/molcurator.py rename to synrbl/SynMCSImputer/MissingGraph/molcurator.py diff --git a/SynRBL/SynMCSImputer/MissingGraph/refinement_uncertainty.py b/synrbl/SynMCSImputer/MissingGraph/refinement_uncertainty.py similarity index 100% rename from SynRBL/SynMCSImputer/MissingGraph/refinement_uncertainty.py rename to synrbl/SynMCSImputer/MissingGraph/refinement_uncertainty.py diff --git a/SynRBL/SynMCSImputer/MissingGraph/uncertainty_graph.py b/synrbl/SynMCSImputer/MissingGraph/uncertainty_graph.py similarity index 100% rename from SynRBL/SynMCSImputer/MissingGraph/uncertainty_graph.py rename to synrbl/SynMCSImputer/MissingGraph/uncertainty_graph.py diff --git a/SynRBL/SynMCSImputer/SubStructure/__init__.py b/synrbl/SynMCSImputer/SubStructure/__init__.py similarity index 100% rename from SynRBL/SynMCSImputer/SubStructure/__init__.py rename to synrbl/SynMCSImputer/SubStructure/__init__.py diff --git a/SynRBL/SynMCSImputer/SubStructure/extract_common_mcs.py b/synrbl/SynMCSImputer/SubStructure/extract_common_mcs.py similarity index 100% rename from SynRBL/SynMCSImputer/SubStructure/extract_common_mcs.py rename to synrbl/SynMCSImputer/SubStructure/extract_common_mcs.py diff --git a/SynRBL/SynMCSImputer/SubStructure/mcs_graph_detector.py b/synrbl/SynMCSImputer/SubStructure/mcs_graph_detector.py similarity index 99% rename from SynRBL/SynMCSImputer/SubStructure/mcs_graph_detector.py rename to synrbl/SynMCSImputer/SubStructure/mcs_graph_detector.py index 67536a3..de967fa 100644 --- a/SynRBL/SynMCSImputer/SubStructure/mcs_graph_detector.py +++ b/synrbl/SynMCSImputer/SubStructure/mcs_graph_detector.py @@ -1,7 +1,7 @@ from rdkit import Chem from rdkit.Chem import rdFMCS from rdkit.Chem import rdRascalMCES -from SynRBL.SynMCSImputer.SubStructure.substructure_analyzer import SubstructureAnalyzer +from synrbl.SynMCSImputer.SubStructure.substructure_analyzer import SubstructureAnalyzer class MCSMissingGraphAnalyzer: diff --git a/SynRBL/SynMCSImputer/SubStructure/mcs_process.py b/synrbl/SynMCSImputer/SubStructure/mcs_process.py similarity index 97% rename from SynRBL/SynMCSImputer/SubStructure/mcs_process.py rename to synrbl/SynMCSImputer/SubStructure/mcs_process.py index 7f16d65..349859e 100644 --- a/SynRBL/SynMCSImputer/SubStructure/mcs_process.py +++ b/synrbl/SynMCSImputer/SubStructure/mcs_process.py @@ -3,7 +3,7 @@ import copy import logging -from SynRBL.SynMCSImputer.SubStructure.mcs_graph_detector import MCSMissingGraphAnalyzer +from synrbl.SynMCSImputer.SubStructure.mcs_graph_detector import MCSMissingGraphAnalyzer from rdkit import Chem from joblib import Parallel, delayed diff --git a/SynRBL/SynMCSImputer/SubStructure/substructure_analyzer.py b/synrbl/SynMCSImputer/SubStructure/substructure_analyzer.py similarity index 100% rename from SynRBL/SynMCSImputer/SubStructure/substructure_analyzer.py rename to synrbl/SynMCSImputer/SubStructure/substructure_analyzer.py diff --git a/SynRBL/SynMCSImputer/__init__.py b/synrbl/SynMCSImputer/__init__.py similarity index 100% rename from SynRBL/SynMCSImputer/__init__.py rename to synrbl/SynMCSImputer/__init__.py diff --git a/SynRBL/SynMCSImputer/compound_rules.json b/synrbl/SynMCSImputer/compound_rules.json similarity index 100% rename from SynRBL/SynMCSImputer/compound_rules.json rename to synrbl/SynMCSImputer/compound_rules.json diff --git a/SynRBL/SynMCSImputer/expand_rules.json b/synrbl/SynMCSImputer/expand_rules.json similarity index 100% rename from SynRBL/SynMCSImputer/expand_rules.json rename to synrbl/SynMCSImputer/expand_rules.json diff --git a/SynRBL/SynMCSImputer/merge.py b/synrbl/SynMCSImputer/merge.py similarity index 100% rename from SynRBL/SynMCSImputer/merge.py rename to synrbl/SynMCSImputer/merge.py diff --git a/SynRBL/SynMCSImputer/merge_rules.json b/synrbl/SynMCSImputer/merge_rules.json similarity index 100% rename from SynRBL/SynMCSImputer/merge_rules.json rename to synrbl/SynMCSImputer/merge_rules.json diff --git a/SynRBL/SynMCSImputer/merge_rules_example.json b/synrbl/SynMCSImputer/merge_rules_example.json similarity index 100% rename from SynRBL/SynMCSImputer/merge_rules_example.json rename to synrbl/SynMCSImputer/merge_rules_example.json diff --git a/SynRBL/SynMCSImputer/model.py b/synrbl/SynMCSImputer/model.py similarity index 96% rename from SynRBL/SynMCSImputer/model.py rename to synrbl/SynMCSImputer/model.py index 6d0900a..269bc84 100644 --- a/SynRBL/SynMCSImputer/model.py +++ b/synrbl/SynMCSImputer/model.py @@ -1,6 +1,6 @@ -from SynRBL.SynMCSImputer.structure import CompoundSet -from SynRBL.SynMCSImputer.utils import is_carbon_balanced -from SynRBL.SynMCSImputer.merge import merge +from synrbl.SynMCSImputer.structure import CompoundSet +from synrbl.SynMCSImputer.utils import is_carbon_balanced +from synrbl.SynMCSImputer.merge import merge from rdkit.rdBase import BlockLogs diff --git a/SynRBL/SynMCSImputer/rules.py b/synrbl/SynMCSImputer/rules.py similarity index 96% rename from SynRBL/SynMCSImputer/rules.py rename to synrbl/SynMCSImputer/rules.py index 9715fc1..e2f3909 100644 --- a/SynRBL/SynMCSImputer/rules.py +++ b/synrbl/SynMCSImputer/rules.py @@ -9,11 +9,11 @@ import rdkit.Chem.rdmolops as rdmolops import rdkit.Chem.rdchem as rdchem -import SynRBL.SynMCSImputer -import SynRBL.SynUtils.functional_group_utils as fgutils -import SynRBL.SynMCSImputer.utils as utils +import synrbl.SynMCSImputer +import synrbl.SynUtils.functional_group_utils as fgutils +import synrbl.SynMCSImputer.utils as utils -from SynRBL.SynUtils.chem_utils import remove_atom_mapping +from synrbl.SynUtils.chem_utils import remove_atom_mapping from .structure import Boundary, Compound @@ -416,7 +416,7 @@ class BoundaryCondition: """ Atom condition class to check if a rule is applicable to a specific molecule. Property configs can be prefixed with '!' to negate the check. - See SynRBL.SynMCSImputer.rule_formation.Property for more information. + See synrbl.SynMCSImputer.rule_formation.Property for more information. Example: Check if atom is Carbon and has Oxygen or Nitrogen as neighbor. @@ -426,8 +426,8 @@ class BoundaryCondition: True Attributes: - atom (SynRBL.SynMCSImputer.rule_formation.Property): Atom property - neighbor_atom (SynRBL.SynMCSImputer.rule_formation.Property): Neighbors property + atom (synrbl.SynMCSImputer.rule_formation.Property): Atom property + neighbor_atom (synrbl.SynMCSImputer.rule_formation.Property): Neighbors property """ def __init__( @@ -442,7 +442,7 @@ def __init__( """ Atom condition class to check if a rule is applicable to a specific molecule. Property configs can be prefixed with '!' to negate the - check. See SynRBL.SynMCSImputer.rule_formation.Property for more information. + check. See synrbl.SynMCSImputer.rule_formation.Property for more information. Arguments: atom: Atom property configuration. @@ -591,7 +591,7 @@ class MergeRule: meets condition1 and boundary atom2 meets condition2 a bond is formed between atom1 and atom2. A merge rule can be configured by providing a suitable dictionary. Examples on how to configure merge rules can be found - in SynRBL/SynMCS/merge_rules.json file. + in synrbl/SynMCS/merge_rules.json file. Example: The following example shows a complete default configuration for a merge rule. @@ -652,14 +652,14 @@ def __init__( def get_all(cls) -> list[MergeRule]: """ Get a list of merge rules. The rules are configured in - SynRBL/SynMCS/merge_rules.json. + synrbl/SynMCS/merge_rules.json. Returns: list[MergeRule]: Returns a list of merge rules. """ if cls._merge_rules is None: json_data = ( - importlib.resources.files(SynRBL.SynMCSImputer) + importlib.resources.files(synrbl.SynMCSImputer) .joinpath("merge_rules.json") .read_text() ) @@ -671,8 +671,8 @@ def can_apply(self, boundary1: Boundary, boundary2: Boundary): Check if the rule can be applied to merge atom1 and atom2. Arguments: - boundary1 (SynRBL.SynMCSImputer.structure.Boundary): First boundary. - boundary2 (SynRBL.SynMCSImputer.structure.Boundary): Second boundary. + boundary1 (synrbl.SynMCSImputer.structure.Boundary): First boundary. + boundary2 (synrbl.SynMCSImputer.structure.Boundary): Second boundary. Returns: bool: True if the rule can be applied, false otherwise. @@ -726,7 +726,7 @@ class ExpandRule: Class for defining a compound expansion rule. The compound is added if the boundary atom meets the condition. A compound rule can be configured by providing a suitable dictionary. Examples on how to configure compound - rules can be found in SynRBL/SynMCS/expand_rules.json file. + rules can be found in synrbl/SynMCS/expand_rules.json file. Attributes: name (str, optional): A descriptive name for the rule. This attribute @@ -749,14 +749,14 @@ def __init__(self, name="unnamed", condition={}, compound=None, **kwargs): def get_all(cls) -> list[ExpandRule]: """ Get a list of compound expansion rules. The rules are configured in - SynRBL/SynMCS/expand.json. + synrbl/SynMCS/expand.json. Returns: list[ExpandRule]: Returns a list of compound rules. """ if cls._expand_rules is None: json_data = ( - importlib.resources.files(SynRBL.SynMCSImputer) + importlib.resources.files(synrbl.SynMCSImputer) .joinpath("expand_rules.json") .read_text() ) @@ -784,7 +784,7 @@ def apply(self) -> Compound: Apply the compound rule. Returns: - SynRBL.SynMCSImputer.structure.Compound: The compound generated by this + synrbl.SynMCSImputer.structure.Compound: The compound generated by this rule. """ compound = Compound(self.compound["smiles"]) @@ -812,7 +812,7 @@ def __init__(self, name="unnamed", condition={}, action=[], **kwargs): def get_all(cls) -> list[CompoundRule]: if cls._compound_rules is None: json_data = ( - importlib.resources.files(SynRBL.SynMCSImputer) + importlib.resources.files(synrbl.SynMCSImputer) .joinpath("compound_rules.json") .read_text() ) @@ -832,7 +832,7 @@ def apply(self, compound: Compound) -> Compound: def get_merge_rules() -> list[MergeRule]: """ Get a list of merge rules. The rules are configured in - SynRBL/SynMCS/merge_rules.json. + synrbl/SynMCS/merge_rules.json. Returns: list[MergeRule]: Returns a list of merge rules. @@ -843,7 +843,7 @@ def get_merge_rules() -> list[MergeRule]: def get_expand_rules() -> list[ExpandRule]: """ Get a list of compound expandsion rules. The rules are configured in - SynRBL/SynMCS/expand_rules.json. + synrbl/SynMCS/expand_rules.json. Returns: list[ExpandRule]: Returns a list of compound rules. diff --git a/SynRBL/SynMCSImputer/structure.py b/synrbl/SynMCSImputer/structure.py similarity index 100% rename from SynRBL/SynMCSImputer/structure.py rename to synrbl/SynMCSImputer/structure.py diff --git a/SynRBL/SynMCSImputer/utils.py b/synrbl/SynMCSImputer/utils.py similarity index 100% rename from SynRBL/SynMCSImputer/utils.py rename to synrbl/SynMCSImputer/utils.py diff --git a/SynRBL/SynProcessor/__init__.py b/synrbl/SynProcessor/__init__.py similarity index 100% rename from SynRBL/SynProcessor/__init__.py rename to synrbl/SynProcessor/__init__.py diff --git a/SynRBL/SynProcessor/check_carbon_balance.py b/synrbl/SynProcessor/check_carbon_balance.py similarity index 100% rename from SynRBL/SynProcessor/check_carbon_balance.py rename to synrbl/SynProcessor/check_carbon_balance.py diff --git a/SynRBL/SynProcessor/rsmi_both_side_process.py b/synrbl/SynProcessor/rsmi_both_side_process.py similarity index 100% rename from SynRBL/SynProcessor/rsmi_both_side_process.py rename to synrbl/SynProcessor/rsmi_both_side_process.py diff --git a/SynRBL/SynProcessor/rsmi_comparator.py b/synrbl/SynProcessor/rsmi_comparator.py similarity index 100% rename from SynRBL/SynProcessor/rsmi_comparator.py rename to synrbl/SynProcessor/rsmi_comparator.py diff --git a/SynRBL/SynProcessor/rsmi_decomposer.py b/synrbl/SynProcessor/rsmi_decomposer.py similarity index 100% rename from SynRBL/SynProcessor/rsmi_decomposer.py rename to synrbl/SynProcessor/rsmi_decomposer.py diff --git a/SynRBL/SynProcessor/rsmi_processing.py b/synrbl/SynProcessor/rsmi_processing.py similarity index 99% rename from SynRBL/SynProcessor/rsmi_processing.py rename to synrbl/SynProcessor/rsmi_processing.py index 0473abc..9b91022 100644 --- a/SynRBL/SynProcessor/rsmi_processing.py +++ b/synrbl/SynProcessor/rsmi_processing.py @@ -2,7 +2,7 @@ import rdkit.Chem as Chem from joblib import Parallel, delayed -from SynRBL.rsmi_utils import save_database +from synrbl.rsmi_utils import save_database from typing import Tuple diff --git a/SynRBL/SynRuleImputer/__init__.py b/synrbl/SynRuleImputer/__init__.py similarity index 100% rename from SynRBL/SynRuleImputer/__init__.py rename to synrbl/SynRuleImputer/__init__.py diff --git a/SynRBL/SynRuleImputer/auto_extract_rules.py b/synrbl/SynRuleImputer/auto_extract_rules.py similarity index 97% rename from SynRBL/SynRuleImputer/auto_extract_rules.py rename to synrbl/SynRuleImputer/auto_extract_rules.py index 572350b..868aaa4 100644 --- a/SynRBL/SynRuleImputer/auto_extract_rules.py +++ b/synrbl/SynRuleImputer/auto_extract_rules.py @@ -3,7 +3,7 @@ from joblib import Parallel, delayed import pandas as pd from typing import List -from SynRBL.SynRuleImputer.rule_data_manager import RuleImputeManager +from synrbl.SynRuleImputer.rule_data_manager import RuleImputeManager class AutomaticRulesExtraction: diff --git a/SynRBL/SynRuleImputer/auto_extract_smiles.py b/synrbl/SynRuleImputer/auto_extract_smiles.py similarity index 100% rename from SynRBL/SynRuleImputer/auto_extract_smiles.py rename to synrbl/SynRuleImputer/auto_extract_smiles.py diff --git a/SynRBL/SynRuleImputer/rule_data_manager.py b/synrbl/SynRuleImputer/rule_data_manager.py similarity index 99% rename from SynRBL/SynRuleImputer/rule_data_manager.py rename to synrbl/SynRuleImputer/rule_data_manager.py index faa924e..041b4be 100644 --- a/SynRBL/SynRuleImputer/rule_data_manager.py +++ b/synrbl/SynRuleImputer/rule_data_manager.py @@ -1,5 +1,5 @@ from rdkit import Chem -from SynRBL.SynProcessor import RSMIDecomposer +from synrbl.SynProcessor import RSMIDecomposer import pandas as pd from typing import List, Optional, Dict diff --git a/SynRBL/SynRuleImputer/rules_manager.json.gz b/synrbl/SynRuleImputer/rules_manager.json.gz similarity index 100% rename from SynRBL/SynRuleImputer/rules_manager.json.gz rename to synrbl/SynRuleImputer/rules_manager.json.gz diff --git a/SynRBL/SynRuleImputer/synthetic_rule_constraint.py b/synrbl/SynRuleImputer/synthetic_rule_constraint.py similarity index 100% rename from SynRBL/SynRuleImputer/synthetic_rule_constraint.py rename to synrbl/SynRuleImputer/synthetic_rule_constraint.py diff --git a/SynRBL/SynRuleImputer/synthetic_rule_imputer.py b/synrbl/SynRuleImputer/synthetic_rule_imputer.py similarity index 98% rename from SynRBL/SynRuleImputer/synthetic_rule_imputer.py rename to synrbl/SynRuleImputer/synthetic_rule_imputer.py index 7f4cc6d..ea59922 100644 --- a/SynRBL/SynRuleImputer/synthetic_rule_imputer.py +++ b/synrbl/SynRuleImputer/synthetic_rule_imputer.py @@ -1,7 +1,7 @@ import copy from rdkit import Chem -from SynRBL.SynRuleImputer.synthetic_rule_matcher import SyntheticRuleMatcher +from synrbl.SynRuleImputer.synthetic_rule_matcher import SyntheticRuleMatcher from joblib import Parallel, delayed from typing import List, Dict, Any, Union, Optional from rdkit import RDLogger diff --git a/SynRBL/SynRuleImputer/synthetic_rule_matcher.py b/synrbl/SynRuleImputer/synthetic_rule_matcher.py similarity index 98% rename from SynRBL/SynRuleImputer/synthetic_rule_matcher.py rename to synrbl/SynRuleImputer/synthetic_rule_matcher.py index 422452b..480f20d 100644 --- a/SynRBL/SynRuleImputer/synthetic_rule_matcher.py +++ b/synrbl/SynRuleImputer/synthetic_rule_matcher.py @@ -1,5 +1,5 @@ -from SynRBL.SynUtils.data_utils import find_shortest_sublists -from SynRBL.SynUtils.chem_utils import calculate_net_charge +from synrbl.SynUtils.data_utils import find_shortest_sublists +from synrbl.SynUtils.chem_utils import calculate_net_charge from typing import List, Dict, Any from typing import Union diff --git a/SynRBL/SynUtils/__init__.py b/synrbl/SynUtils/__init__.py similarity index 100% rename from SynRBL/SynUtils/__init__.py rename to synrbl/SynUtils/__init__.py diff --git a/SynRBL/SynUtils/chem_utils.py b/synrbl/SynUtils/chem_utils.py similarity index 99% rename from SynRBL/SynUtils/chem_utils.py rename to synrbl/SynUtils/chem_utils.py index 224d0d0..835a6b3 100644 --- a/SynRBL/SynUtils/chem_utils.py +++ b/synrbl/SynUtils/chem_utils.py @@ -9,7 +9,7 @@ from PIL import Image from reportlab.pdfgen import canvas from reportlab.lib.pagesizes import landscape, letter -from SynRBL.SynVis.reaction_visualizer import ReactionVisualizer +from synrbl.SynVis.reaction_visualizer import ReactionVisualizer class CheckCarbonBalance: diff --git a/SynRBL/SynUtils/common.py b/synrbl/SynUtils/common.py similarity index 100% rename from SynRBL/SynUtils/common.py rename to synrbl/SynUtils/common.py diff --git a/SynRBL/SynUtils/data_utils.py b/synrbl/SynUtils/data_utils.py similarity index 100% rename from SynRBL/SynUtils/data_utils.py rename to synrbl/SynUtils/data_utils.py diff --git a/SynRBL/SynUtils/functional_group_utils.py b/synrbl/SynUtils/functional_group_utils.py similarity index 100% rename from SynRBL/SynUtils/functional_group_utils.py rename to synrbl/SynUtils/functional_group_utils.py diff --git a/SynRBL/SynUtils/rsmi_utils.py b/synrbl/SynUtils/rsmi_utils.py similarity index 100% rename from SynRBL/SynUtils/rsmi_utils.py rename to synrbl/SynUtils/rsmi_utils.py diff --git a/SynRBL/SynVis/__init__.py b/synrbl/SynVis/__init__.py similarity index 100% rename from SynRBL/SynVis/__init__.py rename to synrbl/SynVis/__init__.py diff --git a/SynRBL/SynVis/mcs_visualizer.py b/synrbl/SynVis/mcs_visualizer.py similarity index 100% rename from SynRBL/SynVis/mcs_visualizer.py rename to synrbl/SynVis/mcs_visualizer.py diff --git a/SynRBL/SynVis/reaction_visualizer.py b/synrbl/SynVis/reaction_visualizer.py similarity index 100% rename from SynRBL/SynVis/reaction_visualizer.py rename to synrbl/SynVis/reaction_visualizer.py diff --git a/SynRBL/__init__.py b/synrbl/__init__.py similarity index 100% rename from SynRBL/__init__.py rename to synrbl/__init__.py diff --git a/SynRBL/confidence_prediction.py b/synrbl/confidence_prediction.py similarity index 92% rename from SynRBL/confidence_prediction.py rename to synrbl/confidence_prediction.py index e670a11..8e07530 100644 --- a/SynRBL/confidence_prediction.py +++ b/synrbl/confidence_prediction.py @@ -2,13 +2,13 @@ import pandas as pd import numpy as np import importlib.resources -import SynRBL.SynAnalysis +import synrbl.SynAnalysis -from SynRBL.SynAnalysis.analysis_utils import ( +from synrbl.SynAnalysis.analysis_utils import ( calculate_chemical_properties, count_boundary_atoms_products_and_calculate_changes, ) -from SynRBL.SynUtils.common import update_reactants_and_products +from synrbl.SynUtils.common import update_reactants_and_products class ConfidencePredictor: @@ -22,7 +22,7 @@ def __init__( mcs_col="mcs", ): self.model = joblib.load( - importlib.resources.files(SynRBL.SynAnalysis) + importlib.resources.files(synrbl.SynAnalysis) .joinpath("scoring_function.dump") .open("rb") ) diff --git a/SynRBL/main.py b/synrbl/main.py similarity index 91% rename from SynRBL/main.py rename to synrbl/main.py index 0324d6d..04d1658 100644 --- a/SynRBL/main.py +++ b/synrbl/main.py @@ -2,12 +2,12 @@ import logging import pandas as pd -from SynRBL.preprocess import preprocess -from SynRBL.postprocess import Validator -from SynRBL.rule_based import RuleBasedMethod -from SynRBL.mcs import MCS -from SynRBL.SynMCSImputer.model import MCSBasedMethod -from SynRBL.confidence_prediction import ConfidencePredictor +from synrbl.preprocess import preprocess +from synrbl.postprocess import Validator +from synrbl.rule_based import RuleBasedMethod +from synrbl.mcs import MCS +from synrbl.SynMCSImputer.model import MCSBasedMethod +from synrbl.confidence_prediction import ConfidencePredictor logger = logging.getLogger("SynRBL") diff --git a/SynRBL/mcs.py b/synrbl/mcs.py similarity index 93% rename from SynRBL/mcs.py rename to synrbl/mcs.py index df7115f..1986bd6 100644 --- a/SynRBL/mcs.py +++ b/synrbl/mcs.py @@ -1,8 +1,8 @@ import logging -from SynRBL.SynMCSImputer.SubStructure.mcs_process import ensemble_mcs -from SynRBL.SynMCSImputer.SubStructure.extract_common_mcs import ExtractMCS -from SynRBL.SynMCSImputer.MissingGraph.find_graph_dict import find_graph_dict +from synrbl.SynMCSImputer.SubStructure.mcs_process import ensemble_mcs +from synrbl.SynMCSImputer.SubStructure.extract_common_mcs import ExtractMCS +from synrbl.SynMCSImputer.MissingGraph.find_graph_dict import find_graph_dict logger = logging.getLogger(__name__) diff --git a/SynRBL/postprocess.py b/synrbl/postprocess.py similarity index 94% rename from SynRBL/postprocess.py rename to synrbl/postprocess.py index 13988f5..eddef72 100644 --- a/SynRBL/postprocess.py +++ b/synrbl/postprocess.py @@ -1,5 +1,5 @@ -from SynRBL.SynProcessor import RSMIComparator, RSMIDecomposer, CheckCarbonBalance -from SynRBL.SynUtils.common import update_reactants_and_products +from synrbl.SynProcessor import RSMIComparator, RSMIDecomposer, CheckCarbonBalance +from synrbl.SynUtils.common import update_reactants_and_products class Validator: diff --git a/SynRBL/preprocess.py b/synrbl/preprocess.py similarity index 93% rename from SynRBL/preprocess.py rename to synrbl/preprocess.py index 9676b6a..59004bf 100644 --- a/SynRBL/preprocess.py +++ b/synrbl/preprocess.py @@ -1,6 +1,6 @@ import pandas as pd -from SynRBL.SynProcessor import RSMIProcessing +from synrbl.SynProcessor import RSMIProcessing def preprocess(reactions, reaction_col, index_col, solved_col, n_jobs=1): diff --git a/SynRBL/rsmi_utils.py b/synrbl/rsmi_utils.py similarity index 100% rename from SynRBL/rsmi_utils.py rename to synrbl/rsmi_utils.py diff --git a/SynRBL/rule_based.py b/synrbl/rule_based.py similarity index 92% rename from SynRBL/rule_based.py rename to synrbl/rule_based.py index fb33700..50f828f 100644 --- a/SynRBL/rule_based.py +++ b/synrbl/rule_based.py @@ -4,21 +4,21 @@ import importlib.resources -import SynRBL.SynRuleImputer -from SynRBL.SynRuleImputer import SyntheticRuleImputer -from SynRBL.SynRuleImputer.synthetic_rule_constraint import RuleConstraint -from SynRBL.SynProcessor import ( +import synrbl.SynRuleImputer +from synrbl.SynRuleImputer import SyntheticRuleImputer +from synrbl.SynRuleImputer.synthetic_rule_constraint import RuleConstraint +from synrbl.SynProcessor import ( RSMIDecomposer, RSMIComparator, BothSideReact, ) -from SynRBL.rsmi_utils import ( +from synrbl.rsmi_utils import ( load_database, filter_data, extract_results_by_key, ) -from SynRBL.SynUtils.common import update_reactants_and_products +from synrbl.SynUtils.common import update_reactants_and_products logger = logging.getLogger(__name__) @@ -28,7 +28,7 @@ def __init__(self, id_col, reaction_col, output_col, rules_path=None, n_jobs=1): self.id_col = id_col self.reaction_col = reaction_col if rules_path is None: - with importlib.resources.files(SynRBL.SynRuleImputer).joinpath( + with importlib.resources.files(synrbl.SynRuleImputer).joinpath( "rules_manager.json.gz" ).open("r") as f: self.rules = json.load(f) diff --git a/synrbl/synrbl.py b/synrbl/synrbl.py new file mode 100644 index 0000000..baed7fd --- /dev/null +++ b/synrbl/synrbl.py @@ -0,0 +1,17 @@ +import logging +import synrbl.SynCmd as cmd + +if __name__ == "__main__": + logger = logging.getLogger("SynRBL") + ch = logging.StreamHandler() + ch.setLevel(logging.INFO) + formatter = logging.Formatter( + "[%(asctime)s %(levelname)s] %(message)s", datefmt="%y-%m-%d %H:%M:%S" + ) + ch.setFormatter(formatter) + logger.setLevel(logging.INFO) + logger.addHandler(ch) + + parser = cmd.setup_argparser() + args = parser.parse_args() + args.func(args) diff --git a/synrbl_pilot.py b/synrbl_pilot.py index 3c4f667..c6877bc 100644 --- a/synrbl_pilot.py +++ b/synrbl_pilot.py @@ -3,8 +3,8 @@ import os import logging import traceback -from SynRBL import Balancer -from SynRBL.rsmi_utils import load_database, save_database +from synrbl import Balancer +from synrbl.rsmi_utils import load_database, save_database def setup_logging(log_file=None): From c6d581f9e7df93c35ec33698c9b46fff04a626cd Mon Sep 17 00:00:00 2001 From: Klaus Weinbauer Date: Thu, 11 Apr 2024 17:18:45 +0200 Subject: [PATCH 2/5] add package main script --- synrbl/{synrbl.py => __main__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename synrbl/{synrbl.py => __main__.py} (100%) diff --git a/synrbl/synrbl.py b/synrbl/__main__.py similarity index 100% rename from synrbl/synrbl.py rename to synrbl/__main__.py From d431bf11c8f1eb0815135894828c6c014d3d0e54 Mon Sep 17 00:00:00 2001 From: Klaus Weinbauer Date: Thu, 11 Apr 2024 17:23:10 +0200 Subject: [PATCH 3/5] prepare release v0.0.5 --- .gitignore | 166 ++++++++++++++++++++++++++++++++++++++++++++++--- pyproject.toml | 2 +- setup.py | 21 ------- 3 files changed, 159 insertions(+), 30 deletions(-) delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index 683e448..53e4a69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,18 +1,168 @@ .DS_Store *.pyc .vscode - -.DS_Store .jukit/ - - -venv/ *.pdf -.coverage tmp/ out/ + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ -Data/Validation_set/validation_set_result.csv -Data/Run/ +# Cython debug symbols +cython_debug/ +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ diff --git a/pyproject.toml b/pyproject.toml index 8d07f47..6b83128 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "synrbl" -version = "0.0.4" +version = "0.0.5" authors = [ {name="Tieu Long Phan", email="long.tieu_phan@uni-leipzig.de"}, {name="Klaus Weinbauer", email="klaus@bioinf.uni-leipzig.de"} diff --git a/setup.py b/setup.py deleted file mode 100644 index a6f1e60..0000000 --- a/setup.py +++ /dev/null @@ -1,21 +0,0 @@ -from setuptools import setup, find_packages - -setup( - name="SynRBL", - version="0.1.1", - description="Synthesis Rebalancing Framework for Computational Chemistry", - author="TieuLongPhan - Klaus Weinbauer", - author_email="long.tieu_phan@uni-leipzig.de - klaus@bioinf.uni-leipzig.de", - url="https://github.com/TieuLongPhan/SynRBL", - packages=find_packages(), - install_requires=[ - "rdkit==2023.9.4", - "joblib==1.3.2", - "seaborn==0.13.2", - "xgboost==2.0.3", - "scikit_learn==1.4.1.post1", - "imbalanced_learn==0.12.0", - "reportlab==4.1.0", - ], - python_requires=">=3.11", -) From 3af7848c53ecffb239cfc241e28d6de13abdc6fe Mon Sep 17 00:00:00 2001 From: Klaus Weinbauer Date: Thu, 11 Apr 2024 17:25:22 +0200 Subject: [PATCH 4/5] cleanup --- synrbl_pilot.py => Scripts/synrbl_pilot.py | 0 synrbl.py | 17 ----------------- 2 files changed, 17 deletions(-) rename synrbl_pilot.py => Scripts/synrbl_pilot.py (100%) delete mode 100644 synrbl.py diff --git a/synrbl_pilot.py b/Scripts/synrbl_pilot.py similarity index 100% rename from synrbl_pilot.py rename to Scripts/synrbl_pilot.py diff --git a/synrbl.py b/synrbl.py deleted file mode 100644 index baed7fd..0000000 --- a/synrbl.py +++ /dev/null @@ -1,17 +0,0 @@ -import logging -import synrbl.SynCmd as cmd - -if __name__ == "__main__": - logger = logging.getLogger("SynRBL") - ch = logging.StreamHandler() - ch.setLevel(logging.INFO) - formatter = logging.Formatter( - "[%(asctime)s %(levelname)s] %(message)s", datefmt="%y-%m-%d %H:%M:%S" - ) - ch.setFormatter(formatter) - logger.setLevel(logging.INFO) - logger.addHandler(ch) - - parser = cmd.setup_argparser() - args = parser.parse_args() - args.func(args) From 2e23e6c089ce1465f7d8cccc90ce9de4f64a9cad Mon Sep 17 00:00:00 2001 From: Klaus Weinbauer Date: Thu, 11 Apr 2024 17:26:27 +0200 Subject: [PATCH 5/5] cleanup --- .DS_Store | Bin 10244 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index b15744f4b8d1c08d06f31e9bfab58f6a065d1d5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10244 zcmeHMU2GiH6+UO`p|#1=iWQJ zo?UMcf~roXxz^6PKj+-J_q*Rc_uMf6V6v$90mJ}6q92p$W_r{~teySVq=;YBMH0y# zCM_qMv78K*)iv5-MTkI%K!`wyK!`wyz^#A)o!Kl&O+tpx5P=YZ5P=E;%s<5F$7I5n zD?)PDK@WZfAlX3GJW-y9{v>0pf@H#%D?(BYB^0J4g(>=14D@dfD9oun;p?vmDa--+ zo2eiF&FJ4y(7$+KjH?4Cgbbe{0wDrx5ny-s2IzrBFu|+7zeg6St>@o7al?vUX35R_ z_xvlFyk)vxZ|^%8+0d}Dag(%3YLZT;&N)jdPxFdyQY)NfrCGISKtnlo+PSxP!ZTX(r_N;F8aB&XFK7cchr4|d1;`}SYzj$J%3(%T&y z8X3HFNtW8;`wq^e&s#a$xh$rNzPo@eqFi}CPPxi_N~wZvIX0Uw)8AUg12pjHuRz#j zph!6b+!~DDCjB5rO2yVBOl@$;+Nid{&KjEr80T-&s`cPH4QHSVe_!vGz<*$9nB(71 z_zw;Ye=7X_`RH!e$`C&o_!Tg$#lBS5$>pi8oL1Z1(wHD%?9O|}1&`%UxK6^se9+`}nF3lG+=0io(TjsUOuIO%A{eg5!r?DJ$bk?CR^mj#XlcbZZeym{7Q&cN^qhF9! zO`3ISW}=HOrCU~AdG627lK5l6l!xB}4%CMx~FVB_41V!Zm<)E|;yXARW zpBzoc71eh~6O#Hf=|T4HBbw_?S;^!R&{DR8l~kh?UG6Ug)kRxMtw_?q6#n$)Z0+srq?_LkPR-E3zJA52sTBq&#AS&+S)uvIkY zgykz-%d}|wj*gw5Q#y|mqm2t6$p zc6D~D5!z;=*t4%wQ8&;glDX|b7ZuSjjOGJ}lE7R)MRICaEK~ zH$DSLUxDw#75EAKia2_m*!c(e3j#LcW{l!)jA0ya$GybKUhF4c4su?OViL#j2yt_o zbMqvg#x$NGhJFPt;-^jgTqb^g6))i<_$WSxm+=XF2EUEZ;&b>szJM}zv^XnrwE;A% zD)ybrd`wjutD~x~QD5{^{s!Wq*2QD8l)bk`g1J{DgM^H8_1uYaUFwtr~oQ^Z9d z{lV3$+2uTiX|1ajysvu;hGCyvESUP#*|VggiL42STPfV9HcZiG%agm{qrfY%=ek{pyJaNCT zBf(xc$SInEhu|@I8eW3e;VL=s_u)_QS419Aw2|}PLr!}LhjBz$Rt|hW04Tqcf6J&^ zuR3n8sy*oVu6~r>JuRGZjn1m;yO~ZM=U3H7&Gu}7S$0(dZ@o7UzbO7UE-L