How to show atom numbers in a RdKit molecule (or how to label atoms in a rdkit molecule)

1 · Manish Kumar · March 1, 2021, midnight
In RdKit, the method SetProp is used to set an atomic property for the atoms involved in the molecule. This method takes two arguments: the peroperty to set and its value. The idea is simple: Create an rdkit mol object from SMILES string, iterate over the atoms, and set the desired property to a custom value. For this article, we’ll look at three different ways to show atom numbers. We’ll take the example of Benzamide to show the modifications. First of all import the necessary packages: from ...