Re: [Rdkit-discuss] Joining Fragments

2013-12-02 Thread Greg Landrum
On Mon, Dec 2, 2013 at 1:03 PM, Michal Krompiec wrote: > > > ReplaceSubstructs() is designed for the very simple case of replacing a > > piece of the molecule that is connected via one bond. It has the > significant > > limitation that it (currently) assumes that the bond will be formed to > the >

[Rdkit-discuss] Joining Fragments

2013-12-02 Thread Michal Krompiec
Dear Greg, Thanks for the answer. > ReplaceSubstructs() is designed for the very simple case of replacing a > piece of the molecule that is connected via one bond. It has the significant > limitation that it (currently) assumes that the bond will be formed to the > first atom in the replacement. I

Re: [Rdkit-discuss] Joining Fragments

2013-12-02 Thread Greg Landrum
On Mon, Dec 2, 2013 at 11:53 AM, Michal Krompiec wrote: > But does CombineMols create any new bonds? > It does not, but you can add bonds by converting to an EditableMol and working there. Something like this: In [2]: m = Chem.MolFromSmiles('c1c1N') In [3]: m2 = Chem.MolFromSmiles('CC(=O)'

Re: [Rdkit-discuss] Joining Fragments

2013-12-02 Thread Michal Krompiec
Dear Greg, But does CombineMols create any new bonds? What is the simplest/fastest way of joining two molecules (fragments) together? (i.e. is there anything simpler than using ReplaceSubstructs) Best wishes, Michal On 1 December 2013 04:40, Greg Landrum wrote: > This is the approach I would us

Re: [Rdkit-discuss] Joining Fragments

2013-12-02 Thread Nicholas Firth
Thanks for the replies. I was looking for the combine molecules function. I use the reaction based joining for ordered connections I want to make. I was looking for something a bit more basic though. Best, Nick Nicholas C. Firth | PhD Student | Cancer Therapeutics The Institute of Cancer Resea

Re: [Rdkit-discuss] Joining Fragments

2013-11-30 Thread Greg Landrum
This is the approach I would use. It allows you to skip the SMILES generation and parsing steps. On Fri, Nov 29, 2013 at 5:31 PM, Markus Hartenfeller < markus.hartenfel...@molecularhealth.com> wrote: > Hi Nick, > > I'm not 100% sure, but this might do what you are looking for: > > Chem.CombineM

Re: [Rdkit-discuss] Joining Fragments

2013-11-29 Thread Michal Krompiec
Suppose we have 2 fragments, A and B, with free valences marked as some dummy atoms. For example, A=CH3* and B=HO*. We want a general method to combine A and B, in this example the result should be CH3OH. There are at least 3 ways to do it. 1. Use the trick from SMILIB: replace dummies with %11, a

Re: [Rdkit-discuss] Joining Fragments

2013-11-29 Thread Markus Hartenfeller
Hi Nick, I'm not 100% sure, but this might do what you are looking for: Chem.CombineMols(molFrags[i], molFrags[i+1]) Best, Markus On 11/29/2013 05:03 PM, Nicholas Firth wrote: > Hi RDKitters, > > This may be a silly question, but I'm wondering if there's any functionality > in RDKit to add tw

[Rdkit-discuss] Joining Fragments

2013-11-29 Thread Nicholas Firth
Hi RDKitters, This may be a silly question, but I'm wondering if there's any functionality in RDKit to add two molecules together? I've been writing to SMILES and joining with a '.' and then reading back in. This feels very cludgy. Basically I have two fragments of molecules and I want to add t