polymerist.rdutils.bonding.permutation

Tool for swapping bonds within and between RDKit Mols

Attributes

LOGGER

Functions

swap_bonds(→ Optional[rdkit.Chem.rdchem.RWMol])

Takes a modifiable Mol and a bond derangement dict and performs the requested bond swaps

Module Contents

polymerist.rdutils.bonding.permutation.LOGGER
polymerist.rdutils.bonding.permutation.swap_bonds(rwmol: rdkit.Chem.rdchem.RWMol, bond_derangement: dict[int, tuple[int, int]], show_steps: bool = False, bond_breakage_marker: str = '--x->', bond_formation_marker: str = '---->') rdkit.Chem.rdchem.RWMol | None[source]

Takes a modifiable Mol and a bond derangement dict and performs the requested bond swaps Derangement dict should have th following form:

keys : int = corresponds to the beginning atom of a bond values : tuple[int, int] = corresponds to the current end atom map number and target end atom map number (in that order)

Modifiable Mol can contain multiple disconnected molecular components