19#include <unordered_map>
40 if (m_templates.find(atomCount) != m_templates.end()) {
47 unsigned int atomCount) {
48 return m_templates[atomCount];
73 m_templates[mol->getNumAtoms()].push_back(mol);
79 CoordinateTemplates(
const CoordinateTemplates &) =
delete;
80 CoordinateTemplates &operator=(
const CoordinateTemplates &) =
delete;
82 void clearTemplates() {
83 for (
auto &[atom_cout, romols] : m_templates) {
89 ~CoordinateTemplates() { clearTemplates(); }
91 void loadTemplatesFromPath(
92 const std::string &templatePath,
94 unsigned int, std::vector<std::shared_ptr<RDKit::ROMol>>> &templates);
96 std::unordered_map<unsigned int, std::vector<std::shared_ptr<RDKit::ROMol>>>
Defines the primary molecule class ROMol as well as associated typedefs.
const std::vector< std::string > TEMPLATE_SMILES
const std::vector< std::shared_ptr< RDKit::ROMol > > & getMatchingTemplates(unsigned int atomCount)
bool hasTemplateOfSize(unsigned int atomCount)
void addRingSystemTemplates(const std::string &templatePath)
static void assertValidTemplate(RDKit::ROMol &mol, const std::string &smiles)
check if a template is considered valid
void loadDefaultTemplates()
void setRingSystemTemplates(const std::string &templatePath)
static CoordinateTemplates & getRingSystemTemplates()
returns a reference to the singleton CoordinateTemplates
#define RDKIT_DEPICTOR_EXPORT
RDKit::RWMol * SmilesToMol(const std::string &smi, const SmilesParserParams &ps)