Loading...
Searching...
No Matches
SmilesWrite.h File Reference
`#include <RDGeneral/export.h>`
`#include <string>`
`#include <vector>`
`#include <memory>`
`#include <cstdint>`
`#include <limits>`
`#include <boost/shared_ptr.hpp>`

Go to the source code of this file.

## Classes

struct | RDKit::SmilesWriteParams

## Namespaces

namespace | RDKit
| Std stuff.
namespace | RDKit::SmilesWrite
namespace | RDKit::SmilesWrite::detail

## Macros

#define | CXSMILESFIELDS_ENUM_ITEMS
#define | CXSMILESFIELDS_ENUM_ITEM(k, v) k = (v),
#define | CXSMILESFIELDS_STD_MAP_ITEM(k) {#k, SmilesWrite::CXSmilesFields::k},
#define | CXSMILESFIELDS_ENUM_ITEM(k, v) CXSMILESFIELDS_STD_MAP_ITEM(k)
#define | CXSMILESFIELDS_ITEMS_MAP
#define | RESTOREBONDDIROPTION_ENUM_ITEMS
#define | RESTOREBONDDIROPTION_ENUM_ITEM(k, v) k = v,
#define | RESTOREBONDDIROPTION_STD_MAP_ITEM(k) {#k, k},
#define | RESTOREBONDDIROPTION_ENUM_ITEM(k, v) RESTOREBONDDIROPTION_STD_MAP_ITEM(k)
#define | RESTOREBONDDIROPTION_ITEMS_MAP

## Enumerations

enum | RDKit::SmilesWrite::CXSmilesFields : uint32_t { RDKit::SmilesWrite::CXSMILESFIELDS_ENUM_ITEMS }
enum | RDKit::RestoreBondDirOption { RDKit::RESTOREBONDDIROPTION_ENUM_ITEMS }

## Functions

RDKIT_SMILESPARSE_EXPORT std::string | RDKit::SmilesWrite::getCXExtensions (const ROMol &mol, std::uint32_t flags=CXSmilesFields::CX_ALL)
| returns the cxsmiles data for a molecule
RDKIT_SMILESPARSE_EXPORT std::string | RDKit::SmilesWrite::getCXExtensions (const std::vector< ROMol * > &mols, std::uint32_t flags)
| returns the cxsmiles data for a vector of molecules
RDKIT_SMILESPARSE_EXPORT bool | RDKit::SmilesWrite::inOrganicSubset (int atomicNumber)
| returns true if the atom number is in the SMILES organic subset
RDKIT_SMILESPARSE_EXPORT std::string | RDKit::SmilesWrite::GetAtomSmiles (const Atom *atom, const SmilesWriteParams &ps)
| returns the SMILES for an atom
std::string | RDKit::SmilesWrite::GetAtomSmiles (const Atom *atom, bool doKekule=false, const Bond *=nullptr, bool allHsExplicit=false, bool isomericSmiles=true)
| returns the SMILES for an atom
RDKIT_SMILESPARSE_EXPORT std::string | RDKit::SmilesWrite::GetBondSmiles (const Bond *bond, const SmilesWriteParams &ps, int atomToLeftIdx=-1)
| returns the SMILES for a bond
std::string | RDKit::SmilesWrite::GetBondSmiles (const Bond *bond, int atomToLeftIdx=-1, bool doKekule=false, bool allBondsExplicit=false)
| returns the SMILES for a bond
RDKIT_SMILESPARSE_EXPORT std::string | RDKit::SmilesWrite::detail::MolToSmiles (const ROMol &mol, const SmilesWriteParams &params, bool doingCXSmiles)
RDKIT_SMILESPARSE_EXPORT std::string | RDKit::MolToSmiles (const ROMol &mol, const SmilesWriteParams &params)
| returns canonical SMILES for a molecule
std::string | RDKit::MolToSmiles (const ROMol &mol, bool doIsomericSmiles=true, bool doKekule=false, int rootedAtAtom=-1, bool canonical=true, bool allBondsExplicit=false, bool allHsExplicit=false, bool doRandom=false, bool ignoreAtomMapNumbers=false)
| returns SMILES for a molecule, canonical by default
RDKIT_SMILESPARSE_EXPORT std::vector< std::string > | RDKit::MolToRandomSmilesVect (const ROMol &mol, unsigned int numSmiles, unsigned int randomSeed=0, bool doIsomericSmiles=true, bool doKekule=false, bool allBondsExplicit=false, bool allHsExplicit=false)
| returns a vector of random SMILES for a molecule (may contain duplicates)
RDKIT_SMILESPARSE_EXPORT std::string | RDKit::MolFragmentToSmiles (const ROMol &mol, const SmilesWriteParams &params, const std::vector< int > &atomsToUse, const std::vector< int > *bondsToUse=nullptr, const std::vector< std::string > *atomSymbols=nullptr, const std::vector< std::string > *bondSymbols=nullptr)
| returns canonical SMILES for part of a molecule
std::string | RDKit::MolFragmentToSmiles (const ROMol &mol, const std::vector< int > &atomsToUse, const std::vector< int > *bondsToUse=nullptr, const std::vector< std::string > *atomSymbols=nullptr, const std::vector< std::string > *bondSymbols=nullptr, bool doIsomericSmiles=true, bool doKekule=false, int rootedAtAtom=-1, bool canonical=true, bool allBondsExplicit=false, bool allHsExplicit=false)
| returns canonical SMILES for part of a molecule
RDKIT_SMILESPARSE_EXPORT std::string | RDKit::MolToCXSmiles (const ROMol &mol, const SmilesWriteParams &ps, std::uint32_t flags=SmilesWrite::CXSmilesFields::CX_ALL, RestoreBondDirOption restoreBondDirs=RestoreBondDirOptionClear)
| returns canonical CXSMILES for a molecule
std::string | RDKit::MolToCXSmiles (const ROMol &mol, bool doIsomericSmiles=true, bool doKekule=false, int rootedAtAtom=-1, bool canonical=true, bool allBondsExplicit=false, bool allHsExplicit=false, bool doRandom=false)
| returns canonical CXSMILES for a molecule
RDKIT_SMILESPARSE_EXPORT std::string | RDKit::MolFragmentToCXSmiles (const ROMol &mol, const SmilesWriteParams &params, const std::vector< int > &atomsToUse, const std::vector< int > *bondsToUse=nullptr, const std::vector< std::string > *atomSymbols=nullptr, const std::vector< std::string > *bondSymbols=nullptr)
| returns canonical CXSMILES for part of a molecule

std::string

RDKit::MolFragmentToCXSmiles (const ROMol &mol, const std::vector< int > &atomsToUse, const std::vector< int > *bondsToUse=nullptr, const std::vector< std::string > *atomSymbols=nullptr, const std::vector< std::string > *bondSymbols=nullptr, bool doIsomericSmiles=true, bool doKekule=false, int rootedAtAtom=-1, bool canonical=true, bool allBondsExplicit=false, bool allHsExplicit=false)

| returns canonical CXSMILES for part of a molecule
void | RDKit::updateSmilesWriteParamsFromJSON (SmilesWriteParams &params, const std::string &details_json)
void | RDKit::updateSmilesWriteParamsFromJSON (SmilesWriteParams &params, const char *details_json)
void | RDKit::updateCXSmilesFieldsFromJSON (SmilesWrite::CXSmilesFields &cxSmilesFields, RestoreBondDirOption &restoreBondDirs, const std::string &details_json)
void | RDKit::updateCXSmilesFieldsFromJSON (SmilesWrite::CXSmilesFields &cxSmilesFields, RestoreBondDirOption &restoreBondDirs, const char *details_json)

## Macro Definition Documentation

## CXSMILESFIELDS_ENUM_ITEM [1/2]

#define CXSMILESFIELDS_ENUM_ITEM | ( |  | k,
|  |  | v
| ) |  | k = (v),

Definition at line 73 of file SmilesWrite.h.

## CXSMILESFIELDS_ENUM_ITEM [2/2]

#define CXSMILESFIELDS_ENUM_ITEM | ( |  | k,
|  |  | v
| ) |  | CXSMILESFIELDS_STD_MAP_ITEM(k)

Definition at line 73 of file SmilesWrite.h.

## CXSMILESFIELDS_ENUM_ITEMS

#define CXSMILESFIELDS_ENUM_ITEMS

Value:
CXSMILESFIELDS_ENUM_ITEM(CX_NONE, 0) \
CXSMILESFIELDS_ENUM_ITEM(CX_ATOM_LABELS, 1 << 0) \
CXSMILESFIELDS_ENUM_ITEM(CX_MOLFILE_VALUES, 1 << 1) \
CXSMILESFIELDS_ENUM_ITEM(CX_COORDS, 1 << 2) \
CXSMILESFIELDS_ENUM_ITEM(CX_RADICALS, 1 << 3) \
CXSMILESFIELDS_ENUM_ITEM(CX_ATOM_PROPS, 1 << 4) \
CXSMILESFIELDS_ENUM_ITEM(CX_LINKNODES, 1 << 5) \
CXSMILESFIELDS_ENUM_ITEM(CX_ENHANCEDSTEREO, 1 << 6) \
CXSMILESFIELDS_ENUM_ITEM(CX_SGROUPS, 1 << 7) \
CXSMILESFIELDS_ENUM_ITEM(CX_POLYMER, 1 << 8) \
CXSMILESFIELDS_ENUM_ITEM(CX_BOND_CFG, 1 << 9) \
CXSMILESFIELDS_ENUM_ITEM(CX_BOND_ATROPISOMER, 1 << 10) \
CXSMILESFIELDS_ENUM_ITEM(CX_COORDINATE_BONDS, 1 << 11) \
CXSMILESFIELDS_ENUM_ITEM(CX_ALL, 0x7fffffff) \
CXSMILESFIELDS_ENUM_ITEM(CX_ALL_BUT_COORDS, CX_ALL ^ CX_COORDS)
CXSMILESFIELDS_ENUM_ITEM
#define CXSMILESFIELDS_ENUM_ITEM(k, v)
Definition SmilesWrite.h:73

Definition at line 56 of file SmilesWrite.h.

## CXSMILESFIELDS_ITEMS_MAP

#define CXSMILESFIELDS_ITEMS_MAP

Value:
std::map<std::string, SmilesWrite::CXSmilesFields> { \
CXSMILESFIELDS_ENUM_ITEMS \
}
CXSMILESFIELDS_ENUM_ITEMS
#define CXSMILESFIELDS_ENUM_ITEMS
Definition SmilesWrite.h:56

Definition at line 78 of file SmilesWrite.h.

## CXSMILESFIELDS_STD_MAP_ITEM

#define CXSMILESFIELDS_STD_MAP_ITEM | ( |  | k | ) | {#k, SmilesWrite::CXSmilesFields::k},

Definition at line 76 of file SmilesWrite.h.

## RESTOREBONDDIROPTION_ENUM_ITEM [1/2]

#define RESTOREBONDDIROPTION_ENUM_ITEM | ( |  | k,
|  |  | v
| ) |  | k = v,

Definition at line 280 of file SmilesWrite.h.

## RESTOREBONDDIROPTION_ENUM_ITEM [2/2]

#define RESTOREBONDDIROPTION_ENUM_ITEM | ( |  | k,
|  |  | v
| ) |  | RESTOREBONDDIROPTION_STD_MAP_ITEM(k)

Definition at line 280 of file SmilesWrite.h.

## RESTOREBONDDIROPTION_ENUM_ITEMS

#define RESTOREBONDDIROPTION_ENUM_ITEMS

Value:
RESTOREBONDDIROPTION_ENUM_ITEM(RestoreBondDirOptionTrue, \
0) /*!< DO restore bond dirs */ \
RESTOREBONDDIROPTION_ENUM_ITEM(RestoreBondDirOptionClear, \
1)
RESTOREBONDDIROPTION_ENUM_ITEM
#define RESTOREBONDDIROPTION_ENUM_ITEM(k, v)
Definition SmilesWrite.h:280

clear all bond dir information

Definition at line 278 of file SmilesWrite.h.

## RESTOREBONDDIROPTION_ITEMS_MAP

#define RESTOREBONDDIROPTION_ITEMS_MAP

Value:
std::map<std::string, RestoreBondDirOption> { \
RESTOREBONDDIROPTION_ENUM_ITEMS \
}
RESTOREBONDDIROPTION_ENUM_ITEMS
#define RESTOREBONDDIROPTION_ENUM_ITEMS
Definition SmilesWrite.h:274

Definition at line 286 of file SmilesWrite.h.

## RESTOREBONDDIROPTION_STD_MAP_ITEM

#define RESTOREBONDDIROPTION_STD_MAP_ITEM | ( |  | k | ) | {#k, k},

Definition at line 283 of file SmilesWrite.h.