PNGParser.h File Reference
`#include <RDGeneral/export.h>`
`#include <RDGeneral/types.h>`
`#include <RDGeneral/BadFileException.h>`
`#include <GraphMol/RDKitBase.h>`
`#include <GraphMol/SmilesParse/SmilesParse.h>`
`#include <GraphMol/SmilesParse/SmilesWrite.h>`
`#include <boost/format.hpp>`
`#include <string>`
`#include <fstream>`
`#include <sstream>`

Go to the source code of this file.

## Namespaces

| RDKit
| Std stuff.
| RDKit::PNGData
| Tags used for PNG metadata.

## Functions

metadata to/from PNG
RDKIT_FILEPARSERS_EXPORT std::vector< std::pair< std::string, std::string > > | RDKit::PNGStreamToMetadata (std::istream &inStream)
| returns the metadata (tEXt and zTXt chunks) from PNG data More...
std::vector< std::pair< std::string, std::string > > | RDKit::PNGFileToMetadata (const std::string &fname)
| returns the metadata (tEXt and zTXt chunks) from PNG data More...
std::vector< std::pair< std::string, std::string > > | RDKit::PNGStringToMetadata (const std::string &data)
| returns the metadata (tEXt and zTXt chunks) from PNG data More...
RDKIT_FILEPARSERS_EXPORT std::string | RDKit::addMetadataToPNGStream (std::istream &iStream, const std::vector< std::pair< std::string, std::string >> &metadata, bool compressed=true)
| adds metadata to a PNG stream. The modified PNG data is returned. More...
std::string | RDKit::addMetadataToPNGString (const std::string &pngString, const std::vector< std::pair< std::string, std::string >> &metadata, bool compressed=true)
| adds metadata to a PNG string. The modified PNG data is returned. More...
std::string | RDKit::addMetadataToPNGFile (const std::string &fname, const std::vector< std::pair< std::string, std::string >> &metadata, bool compressed=true)
| adds metadata to a PNG file. The modified PNG data is returned. More...
molecules to/from PNG
RDKIT_FILEPARSERS_EXPORT ROMol * | RDKit::PNGStreamToMol (std::istream &inStream, const SmilesParserParams &params=SmilesParserParams())
| constructs an ROMol from the metadata in a PNG stream More...
ROMol * | RDKit::PNGFileToMol (const std::string &fname, const SmilesParserParams &params=SmilesParserParams())
| constructs an ROMol from the metadata in a PNG file. See `PNGStreamToMol()` for more details. More...
ROMol * | RDKit::PNGStringToMol (const std::string &data, const SmilesParserParams &params=SmilesParserParams())
| constructs an ROMol from the metadata in a PNG string. See `PNGStreamToMol()` for more details. More...
RDKIT_FILEPARSERS_EXPORT std::vector< std::unique_ptr< ROMol > > | RDKit::PNGStreamToMols (std::istream &inStream, const std::string &tagToUse=PNGData::pklTag, const SmilesParserParams &params=SmilesParserParams())
| constructs a vector of ROMol from the metadata in a PNG stream More...
std::vector< std::unique_ptr< ROMol > > | RDKit::PNGFileToMols (const std::string &fname, const std::string &tagToUse=PNGData::pklTag, const SmilesParserParams &params=SmilesParserParams())
| constructs a vector of ROMol from the metadata in a PNG file. See `PNGStreamToMols()` for more details. More...
std::vector< std::unique_ptr< ROMol > > | RDKit::PNGStringToMols (const std::string &data, const std::string &tagToUse=PNGData::pklTag, const SmilesParserParams &params=SmilesParserParams())
| constructs a vector of ROMol from the metadata in a PNG string. See `PNGStreamToMols()` for more details. More...
RDKIT_FILEPARSERS_EXPORT std::string | RDKit::addMolToPNGStream (const ROMol &mol, std::istream &iStream, bool includePkl=true, bool includeSmiles=true, bool includeMol=false)
| adds metadata for an ROMol to the data from a PNG stream. The modified PNG data is returned. More...
std::string | RDKit::addMolToPNGString (const ROMol &mol, const std::string &pngString, bool includePkl=true, bool includeSmiles=true, bool includeMol=false)
| adds metadata for an ROMol to a PNG string. The modified PNG data is returned. See `addMolToPNGStream()` for more details. More...
std::string | RDKit::addMolToPNGFile (const ROMol &mol, const std::string &fname, bool includePkl=true, bool includeSmiles=true, bool includeMol=false)
| adds metadata for an ROMol to the data from a PNG file. The modified PNG data is returned. See `addMolToPNGStream()` for more details. More...

## Variables

RDKIT_FILEPARSERS_EXPORT const std::string | RDKit::PNGData::smilesTag
RDKIT_FILEPARSERS_EXPORT const std::string | RDKit::PNGData::molTag
RDKIT_FILEPARSERS_EXPORT const std::string | RDKit::PNGData::pklTag