Commit bc8d2711 authored by jdurrant's avatar jdurrant
Browse files

Minor fix.

parent a5b07cc6
Pipeline #310 failed with stages
Not yet committed: Minor bug fix. Gypsum-DL would crash with some mal-formed SMILES strings. Now just skips them.
......@@ -299,6 +299,10 @@ def detect_unassigned_bonds(smiles):
mol = Chem.MolFromSmiles(smiles, sanitize=False)
if mol is None:
# Apparently the bonds are particularly bad, because couldn't even
# create the molecule.
return None
for bond in mol.GetBonds():
if bond.GetBondTypeAsDouble() == 0:
return None
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment