Hi Sergio,

You need to provide the filename when you construct the SDMolSupplier.
Here's some sample code from one of the RDKit tests that demonstrates how
to use the supplier:
https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/FileParsers/testMolSupplier.cpp#L42

(that file contains other examples of using the suppliers too)

-greg


On Tue, Jul 14, 2015 at 7:10 AM, Wong, Sergio E. <wong...@llnl.gov> wrote:

>  Dear RDKit users;
>
>     I am trying to read a sdf file using the following code:
>
> #include<stdlib.h>
> #include<GraphMol/FileParsers/MolSupplier.h>
> #include<RDGeneral/FileParseException.h>
> #include<RDGeneral/BadFileException.h>
> #include<RDGeneral/RDLog.h>
> #include<GraphMol/RDKitBase.h>
>
> int main()
> {
> RDKit::SDMolSupplier supplier;
>
> supplier.init();
> supplier.SDMolSupplier("PubChem_info_dat.sdf");
>
> return 0;
>
> }
>
> When I try to compile it, I get the following error:
>
> test.c: In function ‘int main()’:
> test.c:19:10: error: invalid use of ‘RDKit::SDMolSupplier::SDMolSupplier’
>  supplier.SDMolSupplier("PubChem_info_dat.sdf");
>           ^
>
> Can anyone suggest anything?
>
> Thanks!
> -Sergio
>
>
>
>
> ------------------------------------------------------------------------------
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to