Hi Greg,

Thats why I had that strange "bug" with my hydrophobic - hydrophilic
fragmentation, I was using PathToSubmol with list of atom indices too.

And the solution I've actually found is, as Greg said, iterate through the
atoms of the molecule and find the bonds that connect my query pattern,
hydrophobic atoms, to atoms that are not part of it, aka are hydrophilic.
Then I used Chem.FragmentOnBonds to break the molecule on that list of
bonds.

Here is the IPython Notebook that shows what I'm doing
http://nbviewer.ipython.org/gist/CKannas/10975497
I do not break rings, if some ring atoms are mapped as hydrophobic, and I
also keep terminal carbons (CH3) connected to the adjacent hydrophobic
group, if any. I hope these assumptions are chemically correct.

Best,

Christos

Christos Kannas

Researcher
Ph.D Student

Mob (UK): +44 (0) 7447700937
Mob (Cyprus): +357 99530608

[image: View Christos Kannas's profile on
LinkedIn]<http://cy.linkedin.com/in/christoskannas>


On 17 April 2014 10:18, Greg Landrum <[email protected]> wrote:

>
> On Thu, Apr 17, 2014 at 10:32 AM, JP <[email protected]> wrote:
>
>>
>> On 16 April 2014 19:13, Christos Kannas <[email protected]> wrote:
>>
>>> Chem.PathToSubmol(mol, path)
>>
>>
>> Hi there Christos,
>>
>> Many thanks for your reply (and idea of using nbviewer)
>>
>> There is still something strange happening which I cannot figure out - my
>> atom index is a tuple with six elements - and in the resulting "submol" I
>> get seven atoms.  Also the ring is opened in a chain (so some of the
>> properties are changing).
>>
>> A simple example here:
>> http://nbviewer.ipython.org/gist/anonymous/10964449
>>
>> Any ideas?
>>
>
> PathToSubmol is underdocumented. It's expecting a list/tuple of bond
> indices; not atom indices.
>
> What you need to do is loop over the atoms in your match and find all the
> bonds that they are involved in that go to other atoms in the match. Pass
> that tuple/list to PathToSubmol and you should get what you want.
>
> If you're ok having dummies marking attachment points (which I suspect you
> aren't), you could use Chem.ReplaceSidechains(), but otherwise I don't
> think there's an easier way to do this.
>
> -greg
>
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to