Just as a follow up, I'm getting a similar error with the following ligand 
molecule:
ValueError: Sanitization error: Explicit valence for atom # 21 F, 2, is greater 
than permitted

### Molecule SDF ###
C15836516_1
  -OEChem-06041915443D

35 38  0     0  0  0  0  0  0999 V2000
   -0.0860  -13.4464   10.3875 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.8595  -13.0611   11.4209 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0456  -12.6304    9.1357 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0545  -14.6571   12.8727 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.7592  -11.8504   11.3525 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.8775  -11.3676    9.0585 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.7867  -14.6771   10.4820 C   0  0  1  0  0  0  0  0  0  0  0  0
    1.1317  -14.9419   11.9651 C   0  0  2  0  0  0  0  0  0  0  0  0
   -2.1463  -11.4368    9.9188 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.1581  -15.3850   14.1896 C   0  0  0  0  0  0  0  0  0  0  0  0
   -3.1565  -12.4343    9.3137 C   0  0  0  0  0  0  0  0  0  0  0  0
   -2.8105  -10.0486    9.9553 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.9545  -13.7595   12.6050 N   0  0  0  0  0  0  0  0  0  0  0  0
    0.6894  -12.9502    8.2016 O   0  0  0  0  0  0  0  0  0  0  0  0
   -1.3086  -17.7691    9.7487 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.9878  -18.0241    8.4154 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.7307  -16.6855   10.4101 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0889  -17.1956    7.7436 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.1681  -15.8570    9.7384 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.4891  -16.1120    8.4051 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.4492  -15.2393    7.6653 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.8478  -14.2161    6.9909 F   0  0  0  0  0  0  0  0  0  0  0  0
    2.3744  -14.6416    8.4716 F   0  0  0  0  0  0  0  0  0  0  0  0
    2.1655  -15.9259    6.7293 F   0  0  0  0  0  0  0  0  0  0  0  0
    1.7821  -16.2803   12.1461 C   0  0  0  0  0  0  0  0  0  0  0  0
    0.8835  -17.2086   12.6564 N   0  0  0  0  0  0  0  0  0  0  0  0
    2.9611  -16.4505   11.8532 O   0  0  0  0  0  0  0  0  0  0  0  0
   -0.0649  -16.8862   12.8376 H   0  0  0  0  0  0  0  0  0  0  0  0
    1.1544  -19.5173   11.9361 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.3463  -18.9614   14.2795 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.3969  -20.8582   12.2343 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.5888  -20.3024   14.5777 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.1292  -18.5689   12.9587 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.6141  -21.2507   13.5550 C   0  0  0  0  0  0  0  0  0  0  0  0
    1.8458  -22.5385   13.8418 F   0  0  0  0  0  0  0  0  0  0  0  0
15 16  1  0  0  0  0
15 17  2  0  0  0  0
16 18  2  0  0  0  0
17 19  1  0  0  0  0
18 20  1  0  0  0  0
29 31  2  0  0  0  0
29 33  1  0  0  0  0
30 32  1  0  0  0  0
30 33  2  0  0  0  0
31 34  1  0  0  0  0
32 34  2  0  0  0  0
19 20  2  0  0  0  0
  7 19  1  0  0  0  0
20 21  1  0  0  0  0
26 33  1  0  0  0  0
34 35  1  0  0  0  0
  1  2  2  0  0  0  0
  1  3  1  0  0  0  0
  1  7  1  0  0  0  0
  2  5  1  0  0  0  0
  2 13  1  0  0  0  0
  3  6  1  0  0  0  0
  3 14  2  0  0  0  0
  4  8  1  0  0  0  0
  4 10  1  0  0  0  0
  4 13  2  0  0  0  0
  8 25  1  0  0  0  0
25 26  1  0  0  0  0
25 27  2  0  0  0  0
  5  9  1  0  0  0  0
  6  9  1  0  0  0  0
  7  8  1  0  0  0  0
  9 11  1  0  0  0  0
  9 12  1  0  0  0  0
21 22  1  0  0  0  0
21 23  1  0  0  0  0
21 24  1  0  0  0  0
26 28  1  0  0  0  0
M  END
> <minimizedAffinity>
-3.90246

$$$$

From: Mateo Vacacela <mvacac...@cdrd.ca>
Sent: June 6, 2019 9:27 AM
To: rdkit-discuss@lists.sourceforge.net
Subject: [Rdkit-discuss] Sanitization Error: Explicit valence greater than 
permitted for normal protein

Hello,

I'm getting the following error when trying to sanitize a protein from a 
published pdb file (1E66):

ValueError: Sanitization error: Explicit valence for atom # 1254 C, 5, is 
greater than permitted

Here is the script I'm running to recreate the error. I've replicated it based 
off of a script from the deepchem library:

######## Script Starts ########
import tempfile
import os
from rdkit import Chem
from rdkit.Chem import rdmolops

protein_pdb = 'receptor.pdb'

with open(protein_pdb) as protein_file:
    protein_pdb_lines = protein_file.readlines()

tempdir = tempfile.mkdtemp()

protein_pdb_file = os.path.join(tempdir, "protein.pdb")
with open(protein_pdb_file, "w") as protein_f:
    protein_f.writelines(protein_pdb_lines)

molecule_file = protein_pdb_file
my_mol = Chem.MolFromPDBFile(str(molecule_file), sanitize=False, removeHs=False)
mol = Chem.SanitizeMol(my_mol)  # Error occurs here
######## Script Ends #########

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to