D4CMPP2 0.4.0__py3-none-any.whl
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.
- D4CMPP2/_Data/AGENTS.md +24 -0
- D4CMPP2/_Data/Aqsoldb.csv +9291 -0
- D4CMPP2/_Data/BradleyMP.csv +3042 -0
- D4CMPP2/_Data/Lipophilicity.csv +1131 -0
- D4CMPP2/_Data/README.md +8 -0
- D4CMPP2/_Data/__init__.py +26 -0
- D4CMPP2/_Data/optical.csv +20237 -0
- D4CMPP2/_Data/test.csv +190 -0
- D4CMPP2/__init__.py +16 -0
- D4CMPP2/__main__.py +5 -0
- D4CMPP2/_main.py +500 -0
- D4CMPP2/cli.py +7 -0
- D4CMPP2/exceptions.py +53 -0
- D4CMPP2/grid_search.py +259 -0
- D4CMPP2/network_refer.yaml +160 -0
- D4CMPP2/networks/AFP_model.py +72 -0
- D4CMPP2/networks/AFPwithSolv_model.py +72 -0
- D4CMPP2/networks/DMPNN_model.py +90 -0
- D4CMPP2/networks/DMPNNwithSolv_model.py +89 -0
- D4CMPP2/networks/GAT_model.py +48 -0
- D4CMPP2/networks/GATwithSolv_model.py +63 -0
- D4CMPP2/networks/GCN_model.py +113 -0
- D4CMPP2/networks/GCNwithSolv_model.py +103 -0
- D4CMPP2/networks/GC_model.py +122 -0
- D4CMPP2/networks/ISATPM_model.py +14 -0
- D4CMPP2/networks/ISATPN_model.py +199 -0
- D4CMPP2/networks/ISAT_model.py +90 -0
- D4CMPP2/networks/MPNN_model.py +56 -0
- D4CMPP2/networks/MPNNwithSolv_model.py +72 -0
- D4CMPP2/networks/__init__.py +25 -0
- D4CMPP2/networks/base.py +250 -0
- D4CMPP2/networks/registry.py +187 -0
- D4CMPP2/networks/src/AFP.py +118 -0
- D4CMPP2/networks/src/BiDropout.py +29 -0
- D4CMPP2/networks/src/DMPNN.py +35 -0
- D4CMPP2/networks/src/GAT.py +69 -0
- D4CMPP2/networks/src/GC.py +85 -0
- D4CMPP2/networks/src/GCN.py +71 -0
- D4CMPP2/networks/src/ISAT.py +153 -0
- D4CMPP2/networks/src/Linear.py +49 -0
- D4CMPP2/networks/src/MPNN.py +56 -0
- D4CMPP2/networks/src/SolventLayer.py +62 -0
- D4CMPP2/networks/src/__init__.py +0 -0
- D4CMPP2/networks/src/distGCN.py +21 -0
- D4CMPP2/networks/src/pyg_hetero.py +24 -0
- D4CMPP2/optimize.py +472 -0
- D4CMPP2/src/Analyzer/ISAAnalyzer.py +458 -0
- D4CMPP2/src/Analyzer/ISAPNAnalyzer.py +366 -0
- D4CMPP2/src/Analyzer/ISAwSAnalyzer.py +117 -0
- D4CMPP2/src/Analyzer/MolAnalyzer.py +319 -0
- D4CMPP2/src/Analyzer/__init__.py +54 -0
- D4CMPP2/src/Analyzer/core.py +480 -0
- D4CMPP2/src/Analyzer/factory.py +166 -0
- D4CMPP2/src/Analyzer/interpretation.py +232 -0
- D4CMPP2/src/Analyzer/results.py +101 -0
- D4CMPP2/src/DataManager/Dataset/GraphDataset.py +314 -0
- D4CMPP2/src/DataManager/Dataset/ISAGraphDataset.py +384 -0
- D4CMPP2/src/DataManager/Dataset/__init__.py +0 -0
- D4CMPP2/src/DataManager/GraphGenerator/ISAGraphGenerator.py +223 -0
- D4CMPP2/src/DataManager/GraphGenerator/MolGraphGenerator.py +73 -0
- D4CMPP2/src/DataManager/GraphGenerator/__init__.py +14 -0
- D4CMPP2/src/DataManager/ISADataManager.py +67 -0
- D4CMPP2/src/DataManager/MolDataManager.py +735 -0
- D4CMPP2/src/DataManager/__init__.py +14 -0
- D4CMPP2/src/DataManager/contracts.py +179 -0
- D4CMPP2/src/NetworkManager/ISANetworkManager.py +12 -0
- D4CMPP2/src/NetworkManager/NetworkManager.py +520 -0
- D4CMPP2/src/NetworkManager/__init__.py +14 -0
- D4CMPP2/src/PostProcessor.py +160 -0
- D4CMPP2/src/TrainManager/ISATrainManager.py +26 -0
- D4CMPP2/src/TrainManager/TrainManager.py +254 -0
- D4CMPP2/src/TrainManager/__init__.py +14 -0
- D4CMPP2/src/TrainManager/callbacks.py +119 -0
- D4CMPP2/src/__init__.py +0 -0
- D4CMPP2/src/utils/PATH.py +246 -0
- D4CMPP2/src/utils/__init__.py +0 -0
- D4CMPP2/src/utils/argparser.py +56 -0
- D4CMPP2/src/utils/checkpointing.py +90 -0
- D4CMPP2/src/utils/config_resolution.py +123 -0
- D4CMPP2/src/utils/config_validation.py +370 -0
- D4CMPP2/src/utils/csv_validation.py +105 -0
- D4CMPP2/src/utils/data_quality.py +181 -0
- D4CMPP2/src/utils/featureizer.py +202 -0
- D4CMPP2/src/utils/functional_group.csv +169 -0
- D4CMPP2/src/utils/graph_cache.py +213 -0
- D4CMPP2/src/utils/leaderboard.py +212 -0
- D4CMPP2/src/utils/metrics.py +31 -0
- D4CMPP2/src/utils/module_loader.py +147 -0
- D4CMPP2/src/utils/output.py +80 -0
- D4CMPP2/src/utils/reproducibility.py +70 -0
- D4CMPP2/src/utils/run_manifest.py +175 -0
- D4CMPP2/src/utils/scaler.py +40 -0
- D4CMPP2/src/utils/sculptor.py +713 -0
- D4CMPP2/src/utils/splitting.py +250 -0
- D4CMPP2/src/utils/supportfile_saver.py +94 -0
- D4CMPP2/src/utils/tools.py +156 -0
- D4CMPP2/src/utils/transfer_learning.py +111 -0
- d4cmpp2-0.4.0.dist-info/METADATA +420 -0
- d4cmpp2-0.4.0.dist-info/RECORD +103 -0
- d4cmpp2-0.4.0.dist-info/WHEEL +5 -0
- d4cmpp2-0.4.0.dist-info/entry_points.txt +2 -0
- d4cmpp2-0.4.0.dist-info/licenses/LICENSE +21 -0
- d4cmpp2-0.4.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Lazy exports for built-in graph-generator modules."""
|
|
2
|
+
|
|
3
|
+
from importlib import import_module
|
|
4
|
+
from types import ModuleType
|
|
5
|
+
|
|
6
|
+
__all__ = ["MolGraphGenerator", "ISAGraphGenerator"]
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def __getattr__(name: str) -> ModuleType:
|
|
10
|
+
if name not in __all__:
|
|
11
|
+
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|
|
12
|
+
module = import_module(f"{__name__}.{name}")
|
|
13
|
+
globals()[name] = module
|
|
14
|
+
return module
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
from .MolDataManager import MolDataManager
|
|
2
|
+
from D4CMPP2.src.utils import PATH
|
|
3
|
+
|
|
4
|
+
from .GraphGenerator.ISAGraphGenerator import ISAGraphGenerator
|
|
5
|
+
from .Dataset.ISAGraphDataset import ISAGraphDataset, ISAGraphDataset_legacy
|
|
6
|
+
|
|
7
|
+
class ISADataManager_legacy(MolDataManager):
|
|
8
|
+
"""The class for the data management of the ISA dataset."""
|
|
9
|
+
feature_dimension_keys = (
|
|
10
|
+
"node_dim", "edge_dim",
|
|
11
|
+
"r_node_dim", "i_node_dim", "d_node_dim",
|
|
12
|
+
"r_edge_dim", "i_edge_dim", "d_edge_dim",
|
|
13
|
+
)
|
|
14
|
+
def __init__(self, config):
|
|
15
|
+
super().__init__(config)
|
|
16
|
+
self.config.update({
|
|
17
|
+
"r_node_dim": self.gg.r_node_dim,
|
|
18
|
+
"i_node_dim": self.gg.i_node_dim,
|
|
19
|
+
"d_node_dim": self.gg.d_node_dim,
|
|
20
|
+
"r_edge_dim": self.gg.r_edge_dim,
|
|
21
|
+
"i_edge_dim": self.gg.i_edge_dim,
|
|
22
|
+
"d_edge_dim": self.gg.d_edge_dim,
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
def import_others(self):
|
|
26
|
+
if 'sculptor_a' not in self.config or 'sculptor_c' not in self.config or 'sculptor_s' not in self.config:
|
|
27
|
+
raise Exception("The argument 'sculptor_index' is not defined")
|
|
28
|
+
sculptor_index = (self.config['sculptor_s'],self.config['sculptor_c'],self.config['sculptor_a'])
|
|
29
|
+
self._output().info(
|
|
30
|
+
f"[Data] ISA fragmentation index: {sculptor_index!r}."
|
|
31
|
+
)
|
|
32
|
+
self.graph_type = 'img'+str(sculptor_index[0])+str(sculptor_index[1])+str(sculptor_index[2])
|
|
33
|
+
self.gg = ISAGraphGenerator(
|
|
34
|
+
self.config['MODEL_PATH']+'/functional_group.csv',
|
|
35
|
+
sculptor_index
|
|
36
|
+
)
|
|
37
|
+
self.dataset =ISAGraphDataset_legacy
|
|
38
|
+
self.unwrapper = self.dataset.unwrapper
|
|
39
|
+
|
|
40
|
+
class ISADataManager(MolDataManager):
|
|
41
|
+
"""The class for the data management of the ISA dataset."""
|
|
42
|
+
feature_dimension_keys = ISADataManager_legacy.feature_dimension_keys
|
|
43
|
+
def __init__(self, config):
|
|
44
|
+
super().__init__(config)
|
|
45
|
+
self.config.update({
|
|
46
|
+
"r_node_dim": self.gg.r_node_dim,
|
|
47
|
+
"i_node_dim": self.gg.i_node_dim,
|
|
48
|
+
"d_node_dim": self.gg.d_node_dim,
|
|
49
|
+
"r_edge_dim": self.gg.r_edge_dim,
|
|
50
|
+
"i_edge_dim": self.gg.i_edge_dim,
|
|
51
|
+
"d_edge_dim": self.gg.d_edge_dim,
|
|
52
|
+
})
|
|
53
|
+
|
|
54
|
+
def import_others(self):
|
|
55
|
+
if 'sculptor_a' not in self.config or 'sculptor_c' not in self.config or 'sculptor_s' not in self.config:
|
|
56
|
+
raise Exception("The argument 'sculptor_index' is not defined")
|
|
57
|
+
sculptor_index = (self.config['sculptor_s'],self.config['sculptor_c'],self.config['sculptor_a'])
|
|
58
|
+
self._output().info(
|
|
59
|
+
f"[Data] ISA fragmentation index: {sculptor_index!r}."
|
|
60
|
+
)
|
|
61
|
+
self.graph_type = 'img'+str(sculptor_index[0])+str(sculptor_index[1])+str(sculptor_index[2])
|
|
62
|
+
self.gg = ISAGraphGenerator(
|
|
63
|
+
self.config['MODEL_PATH']+'/functional_group.csv',
|
|
64
|
+
sculptor_index
|
|
65
|
+
)
|
|
66
|
+
self.dataset =ISAGraphDataset
|
|
67
|
+
self.unwrapper = self.dataset.unwrapper
|