polymerist.rdutils.rdprops.bondprops

For assigning, transferring, and removing properties of RDKit Bonds

Attributes

T

Functions

bond_ids_with_prop(→ list[int])

Returns list of indices of bonds which have a particular property assigned

aggregate_bond_prop(→ dict[int, T])

Collects the values of a given Prop across all bonds in an RDKit molecule

clear_bond_props(→ None)

Wipe properties of all bonds in a molecule

annotate_bond_prop(→ None)

Labels the desired Prop for all bonds in a Mol which have it

annotate_bond_ids(→ None)

Draws bond indices over their positions when displaying a Mol.

clear_bond_annotations(→ None)

Removes bond annotations over their positions when displaying a Mol

Module Contents

polymerist.rdutils.rdprops.bondprops.T
polymerist.rdutils.rdprops.bondprops.bond_ids_with_prop(rdmol: rdkit.Chem.Mol, prop_name: str) list[int][source]

Returns list of indices of bonds which have a particular property assigned

polymerist.rdutils.rdprops.bondprops.aggregate_bond_prop(rdmol: rdkit.Chem.Mol, prop: str, prop_type: T = str) dict[int, T][source]

Collects the values of a given Prop across all bonds in an RDKit molecule

polymerist.rdutils.rdprops.bondprops.clear_bond_props(rdmol: rdkit.Chem.Mol) None[source]

Wipe properties of all bonds in a molecule

polymerist.rdutils.rdprops.bondprops.annotate_bond_prop(rdmol: rdkit.Chem.Mol, prop: str, prop_type: T = str, annotate_precision: int | None = None) None[source]

Labels the desired Prop for all bonds in a Mol which have it

polymerist.rdutils.rdprops.bondprops.annotate_bond_ids(rdmol: rdkit.Chem.Mol, bond_id_remap: dict[int, int] | None = None) None[source]

Draws bond indices over their positions when displaying a Mol. Can optionally provide a dict mapping bond indices to some other integers

polymerist.rdutils.rdprops.bondprops.clear_bond_annotations(rdmol: rdkit.Chem.Mol) None[source]

Removes bond annotations over their positions when displaying a Mol