11#ifndef RD_DEPICTOR_TEMPLATES_H
12#define RD_DEPICTOR_TEMPLATES_H
21#include <unordered_map>
37 static CoordinateTemplates template_mols;
42 if (m_templates.find(atomCount) != m_templates.end()) {
49 unsigned int atomCount) {
50 return m_templates[atomCount];
81 m_templates[mol->getNumAtoms()].push_back(mol);
87 CoordinateTemplates(
const CoordinateTemplates &) =
delete;
88 CoordinateTemplates &operator=(
const CoordinateTemplates &) =
delete;
90 void clearTemplates() {
91 for (
auto &[atom_cout, romols] : m_templates) {
97 ~CoordinateTemplates() { clearTemplates(); }
99 void loadTemplatesFromPath(
100 const std::string &templatePath,
102 unsigned int, std::vector<std::shared_ptr<RDKit::ROMol>>> &templates);
104 std::unordered_map<unsigned int, std::vector<std::shared_ptr<RDKit::ROMol>>>
Defines the primary molecule class ROMol as well as associated typedefs.
constexpr std::array< const char *, 578 > TEMPLATE_SMARTS
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_GRAPHMOL_EXPORT int symmetrizeSSSR(ROMol &mol, std::vector< std::vector< int > > &res, bool includeDativeBonds=false, bool includeHydrogenBonds=false)
symmetrize the molecule's Smallest Set of Smallest Rings
RWMol * SmartsToMol(const std::string &sma, const SmartsParserParams &ps)
std::vector< INT_VECT > VECT_INT_VECT