syndirella.slipper.flatness

slipper/flatness.py

This module was directly sourced from the PoseBusters repository, which is open source code under the BSD-3-Clause license. The original code is found at: https://github.com/maabuu/posebusters/blob/3c467ab82bdbae5b71f80a286bb49ecc011be529/posebusters/modules/flatness.py

It is used to check flatness of aromatic rings and double bonds of ligand conformations.

Attributes

_flat

_empty_results

Functions

check_flatness(→ dict[str, Any])

Check whether substructures of molecule are flat.

_get_distances_to_plane(→ numpy.ndarray)

Get distances of points X to their common plane.

_get_coords(→ numpy.ndarray)

Module Contents

syndirella.slipper.flatness._flat[source]
syndirella.slipper.flatness._empty_results[source]
syndirella.slipper.flatness.check_flatness(mol_pred: rdkit.Chem.rdchem.Mol, threshold_flatness: float = 0.1, flat_systems: dict[str, str] = _flat) dict[str, Any][source]

Check whether substructures of molecule are flat.

Parameters:
  • mol_pred – Molecule with exactly one conformer.

  • threshold_flatness – Maximum distance from shared plane used as cutoff. Defaults to 0.1.

  • flat_systems – Patterns of flat systems provided as SMARTS. Defaults to 5 and 6 membered aromatic rings and carbon sigma bonds.

Returns:

PoseBusters results dictionary.

syndirella.slipper.flatness._get_distances_to_plane(X: numpy.ndarray) numpy.ndarray[source]

Get distances of points X to their common plane.

syndirella.slipper.flatness._get_coords(mol: rdkit.Chem.rdchem.Mol, indices: Iterable[int]) numpy.ndarray[source]