It is hard to tell if this is a bug or not, however:

                     atomCompare=rdFMCS.AtomCompare.CompareAny,
                     bondCompare=rdFMCS.BondCompare.CompareAny,

Means that any atom matches any other atom and any bond matches any other
bond.  The smarts being returned does not have the appropriate wildcards.

'[#6](:[#6](-[#6]):[#7]:[#7]:[#6]=[#8]):[#6]'


The mcs you actually computed should have been something like:


mcs = Chem.MolFromSmarts('[*](~[*](~[*])~[*]~[*]~[*]~[*])~[*]')

print moli_noh.GetSubstructMatch(mcs)
print molj_noh.GetSubstructMatch(mcs)


(0, 1, 7, 9, 10, 2, 11, 12)
(0, 1, 6, 8, 9, 5, 3, 2)



So it looks like the smarts generation portion of the MCS code doesn't
apply the rules of the mcs matcher.  Bug?  Maybe :)




On Wed, Feb 24, 2016 at 6:20 PM, Gaetano Calabro <[email protected]> wrote:

>
> Hi There,
>
> I have calculated the Maximum Common Subgraph (MCS) between the attached
> mol2 molecules. The MCS seems to be successfully found but if I try to map
> it back to the original molecules I cannot found the common subgraph in one
> of the two molecule. My script is:
>
> from rdkit import Chem
> from rdkit.Chem import rdFMCS
> from rdkit.Chem import AllChem
>
> moli = Chem.MolFromMol2File('moli.mol2')
> molj = Chem.MolFromMol2File('molj.mol2')
>
> moli_noh = AllChem.RemoveHs(moli)
> molj_noh = AllChem.RemoveHs(molj)
>
> # MCS pattern calculation
> mcs = rdFMCS.FindMCS([moli_noh, molj_noh],
>                      timeout=20,
>                      atomCompare=rdFMCS.AtomCompare.CompareAny,
>                      bondCompare=rdFMCS.BondCompare.CompareAny,
>                      matchValences=False,
>                      ringMatchesRingOnly=True,
>                      completeRingsOnly=False,
>                      matchChiralTag=False)
>
>
> mcs_mol = Chem.MolFromSmarts(mcs.smartsString)
>
> print moli_noh.GetSubstructMatch(mcs_mol)
> print molj_noh.GetSubstructMatch(mcs_mol)
>
>
> This produces the output:
>
> ()
> (0, 1, 6, 8, 9, 5, 11, 2)
>
> Can someone help me please?
>
> Thanks,
>
> Gaetano
>
>
>
> ------------------------------------------------------------------------------
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to