-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KekulizeException: Can't kekulize mol. #8
Comments
Have you solved it? I have also met this problem and I skip these molecules but failed in another error:
Does this KetError mean that I should re-generate vocab of QED dataset? |
I made some working version of the code here: graph2graph_molecule |
Are you just replace the code
with
This way indeed works for the former problem, but I still have the problem with KeyError that I mentioned above |
You can create a new issue with the new problem. I think the key should be in the "vocab.txt" . So, if it is not there, it may be manually added or the vocabulary can be extracted from list of SMILES strings using "mol_tree.py" |
Hi! I want to know have you solved this problem? |
I forgot whether I solved it or not. |
Hi, I am trying to execute the scripts/preprocess.py and getting this error.
"""
Traceback (most recent call last):
File "/usr/lib/python3.7/multiprocessing/pool.py", line 121, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.7/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "", line 28, in tensorize_pair
mol_tree0 = tensorize(smiles_pair[0], assm=False)
File "", line 12, in tensorize
mol_tree = MolTree(smiles)
File "", line 95, in init
cmol = get_clique_mol(self.mol, c)
File "", line 68, in get_clique_mol
smiles = Chem.MolFragmentToSmiles(mol, atoms, kekuleSmiles=True)
rdkit.Chem.rdchem.KekulizeException: Can't kekulize mol. Unkekulized atoms: 1 2 3 4 26
"""
The above exception was the direct cause of the following exception:
KekulizeException Traceback (most recent call last)
in ()
48 data = [line.strip("\r\n ").split()[:2] for line in f]
49
---> 50 all_data = pool.map(tensorize_pair, data)
51 num_splits = len(data) / 10000
52
1 frames
/usr/lib/python3.7/multiprocessing/pool.py in get(self, timeout)
655 return self._value
656 else:
--> 657 raise self._value
658
659 def _set(self, i, obj):
KekulizeException: Can't kekulize mol. Unkekulized atoms: 1 2 3 4 26
The text was updated successfully, but these errors were encountered: