LiGAN icon indicating copy to clipboard operation
LiGAN copied to clipboard

Sulfonyl double bonds not retained in OB to RDKit conversion

Open RMeli opened this issue 2 years ago • 1 comments

I think the function fitting.convert_ob_mol_to_rd_mol() suffers of the same problem described in #15 . While double bonds are now correctly assigned to the sulfonyl group by Open Babel, the conversion to RDKit seems to make them disappear again.

RMeli avatar Sep 10 '21 14:09 RMeli

https://github.com/mattragoza/liGAN/blob/7d760bde1c94d755113c05849fb81b905888fb1b/fitting.py#L618-L627

A possible solution is to use max(pt.GetValenceList(a1.GetAtomicNum())) instead of pt.GetDefaultValence(a1.GetAtomicNum()).

I can open a PR if this is of interest.

RMeli avatar Sep 10 '21 14:09 RMeli

Closing as stale.

RMeli avatar Jun 11 '23 20:06 RMeli