polymerist.rdutils.rdprops.atomprops

For assigning, transferring, and removing properties of RDKit Atoms

Attributes

T

label_R_groups

Functions

atom_ids_with_prop(→ list[int])

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

aggregate_atom_prop(→ dict[int, T])

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

clear_atom_props(→ None)

Wipe properties of all atoms in a molecule

annotate_atom_prop(→ None)

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

annotate_atom_ids(→ None)

Draws atom indices over their positions when displaying a Mol.

clear_atom_annotations(→ None)

Removes atom annotations over their positions when displaying a Mol

label_linkers(→ None)

Labels wild-type ("*") atoms in a Mol for display

Module Contents

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

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

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

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

polymerist.rdutils.rdprops.atomprops.clear_atom_props(rdmol: rdkit.Chem.Mol) None[source]

Wipe properties of all atoms in a molecule

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

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

polymerist.rdutils.rdprops.atomprops.annotate_atom_ids(rdmol: rdkit.Chem.Mol, atom_id_remap: dict[int, int] | None = None) None[source]

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

polymerist.rdutils.rdprops.atomprops.clear_atom_annotations(rdmol: rdkit.Chem.Mol) None[source]

Removes atom annotations over their positions when displaying a Mol

polymerist.rdutils.rdprops.atomprops.label_linkers(rdmol: rdkit.Chem.Mol, label_props: Iterable[str] = None, naming_funct: Callable[[int], str] | None = None) None[source]

Labels wild-type (“*”) atoms in a Mol for display

polymerist.rdutils.rdprops.atomprops.label_R_groups