11#ifndef RD_SMILESWRITE_H_012020
12#define RD_SMILESWRITE_H_012020
21#include <boost/shared_ptr.hpp>
59 CX_ATOM_LABELS = 1 << 0,
60 CX_MOLFILE_VALUES = 1 << 1,
63 CX_ATOM_PROPS = 1 << 4,
64 CX_LINKNODES = 1 << 5,
65 CX_ENHANCEDSTEREO = 1 << 6,
69 CX_BOND_ATROPISOMER = 1 << 10,
70 CX_COORDINATE_BONDS = 1 << 11,
71 CX_HYDROGEN_BONDS = 1 << 12,
72 CX_ZERO_BONDS = 1 << 13,
74 CX_ALL_BUT_COORDS = CX_ALL ^ CX_COORDS
79 const ROMol &mol, std::uint32_t flags = CXSmilesFields::CX_ALL);
83 const std::vector<ROMol *> &mols, std::uint32_t flags);
107 const Bond * =
nullptr,
108 bool allHsExplicit =
false,
109 bool isomericSmiles =
true) {
127 int atomToLeftIdx = -1);
138 bool doKekule =
false,
139 bool allBondsExplicit =
false) {
180 bool doKekule =
false,
int rootedAtAtom = -1,
181 bool canonical =
true,
182 bool allBondsExplicit =
false,
183 bool allHsExplicit =
false,
184 bool doRandom =
false,
185 bool ignoreAtomMapNumbers =
false) {
212 const ROMol &mol,
unsigned int numSmiles,
unsigned int randomSeed = 0,
213 bool doIsomericSmiles =
true,
bool doKekule =
false,
214 bool allBondsExplicit =
false,
bool allHsExplicit =
false);
219 const std::vector<int> &atomsToUse,
220 const std::vector<int> *bondsToUse =
nullptr,
221 const std::vector<std::string> *atomSymbols =
nullptr,
222 const std::vector<std::string> *bondSymbols =
nullptr);
250 const ROMol &mol,
const std::vector<int> &atomsToUse,
251 const std::vector<int> *bondsToUse =
nullptr,
252 const std::vector<std::string> *atomSymbols =
nullptr,
253 const std::vector<std::string> *bondSymbols =
nullptr,
254 bool doIsomericSmiles =
true,
bool doKekule =
false,
int rootedAtAtom = -1,
255 bool canonical =
true,
bool allBondsExplicit =
false,
256 bool allHsExplicit =
false) {
269 RestoreBondDirOptionTrue = 0,
270 RestoreBondDirOptionClear = 1
276 std::uint32_t flags = SmilesWrite::CXSmilesFields::CX_ALL,
277 RestoreBondDirOption restoreBondDirs =
278 RestoreBondDirOption::RestoreBondDirOptionClear);
297 bool doKekule =
false,
int rootedAtAtom = -1,
298 bool canonical =
true,
299 bool allBondsExplicit =
false,
300 bool allHsExplicit =
false,
301 bool doRandom =
false) {
310 return MolToCXSmiles(mol, ps, SmilesWrite::CXSmilesFields::CX_ALL);
316 const std::vector<int> &atomsToUse,
317 const std::vector<int> *bondsToUse =
nullptr,
318 const std::vector<std::string> *atomSymbols =
nullptr,
319 const std::vector<std::string> *bondSymbols =
nullptr);
345 const ROMol &mol,
const std::vector<int> &atomsToUse,
346 const std::vector<int> *bondsToUse =
nullptr,
347 const std::vector<std::string> *atomSymbols =
nullptr,
348 const std::vector<std::string> *bondSymbols =
nullptr,
349 bool doIsomericSmiles =
true,
bool doKekule =
false,
int rootedAtAtom = -1,
350 bool canonical =
true,
bool allBondsExplicit =
false,
351 bool allHsExplicit =
false) {
#define BETTER_ENUM(Enum, Underlying,...)
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, bool includeStereoGroups=true)
RDKIT_SMILESPARSE_EXPORT std::string GetAtomSmiles(const Atom *atom, const SmilesWriteParams &ps)
returns the SMILES for an atom
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, const SmilesWriteParams &ps, int atomToLeftIdx=-1)
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::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)
RDKIT_SMILESPARSE_EXPORT std::string MolToCXSmiles(const ROMol &mol, const SmilesWriteParams &ps, std::uint32_t flags=SmilesWrite::CXSmilesFields::CX_ALL, RestoreBondDirOption restoreBondDirs=RestoreBondDirOption::RestoreBondDirOptionClear)
returns canonical CXSMILES for a molecule
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 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
std::vector< boost::shared_ptr< ROMol > > MOL_SPTR_VECT
bool ignoreAtomMapNumbers