polymerist.rdutils.rdcoords.piercing
Methods for detecting ring piercing in molecular conformers
Attributes
Functions
|
Implements the PINPRICS algorithm (Planar Intersection Nomography for Pierced Ring Identification via Cut Sets) |
|
Detects and returns all bonded pairs of atoms which pierce a particular ring in a molecule |
|
Apply PINPRICS algorithm to all ring detected in a molecule and |
Module Contents
- polymerist.rdutils.rdcoords.piercing.N
- polymerist.rdutils.rdcoords.piercing.PINPRICS(positions: numpy.ndarray[tuple[N, 3], float], bonded_atom_idxs: Sequence[tuple[int, int]], ring_atom_idxs: list[int]) tuple[tuple[int, int]][source]
Implements the PINPRICS algorithm (Planar Intersection Nomography for Pierced Ring Identification via Cut Sets) Assumes rings is oblate, i.e. faces along the minor axis and is “wider than it is tall”
- Parameters:
positions (Array[[N, 3], float]) – An array of the 3D coordinates of all atoms in a molecule
bonded_atom_idxs (Sequence[tuple[int, int]]) – A sequence of pairs of indices of all bonded atoms in the molecule This represents the topology on the molecules graph
ring_atom_idxs (list[int]) – List of indices of the atoms which make up the ring to be tested for piercing Requirement of specifically a list (i.e. not just a Sequence etc.) is to allow for “smart” indexing in numpy
- Returns:
piercing_idxs – A tuple of all pairs of atom indices which were perceived to pierce the ring
- Return type:
tuple[tuple[int, int]]
- polymerist.rdutils.rdcoords.piercing.ring_piercing_idxs
- polymerist.rdutils.rdcoords.piercing.detect_ring_is_pierced(mol: rdkit.Chem.Mol, ring_atom_idxs: list[int], conformer_idx: int = 0) tuple[tuple[int, int]][source]
Detects and returns all bonded pairs of atoms which pierce a particular ring in a molecule
- Parameters:
mol (Mol) – An RDKit Mol instance assumed to have at least one conformer
ring_atom_idxs (list[int]) – List of indices of the atoms which make up the ring to be tested for piercing
conformer_idx (int, default 0) – The index of the conformer to draw coordinates from By default, will just take the first conformer
- Returns:
piercing_idxs – A tuple of all pairs of atom indices which were perceived to pierce the ring
- Return type:
tuple[tuple[int, int]]
- polymerist.rdutils.rdcoords.piercing.summarize_ring_piercing(mol: rdkit.Chem.Mol, conformer_idx: int = 0) dict[tuple[int], tuple[tuple[int, int]]][source]
Apply PINPRICS algorithm to all ring detected in a molecule and provide a summary of which bonds (if any) were detected to be piercing each ring
- Parameters:
mol (Mol) – An RDKit Mol instance assumed to have at least one conformer
conformer_idx (int, default 0) – The index of the conformer to draw coordinates from By default, will just take the first conformer
- Returns:
piercing_summary – A dict mapping the indices of the atoms in each ring to a tuple of all pairs of atom indices which were perceived to pierce the ring
- Return type:
dict[tuple[int], tuple[tuple[int, int]]]