RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
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

namespace  RDKit
 Std stuff.
 
namespace  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
 
std::vector< std::pair< std::string, std::string > > RDKit::PNGFileToMetadata (const std::string &fname)
 returns the metadata (tEXt and zTXt chunks) from PNG data
 
std::vector< std::pair< std::string, std::string > > RDKit::PNGStringToMetadata (const std::string &data)
 returns the metadata (tEXt and zTXt chunks) from PNG data
 
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.
 
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.
 
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.
 
molecules to/from PNG
RDKIT_FILEPARSERS_EXPORT ROMolRDKit::PNGStreamToMol (std::istream &inStream, const SmilesParserParams &params=SmilesParserParams())
 constructs an ROMol from the metadata in a PNG stream
 
ROMolRDKit::PNGFileToMol (const std::string &fname, const SmilesParserParams &params=SmilesParserParams())
 constructs an ROMol from the metadata in a PNG file. See PNGStreamToMol() for more details.
 
ROMolRDKit::PNGStringToMol (const std::string &data, const SmilesParserParams &params=SmilesParserParams())
 constructs an ROMol from the metadata in a PNG string. See PNGStreamToMol() for more details.
 
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
 
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.
 
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.
 
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.
 
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.
 
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.
 

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