Atom featurizers
AromaticityFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom based on its aromaticity.
Source code in bionemo/geometric/atom_featurizers.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
|
n_dim: int
property
Returns dimensionality of the computed features.
get_atom_features(mol, atom_indices=None)
Computes features of atoms of all of select atoms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor of representing if atoms are aromatic as integers. |
Source code in bionemo/geometric/atom_featurizers.py
197 198 199 200 201 202 203 204 205 206 207 208 |
|
AtomicNumberFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by its atomic number.
Source code in bionemo/geometric/atom_featurizers.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
__init__(dim_atomic_num=None)
Initializes AtomicNumberFeaturizer class.
Source code in bionemo/geometric/atom_featurizers.py
44 45 46 47 |
|
get_atom_features(mol, atom_indices=None)
Computes features of atoms of all of select atoms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor of integers representing atomic numbers of atoms. |
Source code in bionemo/geometric/atom_featurizers.py
53 54 55 56 57 58 59 60 61 62 63 64 |
|
n_dim()
Returns dimensionality of the computed features.
Source code in bionemo/geometric/atom_featurizers.py
49 50 51 |
|
AtomicRadiusFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by its bond, covalent, and vdW radii.
Source code in bionemo/geometric/atom_featurizers.py
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
|
max_val: torch.tensor
property
Returns maximum values for features: bond, covalent, and vdW radius.
min_val: torch.tensor
property
Returns minimum values for features: bond, covalent, and vdW radius.
n_dim: int
property
Returns dimensionality of the computed features.
__init__()
Initializes AtomicRadiusFeaturizer class.
Source code in bionemo/geometric/atom_featurizers.py
260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
|
get_atom_features(mol, atom_indices=None)
Computes bond radius, covalent radius, and van der Waals radius without normalization.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
Tensor
|
A torch.Tensor of different atomic radii. Each atom is featurizer by bond radius, covalent radius, and van der Waals radius. |
Source code in bionemo/geometric/atom_featurizers.py
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 |
|
ChiralTypeFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by its chirality type.
Source code in bionemo/geometric/atom_featurizers.py
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 |
|
n_dim: int
property
Returns dimensionality of the computed features.
__init__()
Initializes ChiralTypeFeaturizer class.
Source code in bionemo/geometric/atom_featurizers.py
114 115 116 |
|
get_atom_features(mol, atom_indices=None)
Computes features of atoms of all of select atoms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor representing chirality type of atoms as integers. |
Source code in bionemo/geometric/atom_featurizers.py
123 124 125 126 127 128 129 130 131 132 133 134 |
|
CrippenFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by Crippen logP and molar refractivity.
Source code in bionemo/geometric/atom_featurizers.py
463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 |
|
max_val: torch.tensor
property
Returns maximum values for features: logP and molar refractivity.
min_val: torch.tensor
property
Returns minimum values for features: logP and molar refractivity.
n_dim: int
property
Returns dimensionality of the computed features.
__init__()
Initializes CrippenFeaturizer class.
Source code in bionemo/geometric/atom_featurizers.py
466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 |
|
get_atom_features(mol, atom_indices=None)
Compute atomic contributions to Crippen logP and molar refractivity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
Tensor
|
A torch.Tensor featurizing atoms by its atomic contribution to logP and molar refractivity. |
Source code in bionemo/geometric/atom_featurizers.py
497 498 499 500 501 502 503 504 505 506 507 508 509 510 |
|
DegreeFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by its degree (excluding hydrogens) of connectivity.
Source code in bionemo/geometric/atom_featurizers.py
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
|
n_dim: int
property
Returns dimensionality of the computed features.
get_atom_features(mol, atom_indices=None)
Computes features of atoms of all of select atoms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor of integers representing degree of connectivity of atoms. |
Source code in bionemo/geometric/atom_featurizers.py
75 76 77 78 79 80 81 82 83 84 85 86 |
|
ElectronicPropertyFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by its electronic properties.
This class computes electronic properties like electronegativity, ionization energy, and electron affinity.
Source code in bionemo/geometric/atom_featurizers.py
314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
max_val: torch.Tensor
property
Returns maximum values for features: electronegativity, ionization energy, electron affinity.
min_val: torch.Tensor
property
Returns minimum values for features: electronegativity, ionization energy, electron affinity.
n_dim: int
property
Returns dimensionality of the computed features.
__init__(data_file=None)
Initializes PeriodicTableFeaturizer class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data_file
|
Path to the data file. |
None
|
Source code in bionemo/geometric/atom_featurizers.py
320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 |
|
get_atom_features(mol, atom_indices=None)
Returns electronic features of the atom.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
Tensor
|
A torch.Tensor consisting of Pauling scale electronegativity, ionization energy, and electron affinity for each atom. |
Source code in bionemo/geometric/atom_featurizers.py
367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 |
|
HybridizationFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by its hybridization type.
Source code in bionemo/geometric/atom_featurizers.py
163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 |
|
n_dim: int
property
Returns dimensionality of the computed features.
__init__()
Initializes HybridizationFeaturizer class.
Source code in bionemo/geometric/atom_featurizers.py
166 167 168 |
|
get_atom_features(mol, atom_indices=None)
Computes features of atoms of all of select atoms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor representing hybridization type of atoms as integers. |
Source code in bionemo/geometric/atom_featurizers.py
175 176 177 178 179 180 181 182 183 184 185 186 |
|
PeriodicTableFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by its position (period and group) in the periodic table.
Source code in bionemo/geometric/atom_featurizers.py
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
|
n_dim: int
property
Returns dimensionality of the computed features.
__init__()
Initializes PeriodicTableFeaturizer class.
Source code in bionemo/geometric/atom_featurizers.py
214 215 216 217 218 |
|
get_atom_features(mol, atom_indices=None)
Computes periodic table position of atoms of all or select atoms specific in atom_indices
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor of representing positions of atoms in periodic table. First index represents period and second index represents group. |
Source code in bionemo/geometric/atom_featurizers.py
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
|
get_group(atom)
Returns periodic table group of atom.
Source code in bionemo/geometric/atom_featurizers.py
235 236 237 238 |
|
get_period(atom)
Returns periodic table period of atom.
Source code in bionemo/geometric/atom_featurizers.py
225 226 227 228 229 230 231 232 233 |
|
ScaffoldFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom based on whether it is present in Bemis-Murcko scaffold.
Source code in bionemo/geometric/atom_featurizers.py
386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
|
n_dim: int
property
Returns dimensionality of the computed features.
get_atom_features(mol, atom_indices=None)
Returns position of the atoms with respect to Bemis-Murcko scaffold.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor indicating if atoms are present in the Bemis-Murcko scaffold of the molecule. |
Source code in bionemo/geometric/atom_featurizers.py
394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
|
SmartsFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by hydrogen donor/acceptor and acidity/basicity.
Source code in bionemo/geometric/atom_featurizers.py
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
n_dim: int
property
Returns dimensionality of the computed features.
__init__()
Initializes SmartsFeaturizer class.
Source code in bionemo/geometric/atom_featurizers.py
416 417 418 419 420 421 422 423 424 425 426 427 |
|
get_atom_features(mol, atom_indices=None)
Computes matches by prefixed SMARTS patterns.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
An torch.tensor indicating if atoms are hydrogen bond donors, hydrogen bond acceptors, acidic, or basic. |
Source code in bionemo/geometric/atom_featurizers.py
434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
TotalDegreeFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by its total degree (including hydrogens) of connectivity.
Source code in bionemo/geometric/atom_featurizers.py
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
|
n_dim: int
property
Returns dimensionality of the computed features.
get_atom_features(mol, atom_indices=None)
Computes features of atoms of all of select atoms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor of integers representing total connectivity (including hydrogens) of atoms. |
Source code in bionemo/geometric/atom_featurizers.py
97 98 99 100 101 102 103 104 105 106 107 108 |
|
TotalNumHFeaturizer
Bases: BaseAtomFeaturizer
Class for featurizing atom by total number of hydrogens.
Source code in bionemo/geometric/atom_featurizers.py
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 |
|
n_dim: int
property
Returns dimensionality of the computed features.
__init__()
Initializes TotalNumHFeaturizer class.
Source code in bionemo/geometric/atom_featurizers.py
140 141 142 |
|
get_atom_features(mol, atom_indices=None)
Computes features of atoms of all of select atoms.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol
|
Mol
|
An RDkit Chem.Mol object |
required |
atom_indices
|
Optional[Iterable]
|
Indices of atoms for feature computation. By default, features for all atoms is computed. |
None
|
Returns:
Type | Description |
---|---|
tensor
|
A torch.tensor of integers representing total number of hydrogens on atoms. |
Source code in bionemo/geometric/atom_featurizers.py
149 150 151 152 153 154 155 156 157 158 159 160 |
|