-1

How can I convert SMILES column to new SDF(ROMol) column in the same pandas data frame using RDkit or other?

for example:

ID SMILES
1  Oc1ccc2c(noc2c1)c3cccc4ccc(O)cc34
2  Oc1cc(C=C)c2cc(ccc2c1)c3ccc(O)c(F)c3
3  CC1=C(C(=O)c2ccc(O)cc12)c3ccc(O)cc3
...
piRSquared
  • 285,575
  • 57
  • 475
  • 624
Naravut Suvannang
  • 187
  • 1
  • 4
  • 11

1 Answers1

2

rdkit.Chem has a module called PandasTools which can be used to create dataframes prepopulated with the columns you require.
http://www.blopig.com/blog/2017/02/using-rdkit-to-load-ligand-sdfs-into-pandas-dataframes/

If you wish to just edit an existing dataframe, the function you need is AddMoleculeColumnToFrame in rdkit.Chem.PandasTools http://www.rdkit.org/Python_Docs/rdkit.Chem.PandasTools-module.html

JoshuaBox
  • 735
  • 1
  • 4
  • 16