BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
BALL::PubChemDownloader Class Reference

Downloads PubChem entries. More...

#include <BALL/FORMAT/pubchemDownloader.h>

Public Member Functions

 PubChemDownloader ()
 
bool downloadSDFByName (const String &query, const String &filename)
 
bool downloadSDFByCID (int cid, const String &filename)
 

Detailed Description

Downloads PubChem entries.

This class provides a simplistic, blocking interface to the PubChem REST query interface. It downloads the obtained records in SDF format and

Definition at line 20 of file pubchemDownloader.h.

Constructor & Destructor Documentation

BALL::PubChemDownloader::PubChemDownloader ( )

Default constructor

Member Function Documentation

bool BALL::PubChemDownloader::downloadSDFByCID ( int  cid,
const String filename 
)

Download an SD file corresponding to the Pubchem record identified by Pubchem CID

Parameters
cidThe CID of the substance that should be received.
filenameThe path to the file into which the results should be saved.
Returns
false if an error was encountered during download.
bool BALL::PubChemDownloader::downloadSDFByName ( const String query,
const String filename 
)

Download an SD file corresponding to the Pubchem record identified by name.

Parameters
queryThe name of the substance that should be received.
filenameThe path to the file into which the results should be saved.
Returns
false if an error was encountered during download.