Dear Colleagues,

I am trying to do something that I think is quite simple, but I have not
figured out a simple way. Don't know if I am missing something. I am sure
that ultimately I can figure it out, but I wonder if there is a good way.

I fragmented a molecule with some rules, using FragmentOnBonds. I did get a
list of primary fragments.

I wish to recombine pairs (and triplets, but no bigger) of these primary
fragments, but only if the resulting fragment is part of the original
molecule. I.e. I want to undo some of the cuttings. (FragmentOnSomeBonds
does not help, since you cannot ensure that the resulting fragments consist
only of pairs of primary fragments.)

What is the best way to do this? The following is what I am trying.

I see that you can mark the original cut points using the dummyLabels
argument in FragmentOnBonds. So I converted the primary fragments to
smiles. I looked for the two sides of the original cut point and
substituted the two dummyLables to [2H] and [3H]. I then tried to rejoin
the fragments using a reaction string "[*:1][2H].[*:2][3H]>>[*:1][*:2]".
Unfortunately the ReactionFromSmarts function does not accept this string.
So I'll have to use Smarts search to look for [2H] and [3H], then create an
editable molecule from the two primary fragments, look for neighbours of
[2H] and [3H], add a bond, then delete the atoms [2H] and [3H], then
sanitize.

Thank you for your ideas.

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

Reply via email to