Hi, I came across an issue today that seemed straightforward at the beginning, but after a while ceased to appear that easily accessible. Well, I probably shouldn't be surprised - I guess that is just cheminformatics at its best :)
The following smiles popped up in my workflow: [Na+].O=C1[N]C=CC=2C=CC(Br)=CC12.FC(F)(F)CI This translates to the sole nitrogen (valency = 3, SP2) being a radical with no implicit hydrogen and two neighboring carbon atoms both of which are connected by single bonds. Irrespective of how that radical got there I want to 'remove' it by just adding an implicit hydrogen to the nitrogen atom. This then led to the more general question of how to remove radicals for common organic elements (C, N, O, P, S seems like a good start). I came up with the following formula: int numberOfUnpairedElectrons = (int) (atom.getValency() - atomContainer.getBondOrderSum(atom) + atom.getFormalCharge() - atom.getImplicitHydrogenCount()); if (numberOfUnpairedElectrons % 2 != 0) { atom.setImplicitHydrogenCount(atom.getImplicitHydrogenCount() + 1); } As this is chemistry, I am sure there are a lot of exceptions - even if the elements of interest are very restricted. Is the formula above a reasonable simplification? Or am I oversimplifying this? Best Uli
_______________________________________________ Cdk-user mailing list Cdk-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/cdk-user