18#include <unordered_map>
34 static CoordinateTemplates template_mols;
39 if (m_templates.find(atomCount) != m_templates.end()) {
46 unsigned int atomCount) {
47 return m_templates[atomCount];
78 m_templates[mol->getNumAtoms()].push_back(mol);
84 CoordinateTemplates(
const CoordinateTemplates &) =
delete;
85 CoordinateTemplates &operator=(
const CoordinateTemplates &) =
delete;
87 void clearTemplates() {
88 for (
auto &[atom_cout, romols] : m_templates) {
94 ~CoordinateTemplates() { clearTemplates(); }
96 void loadTemplatesFromPath(
97 const std::string &templatePath,
99 unsigned int, std::vector<std::shared_ptr<RDKit::ROMol>>> &templates);
101 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_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