Loading...
Searching...
No Matches
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

## PubChemDownloader()

BALL::PubChemDownloader::PubChemDownloader | ( |  | ) |

Default constructor

## Member Function Documentation

## downloadSDFByCID()

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

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

Parameters

  cid | The CID of the substance that should be received.
  filename | The path to the file into which the results should be saved.

Returns
  false if an error was encountered during download.

## downloadSDFByName()

bool BALL::PubChemDownloader::downloadSDFByName | ( | const String & | query,
|  | const String & | filename )

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

Parameters

  query | The name of the substance that should be received.
  filename | The path to the file into which the results should be saved.

Returns
  false if an error was encountered during download.