ecnet.datasets
ecnet.datasets.QSPRDataset
Bases: Dataset
Source code in ecnet/datasets/structs.py
11 12 13 14 15 16 17 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 |
|
__getitem__(idx)
Dictionary representation of compound at index idx
Parameters:
Name | Type | Description | Default |
---|---|---|---|
idx |
int
|
compound to return |
required |
Source code in ecnet/datasets/structs.py
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
|
__init__(smiles, target_vals, backend='padel')
QSPRDataset: creates a torch.utils.data.Dataset from SMILES strings and target values
Parameters:
Name | Type | Description | Default |
---|---|---|---|
smiles |
list[str]
|
SMILES strings |
required |
target_vals |
Iterable[Iterable[float]]
|
target values of shape (n_samples, n_targets) |
required |
backend |
str
|
backend for QSPR generation, ['padel', 'alvadesc'] |
'padel'
|
Source code in ecnet/datasets/structs.py
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
set_desc_index(index)
Reduce the number of features per sample; features retained given by supplied indices
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index |
list[int]
|
indices of the features to retain, all others are removed |
required |
Source code in ecnet/datasets/structs.py
63 64 65 66 67 68 69 70 71 72 73 74 |
|
set_index(index)
Reduce the number of samples in the dataset; samples retained given by supplied indices
Parameters:
Name | Type | Description | Default |
---|---|---|---|
index |
list[int]
|
indices of the dataset to retain, all others are removed |
required |
Source code in ecnet/datasets/structs.py
49 50 51 52 53 54 55 56 57 58 59 60 61 |
|
smi_to_qspr(smiles, backend)
staticmethod
Generate QSPR descriptors for each supplied SMILES string
Parameters:
Name | Type | Description | Default |
---|---|---|---|
smiles |
list[str]
|
SMILES strings |
required |
backend |
str
|
backend for QSPR generation, ['padel', 'alvadesc'] |
required |
Returns:
Type | Description |
---|---|
Tuple[List[List[float]], List[str]]
|
tuple[list[list[float]], list[str]] |
Source code in ecnet/datasets/structs.py
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
ecnet.datasets.QSPRDatasetFromFile
Bases: QSPRDataset
Source code in ecnet/datasets/structs.py
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 135 136 137 138 139 140 141 142 |
|
__init__(smiles_fn, target_vals, backend='padel')
QSPRDatasetFromFile: creates a torch.utils.data.Dataset given target values and a supplied filename/path to a SMILES file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
smiles_fn |
str
|
filename/path of SMILES file |
required |
target_vals |
Iterable[Iterable[float]]
|
target values of shape (n_samples, n_targets) |
required |
backend |
str
|
backend for QSPR generation, ['padel', 'alvadesc'] |
'padel'
|
Source code in ecnet/datasets/structs.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 |
|
ecnet.datasets.QSPRDatasetFromValues
Bases: QSPRDataset
Source code in ecnet/datasets/structs.py
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
__init__(desc_vals, target_vals)
QSPRDatasetFromValues: creates a torch.utils.data.Dataset given supplied descriptor values, supplied target values
Parameters:
Name | Type | Description | Default |
---|---|---|---|
desc_vals |
Iterable[Iterable[float]]
|
descriptor values, shape (n_samples, n_features) |
required |
target_vals |
Iterable[Iterable[float]]
|
target values, shape (n_samples, n_targets) |
required |
Source code in ecnet/datasets/structs.py
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 |
|
ecnet.datasets.load_bp
Loads boiling point data; target values given in Celsius
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 |
|
ecnet.datasets.load_cn
Loads cetane number data; target values given in CN units
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
|
ecnet.datasets.load_cp
Loads cloud point data; target values given in Celsius
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
|
ecnet.datasets.load_kv
Loads kinematic viscosity data; target values given in mm^2/s (cSt) at 313 deg. K
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 |
|
ecnet.datasets.load_lhv
Loads lower heating value data; target values given in MJ/kg = kJ/g
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
|
ecnet.datasets.load_mon
Loads motor octane number data; target values given in MON units
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 |
|
ecnet.datasets.load_pp
Loads pour point data; target values given in Celsius
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 |
|
ecnet.datasets.load_ron
Loads research octane number data; target values given in RON units
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
|
ecnet.datasets.load_ysi
Loads yield sooting index data; target values given in unified YSI units
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
|
ecnet.datasets.load_mp
Loads melting point data; target values given in Celsius
Parameters:
Name | Type | Description | Default |
---|---|---|---|
as_dataset |
bool
|
if True, return QSPRDatasetFromFile object housing data; otherwise, return tuple of smiles and target values |
False
|
backend |
str
|
any in ['padel', 'alvadesc'] |
'padel'
|
Returns:
Type | Description |
---|---|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]
|
Union[Tuple[List[str], List[List[float]]], QSPRDatasetFromFile]: either tuple of (smiles, target vals) or QSPRDatasetFromFile |
Source code in ecnet/datasets/load_data.py
210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
|