Re: [Rdkit-discuss] How to get a list of available properties from SD file
Dear Paolo Tosco, Thank you very much for offering a concrete coding lesson in your previous email. This will help me a lot. I have got all the answers. -Malitha On Tue, Jun 27, 2017 at 3:58 PM, Malitha Kabir wrote: > Dear Maciek Wójcikowski, > > list(m0.GetPropNames()) returned the object I need. > Thank you very much. > > -Malitha > > > > > On Tue, Jun 27, 2017 at 3:45 PM, Maciek Wójcikowski > wrote: > >> Hi, >> >> There is a method GetPropsAsDict() or GetPropNames() for RDKit molecule. >> http://www.rdkit.org/Python_Docs/rdkit.Chem.rdchem >> .Mol-class.html#GetPropsAsDict which should do what you want. >> >> >> Pozdrawiam, | Best regards, >> Maciek Wójcikowski >> mac...@wojcikowski.pl >> >> 2017-06-27 11:26 GMT+02:00 Malitha Kabir : >> >>> Hi, >>> >>> Thank you very much in advance for kindly looking into this. >>> My question is in short: >>> Is there any method that can create a list of available properties from >>> SD file? >>> >>> I am describing the scenario here: >>> You can view a sample SD file from the following github link: >>> https://github.com/rdkit/rdkit/blob/master/Docs/Book/data/cdk2.sdf >>> >>> That file contains previously calculated properties (eg: Cluster, >>> MODEL.SOURCE etc.). I can read the file in RDKit using the following codes: >>> >>> from rdkit.Chem.rdmolfiles import SDMolSupplier >>> file1='cdk2.sdf' >>> data=SDMolSupplier(fileName=file1, sanitize=True, removeHs=False, >>> strictParsing=True) >>> >>> I can access the first molecule by using the following code: >>> m0=data[0] >>> >>> Now the object m0 (rdkit Mol object) contains all the necessary >>> information about the molecule including properties. >>> >>> I need to create a list of previously calculated properties from that >>> file without seeing the file visually. >>> >>> Any direction is warmly appreciated. Thank you very much. Have a great >>> day! >>> >>> -Malitha >>> >>> >>> >>> >>> -- >>> Check out the vibrant tech community on one of the world's most >>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >>> ___ >>> Rdkit-discuss mailing list >>> Rdkit-discuss@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >>> >>> >> > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] How to get a list of available properties from SD file
Dear Maciek Wójcikowski, list(m0.GetPropNames()) returned the object I need. Thank you very much. -Malitha On Tue, Jun 27, 2017 at 3:45 PM, Maciek Wójcikowski wrote: > Hi, > > There is a method GetPropsAsDict() or GetPropNames() for RDKit molecule. > http://www.rdkit.org/Python_Docs/rdkit.Chem.rdchem.Mol-class.html# > GetPropsAsDict which should do what you want. > > > Pozdrawiam, | Best regards, > Maciek Wójcikowski > mac...@wojcikowski.pl > > 2017-06-27 11:26 GMT+02:00 Malitha Kabir : > >> Hi, >> >> Thank you very much in advance for kindly looking into this. >> My question is in short: >> Is there any method that can create a list of available properties from >> SD file? >> >> I am describing the scenario here: >> You can view a sample SD file from the following github link: >> https://github.com/rdkit/rdkit/blob/master/Docs/Book/data/cdk2.sdf >> >> That file contains previously calculated properties (eg: Cluster, >> MODEL.SOURCE etc.). I can read the file in RDKit using the following codes: >> >> from rdkit.Chem.rdmolfiles import SDMolSupplier >> file1='cdk2.sdf' >> data=SDMolSupplier(fileName=file1, sanitize=True, removeHs=False, >> strictParsing=True) >> >> I can access the first molecule by using the following code: >> m0=data[0] >> >> Now the object m0 (rdkit Mol object) contains all the necessary >> information about the molecule including properties. >> >> I need to create a list of previously calculated properties from that >> file without seeing the file visually. >> >> Any direction is warmly appreciated. Thank you very much. Have a great >> day! >> >> -Malitha >> >> >> >> >> -- >> Check out the vibrant tech community on one of the world's most >> engaging tech sites, Slashdot.org! http://sdm.link/slashdot >> ___ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> >> > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] How to get a list of available properties from SD file
Hi, There is a method GetPropsAsDict() or GetPropNames() for RDKit molecule. http://www.rdkit.org/Python_Docs/rdkit.Chem.rdchem.Mol-class.html#GetPropsAsDict which should do what you want. Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl 2017-06-27 11:26 GMT+02:00 Malitha Kabir : > Hi, > > Thank you very much in advance for kindly looking into this. > My question is in short: > Is there any method that can create a list of available properties from SD > file? > > I am describing the scenario here: > You can view a sample SD file from the following github link: > https://github.com/rdkit/rdkit/blob/master/Docs/Book/data/cdk2.sdf > > That file contains previously calculated properties (eg: Cluster, > MODEL.SOURCE etc.). I can read the file in RDKit using the following codes: > > from rdkit.Chem.rdmolfiles import SDMolSupplier > file1='cdk2.sdf' > data=SDMolSupplier(fileName=file1, sanitize=True, removeHs=False, > strictParsing=True) > > I can access the first molecule by using the following code: > m0=data[0] > > Now the object m0 (rdkit Mol object) contains all the necessary > information about the molecule including properties. > > I need to create a list of previously calculated properties from that file > without seeing the file visually. > > Any direction is warmly appreciated. Thank you very much. Have a great day! > > -Malitha > > > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss