diff --git a/chebai_graph/preprocessing/datasets/__init__.py b/chebai_graph/preprocessing/datasets/__init__.py index 8708c28..950a738 100644 --- a/chebai_graph/preprocessing/datasets/__init__.py +++ b/chebai_graph/preprocessing/datasets/__init__.py @@ -11,6 +11,7 @@ ChEBI50_WFGE_WGN_AsPerNodeType, ChEBI50_WFGE_WGN_GraphProp, ChEBI50GraphData, + ChEBI25GraphProperties, ChEBI50GraphProperties, ChEBI100GraphProperties, ) @@ -18,6 +19,7 @@ __all__ = [ "ChEBI50GraphFGAugmentorReader", + "ChEBI25GraphProperties", "ChEBI50GraphProperties", "ChEBI100GraphProperties", "ChEBI50GraphData", diff --git a/chebai_graph/preprocessing/datasets/chebi.py b/chebai_graph/preprocessing/datasets/chebi.py index a83b58e..2b563eb 100644 --- a/chebai_graph/preprocessing/datasets/chebi.py +++ b/chebai_graph/preprocessing/datasets/chebi.py @@ -9,6 +9,7 @@ import torch import tqdm from chebai.preprocessing.datasets.chebi import ( + ChEBIOver25, ChEBIOver50, ChEBIOver100, ChEBIOverX, @@ -705,6 +706,12 @@ def load_processed_data_from_file(self, filename): return base_df[base_data[0].keys()].to_dict("records") +class ChEBI25GraphProperties(GraphPropertiesMixIn, ChEBIOver25): + """ChEBIOver25 dataset with molecular property encodings.""" + + THRESHOLD = 25 + + class ChEBI50GraphProperties(GraphPropertiesMixIn, ChEBIOver50): """ChEBIOver50 dataset with molecular property encodings.""" diff --git a/configs/data/chebi25_graph_properties.yml b/configs/data/chebi25_graph_properties.yml new file mode 100644 index 0000000..6ac396d --- /dev/null +++ b/configs/data/chebi25_graph_properties.yml @@ -0,0 +1,14 @@ +class_path: chebai_graph.preprocessing.datasets.ChEBI25GraphProperties +init_args: + properties: + - chebai_graph.preprocessing.properties.AtomType + - chebai_graph.preprocessing.properties.NumAtomBonds + - chebai_graph.preprocessing.properties.AtomCharge + - chebai_graph.preprocessing.properties.AtomAromaticity + - chebai_graph.preprocessing.properties.AtomHybridization + - chebai_graph.preprocessing.properties.AtomNumHs + - chebai_graph.preprocessing.properties.BondType + - chebai_graph.preprocessing.properties.BondInRing + - chebai_graph.preprocessing.properties.BondAromaticity + #- chebai_graph.preprocessing.properties.MoleculeNumRings + - chebai_graph.preprocessing.properties.RDKit2DNormalized diff --git a/configs/model/gat.yml b/configs/model/gat.yml index dda84dc..1e96d57 100644 --- a/configs/model/gat.yml +++ b/configs/model/gat.yml @@ -3,12 +3,13 @@ init_args: optimizer_kwargs: lr: 1e-3 config: - in_channels: 158 # number of node/atom properties + in_channels: 161 # number of node/atom properties hidden_channels: 256 out_channels: 512 num_layers: 4 - edge_dim: 7 # number of bond properties + edge_dim: 8 # number of bond properties heads: 8 # the number of heads should be divisible by output channels (hidden channels if output channel not given) v2: True # This uses `torch_geometric.nn.conv.GATv2Conv` convolution layers, set False to use `GATConv` + dropout: 0 n_molecule_properties: 0 n_linear_layers: 1 diff --git a/configs/model/resgated.yml b/configs/model/resgated.yml index ccc6615..863890d 100644 --- a/configs/model/resgated.yml +++ b/configs/model/resgated.yml @@ -3,11 +3,11 @@ init_args: optimizer_kwargs: lr: 1e-3 config: - in_channels: 158 # number of node/atom properties + in_channels: 161 # number of node/atom properties hidden_channels: 256 out_channels: 512 num_layers: 4 - edge_dim: 7 # number of bond properties + edge_dim: 8 # number of bond properties dropout: 0 n_molecule_properties: 0 n_linear_layers: 1