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

rd_mol_to_ob_mol conversion loses aromaticity information #25

Closed RMeli closed 1 year ago

RMeli commented 3 years ago

When using molecules.rd_mol_to_ob_mol to convert an RDKit molecule to a OpenBabel molecule, aromaticity information seem to be lost, which results in erroneous atom types when gridding.

from molecules import rd_mol_to_ob_mol

from rdkit import Chem
from rdkit.Chem import AllChem
from openbabel import pybel

rdmol = Chem.MolFromSmiles("c1ccccc1")
AllChem.EmbedMolecule(rdmol)

w = Chem.SDWriter('rdmol.sdf')
w.write(rdmol)
w.close()

obmol = rd_mol_to_ob_mol(rdmol)

pybel.Molecule(obmol).write("sdf", "obmol.sdf", overwrite=True)
RMeli commented 1 year ago

Closing as stale.