Hi Gianluca, Yes you can do that.
You create a list of molecule objects from the mol2 files and then you assign this list to a new column in your dataframe. I.e. (Pythopsuedocode...) mols = list() for mol2 in mol2_files: mol = Chem.MolFromMol2(mol2) mols.append(mol) df["Molecule"] = mols Best, Christos Christos Kannas Scientific Software Developer (Cheminformatics) On Thu, 25 Jul 2019 at 15:45, Gianluca Sforna <gia...@gmail.com> wrote: > Hi all, > is it possible to manually add molecules to a pandas dataframe? I am > reading a bunch of mol2 files, adding some properties (including some > atom highlighting), then I'd like to add the resulting molecule to the > dataframe in order to show its depiction along with the data. > However, API docs and examples I found around always assume you have a > SMILES string to start with. > > Any pointers? > > -- > Gianluca Sforna > > > _______________________________________________ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >
_______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss