Hi Jason,

The MMFF94 force field uses a different aromaticity model from the RDKit; to restore the traditional RDKit aromaticity model you may useChem.SetAromaticity():

from  cresset  import  flare

from  rdkit  import  Chem
from  rdkit.Chem  import  AllChem

m  =  Chem.MolFromSmiles("Cc1cccc(Oc2cnc(=O)[nH]c2)c1")

m1  =  Chem.AddHs(m)

m2  =  Chem.Mol(m1)

AllChem.EmbedMolecule(m2);

m2.GetSubstructMatches(Chem.MolFromSmarts('a'))

((1,), (2,), (3,), (4,), (5,), (7,), (8,), (9,), (10,), (12,), (13,), (14,))

AllChem.MMFFOptimizeMolecule(m2);

m2.GetSubstructMatches(Chem.MolFromSmarts('a'))

((1,), (2,), (3,), (4,), (5,), (14,))

Chem.SetAromaticity(m2)

m2.GetSubstructMatches(Chem.MolFromSmarts('a'))

((1,), (2,), (3,), (4,), (5,), (7,), (8,), (9,), (10,), (12,), (13,), (14,))


Cheers,
p.

On 02/05/19 20:31, Jason Biggs wrote:
I noticed that I'm getting a different substructure match depending on whether I have called the MMFF optimization.  This is reproducible in python with


>> m = Chem.MolFromSmiles("Cc1cccc(Oc2cnc(=O)[nH]c2)c1")

>> m1 = Chem.AddHs(m)
>> m2 = Chem.Mol(m1)
>> AllChem.EmbedMolecule(m2);
>> m2.GetSubstructMatches(Chem.MolFromSmarts('a'))

((1,), (2,), (3,), (4,), (5,), (7,), (8,), (9,), (10,), (12,), (13,), (14,))

>> AllChem.MMFFOptimizeMolecule(m2);
>> m2.GetSubstructMatches(Chem.MolFromSmarts('a'))

((1,), (2,), (3,), (4,), (5,), (14,))
Is this expected behavior?  I notice in the C++ code that the constructor for RDKit::MMFF::MMFFMolProperties will call MolOps::Kekulize, so maybe this is expected. For my application it's undesirable, and I can work around it by creating a copy of my ROMol and generating the MMFFMolProperties object using that copy (which can then be discarded).  Is there a better workaround?

Jason Biggs





_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to