21 #ifndef RD_STRUCTCHECKER_H_Oct2016 22 #define RD_STRUCTCHECKER_H_Oct2016 26 #include "../RDKitBase.h" 29 namespace StructureCheck {
86 AugmentedAtom(
const std::string &symbol,
const std::string &name,
int charge,
164 bool loadAugmentedAtomTranslations(
const std::string &path);
165 void setAugmentedAtomTranslations(
166 const std::vector<std::pair<AugmentedAtom, AugmentedAtom> > &aaPairs);
168 bool loadAcidicAugmentedAtoms(
const std::string &path);
169 void setAcidicAugmentedAtoms(
const std::vector<AugmentedAtom> &acidicAtoms);
171 bool loadGoodAugmentedAtoms(
const std::string &path);
172 void setGoodAugmentedAtoms(
const std::vector<AugmentedAtom> &acidicAtoms);
174 bool loadPatterns(
const std::string &path);
176 const std::vector<std::string> &smarts);
177 void setPatterns(
const std::vector<ROMOL_SPTR> &p);
179 bool loadRotatePatterns(
180 const std::string &path);
181 void parseRotatePatterns(
182 const std::vector<std::string> &smarts);
183 void setRotatePatterns(
const std::vector<ROMOL_SPTR> &p);
185 bool loadStereoPatterns(
186 const std::string &path);
187 void parseStereoPatterns(
188 const std::vector<std::string> &smarts);
189 void setStereoPatterns(
const std::vector<ROMOL_SPTR> &p);
191 bool loadTautomerData(
const std::string &path);
192 void parseTautomerData(
const std::vector<std::string> &smartsFrom,
193 const std::vector<std::string> &smartsTo);
194 void setTautomerData(
const std::vector<ROMOL_SPTR> &from,
195 const std::vector<ROMOL_SPTR> &to);
196 bool loadChargeDataTables(
const std::string &path);
203 const std::string &augmentedAtomTranslationsFile =
"",
206 const std::string &patternFile =
"",
207 const std::string &rotatePatternFile =
"",
208 const std::string &stereoPatternFile =
"",
209 const std::string &tautomerFile =
"");
247 BAD_MOLECULE = 0x0001,
248 ALIAS_CONVERSION_FAILED = 0x0002,
249 STEREO_ERROR = 0x0004,
250 STEREO_FORCED_BAD = 0x0008,
252 ATOM_CHECK_FAILED = 0x0020,
253 SIZE_CHECK_FAILED = 0x0040,
255 TRANSFORMED = 0x0100,
256 FRAGMENTS_FOUND = 0x0200,
257 EITHER_WARNING = 0x0400,
258 DUBIOUS_STEREO_REMOVED = 0x0800,
260 STEREO_TRANSFORMED = 0x2000,
261 TEMPLATE_TRANSFORMED = 0x4000,
262 TAUTOMER_TRANSFORMED = 0x8000,
264 BAD_SET = (BAD_MOLECULE | ALIAS_CONVERSION_FAILED | STEREO_ERROR |
265 STEREO_FORCED_BAD | ATOM_CLASH | ATOM_CHECK_FAILED |
268 TRANSFORMED_SET = (TRANSFORMED | FRAGMENTS_FOUND | EITHER_WARNING |
269 DUBIOUS_STEREO_REMOVED | STEREO_TRANSFORMED |
270 TEMPLATE_TRANSFORMED | TAUTOMER_TRANSFORMED | RECHARGED),
279 : Options(options) {}
287 unsigned checkMolStructure(
RWMol &mol)
const;
291 static std::string StructureFlagsToString(
unsigned flags);
293 static unsigned StringToStructureFlags(
const std::string &str);
Class for performing structure validation and cleanup.
std::vector< Ligand > Ligands
bool loadOptionsFromFiles(StructCheckerOptions &op, const std::string &augmentedAtomTranslationsFile="", const std::string &patternFile="", const std::string &rotatePatternFile="", const std::string &stereoPatternFile="", const std::string &tautomerFile="")
std::vector< ROMOL_SPTR > Patterns
std::vector< IncEntry > AtomAcidity
std::vector< ROMOL_SPTR > FromTautomer
RWMol is a molecule class that is intended to be edited.
bool parseOptionsJSON(const std::string &json, StructCheckerOptions &op)
std::vector< std::pair< AugmentedAtom, AugmentedAtom > > AugmentedAtomPairs
AugmentedAtom(const std::string &symbol, const std::string &name, int charge, RadicalType radical, AATopology topology)
unsigned SubstitutionCount
std::vector< PathEntry > BetaPathTable
bool RemoveMinorFragments
StructChecker(const StructCheckerOptions &options)
std::vector< AugmentedAtom > GoodAtoms
static const int ANY_CHARGE
std::vector< ROMOL_SPTR > ToTautomer
std::vector< ROMOL_SPTR > StereoPatterns
std::map< unsigned, double > ElnegTable
std::vector< IncEntry > ChargeIncTable
const StructCheckerOptions & GetOptions() const
void SetOptions(const StructCheckerOptions &options)
std::vector< ROMOL_SPTR > RotatePatterns
int CollisionLimitPercent
std::vector< AugmentedAtom > AcidicAtoms