190
190
//! \name Sanitization
195
SANITIZE_CLEANUP=0x1,
196
SANITIZE_PROPERTIES=0x2,
197
SANITIZE_SYMMRINGS=0x4,
198
SANITIZE_KEKULIZE=0x8,
199
SANITIZE_FINDRADICALS=0x10,
200
SANITIZE_SETAROMATICITY=0x20,
201
SANITIZE_SETCONJUGATION=0x40,
202
SANITIZE_SETHYBRIDIZATION=0x80,
203
SANITIZE_CLEANUPCHIRALITY=0x100,
204
SANITIZE_ADJUSTHS=0x200,
205
SANITIZE_ALL=0xFFFFFFFF
193
208
//! \brief carries out a collection of tasks for cleaning up a molecule and ensuring
194
209
//! that it makes "chemical sense"
196
211
This functions calls the following in sequence
197
212
-# MolOps::cleanUp()
213
-# mol.updatPropertyCache()
214
-# MolOps::symmetrizeSSSR()
198
215
-# MolOps::Kekulize()
216
-# MolOps::assignRadicals()
199
217
-# MolOps::setAromaticity()
200
218
-# MolOps::setConjugation()
201
219
-# MolOps::setHybridization()
202
220
-# MolOps::cleanupChirality()
203
221
-# MolOps::adjustHs()
205
\param mol the RWMol to be cleaned
223
\param mol : the RWMol to be cleaned
225
\param operationThatFailed : the first (if any) sanitization operation that fails is set here.
226
The values are taken from the \c SanitizeFlags enum.
227
On success, the value is \c SanitizeFlags::SANITIZE_NONE
229
\param sanitizeOps : the bits here are used to set which sanitization operations are carried
230
out. The elements of the \c SanitizeFlags enum define the operations.
208
233
- If there is a failure in the sanitization, a \c SanitException
211
236
function to a ROMol, so that new atoms and bonds cannot be added to the
212
237
molecule and screw up the sanitizing that has been done here
239
void sanitizeMol(RWMol &mol,unsigned int &operationThatFailed,
240
unsigned int sanitizeOps=SANITIZE_ALL);
214
242
void sanitizeMol(RWMol &mol);
216
244
//! Sets up the aromaticity for a molecule
352
380
int findSSSR(const ROMol &mol, std::vector<std::vector<int> > *res=0);
382
//! use a DFS algorithm to identify ring bonds and atoms in a molecule
384
\b NOTE: though the RingInfo structure is populated by this function,
385
the only really reliable calls that can be made are to check if
386
mol.getRingInfo().numAtomRings(idx) or mol.getRingInfo().numBondRings(idx)
389
void fastFindRings(const ROMol &mol);
354
392
//! symmetrize the molecule's Smallest Set of Smallest Rings
356
394
SSSR rings obatined from "findSSSR" can be non-unique in some case.