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 {
76 bool doKekule =
false,
78 bool allHsExplicit =
false,
92 bool allBondsExplicit =
false);
123 bool doKekule =
false,
int rootedAtAtom = -1,
124 bool canonical =
true,
125 bool allBondsExplicit =
false,
126 bool allHsExplicit =
false,
127 bool doRandom =
false) {
130 ps.doKekule = doKekule;
131 ps.rootedAtAtom = rootedAtAtom;
132 ps.canonical = canonical;
133 ps.allBondsExplicit = allBondsExplicit;
134 ps.allHsExplicit = allHsExplicit;
135 ps.doRandom = doRandom;
153 const ROMol &mol,
unsigned int numSmiles,
unsigned int randomSeed = 0,
154 bool doIsomericSmiles =
true,
bool doKekule =
false,
155 bool allBondsExplicit =
false,
bool allHsExplicit =
false);
162 const std::vector<std::string> *atomSymbols =
nullptr,
163 const std::vector<std::string> *
bondSymbols =
nullptr);
193 const std::vector<std::string> *atomSymbols =
nullptr,
194 const std::vector<std::string> *
bondSymbols =
nullptr,
195 bool doIsomericSmiles =
true,
bool doKekule =
false,
int rootedAtAtom = -1,
196 bool canonical =
true,
bool allBondsExplicit =
false,
197 bool allHsExplicit =
false) {
200 ps.doKekule = doKekule;
201 ps.rootedAtAtom = rootedAtAtom;
202 ps.canonical = canonical;
203 ps.allBondsExplicit = allBondsExplicit;
204 ps.allHsExplicit = allHsExplicit;
229 bool doKekule =
false,
int rootedAtAtom = -1,
230 bool canonical =
true,
231 bool allBondsExplicit =
false,
232 bool allHsExplicit =
false,
233 bool doRandom =
false) {
236 ps.doKekule = doKekule;
237 ps.rootedAtAtom = rootedAtAtom;
238 ps.canonical = canonical;
239 ps.allBondsExplicit = allBondsExplicit;
240 ps.allHsExplicit = allHsExplicit;
241 ps.doRandom = doRandom;
250 const std::vector<std::string> *atomSymbols =
nullptr,
251 const std::vector<std::string> *
bondSymbols =
nullptr);
279 const std::vector<std::string> *atomSymbols =
nullptr,
280 const std::vector<std::string> *
bondSymbols =
nullptr,
281 bool doIsomericSmiles =
true,
bool doKekule =
false,
int rootedAtAtom = -1,
282 bool canonical =
true,
bool allBondsExplicit =
false,
283 bool allHsExplicit =
false) {
286 ps.doKekule = doKekule;
287 ps.rootedAtAtom = rootedAtAtom;
288 ps.canonical = canonical;
289 ps.allBondsExplicit = allBondsExplicit;
290 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)
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