Skip to main content

rd.add_atom_numbers()

Label atoms for drawing as f"{symbol}{number}".

Usage

Source

rd.add_atom_numbers(
    mol,
    to_number,
    *,
    in_place=False,
)

Parameters

mol: Mol

RDKit molecule.

to_number: Mapping[int, int]

Number for each atom index.

in_place: bool = False
If True, modify mol instead of returning a copy.

Returns

Mol
The molecule with "atomLabel" properties set.