MolecularDiffusion.utils.shepherd_score.pharm_utils.pharmacophore¶
Generate pharmacophores from a RDKit conformer.
Parts of code adapted from Francois Berenger / Tsuda Lab and RDKit.
References:
Tsuda Lab: https://github.com/tsudalab/ACP4/blob/master/bin/acp4_ph4.py (From https://doi.org/10.1021/acs.jcim.2c01623)
RDKit: https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/Features/FeatDirUtilsRD.py
RDKit: https://github.com/rdkit/rdkit/blob/master/rdkit/Chem/Features/ShowFeats.py
Attributes¶
Functions¶
|
Find hydrophobes and cluster them. |
|
Get the identity, anchor positions, and relative unit vectors for each pharmacophore. |
|
Get the positions of pharmacophore anchors and their associated unit vectors. |
Module Contents¶
- MolecularDiffusion.utils.shepherd_score.pharm_utils.pharmacophore.find_hydrophobes(mol: rdkit.Chem.rdchem.Mol, cluster_hydrophobic: bool = True)¶
Find hydrophobes and cluster them.
- MolecularDiffusion.utils.shepherd_score.pharm_utils.pharmacophore.get_pharmacophores(mol: rdkit.Chem.rdchem.Mol, multi_vector: bool = True, exclude: List[int] = [], check_access: bool = False, scale: float = 1.0) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]¶
Get the identity, anchor positions, and relative unit vectors for each pharmacophore.
Pharmacophore ordering for indexing: (‘Acceptor’, ‘Donor’, ‘Aromatic’, ‘Hydrophobe’, ‘Cation’, ‘Anion’, ‘ZnBinder’)
Notes
The
check_accessparameter is currently based on whether interaction points sampled from a sphere’s surface with a radius of 1.8A from the acceptor/donor atom falls outside the solvent accessible surface defined by the vdW radius + 0.8A of the neighboring atoms. This works for buried acceptors/donors, but may be prone to false positives. For example, CN(C)C would have its sole HBA rejected. Other approaches such as buried volume should be considered in the future.- Parameters:
mol (rdkit.Chem.Mol) – RDKit Mol object with conformer.
multi_vector (bool, optional) – Whether to represent pharmacophores with multiple vectors. Default is
True.exclude (list, optional) – List of hydrogen indices to not include as a HBD. Default is [].
check_access (bool, optional) – Check if HBD/HBA are accessible to the molecular surface. Default is
False.scale (float, optional) – Length of a pharmacophore vector in Angstroms. Default is 1.0.
- Returns:
X (np.ndarray) – Identity of pharmacophore corresponding to the indexing order, shape (N,).
P (np.ndarray) – Anchor positions of each pharmacophore, shape (N, 3).
V (np.ndarray) – Unit vectors in a relative position to the anchor positions, shape (N, 3). Adding P and V results in the position of the vector’s extended point.
- MolecularDiffusion.utils.shepherd_score.pharm_utils.pharmacophore.get_pharmacophores_dict(mol: rdkit.Chem.rdchem.Mol, multi_vector: bool = True, exclude: List[int] = [], check_access: bool = False, scale: float = 1.0) Dict¶
Get the positions of pharmacophore anchors and their associated unit vectors.
Returns a dictionary. Adapted from rdkit.Chem.Features.ShowFeats.ShowMolFeats.
- Parameters:
mol (rdkit.Chem.Mol) – RDKit Mol object with a conformer.
multi_vector (bool, optional) – Whether to represent pharmacophores with multiple vectors. Default is
True.exclude (list, optional) – List of atom indices to not include as a HBD. Default is [].
check_access (bool, optional) – Check if HBD/HBA are accessible to the molecular surface. Default is
False.scale (float, optional) – Length of the vector in Angstroms. Default is 1.0.
- Returns:
Dictionary with format
{'FeatureName': {'P': [(anchor coord), ...], 'V': [(rel. vec), ...]}}.- Return type:
- MolecularDiffusion.utils.shepherd_score.pharm_utils.pharmacophore.pattern_of_smarts(s)¶
- MolecularDiffusion.utils.shepherd_score.pharm_utils.pharmacophore.PT¶
- MolecularDiffusion.utils.shepherd_score.pharm_utils.pharmacophore.feature_colors¶