Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-25 Thread Tim Dudgeon
I have a follow up question on ConstrainedEmbed. You pass the molecule to embed and the substructure core into this function and get back the embedded and aligned molecule. In rare cases there will be multiple substructure matches (e.g. in the case of symmetry). How would one go about generat

Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-18 Thread Paolo Tosco
Hi Tim, it's in mol.__sssAtoms, but that information is avaiable only if you are running code in the Jupyter notebook with IPythonConsole extensiosn installed; see https://github.com/rdkit/rdkit/blob/39bcee635e0ee8bc5da6798318fdcd4602c4baa6/rdkit/Chem/Draw/IPythonConsole.py#L142 Cheers, p.

Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-18 Thread Tim Dudgeon
On 18/04/2020 11:56, Paolo Tosco wrote: Hi Tim, mol.GetSubstructMatch(query) will give you indices in mol that match query. Yes, I can re-calculate it, but the fact that it's getting highlighted in Jupyter suggests that the mol already has that info so it shouldn't need recalculating. But

Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-18 Thread Paolo Tosco
Hi Tim, mol.GetSubstructMatch(query) will give you indices in mol that match query. Also note that |rdFMCS.||MCSResult| has a |queryMol |property that encode the MCS query, so you don't need to rebuild the query molecule out of the SMARTS pattern. p. On 18/04/2020 10:27, Tim Dudgeon wrote:

Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-18 Thread Tim Dudgeon
I also updated the Jupyter notebook with the solution. Out of interest, I now need to get the atom indices of the part of the molecule that matched. As Jupyter is nicely highlighting this that must already be present in the molecule somehow, but I can't find out how. I look at molecule and at

Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-18 Thread Tim Dudgeon
I think I tracked it down. If I use 'bondCompare=rdFMCS.BondCompare.CompareOrderExact' for the FindMCS() function then it seem to find the right MCS. Seems like by default it matches aromatic and aliphatic rings, and by doing so in my example it finds a bigger MCS so uses it. On 17/04/2020

Re: [Rdkit-discuss] Complications with ConstrainedEmbed

2020-04-17 Thread Paolo Tosco
Hi Tim, I’ll take a look later and get back to you. Cheers, p. > On 17 Apr 2020, at 18:55, Tim Dudgeon wrote: > > I'm wanting to use AllChem.ConstrainedEmbed() to generate a conformer of a > molecule tethered to a molecule that should always have some MCS. I found > some code on the interne