datamol.descriptors
¶
n_aromatic_atoms(mol)
¶
Calculate the number of aromatic atoms.
Source code in datamol/descriptors/descriptors.py
90 91 92 93 |
|
n_aromatic_atoms_proportion(mol)
¶
Calculate the aromatic proportion: # aromatic atoms/#atoms total.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol |
Mol
|
A molecule. |
required |
Only heavy atoms are considered.
Source code in datamol/descriptors/descriptors.py
96 97 98 99 100 101 102 103 104 |
|
n_charged_atoms(mol)
¶
Compute the number of charged atoms in a molecule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol |
Mol
|
A molecule. |
required |
Returns:
Name | Type | Description |
---|---|---|
n_charged_atoms |
int
|
number of charged atoms in the molecule |
Source code in datamol/descriptors/descriptors.py
143 144 145 146 147 148 149 150 151 152 |
|
n_rigid_bonds(mol)
¶
Compute the number of rigid bonds in a molecule.
Rigid bonds are bonds that are not single and not in rings.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol |
Mol
|
A molecule. |
required |
Returns:
Name | Type | Description |
---|---|---|
n_rigid_bonds |
int
|
number of rigid bonds in the molecule |
Source code in datamol/descriptors/descriptors.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
|
n_stereo_centers(mol)
¶
Compute the number of stereocenters in a molecule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol |
Mol
|
A molecule. |
required |
Returns:
Name | Type | Description |
---|---|---|
n_stero_center |
int
|
number of stereocenters in the molecule |
Source code in datamol/descriptors/descriptors.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 |
|
n_stereo_centers_unspecified(mol)
¶
Compute the number of unspecified stereocenters in a molecule.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol |
Mol
|
A molecule. |
required |
Returns:
Name | Type | Description |
---|---|---|
n_stereo_centers_unspecified |
int
|
number of unspecified stereocenters in the molecule |
Source code in datamol/descriptors/descriptors.py
125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
|
any_rdkit_descriptor(name)
¶
Return a descriptor function by name either from
rdkit.Chem import Descriptors
or rdkit.Chem.rdMolDescriptors
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Descriptor name. |
required |
Source code in datamol/descriptors/compute.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
batch_compute_many_descriptors(mols, properties_fn=None, add_properties=True, n_jobs=1, batch_size=None, progress=False, progress_leave=True)
¶
Compute a list of opiniated molecular properties on a list of molecules.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mols |
List[Mol]
|
A list of molecules. |
required |
properties_fn |
Optional[Dict[str, Union[Callable, str]]]
|
A list of functions that compute properties. If None,
a default list of properties is used. If the function is a string,
|
None
|
add_properties |
bool
|
Whether to add the computed properties to the default list. |
True
|
Returns:
Type | Description |
---|---|
DataFrame
|
A dataframe of computed properties with one row per input molecules. |
Source code in datamol/descriptors/compute.py
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
|
compute_many_descriptors(mol, properties_fn=None, add_properties=True)
¶
Compute a list of opiniated molecular properties.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
mol |
Mol
|
A molecule. |
required |
properties_fn |
Optional[Dict[str, Union[Callable, str]]]
|
A list of functions that compute properties. If None,
a default list of properties is used. If the function is a string,
|
None
|
add_properties |
bool
|
Whether to add the computed properties to the default list. |
True
|
Returns:
Type | Description |
---|---|
dict
|
Computed properties as a dict. |
Source code in datamol/descriptors/compute.py
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 |
|