olorenchemengine.external.SPGNN package#
Submodules#
olorenchemengine.external.SPGNN.main module#
Wraps the model presented in Strategies for pre-training graph neural networks
- class olorenchemengine.external.SPGNN.main.SPGNN(model_type='contextpred', batch_size=32, epochs=100, lr=0.001, lr_scale=1, decay=0, num_layer=5, emb_dim=300, dropout_ratio=0.5, graph_pooling='mean', JK='last', gnn_type='gin', **kwargs)#
Bases:
BaseModel
SPGNN is the model presented in Strategies for pre-training graph neural networks GitHub repository
- available_pretrained_models#
List of available pretrained models; passed in the model_type parameter
- Type:
List[str]
- Parameters:
model_type (str) – Type of model to use; default: “contextpred”
- classmethod AllInstances()#
AllTypes returns a list of all standard instances of all subclasses of BaseClass.
Standard instances means that all required parameters for instantiation of the subclasses are set with canonical values.
- available_pretrained_models = ['contextpred', 'edgepred', 'infomax', 'masking', 'supervised_contextpred', 'supervised_edgepred', 'supervised_infomax', 'supervised_masking', 'supervised', 'gat_supervised_contextpred', 'gat_supervised', 'gat_contextpred']#
- class olorenchemengine.external.SPGNN.main.SPGNNVecRep(model_type='contextpred', batch_size=32, epochs=100, lr=0.001, lr_scale=1, decay=0, num_layer=5, emb_dim=300, dropout_ratio=0.5, graph_pooling='mean', JK='last', gnn_type='gin', **kwargs)#
Bases:
BaseVecRepresentation
SPGNN_REP gives the output of the model presented in Strategies for pre-training graph neural networks GitHub repository <https://github.com/snap-stanford/pretrain-gnns> as a molecular representation.
- available_pretrained_models#
List of available pretrained models; passed in the model_type parameter
- Type:
List[str]
- Parameters:
model_type (str) – Type of model to use; default: “contextpred”
- available_pretrained_models = ['contextpred', 'edgepred', 'infomax', 'masking', 'supervised_contextpred', 'supervised_edgepred', 'supervised_infomax', 'supervised_masking', 'supervised', 'gat_supervised_contextpred', 'gat_supervised', 'gat_contextpred']#
- convert(smiles, **kwargs)#
BaseVecRepresentation’s convert returns a list of numpy arrays.
- class olorenchemengine.external.SPGNN.main.SPGNN_AF(log=True)#
Bases:
AtomFeaturizer
- convert(atom: _MockObject.Chem.Atom)#
- property length#
- class olorenchemengine.external.SPGNN.main.SPGNN_BF(log=True)#
Bases:
BondFeaturizer
- convert(bond: _MockObject.Chem.Bond)#
- property length#
- class olorenchemengine.external.SPGNN.main.SPGNN_PYG#
Bases:
TorchGeometricGraph
- olorenchemengine.external.SPGNN.main.predict(model, device, loader, setting='classification')#
- olorenchemengine.external.SPGNN.main.train(model, device, loader, optimizer, setting)#
olorenchemengine.external.SPGNN.model module#
Defines the model architecture of SPGNN.