Rings without carbon
RMeli opened this issue · 2 comments
RMeli commented
From time to time it seems that compounds containing rings with no carbon are generated and the following line
https://github.com/mattragoza/liGAN/blob/618e9433dee29db3c1c1a8028ff583409a16f5ab/fitting.py#L512
fails with a ZeroDivisionError
exception:
File "/ligan/fitting.py", line 557, in make_obmol
if aromatic_ccnt/carbon_cnt >= .5 and aromatic_ccnt != ring.Size():
ZeroDivisionError: division by zero
mattragoza commented
I just pushed a fix to master.
RMeli commented
Thanks! I thought I did open a PR with a similar fix but obviously I didn't, sorry about that.