Skip to content

Commit

Permalink
handle problem with rdkit not being able to read some SMILES (this ti…
Browse files Browse the repository at this point in the history
…me properly)
  • Loading branch information
OBrink committed Aug 30, 2021
1 parent 9ee59d7 commit 8e341d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RanDepict/RanDepict.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def random_depiction(
depiction_function = self.random_choice(depiction_functions)
depiction = depiction_function(smiles, shape)
# RDKit sometimes has troubles reading SMILES. If that happens, use Indigo or CDK
if type(depiction) == bool:
if type(depiction) == bool or depiction == None:
depiction_function = self.random_choice([self.depict_and_resize_indigo,self.depict_and_resize_cdk])
depiction = depiction_function(smiles, shape)
return depiction
Expand Down

0 comments on commit 8e341d4

Please sign in to comment.