Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
jdurrant
gypsum_dl
Commits
bc8d2711
Commit
bc8d2711
authored
Feb 29, 2020
by
jdurrant
Browse files
Minor fix.
parent
a5b07cc6
Pipeline
#310
failed with stages
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
gypsum_dl/CHANGES.md
0 → 100644
View file @
bc8d2711
Not yet committed: Minor bug fix. Gypsum-DL would crash with some mal-formed SMILES strings. Now just skips them.
See Start.py:303
gypsum_dl/Start.py
View file @
bc8d2711
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment