Re: [Rdkit-discuss] Adding molecules to pandas dataframe
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Christos K. <chr...@gm...> - 2019-07-25 15:01:37
|
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 <gi...@gm...> 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 > Rdk...@li... > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > |