Hi Liz,

On Thu, Jan 9, 2014 at 4:35 PM, Elizabeth Wylie <ewyli...@gmail.com> wrote:

> Hi All,
>
> I think I've run into either some unexpected behavior or misleading
> documentation in the MCS module. In the guide it reads: "An atomCompare of
> 'any' says that any atom matches any other atom, 'elements' compares by
> element type, and 'isotopes' matches based on the isotope label. Isotope
> labels can be used to implement user-defined atom types." I've created a
> sort of hash based on the element and hybridization of the atom and stored
> it in the isotope label. FindMCS generates the correct results but the
> SMARTS in the MCSResult is garbage.
>

"garbage" is a bit strong. It is returning the SMARTS corresponding to what
it matched. I can understand that this isn't what you're looking for, but
fortunately it's not a giant amount of work to get what (I think) you want.
See below.


>
> MCSResult(numAtoms=35, numBonds=39, 
> smarts='[46*]-[38*]-[36*]:1:[36*]:[36*]:[36*](:[36*]:[36*]:1)-[46*](-[36*]:1:[36*]:[36*]:[36*]:[36*]:[36*]:1)(-[36*]:1:[36*]:[36*]:[36*]:[36*]:[36*]:1)-[37*]-[36*]:1:[37*]:[36*]:2:[36*](:[36*](:[37*]:1)=[38*]):[37*]:[36*]:[37*]:2-[46*]-[48*]-[46*]',
>  completed=1)
>
>
> My isotope label has overwritten the other element information. The SMILES
> I'm comparing are
> "COc1ccc(C(Nc2nc3c(ncn3COCC=O)c(=O)[nH]2)(c2ccccc2)c2ccccc2)cc1" and
> "COc1ccc(C(Nc2nc3c(ncn3COC(CO)(CO)CO)c(=O)[nH]2)(c2ccccc2)c2ccccc2)cc1".
>
> Is there a way to produce the same matching behavior (hybridization and
> element must match) and still produce usable SMARTS? I specifically wanted
> to be able to use a hash so that I could extend this to other features.
>

I put together an IPython notebook showing one way to do this.

Here's an nbviewer link:
http://nbviewer.ipython.org/gist/greglandrum/8351725

and here's the example itself:
https://gist.github.com/greglandrum/8351725


It's a fun example; thanks!
-greg
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to