Graphormer
Graphormer pretrained models¶
GraphormerTransformer
¶
Bases: PretrainedMolTransformer
Graphormer transformer based on pretrained sequence embedder
Attributes:
Name | Type | Description |
---|---|---|
featurizer |
Graphormer embedding object |
|
dtype |
Data type. Use call instead |
|
pooling |
Pooling method for Graphormer's embedding layer |
Source code in molfeat/trans/pretrained/graphormer.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
featurizer = GraphormerEmbeddingsExtractor(pretrained_name=self.name, max_nodes=self.max_length)
instance-attribute
¶
max_length = max_length
instance-attribute
¶
name = kind
instance-attribute
¶
pooling = pooling
instance-attribute
¶
preload = True
instance-attribute
¶
version = version
instance-attribute
¶
__getstate__()
¶
Getting state to allow pickling
Source code in molfeat/trans/pretrained/graphormer.py
84 85 86 87 88 89 |
|
__init__(kind='pcqm4mv2_graphormer_base', dtype=np.float32, pooling='mean', max_length=None, version=None, **params)
¶
Source code in molfeat/trans/pretrained/graphormer.py
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|
__repr__()
¶
Source code in molfeat/trans/pretrained/graphormer.py
55 56 57 58 59 60 61 |
|
__setstate__(d)
¶
Setting state during reloading pickling
Source code in molfeat/trans/pretrained/graphormer.py
91 92 93 94 |
|
compute_max_length(inputs)
¶
Compute maximum node number for the input list of molecules
Parameters:
Name | Type | Description | Default |
---|---|---|---|
inputs |
list
|
input list of molecules |
required |
Source code in molfeat/trans/pretrained/graphormer.py
96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
list_available_models()
staticmethod
¶
List available graphormer model to use
Source code in molfeat/trans/pretrained/graphormer.py
63 64 65 66 67 68 69 70 71 |
|
set_max_length(max_length)
¶
Set the maximum length for this featurizer
Source code in molfeat/trans/pretrained/graphormer.py
110 111 112 113 114 |
|