Re: [Rdkit-discuss] GetSubstructMatch vs MMFFOptimize
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: Paolo T. <pao...@un...> - 2016-05-14 08:18:39
|
Dear Robert, the reason of the failure is that MMFF uses its own aromaticity model (see http://www.rdkit.org/docs/GettingStartedInPython.html#working-with-3d-molecules). Therefore, after calling AllChem.MMFFOptimizeMolecule(mols[0]) you will need to add the following call: AllChem.SanitizeMol(mols[0], sanitizeOps = AllChem.SanitizeFlags.SANITIZE_KEKULIZE \ | AllChem.SanitizeFlags.SANITIZE_SETAROMATICITY) This will fix your problem. Kind regards, Paolo On 05/14/2016 07:07 AM, Robert DeLisle wrote: > RDKitters, > > I'm working on a project in which I want to align a collection of > structures with their most similar structures and display the results > in PyMOL. To accomplish this, I've built a Python script similar to > the one attached here in which I start with pairs of structures, find > the MCS of those structures, create a template based on the MCS and a > 3D conformation of the structure of interest, and then generate a > constrained conformation of a query structure. I tried to comment the > attached code enough to lead you through the process. > > What I find is that quite often, the ConstrainedEmbed() function fails > with the error "molecule doesn't match the core" which seems very odd > since the pairs for which it fails are very similar. The attached .png > shows one such pair and their MCS. > > What I've found is that when I generate a 3D conformation for the > first structure and optimize it with MMFF (MMFFOptimize), this often > causes GetSubstructMatch to fail finding the MCS within the > structure. If instead I used UFFOptimize, everything seems to work OK > most of the time. > > In my code, I've noted where the error occurs and flanked it with some > print statements to show what happens. Specficially, at like 36 I have > the MMFFOptimize line, and at 37 the UFFOptimize line. I've also > attached a set of structures for which MMFF fails. > > While using UFFOptimize produces great results, I'm curious regarding > why MMFFOptimize creates a problem. And, whether this is a bug which > should be fixed, or just a glitch related to atom typing and other > parameterizations that occur with MMFF. > > Thanks for any explanation or ideas. > > -Kirk > > > > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who > bring their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the > apps on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > > > _______________________________________________ > Rdkit-discuss mailing list > Rdk...@li... > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss |