mattragoza / LiGAN

Deep generative models of 3D grids for structure-based drug discovery
GNU General Public License v2.0
225 stars 44 forks source link

Sulfonyl double bonds not retained in OB to RDKit conversion #22

Closed RMeli closed 1 year ago

RMeli commented 3 years ago

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 commented 3 years ago

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 commented 1 year ago

Closing as stale.