Re: [Rdkit-discuss] Atom removal messes up with the electronic configuration of rings

2022-04-07 Thread Paolo Tosco
Hi Gianmarco, it is not for aromatic bonds that you need to increase by 2, it is for double bonds (or triple bonds) - there is no chance that an atom in a ring can ever be terminal, as its degree is at least 2. In your molecule you have two carbonyl groups. In those the oxygen is doubly bonded to

Re: [Rdkit-discuss] Atom removal messes up with the electronic configuration of rings

2022-04-07 Thread Gianmarco Ghiandoni
Hi Paolo, This is exactly what I have tried to do but unsuccessfully because I was just increasing the number of explicit Hs by nbr.SetNumExplicitHs(nbr.GetNumExplicitHs() + 1). In fact, my logic was to increase the number of Hs by 1 for each atom removed and I am still puzzled on why that should

Re: [Rdkit-discuss] Atom removal messes up with the electronic configuration of rings

2022-04-07 Thread Paolo Tosco
Hi Gianmarco, this issue has been discussed before. Removing bonds with RWMol.RemoveBond() will not adjust the implicit H count of the atom at the two ends of the bond. While this is not important for the atom that is going to be removed, the count on the atom that stays needs to be adjusted. In

[Rdkit-discuss] Atom removal messes up with the electronic configuration of rings

2022-04-07 Thread Gianmarco Ghiandoni
Hi all, I am writing a function that removes atoms with only one bond and can be applied recursively in order to find the scaffold of a molecule. The function works in most cases but I have observed that, when aromatic rings are involved, it produces a loss of information. This is an example: