Re: [Rdkit-discuss] SMART reaction for closing rings
Thank you so much! It helps me a lot On Tue, Jun 9, 2020 at 6:24 PM Greg Landrum wrote: > Hi Shani, > > If you have mapped atoms in the reactants that are not in the products, > those end up being removed > > I'm not sure exactly what reaction you're trying to do, but I think you > want something like this; > > rxn = > AllChem.ReactionFromSmarts("([C:1]=[C:2].[*:3][*+:4])>>[*:2]-[*:1][*+0:4][*:3]") > m1 = Chem.MolFromSmiles('C=CC([CH2+])CCC=C(C)C') > ps = rxn.RunReactants((m1,)) > for p in ps: print(Chem.MolToSmiles(p[0])) > > Note that I also explicitly neutralized the carbocation in the products. > Otherwise the +1 from the reactants would be carried over. > > -greg > > > On Tue, Jun 9, 2020 at 4:42 PM Shani Levi wrote: > >> Hello, >> I'm interested in using AllChem.ReactionFromSmarts to predict product for >> a specific reaction. >> For example, I want to describe the reaction between double bonds and a >> carbo-cations. >> >> *I tried: * >> rxn = AllChem.ReactionFromSmarts("([C:1]=[C:2].[*:3][*+:4])>>[*:1][*:4]") >> m1 = Chem.MolFromSmiles('C=CC([CH2+])CCC=C(C)C') >> ps = rxn.RunReactants((m1,)) >> >> *and it gave me four molecules: * >> >> [CH2+]C [CH2+]C [CH2+]CCC >> [CH2+]C(C)C >> >> the problem here that it does not describe the ring-closure molecules and >> it somehow cuts the rest of the molecule, if someone has any suggestions of >> how to change the SMARTS descriptions that it will define the right >> reaction. >> >> Thank you very much, >> Shani >> ___ >> 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] SMART reaction for closing rings
Hello, I'm interested in using AllChem.ReactionFromSmarts to predict product for a specific reaction. For example, I want to describe the reaction between double bonds and a carbo-cations. *I tried: * rxn = AllChem.ReactionFromSmarts("([C:1]=[C:2].[*:3][*+:4])>>[*:1][*:4]") m1 = Chem.MolFromSmiles('C=CC([CH2+])CCC=C(C)C') ps = rxn.RunReactants((m1,)) *and it gave me four molecules: * [CH2+]C [CH2+]C [CH2+]CCC [CH2+]C(C)C the problem here that it does not describe the ring-closure molecules and it somehow cuts the rest of the molecule, if someone has any suggestions of how to change the SMARTS descriptions that it will define the right reaction. Thank you very much, Shani ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] Categorizing carbocations
Hi everyone, I'm looking for a way to categorize different types of carbocations (primary, secondary and tertiary) using RDKit. my input is a smile string, and each smile has a formal charge of +1 (only one carbon is charged), so my goal is categorizing the carbocations to groups according to their type. I tried using GetDegree and GetExplicitValence, but I couldn't figure out how to use them For example: C=C1C=C2[C@H](CC1)[C@@H](C)CC[C@@H]2[C@@H](C)CC[CH+]C(C)C This smile is a secondary carbocation. how can RDKit get this information for me? thanks a lot! Shani ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
[Rdkit-discuss] create a cations
Hi, I would like to create a carbocation "database" from my existing database of unsaturated molecules. The idea is as follows: For each double bond, I would like to attach one Hydrogen, for each carbon in the double bond. So for example, if I have a molecule with one double bond, I will end up with two different carbocations, if I have a molecule with 2 double bonds, I would like to get 4 different carbocations. I tried using GetSubstructMatch for ('C=C') and SetFormalCharge to 1. e.g: mol = Chem.MolFromSmiles('CC(C)C1=CC[C@H]2C(=C1)CC[C@@H]3[C@ @]2(3(C)C)C') func = Chem.MolFromSmiles('C=C') matches = mol.GetSubstructMatches(func) mol.GetAtomWithIdx(matches[0][1]).SetFormalCharge(1) The result is: CC(C)C1=[C+]C[C@H]2C(=C1)CC[C@H]1C(C)(C)CCC[C@@]12C I would like to get rid of the double bond. (and get CC(C)C1[C+]C[C@H]2C(=C1)CC[C@H]1C(C)(C)CCC[C@@]12C ) How can I do that? Thanks a lot in advance, Shani ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss