We try to process PDB files in rdkit.Chem but get errors, for example for PDB IDs 1a0b and 1a0c:
Explicit valence for atom # 781 C, 5, is greater than permittedExplicit valence for atom # 2166 O, 3, is greater than permitted
These errors happen during the sanitization when the molecule is being read from the file. Even if the sanitization is skipped, then rdkit.Chem.rdmolops.AddHs() (which we need) fails with the same error message afterwards.
What's the problem here? (We want to compute partial charges.)
I know nothing about PDB files (sorry about that) but would recommend you change your username since your current username suggests you are affiliated to this forum.
I have not used rdkit.Chem and do not know what sanitization means with it, but from my experience PDB structures require a lot of corrections including changes in charges (hydrogen atoms can not be seen in X-ray and at least with common equipment, also oxygen atom connected to residue or as part of water molecule are usually indistinguishable in X-ray) , changes of atom pairs in symmetric elements (say C and N are almost indistinguishable in electron density maps so if amino acid allows switching inside this C and N pair (usually via rotation) that this has to be tested and so on. So I personally prefer using commercial software that can read pdb files and prepare them for me, like software from Molsoft or Schroedinger can.
I know nothing about PDB files (sorry about that) but would recommend you change your username since your current username suggests you are affiliated to this forum.
I am not specialist in PDB sanitization (not sure what it is), but the first thing that I saw was those valence values..5 for C and 3 for O?
I think it should be 2 or 4 for C and 2 for O ... and the error tells you that ...
Best,
Agata
It looks like your structure has extra connections coming from O and C in defined positions which is not correct. Best, Agata