Categories
Ask Chemistry

Illegal valence meaning

I’m using the rdkit package to process some molecules.
I noticed that when creating a molecule from a SMILES string the library does some syntactic and some semantic checks. This question regards the semantic part (sanitization). (Just in case someone wants to take a look, the checks are described in detail here.

In the sanitization process the explicit and implicit valence of all atoms is computed and it fails when atoms have illegal valence. I don’t really understand what “illegal valence” mean in this context. I tried using some compounds with charged atoms to see if they have “illegal valence” but they didn’t. Examples: Cc1cc(SCC(=O)c2ccc(Br)cc2)cc(C)[o+]1, O=[V]([O-])([O-])[O-] where the Oxygen in both cases is charged (once positively and once negatively).

  • What does “illegal valence” mean? Is it just using more electrons than the ones actually available in the atom? e.g. 2 bonds with a hydrogen.

  • Furthermore, if the previous is true, I suppose that even combinations that are potentially unstable (in practice) with a lot of charged atoms would still be considered “semantically valid”?

Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *