11#ifndef RD_SMILESWRITE_H_012020
12#define RD_SMILESWRITE_H_012020
26 bool doIsomericSmiles =
28 bool doKekule =
false;
32 bool canonical =
true;
33 bool allBondsExplicit =
false;
34 bool allHsExplicit =
false;
35 bool doRandom =
false;
37 int rootedAtAtom = -1;
40namespace SmilesWrite {
77 bool doKekule =
false,
79 bool allHsExplicit =
false,
93 bool allBondsExplicit =
false);
124 bool doKekule =
false,
int rootedAtAtom = -1,
125 bool canonical =
true,
126 bool allBondsExplicit =
false,
127 bool allHsExplicit =
false,
128 bool doRandom =
false) {
131 ps.doKekule = doKekule;
132 ps.rootedAtAtom = rootedAtAtom;
133 ps.canonical = canonical;
134 ps.allBondsExplicit = allBondsExplicit;
135 ps.allHsExplicit = allHsExplicit;
136 ps.doRandom = doRandom;
154 const ROMol &mol,
unsigned int numSmiles,
unsigned int randomSeed = 0,
155 bool doIsomericSmiles =
true,
bool doKekule =
false,
156 bool allBondsExplicit =
false,
bool allHsExplicit =
false);
163 const std::vector<std::string> *atomSymbols =
nullptr,
164 const std::vector<std::string> *
bondSymbols =
nullptr);
194 const std::vector<std::string> *atomSymbols =
nullptr,
195 const std::vector<std::string> *
bondSymbols =
nullptr,
196 bool doIsomericSmiles =
true,
bool doKekule =
false,
int rootedAtAtom = -1,
197 bool canonical =
true,
bool allBondsExplicit =
false,
198 bool allHsExplicit =
false) {
201 ps.doKekule = doKekule;
202 ps.rootedAtAtom = rootedAtAtom;
203 ps.canonical = canonical;
204 ps.allBondsExplicit = allBondsExplicit;
205 ps.allHsExplicit = allHsExplicit;
238 bool doKekule =
false,
int rootedAtAtom = -1,
239 bool canonical =
true,
240 bool allBondsExplicit =
false,
241 bool allHsExplicit =
false,
242 bool doRandom =
false) {
245 ps.doKekule = doKekule;
246 ps.rootedAtAtom = rootedAtAtom;
247 ps.canonical = canonical;
248 ps.allBondsExplicit = allBondsExplicit;
249 ps.allHsExplicit = allHsExplicit;
250 ps.doRandom = doRandom;
259 const std::vector<std::string> *atomSymbols =
nullptr,
260 const std::vector<std::string> *
bondSymbols =
nullptr);
288 const std::vector<std::string> *atomSymbols =
nullptr,
289 const std::vector<std::string> *
bondSymbols =
nullptr,
290 bool doIsomericSmiles =
true,
bool doKekule =
false,
int rootedAtAtom = -1,
291 bool canonical =
true,
bool allBondsExplicit =
false,
292 bool allHsExplicit =
false) {
295 ps.doKekule = doKekule;
296 ps.rootedAtAtom = rootedAtAtom;
297 ps.canonical = canonical;
298 ps.allBondsExplicit = allBondsExplicit;
299 ps.allHsExplicit = allHsExplicit;
The class for representing atoms.
class for representing a bond
#define RDKIT_SMILESPARSE_EXPORT
RDKIT_SMILESPARSE_EXPORT std::string MolToSmiles(const ROMol &mol, const SmilesWriteParams ¶ms, bool doingCXSmiles)
RDKIT_SMILESPARSE_EXPORT bool inOrganicSubset(int atomicNumber)
returns true if the atom number is in the SMILES organic subset
RDKIT_SMILESPARSE_EXPORT std::string GetBondSmiles(const Bond *bond, int atomToLeftIdx=-1, bool doKekule=false, bool allBondsExplicit=false)
returns the SMILES for a bond
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 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::vector< std::string > 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)
bool rdvalue_is(const RDValue_cast_t)
RDKIT_SMILESPARSE_EXPORT std::string MolFragmentToSmiles(const ROMol &mol, const SmilesWriteParams ¶ms, 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
RDKIT_SMILESPARSE_EXPORT std::string MolToSmiles(const ROMol &mol, const SmilesWriteParams ¶ms)
returns canonical SMILES for a molecule
RDKIT_SMILESPARSE_EXPORT std::string MolToCXSmiles(const ROMol &mol, const SmilesWriteParams &ps, std::uint32_t flags=SmilesWrite::CXSmilesFields::CX_ALL, RestoreBondDirOption restoreBondDirs=RestoreBondDirOptionClear)
returns canonical CXSMILES for a molecule
RDKIT_SMILESPARSE_EXPORT std::string MolFragmentToCXSmiles(const ROMol &mol, const SmilesWriteParams ¶ms, 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
@ RestoreBondDirOptionTrue
@ RestoreBondDirOptionClear