22 #ifndef RD_STRUCTCHECKER_H_Oct2016
23 #define RD_STRUCTCHECKER_H_Oct2016
27 #include "../RDKitBase.h"
30 namespace StructureCheck {
165 bool loadAugmentedAtomTranslations(
const std::string &path);
166 void setAugmentedAtomTranslations(
167 const std::vector<std::pair<AugmentedAtom, AugmentedAtom>> &aaPairs);
169 bool loadAcidicAugmentedAtoms(
const std::string &path);
170 void setAcidicAugmentedAtoms(
const std::vector<AugmentedAtom> &acidicAtoms);
172 bool loadGoodAugmentedAtoms(
const std::string &path);
173 void setGoodAugmentedAtoms(
const std::vector<AugmentedAtom> &acidicAtoms);
175 bool loadPatterns(
const std::string &path);
177 const std::vector<std::string> &smarts);
178 void setPatterns(
const std::vector<ROMOL_SPTR> &p);
180 bool loadRotatePatterns(
181 const std::string &path);
182 void parseRotatePatterns(
183 const std::vector<std::string> &smarts);
184 void setRotatePatterns(
const std::vector<ROMOL_SPTR> &p);
186 bool loadStereoPatterns(
187 const std::string &path);
188 void parseStereoPatterns(
189 const std::vector<std::string> &smarts);
190 void setStereoPatterns(
const std::vector<ROMOL_SPTR> &p);
192 bool loadTautomerData(
const std::string &path);
193 void parseTautomerData(
const std::vector<std::string> &smartsFrom,
194 const std::vector<std::string> &smartsTo);
195 void setTautomerData(
const std::vector<ROMOL_SPTR> &from,
196 const std::vector<ROMOL_SPTR> &to);
197 bool loadChargeDataTables(
const std::string &path);
201 StructCheckerOptions &op);
204 StructCheckerOptions &op,
205 const std::string &augmentedAtomTranslationsFile =
"",
208 const std::string &patternFile =
"",
209 const std::string &rotatePatternFile =
"",
210 const std::string &stereoPatternFile =
"",
211 const std::string &tautomerFile =
"");
249 BAD_MOLECULE = 0x0001,
250 ALIAS_CONVERSION_FAILED = 0x0002,
251 STEREO_ERROR = 0x0004,
252 STEREO_FORCED_BAD = 0x0008,
254 ATOM_CHECK_FAILED = 0x0020,
255 SIZE_CHECK_FAILED = 0x0040,
257 TRANSFORMED = 0x0100,
258 FRAGMENTS_FOUND = 0x0200,
259 EITHER_WARNING = 0x0400,
260 DUBIOUS_STEREO_REMOVED = 0x0800,
262 STEREO_TRANSFORMED = 0x2000,
263 TEMPLATE_TRANSFORMED = 0x4000,
264 TAUTOMER_TRANSFORMED = 0x8000,
266 BAD_SET = (BAD_MOLECULE | ALIAS_CONVERSION_FAILED | STEREO_ERROR |
267 STEREO_FORCED_BAD | ATOM_CLASH | ATOM_CHECK_FAILED |
270 TRANSFORMED_SET = (TRANSFORMED | FRAGMENTS_FOUND | EITHER_WARNING |
271 DUBIOUS_STEREO_REMOVED | STEREO_TRANSFORMED |
272 TEMPLATE_TRANSFORMED | TAUTOMER_TRANSFORMED | RECHARGED),
281 : Options(options) {}
289 unsigned checkMolStructure(
RWMol &mol)
const;
293 static std::string StructureFlagsToString(
unsigned flags);
295 static unsigned StringToStructureFlags(
const std::string &str);