Molecule#
Molecule wraps an RDKit Mol object
together with its extracted interaction profiles (molecular surface, ESP
point cloud, and pharmacophore positions/types/vectors).
Helper functions#
- shepherd_score.container._core.update_mol_coordinates(mol, coordinates)[source]#
Updates the coordinates of a 3D RDKit mol object with a new set of coordinates
- Parameters:
mol (Chem.Mol) – RDKit mol object with 3D coordinates to be replaced
coordinates (Union[List, np.ndarray]) – List/array of new [x,y,z] coordinates
- Returns:
mol_new – deep-copied RDKit mol object with updated 3D coordinates
- Return type:
Chem.Mol
Class reference#
- class shepherd_score.container._core.Molecule(mol, num_surf_points=None, density=None, probe_radius=None, surface_points=None, partial_charges=None, electrostatics=None, pharm_multi_vector=None, pharm_types=None, pharm_ancs=None, pharm_vecs=None)[source]#
Bases:
objectMolecule contains ways to hold/generate molecule geometries
- Parameters:
mol (rdkit.Chem.rdchem.Mol)
num_surf_points (int | None)
density (float | None)
probe_radius (float | None)
surface_points (ndarray | None)
partial_charges (ndarray | None)
electrostatics (ndarray | None)
pharm_multi_vector (bool | None)
pharm_types (ndarray | None)
pharm_ancs (ndarray | None)
pharm_vecs (ndarray | None)
- __init__(mol, num_surf_points=None, density=None, probe_radius=None, surface_points=None, partial_charges=None, electrostatics=None, pharm_multi_vector=None, pharm_types=None, pharm_ancs=None, pharm_vecs=None)[source]#
Molecule constructor to extract interaction profiles.
If partial_charges are not provided, they will be generated using MMFF94 which may result in subpar performance.
- Parameters:
mol (rdkit.Chem.rdchem.Mol)
num_surf_points (Optional[int]) – Number of surface points to sample. If
None, the surface point cloud is not generated. More efficient if only doing volumentric.density (Optional[float]) – Density of points to sample on molecular surface. If
None, the surface point cloud is not generated. More efficient if only doing volumentric. If bothnum_surf_pointsanddensityare notNone,num_surf_pointssupercedesdensity.surface_points (Optional[np.ndarray]) – Surface points if they were previously generated. Shape: (M,3).
probe_radius (Optional[float]) – The radius of a probe atom to act as a “solvent accessible surface”. Default is 1.2 if
Noneis passed.partial_charges (Optional[np.ndarray]) – Partial charges for each atom. Shape: (N,). If
Noneis passed and ESP surface is generated, it will default to MMFF94 partial charges.electrostatics (Optional[np.ndarray]) – Electrostatic potential if they were previously generated. Shape: (M,).
pharm_multi_vector (Optional[bool]) – If
None, don’t generate pharmacophores, else generate pharmacophores with/without (True/False) multi-vectors.pharm_types (Optional[np.ndarray]) – Types of pharmacophores. Shape: (P,).
pharm_ancs (Optional[np.ndarray]) – Anchor positions of pharmacophores. Shape: (P,3).
pharm_vecs (Optional[np.ndarray]) – Unit vectors relative to anchor positions of pharmacophores. Shape: (P,3).
- get_electrostatic_potential()[source]#
Get the electrostatic potential at each surface point.
- Return type: