Re: [Rdkit-discuss] Using EnumerateLibraryFromReaction without fragmenting reactants
Unless you can make your reactant definitions a lot more specific, I think you're going to have to do the post-processing. The RDKit just uses all possible substructure matches of the reactant templates you provide... it makes no attempt to determine which is "best". -greg On Sun, Dec 5, 2021 at 8:24 PM James Wallace wrote: > Here's the specific example that I was referring to: > > I used a reaction with this SMILES, making a ChemicalReaction out of it > using the add reactant templates: > > [image: image.png] > N[CH3:1].O=C(O)C(c1c1)C11>>O=C(N[CH3:1])C(c1c1)C11 > > Taking two reagents to fit it: > [image: image.png] > OC(=O)C(C11)c1c1 > > [image: image.png] > NC(=O)Nc1ccc(C(=O)O)cc1 > > Gives us products > > [image: image.png] > O=C(NC(=O)C(c1c1)C11)Nc1ccc(C(=O)O)cc1 > > [image: image.png] > NC(=O)NC(=O)C(c1c1)C11 > > [image: image.png] > O=C(O)c1ccc(NC(=O)C(c2c2)C22)cc1 > > In my case, I want to just see the result that uses the most of the > reagent in each case, and not the ones where the reagent is fragmented. > > Is that possible directly, or do I need to filter my results post hoc? > > On Thu, 2 Dec 2021 at 20:04, Paolo Tosco > wrote: > >> Hi James, >> >> I am not quite sure I understand what you have done and what you'd like >> to achieve. >> Ideally, could you please post: >> >> * the reaction you are using >> * some example reactants >> * the desired product(s) >> * the undesired product(s) >> >> Thanks, cheers >> p. >> >> On Thu, Dec 2, 2021 at 6:03 PM James Wallace >> wrote: >> >>> Hi, >>> I've been working with the EnumerateLibraryFromReaction function to >>> generate some quick access molecule libraries, using standard lists of >>> reagents. >>> >>> However, when I get the output back, I notice that I get results that >>> chop up the reactants I use wherever they match the reaction rule, so for a >>> rule looking for NH I would effectively get the yellow ringed area here >>> used as a structure as well as the desired red one. >>> [image: image.png] >>> As well, since this contains acid character, it would also match there, >>> but I accept that I can't necessarily remove that. >>> >>> Is there any way I can filter out the partial usages, or am I stuck with >>> using the substructures as well? >>> >>> Thanks, >>> >>> James >>> ___ >>> Rdkit-discuss mailing list >>> Rdkit-discuss@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >>> >> ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Using EnumerateLibraryFromReaction without fragmenting reactants
Hi, I think there is an issue on the level of your reaction SMARTS, in fact i cannot get it to work on your example molecules, as there is a methyl [CH3:0] amine defined in the query which is not to be found in the substrate. I imagine some more explicit mapping of what connects and what breaks where might help. When i used a more generally formulated N+OC=O > NC=O.O amide coupling type reaction smarts, i get the two expected products: ``` rxn = AllChem.ReactionFromSmarts('[NX3;H2,H1:0].[O;H:1]-[C:2]=[O:3]>>[N:0]-[C:2]=[O:3].[O:1]') mol1 = Chem.MolFromSmiles('NC(=O)Nc1ccc(C(=O)O)cc1') mol2 = Chem.MolFromSmiles('OC(=O)C(C11)c1c1') products = rxn.RunReactants((mol1,mol2)) for i in range(len(products)): display(products[i][0]) ``` giving the two expected products [image: image.png] as a side note: this kind of "amide coupling" is actually not like a regular amide coupling because the nitrogen is far less basic because it is part of this urea framework. A more strict reaction SMARTS that takes only primary and secondary amines and not nitrogens connected to carbonyls would be '[NX3;H2,H1;!$(NC=O):0].[O;H:1]-[C:2]=[O:3]>>[N:0]-[C:2]=[O:3].[O:1]' best wishes wim On Sun, Dec 5, 2021 at 8:24 PM James Wallace wrote: > Here's the specific example that I was referring to: > > I used a reaction with this SMILES, making a ChemicalReaction out of it > using the add reactant templates: > > [image: image.png] > N[CH3:1].O=C(O)C(c1c1)C11>>O=C(N[CH3:1])C(c1c1)C11 > > Taking two reagents to fit it: > [image: image.png] > OC(=O)C(C11)c1c1 > > [image: image.png] > NC(=O)Nc1ccc(C(=O)O)cc1 > > Gives us products > > [image: image.png] > O=C(NC(=O)C(c1c1)C11)Nc1ccc(C(=O)O)cc1 > > [image: image.png] > NC(=O)NC(=O)C(c1c1)C11 > > [image: image.png] > O=C(O)c1ccc(NC(=O)C(c2c2)C22)cc1 > > In my case, I want to just see the result that uses the most of the > reagent in each case, and not the ones where the reagent is fragmented. > > Is that possible directly, or do I need to filter my results post hoc? > > On Thu, 2 Dec 2021 at 20:04, Paolo Tosco > wrote: > >> Hi James, >> >> I am not quite sure I understand what you have done and what you'd like >> to achieve. >> Ideally, could you please post: >> >> * the reaction you are using >> * some example reactants >> * the desired product(s) >> * the undesired product(s) >> >> Thanks, cheers >> p. >> >> On Thu, Dec 2, 2021 at 6:03 PM James Wallace >> wrote: >> >>> Hi, >>> I've been working with the EnumerateLibraryFromReaction function to >>> generate some quick access molecule libraries, using standard lists of >>> reagents. >>> >>> However, when I get the output back, I notice that I get results that >>> chop up the reactants I use wherever they match the reaction rule, so for a >>> rule looking for NH I would effectively get the yellow ringed area here >>> used as a structure as well as the desired red one. >>> [image: image.png] >>> As well, since this contains acid character, it would also match there, >>> but I accept that I can't necessarily remove that. >>> >>> Is there any way I can filter out the partial usages, or am I stuck with >>> using the substructures as well? >>> >>> Thanks, >>> >>> James >>> ___ >>> Rdkit-discuss mailing list >>> Rdkit-discuss@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >>> >> ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Using EnumerateLibraryFromReaction without fragmenting reactants
Here's the specific example that I was referring to: I used a reaction with this SMILES, making a ChemicalReaction out of it using the add reactant templates: [image: image.png] N[CH3:1].O=C(O)C(c1c1)C11>>O=C(N[CH3:1])C(c1c1)C11 Taking two reagents to fit it: [image: image.png] OC(=O)C(C11)c1c1 [image: image.png] NC(=O)Nc1ccc(C(=O)O)cc1 Gives us products [image: image.png] O=C(NC(=O)C(c1c1)C11)Nc1ccc(C(=O)O)cc1 [image: image.png] NC(=O)NC(=O)C(c1c1)C11 [image: image.png] O=C(O)c1ccc(NC(=O)C(c2c2)C22)cc1 In my case, I want to just see the result that uses the most of the reagent in each case, and not the ones where the reagent is fragmented. Is that possible directly, or do I need to filter my results post hoc? On Thu, 2 Dec 2021 at 20:04, Paolo Tosco wrote: > Hi James, > > I am not quite sure I understand what you have done and what you'd like to > achieve. > Ideally, could you please post: > > * the reaction you are using > * some example reactants > * the desired product(s) > * the undesired product(s) > > Thanks, cheers > p. > > On Thu, Dec 2, 2021 at 6:03 PM James Wallace wrote: > >> Hi, >> I've been working with the EnumerateLibraryFromReaction function to >> generate some quick access molecule libraries, using standard lists of >> reagents. >> >> However, when I get the output back, I notice that I get results that >> chop up the reactants I use wherever they match the reaction rule, so for a >> rule looking for NH I would effectively get the yellow ringed area here >> used as a structure as well as the desired red one. >> [image: image.png] >> As well, since this contains acid character, it would also match there, >> but I accept that I can't necessarily remove that. >> >> Is there any way I can filter out the partial usages, or am I stuck with >> using the substructures as well? >> >> Thanks, >> >> James >> ___ >> Rdkit-discuss mailing list >> Rdkit-discuss@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss >> > ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] Swig versions
Hi Tim, RDKit requires SWIG 3, that you may install with sudo apt-get install swig3.0 Cheers, p. On Sun, Dec 5, 2021 at 7:40 PM Tim Dudgeon wrote: > I'm having problems building with Debian bullseye release. > Bullseye now has swig4.0, but RDKit build seems to require exactly 3.0. > Error is: > > CMake Error at > /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 > (message): > Could NOT find SWIG: Found unsuitable version "4.0.2", but required is > exact version "3.0" (found /usr/bin/swig4.0, ) > > This is on branch Release_2021_09. > > ___ > Rdkit-discuss mailing list > Rdkit-discuss@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rdkit-discuss > ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Swig versions
I'm having problems building with Debian bullseye release. Bullseye now has swig4.0, but RDKit build seems to require exactly 3.0. Error is: CMake Error at /usr/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message): Could NOT find SWIG: Found unsuitable version "4.0.2", but required is exact version "3.0" (found /usr/bin/swig4.0, ) This is on branch Release_2021_09. ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss