RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
RDKit::SmilesWrite Namespace Reference

Namespaces

namespace  detail
 

Enumerations

enum  CXSmilesFields : uint32_t {
  CX_NONE = 0 , CX_ATOM_LABELS = 1 << 0 , CX_MOLFILE_VALUES = 1 << 1 , CX_COORDS = 1 << 2 ,
  CX_RADICALS = 1 << 3 , CX_ATOM_PROPS = 1 << 4 , CX_LINKNODES = 1 << 5 , CX_ENHANCEDSTEREO = 1 << 6 ,
  CX_SGROUPS = 1 << 7 , CX_POLYMER = 1 << 8 , CX_BOND_CFG = 1 << 9 , CX_BOND_ATROPISOMER = 1 << 10 ,
  CX_ALL = 0x7fffffff , CX_ALL_BUT_COORDS = CX_ALL ^ CX_COORDS
}
 

Functions

RDKIT_SMILESPARSE_EXPORT std::string getCXExtensions (const ROMol &mol, std::uint32_t flags=CXSmilesFields::CX_ALL)
 returns the cxsmiles data for a molecule
 
RDKIT_SMILESPARSE_EXPORT bool inOrganicSubset (int atomicNumber)
 returns true if the atom number is in the SMILES organic subset
 
RDKIT_SMILESPARSE_EXPORT std::string GetAtomSmiles (const Atom *atom, bool doKekule=false, const Bond *bondIn=nullptr, bool allHsExplicit=false, bool isomericSmiles=true)
 returns the SMILES for an atom
 
RDKIT_SMILESPARSE_EXPORT std::string GetBondSmiles (const Bond *bond, int atomToLeftIdx=-1, bool doKekule=false, bool allBondsExplicit=false)
 returns the SMILES for a bond
 

Enumeration Type Documentation

◆ CXSmilesFields

Enumerator
CX_NONE 
CX_ATOM_LABELS 
CX_MOLFILE_VALUES 
CX_COORDS 
CX_RADICALS 
CX_ATOM_PROPS 
CX_LINKNODES 
CX_ENHANCEDSTEREO 
CX_SGROUPS 
CX_POLYMER 
CX_BOND_CFG 
CX_BOND_ATROPISOMER 
CX_ALL 
CX_ALL_BUT_COORDS 

Definition at line 42 of file SmilesWrite.h.

Function Documentation

◆ GetAtomSmiles()

RDKIT_SMILESPARSE_EXPORT std::string RDKit::SmilesWrite::GetAtomSmiles ( const Atom * atom,
bool doKekule = false,
const Bond * bondIn = nullptr,
bool allHsExplicit = false,
bool isomericSmiles = true )

returns the SMILES for an atom

Parameters
atom: the atom to work with
doKekule: we're doing kekulized smiles (e.g. don't use lower case for the atom label)
bondIn: the bond we came into the atom on (unused)
allHsExplicit: if true, hydrogen counts will be provided for every atom.
isomericSmiles: if true, isomeric SMILES will be generated

◆ GetBondSmiles()

RDKIT_SMILESPARSE_EXPORT std::string RDKit::SmilesWrite::GetBondSmiles ( const Bond * bond,
int atomToLeftIdx = -1,
bool doKekule = false,
bool allBondsExplicit = false )

returns the SMILES for a bond

Parameters
bond: the bond to work with
atomToLeftIdx: the index of the atom preceding bond in the SMILES
doKekule: we're doing kekulized smiles (e.g. write out bond orders for aromatic bonds)
allBondsExplicit: if true, symbols will be included for all bonds.

◆ getCXExtensions()

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

◆ inOrganicSubset()

RDKIT_SMILESPARSE_EXPORT bool RDKit::SmilesWrite::inOrganicSubset ( int atomicNumber)

returns true if the atom number is in the SMILES organic subset