Skip to content

Commit

Permalink
Update chemutils.py: Added clearAromaticFlags=True to get_mol
Browse files Browse the repository at this point in the history
Fixing reported error: wengong-jin#24
rdkit.Chem.rdchem.KekulizeException: Can't kekulize mol.  Unkekulized atoms: 4 5 6 7 18
  • Loading branch information
bsaldivaremc2 authored Jul 10, 2023
1 parent 782dccf commit e49d2bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hgraph/chemutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def set_atommap(mol, num=0):

def get_mol(smiles):
mol = Chem.MolFromSmiles(smiles)
if mol is not None: Chem.Kekulize(mol)
if mol is not None: Chem.Kekulize(mol,clearAromaticFlags=True)
return mol

def get_smiles(mol):
Expand Down

0 comments on commit e49d2bd

Please sign in to comment.