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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss