RDKit: RDKit::v1 Namespace Reference

| RDKit Open-source cheminformatics and machine learning.

Loading...
Searching...
No Matches
Classes | Enumerations | Functions
RDKit::v1 Namespace Reference

## Classes
class | ForwardSDMolSupplier
class | MolFileUnhandledFeatureException
class | MolSupplier
struct | PDBParserParams
class | SDMolSupplier
struct | SmartsParserParams
class | SmilesMolSupplier
| lazy file parser for Smiles tables More...
class | SmilesParseException
struct | SmilesParserParams
class | TDTMolSupplier
| lazy file parser for TDT files More...

## Enumerations
enum | Mol2Type

## Functions
ChemicalReaction * | RxnBlockToChemicalReaction (const std::string &rxnBlock, bool sanitize=false, bool removeHs=false, bool strictParsing=true)
| Parse a text block in MDL rxn format into a ChemicalReaction.
ChemicalReaction * | RxnFileToChemicalReaction (const std::string &fileName, bool sanitize=false, bool removeHs=false, bool strictParsing=true)
| Parse a file in MDL rxn format into a ChemicalReaction.
ChemicalReaction * | RxnDataStreamToChemicalReaction (std::istream &rxnStream, unsigned int &line, bool sanitize=false, bool removeHs=false, bool strictParsing=true)
| Parse a text stream in MDL rxn format into a ChemicalReaction.
ChemicalReaction * | PNGStreamToChemicalReaction (std::istream &pngStream)
| constructs a ChemicalReaction from the metadata in a PNG stream
ChemicalReaction * | PNGStringToChemicalReaction (const std::string &data)
| constructs a ChemicalReaction from the metadata in a PNG string See `PNGStreamToChemicalReaction()` for more details
ChemicalReaction * | PNGFileToChemicalReaction (const std::string &fname)
| constructs a ChemicalReaction from the metadata in a PNG file See `PNGStreamToChemicalReaction()` for more details
std::vector< std::unique_ptr< RWMol > > | CDXMLDataStreamToMols (std::istream &inStream, bool sanitize=true, bool removeHs=true)
| construct molecules from a CDXML file Note that the CDXML format is large and complex, the RDKit doesn't support full functionality, just the base ones required for molecule and reaction parsing. Note: If the ChemDraw extensions are available, this auto detects between CDXML and CDX
std::vector< std::unique_ptr< RWMol > > | CDXMLFileToMols (const std::string &filename, bool sanitize=true, bool removeHs=true)
| construct molecules from a CDXML file Note that the CDXML format is large and complex, the RDKit doesn't support full functionality, just the base ones required for molecule and reaction parsing. Note: If the ChemDraw extensions are available, This function uses the file extension to determine the file type, .cdx or .cdxml If not, it defaults to CDXML
std::vector< std::unique_ptr< RWMol > > | CDXMLToMols (const std::string &cdxml, bool sanitize=true, bool removeHs=true)
| construct molecules from a CDXML block Note that the CDXML format is large and complex, the RDKit doesn't support full functionality, just the base ones required for molecule and reaction parsing. Note: to parse CDX files see the CDXParserParams variant of this function
RWMol * | MolDataStreamToMol (std::istream *inStream, unsigned int &line, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
RWMol * | MolDataStreamToMol (std::istream &inStream, unsigned int &line, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
RWMol * | MolBlockToMol (const std::string &molBlock, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
RWMol * | MolFileToMol (const std::string &fName, bool sanitize=true, bool removeHs=true, bool strictParsing=true)
RWMol * | TPLDataStreamToMol (std::istream *inStream, unsigned int &line, bool sanitize=true, bool skipFirstConf=false)
| translate TPL data (BioCad format) into a multi-conf molecule
RWMol * | TPLFileToMol (const std::string &fName, bool sanitize=true, bool skipFirstConf=false)
| construct a multi-conf molecule from a TPL (BioCad format) file
RWMol * | Mol2FileToMol (const std::string &fName, bool sanitize=true, bool removeHs=true, Mol2Type variant=Mol2Type::CORINA, bool cleanupSubstructures=true)
RWMol * | Mol2DataStreamToMol (std::istream &inStream, bool sanitize=true, bool removeHs=true, Mol2Type variant=Mol2Type::CORINA, bool cleanupSubstructures=true)
RWMol * | Mol2DataStreamToMol (std::istream *inStream, bool sanitize=true, bool removeHs=true, Mol2Type variant=Mol2Type::CORINA, bool cleanupSubstructures=true)
RWMol * | Mol2BlockToMol (const std::string &molBlock, bool sanitize=true, bool removeHs=true, Mol2Type variant=Mol2Type::CORINA, bool cleanupSubstructures=true)
RWMol * | XYZDataStreamToMol (std::istream &inStream)
RWMol * | XYZBlockToMol (const std::string &xyzBlock)
RWMol * | XYZFileToMol (const std::string &fName)
RWMol * | PDBBlockToMol (const std::string &str, bool sanitize=true, bool removeHs=true, unsigned int flavor=0, bool proximityBonding=true)
RWMol * | PDBBlockToMol (const char *str, bool sanitize=true, bool removeHs=true, unsigned int flavor=0, bool proximityBonding=true)
RWMol * | PDBFileToMol (const std::string &fname, bool sanitize=true, bool removeHs=true, unsigned int flavor=0, bool proximityBonding=true)
RWMol * | PDBDataStreamToMol (std::istream &inStream, bool sanitize=true, bool removeHs=true, unsigned int flavor=0, bool proximityBonding=true)
RWMol * | PDBDataStreamToMol (std::istream *inStream, bool sanitize=true, bool removeHs=true, unsigned int flavor=0, bool proximityBonding=true)
bool | MrvFileIsReaction (const std::string &fname)
bool | MrvDataStreamIsReaction (std::istream *inStream)
bool | MrvDataStreamIsReaction (std::istream &inStream)
bool | MrvBlockIsReaction (const std::string &molmrvText)
RWMol * | MrvDataStreamToMol (std::istream *inStream, bool sanitize=false, bool removeHs=false)
RWMol * | MrvDataStreamToMol (std::istream &inStream, bool sanitize=false, bool removeHs=false)
RWMol * | MrvBlockToMol (const std::string &molmrvText, bool sanitize=false, bool removeHs=false)
RWMol * | MrvFileToMol (const std::string &fName, bool sanitize=false, bool removeHs=false)
ChemicalReaction * | MrvDataStreamToChemicalReaction (std::istream *inStream, bool sanitize=false, bool removeHs=false)
ChemicalReaction * | MrvDataStreamToChemicalReaction (std::istream &inStream, bool sanitize=false, bool removeHs=false)
ChemicalReaction * | MrvBlockToChemicalReaction (const std::string &molmrvText, bool sanitize=false, bool removeHs=false)
ChemicalReaction * | MrvFileToChemicalReaction (const std::string &fName, bool sanitize=false, bool removeHs=false)
RDKit::RWMol * | SmilesToMol (const std::string &smi, const SmilesParserParams &ps)
Atom * | SmilesToAtom (const std::string &smi)
Bond * | SmilesToBond (const std::string &smi)
RWMol * | SmilesToMol (const std::string &smi, int debugParse=0, bool sanitize=true, std::map< std::string, std::string > *replacements=nullptr)
| Construct a molecule from a SMILES string.
RWMol * | SmartsToMol (const std::string &sma, const SmartsParserParams &ps)
RWMol * | SmartsToMol (const std::string &sma, int debugParse=0, bool mergeHs=false, std::map< std::string, std::string > *replacements=nullptr)
| Construct a molecule from a SMARTS string.
Atom * | SmartsToAtom (const std::string &sma)
Bond * | SmartsToBond (const std::string &sma)
Reaction SMARTS/SMILES Support
ChemicalReaction * | RxnSmartsToChemicalReaction (const std::string &text, std::map< std::string, std::string > *replacements=nullptr, bool useSmiles=false, bool allowCXSMILES=true)
| Parse a string containing "Reaction SMARTS" into a ChemicalReaction.

## Enumeration Type Documentation

## ◆ Mol2Type

enum RDKit::v2::FileParsers::Mol2Type

Definition at line 263 of file FileParsers.h.

## Function Documentation

## ◆ CDXMLDataStreamToMols()

std::vector< std::unique_ptr< RWMol > > RDKit::v1::CDXMLDataStreamToMols | ( | std::istream & | inStream,
|  | bool | sanitize = true,
|  | bool | removeHs = true )
| inline

construct molecules from a CDXML file Note that the CDXML format is large and complex, the RDKit doesn't support full functionality, just the base ones required for molecule and reaction parsing. Note: If the ChemDraw extensions are available, this auto detects between CDXML and CDX

Parameters

  inStream | - string containing the mol block
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized correctness of the contents.

Definition at line 108 of file CDXMLParser.h.

## ◆ CDXMLFileToMols()

std::vector< std::unique_ptr< RWMol > > RDKit::v1::CDXMLFileToMols | ( | const std::string & | filename,
|  | bool | sanitize = true,
|  | bool | removeHs = true )
| inline

construct molecules from a CDXML file Note that the CDXML format is large and complex, the RDKit doesn't support full functionality, just the base ones required for molecule and reaction parsing. Note: If the ChemDraw extensions are available, This function uses the file extension to determine the file type, .cdx or .cdxml If not, it defaults to CDXML

Parameters

  fileName | - cdxml fileName
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized correctness of the contents.

Definition at line 130 of file CDXMLParser.h.

## ◆ CDXMLToMols()

std::vector< std::unique_ptr< RWMol > > RDKit::v1::CDXMLToMols | ( | const std::string & | cdxml,
|  | bool | sanitize = true,
|  | bool | removeHs = true )
| inline

construct molecules from a CDXML block Note that the CDXML format is large and complex, the RDKit doesn't support full functionality, just the base ones required for molecule and reaction parsing. Note: to parse CDX files see the CDXParserParams variant of this function

Parameters

  cdxml | - string containing the mol block
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized correctness of the contents.

Definition at line 152 of file CDXMLParser.h.

## ◆ Mol2BlockToMol()

RWMol * RDKit::v1::Mol2BlockToMol | ( | const std::string & | molBlock,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | Mol2Type | variant = Mol2Type::CORINA,
|  | bool | cleanupSubstructures = true )
| inline

Parameters

  molBlock | - string containing the mol block
  sanitize | - toggles sanitization of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  variant | - the atom type definitions to use
  cleanupSubstructures | - toggles recognition and cleanup of common substructures

Definition at line 354 of file FileParsers.h.

## ◆ Mol2DataStreamToMol() [1/2]

RWMol * RDKit::v1::Mol2DataStreamToMol | ( | std::istream & | inStream,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | Mol2Type | variant = Mol2Type::CORINA,
|  | bool | cleanupSubstructures = true )
| inline

Parameters

  inStream | - stream containing the data
  sanitize | - toggles sanitization of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  variant | - the atom type definitions to use
  cleanupSubstructures | - toggles recognition and cleanup of common substructures

Definition at line 324 of file FileParsers.h.

## ◆ Mol2DataStreamToMol() [2/2]

RWMol * RDKit::v1::Mol2DataStreamToMol | ( | std::istream * | inStream,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | Mol2Type | variant = Mol2Type::CORINA,
|  | bool | cleanupSubstructures = true )
| inline

Definition at line 336 of file FileParsers.h.

## ◆ Mol2FileToMol()

RWMol * RDKit::v1::Mol2FileToMol | ( | const std::string & | fName,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | Mol2Type | variant = Mol2Type::CORINA,
|  | bool | cleanupSubstructures = true )
| inline

Parameters

  fName | - string containing the file name
  sanitize | - toggles sanitization of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  variant | - the atom type definitions to use
  cleanupSubstructures | - toggles recognition and cleanup of common substructures

Definition at line 302 of file FileParsers.h.

## ◆ MolBlockToMol()

RWMol * RDKit::v1::MolBlockToMol | ( | const std::string & | molBlock,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | bool | strictParsing = true )
| inline

Parameters

  molBlock | - string containing the mol block
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  strictParsing | - if set to false, the parser is more lax about correctness of the contents.

Definition at line 156 of file FileParsers.h.

## ◆ MolDataStreamToMol() [1/2]

RWMol * RDKit::v1::MolDataStreamToMol | ( | std::istream & | inStream,
|  | unsigned int & | line,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | bool | strictParsing = true )
| inline

Definition at line 141 of file FileParsers.h.

## ◆ MolDataStreamToMol() [2/2]

RWMol * RDKit::v1::MolDataStreamToMol | ( | std::istream * | inStream,
|  | unsigned int & | line,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | bool | strictParsing = true )
| inline

Parameters

  inStream | - stream containing the data
  line | - current line number (used for error reporting)
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  line | - current line number (used for error reporting)
  strictParsing | - if set to false, the parser is more lax about correctness of the contents.

Definition at line 131 of file FileParsers.h.

## ◆ MolFileToMol()

RWMol * RDKit::v1::MolFileToMol | ( | const std::string & | fName,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | bool | strictParsing = true )
| inline

Parameters

  fName | - string containing the file name
  sanitize | - toggles sanitization and stereochemistry perception of the molecule
  removeHs | - toggles removal of Hs from the molecule. H removal is only done if the molecule is sanitized
  strictParsing | - if set to false, the parser is more lax about correctness of the contents.

Definition at line 175 of file FileParsers.h.

## ◆ MrvBlockIsReaction()

bool RDKit::v1::MrvBlockIsReaction | ( | const std::string & | molmrvText | ) |
| inline

Definition at line 66 of file MarvinParser.h.

## ◆ MrvBlockToChemicalReaction()

ChemicalReaction * RDKit::v1::MrvBlockToChemicalReaction | ( | const std::string & | molmrvText,
|  | bool | sanitize = false,
|  | bool | removeHs = false )
| inline

Definition at line 115 of file MarvinParser.h.

## ◆ MrvBlockToMol()

RWMol * RDKit::v1::MrvBlockToMol | ( | const std::string & | molmrvText,
|  | bool | sanitize = false,
|  | bool | removeHs = false )
| inline

Definition at line 84 of file MarvinParser.h.

## ◆ MrvDataStreamIsReaction() [1/2]

bool RDKit::v1::MrvDataStreamIsReaction | ( | std::istream & | inStream | ) |
| inline

Definition at line 63 of file MarvinParser.h.

## ◆ MrvDataStreamIsReaction() [2/2]

bool RDKit::v1::MrvDataStreamIsReaction | ( | std::istream * | inStream | ) |
| inline

Definition at line 59 of file MarvinParser.h.

## ◆ MrvDataStreamToChemicalReaction() [1/2]

ChemicalReaction * RDKit::v1::MrvDataStreamToChemicalReaction | ( | std::istream & | inStream,
|  | bool | sanitize = false,
|  | bool | removeHs = false )
| inline

Definition at line 107 of file MarvinParser.h.

## ◆ MrvDataStreamToChemicalReaction() [2/2]

ChemicalReaction * RDKit::v1::MrvDataStreamToChemicalReaction | ( | std::istream * | inStream,
|  | bool | sanitize = false,
|  | bool | removeHs = false )
| inline

Definition at line 99 of file MarvinParser.h.

## ◆ MrvDataStreamToMol() [1/2]

RWMol * RDKit::v1::MrvDataStreamToMol | ( | std::istream & | inStream,
|  | bool | sanitize = false,
|  | bool | removeHs = false )
| inline

Definition at line 77 of file MarvinParser.h.

## ◆ MrvDataStreamToMol() [2/2]

RWMol * RDKit::v1::MrvDataStreamToMol | ( | std::istream * | inStream,
|  | bool | sanitize = false,
|  | bool | removeHs = false )
| inline

Definition at line 70 of file MarvinParser.h.

## ◆ MrvFileIsReaction()

bool RDKit::v1::MrvFileIsReaction | ( | const std::string & | fname | ) |
| inline

Definition at line 56 of file MarvinParser.h.

## ◆ MrvFileToChemicalReaction()

ChemicalReaction * RDKit::v1::MrvFileToChemicalReaction | ( | const std::string & | fName,
|  | bool | sanitize = false,
|  | bool | removeHs = false )
| inline

Definition at line 123 of file MarvinParser.h.

## ◆ MrvFileToMol()

RWMol * RDKit::v1::MrvFileToMol | ( | const std::string & | fName,
|  | bool | sanitize = false,
|  | bool | removeHs = false )
| inline

Definition at line 91 of file MarvinParser.h.

## ◆ PDBBlockToMol() [1/2]

RWMol * RDKit::v1::PDBBlockToMol | ( | const char * | str,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | unsigned int | flavor = 0,
|  | bool | proximityBonding = true )
| inline

Definition at line 439 of file FileParsers.h.

## ◆ PDBBlockToMol() [2/2]

RWMol * RDKit::v1::PDBBlockToMol | ( | const std::string & | str,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | unsigned int | flavor = 0,
|  | bool | proximityBonding = true )
| inline

Definition at line 429 of file FileParsers.h.

## ◆ PDBDataStreamToMol() [1/2]

RWMol * RDKit::v1::PDBDataStreamToMol | ( | std::istream & | inStream,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | unsigned int | flavor = 0,
|  | bool | proximityBonding = true )
| inline

Definition at line 455 of file FileParsers.h.

## ◆ PDBDataStreamToMol() [2/2]

RWMol * RDKit::v1::PDBDataStreamToMol | ( | std::istream * | inStream,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | unsigned int | flavor = 0,
|  | bool | proximityBonding = true )
| inline

Definition at line 465 of file FileParsers.h.

## ◆ PDBFileToMol()

RWMol * RDKit::v1::PDBFileToMol | ( | const std::string & | fname,
|  | bool | sanitize = true,
|  | bool | removeHs = true,
|  | unsigned int | flavor = 0,
|  | bool | proximityBonding = true )
| inline

Definition at line 445 of file FileParsers.h.

## ◆ PNGFileToChemicalReaction()

ChemicalReaction * RDKit::v1::PNGFileToChemicalReaction | ( | const std::string & | fname | ) |
| inline

constructs a ChemicalReaction from the metadata in a PNG file See `PNGStreamToChemicalReaction()` for more details

Definition at line 346 of file ReactionParser.h.

## ◆ PNGStreamToChemicalReaction()

ChemicalReaction * RDKit::v1::PNGStreamToChemicalReaction | ( | std::istream & | pngStream | ) |
| inline

constructs a ChemicalReaction from the metadata in a PNG stream

Looks through the metadata in the PNG to find the first tag that matches one of the tags in `RDKit::PNGData`. A reaction is constructed from this chunk.

Throws a `FileParseException` if no suitable tag is found.

The caller is responsible for the returned pointer.

Definition at line 336 of file ReactionParser.h.

## ◆ PNGStringToChemicalReaction()

ChemicalReaction * RDKit::v1::PNGStringToChemicalReaction | ( | const std::string & | data | ) |
| inline

constructs a ChemicalReaction from the metadata in a PNG string See `PNGStreamToChemicalReaction()` for more details

Definition at line 341 of file ReactionParser.h.

## ◆ RxnBlockToChemicalReaction()

ChemicalReaction * RDKit::v1::RxnBlockToChemicalReaction | ( | const std::string & | rxnBlock,
|  | bool | sanitize = false,
|  | bool | removeHs = false,
|  | bool | strictParsing = true )
| inline

Parse a text block in MDL rxn format into a ChemicalReaction.

Definition at line 218 of file ReactionParser.h.

## ◆ RxnDataStreamToChemicalReaction()

ChemicalReaction * RDKit::v1::RxnDataStreamToChemicalReaction | ( | std::istream & | rxnStream,
|  | unsigned int & | line,
|  | bool | sanitize = false,
|  | bool | removeHs = false,
|  | bool | strictParsing = true )
| inline

Parse a text stream in MDL rxn format into a ChemicalReaction.

Definition at line 240 of file ReactionParser.h.

## ◆ RxnFileToChemicalReaction()

ChemicalReaction * RDKit::v1::RxnFileToChemicalReaction | ( | const std::string & | fileName,
|  | bool | sanitize = false,
|  | bool | removeHs = false,
|  | bool | strictParsing = true )
| inline

Parse a file in MDL rxn format into a ChemicalReaction.

Definition at line 229 of file ReactionParser.h.

## ◆ RxnSmartsToChemicalReaction()

ChemicalReaction * RDKit::v1::RxnSmartsToChemicalReaction | ( | const std::string & | text,
|  | std::map< std::string, std::string > * | replacements = nullptr,
|  | bool | useSmiles = false,
|  | bool | allowCXSMILES = true )
| inline

Parse a string containing "Reaction SMARTS" into a ChemicalReaction.

Our definition of Reaction SMARTS is something that looks a lot like reaction SMILES, except that SMARTS queries are allowed on the reactant side and that atom-map numbers are required (at least for now)

Parameters

  text | the SMARTS to convert
  replacements | a string->string map of replacement strings.

See also
  SmilesToMol for more information about replacements

Parameters

  useSmiles | if set, the SMILES parser will be used instead of the SMARTS parserfor the individual components
  allowCXSMILES | if set, any CXSMILES extensions present will be parsed, otherwise it will be ignored

Definition at line 113 of file ReactionParser.h.

## ◆ SmartsToAtom()

Atom * RDKit::v1::SmartsToAtom | ( | const std::string & | sma | ) |
| inline

Definition at line 229 of file SmilesParse.h.

## ◆ SmartsToBond()

Bond * RDKit::v1::SmartsToBond | ( | const std::string & | sma | ) |
| inline

Definition at line 232 of file SmilesParse.h.

## ◆ SmartsToMol() [1/2]

RWMol * RDKit::v1::SmartsToMol | ( | const std::string & | sma,
|  | const SmartsParserParams & | ps )
| inline

Definition at line 189 of file SmilesParse.h.

## ◆ SmartsToMol() [2/2]

RWMol * RDKit::v1::SmartsToMol | ( | const std::string & | sma,
|  | int | debugParse = 0,
|  | bool | mergeHs = false,
|  | std::map< std::string, std::string > * | replacements = nullptr )
| inline

Construct a molecule from a SMARTS string.

Parameters

  sma | the SMARTS to convert
  debugParse | toggles verbose debugging information from the parser
  mergeHs | toggles merging H atoms in the SMARTS into neighboring atoms
  replacements | a string->string map of replacement strings.

See also
  SmilesToMol for more information about replacements

Returns
  a pointer to the new molecule; the caller is responsible for free'ing this.

Definition at line 217 of file SmilesParse.h.

## ◆ SmilesToAtom()

Atom * RDKit::v1::SmilesToAtom | ( | const std::string & | smi | ) |
| inline

Definition at line 135 of file SmilesParse.h.

## ◆ SmilesToBond()

Bond * RDKit::v1::SmilesToBond | ( | const std::string & | smi | ) |
| inline

Definition at line 140 of file SmilesParse.h.

## ◆ SmilesToMol() [1/2]

RDKit::RWMol * RDKit::v1::SmilesToMol | ( | const std::string & | smi,
|  | const SmilesParserParams & | ps )
| inline

Definition at line 118 of file SmilesParse.h.

## ◆ SmilesToMol() [2/2]

RWMol * RDKit::v1::SmilesToMol | ( | const std::string & | smi,
|  | int | debugParse = 0,
|  | bool | sanitize = true,
|  | std::map< std::string, std::string > * | replacements = nullptr )
| inline

Construct a molecule from a SMILES string.

Parameters

  smi | the SMILES to convert
  debugParse | toggles verbose debugging information from the parser
  sanitize | toggles H removal and sanitization of the molecule
  replacements | a string->string map of replacement strings. See below for more information about replacements.

Returns
  a pointer to the new molecule; the caller is responsible for free'ing this.

The optional replacements map can be used to do string substitution of abbreviations in the input SMILES. The set of substitutions is repeatedly looped through until the string no longer changes. It is the responsibility of the caller to make sure that substitutions results in legal and sensible SMILES.

Examples of substitutions:

CC{Q}C with {"{Q}":"OCCO"} -> CCOCCOC
C{A}C{Q}C with {"{Q}":"OCCO", "{A}":"C1(CC1)"} -> CC1(CC1)COCCOC
C{A}C{Q}C with {"{Q}":"{X}CC{X}", "{A}":"C1CC1", "{X}":"N"} -> CC1CC1CNCCNC
RDKit::MolDraw2D_detail::OrientType::C
@ C
Definition MolDraw2DHelpers.h:27

Definition at line 171 of file SmilesParse.h.

## ◆ TPLDataStreamToMol()

RWMol * RDKit::v1::TPLDataStreamToMol | ( | std::istream * | inStream,
|  | unsigned int & | line,
|  | bool | sanitize = true,
|  | bool | skipFirstConf = false )
| inline

translate TPL data (BioCad format) into a multi-conf molecule

Parameters

  inStream | the stream from which to read
  line | used to track the line number of errors
  sanitize | toggles sanitization and stereochemistry perception of the molecule
  skipFirstConf | according to the TPL format description, the atomic coords in the atom-information block describe the first conformation and the first conf block describes second conformation. The CombiCode, on the other hand, writes the first conformation data both to the atom-information block and to the first conf block. We want to be able to read CombiCode-style tpls, so we'll allow this mis-feature to be parsed when this flag is set.

Definition at line 223 of file FileParsers.h.

## ◆ TPLFileToMol()

RWMol * RDKit::v1::TPLFileToMol | ( | const std::string & | fName,
|  | bool | sanitize = true,
|  | bool | skipFirstConf = false )
| inline

construct a multi-conf molecule from a TPL (BioCad format) file

Parameters

  fName | the name of the file from which to read
  sanitize | toggles sanitization and stereochemistry perception of the molecule
  skipFirstConf | according to the TPL format description, the atomic coords in the atom-information block describe the first conformation and the first conf block describes second conformation. The CombiCode, on the other hand, writes the first conformation data both to the atom-information block and to the first conf block. We want to be able to read CombiCode-style tpls, so we'll allow this mis-feature to be parsed when this flag is set.

Definition at line 247 of file FileParsers.h.

## ◆ XYZBlockToMol()

RWMol * RDKit::v1::XYZBlockToMol | ( | const std::string & | xyzBlock | ) |
| inline

Parameters

  xyzBlock | - string containing the xyz block

Definition at line 394 of file FileParsers.h.

## ◆ XYZDataStreamToMol()

RWMol * RDKit::v1::XYZDataStreamToMol | ( | std::istream & | inStream | ) |
| inline

Definition at line 387 of file FileParsers.h.

## ◆ XYZFileToMol()

RWMol * RDKit::v1::XYZFileToMol | ( | const std::string & | fName | ) |
| inline

Parameters

  fName | - string containing the file name

Definition at line 401 of file FileParsers.h.