Radii Assignment
Utility functions for determining the van der Waals of atoms in a molecule. It provides two functions that achieve the same goal but in different ways; the first one iterates over the atoms in the molecule which can be time-consuming, while the second one utilizes a vectorized operation for faster performance.
assign_radii ¶
assign_radii(mol)
Get the van der Waals for each atom in the molecule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol |
MolType
|
The OBMol object for which to determine the van der Waals radii. |
required |
Returns:
Type | Description |
---|---|
radii_array
|
An array of shape (n_atoms,) containing the van der Waals radii for each atom in the molecule. |
Source code in lahuta/utils/radii.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
|
v_radii_assignment ¶
v_radii_assignment(elements)
Determine the van der Waals radii for each atom in the molecule using vectorized operation.
This function is a faster alternative to 'assign_radii' as it utilizes numpy's vectorized operations for improved performance when dealing with large molecules.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
elements |
NDArray[str_]
|
An array of atomic element symbols. |
required |
Returns:
Type | Description |
---|---|
NDArray[float32]
|
NDArray[np.float32]: An array of shape (n_atoms, ) where each element is the van der Waals radius. |
Source code in lahuta/utils/radii.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 |
|