Re: [Rdkit-discuss] identify anti-aromatic bonds
Greg, Thanks. I believe identifying anti-aromatic bonds even just with simple rings will be very helpful to my project. Could you please give me some links or sample codes about identifying all the conjugated simple rings and do an electron count? Would you also like to share me some relevant rules you think could be reasonable? By the way, if there is a hard way to identify all anti-aromatic bonds, could you also please give me some hints? If fortunately I can implement it, I will share it by posting my code in this mailing list. Thanks. Yingfeng On Thu, Aug 27, 2015 at 10:08 AM, Greg Landrum wrote: > Hi Yingfeng, > > Non-aromatic is not a problem, but there's no easy way I can think of off > the top of my head for identifying anti-aromatic systems without making C++ > code changes. > > If you were willing to limit yourself to simple rings, you could write > some python code to identify all the conjugated simple rings and do an > electron count according to whatever rules you think are relevant. > > -greg > > > On Thu, Aug 27, 2015 at 1:52 PM, Yingfeng Wang wrote: > >> Could anyone please share your experience with identifying non-aromatic >> bonds using RDKit? I would greatly appreciate your help. >> >> Yingfeng >> >> >> On Mon, Aug 24, 2015 at 9:42 PM, Yingfeng Wang >> wrote: >> >>> Sorry, my previous email has a typo. >>> >>> According to the following link, >>> >>> http://www.rdkit.org/docs/RDKit_Book.html >>> >>> I get sample code for identifying aromatic bonds like >>> >>> >>> from rdkit import Chem >>> >>> m=Chem.MolFromSmiles('O=C1C=CC(=O)C2=C1OC=CO2') >>> >>> m.GetBondBetweenAtoms(6,7).GetIsAromatic() >>> >>> Is there a way to identify anti-aromatic bonds using Rdkit? >>> >>> Thanks. >>> >>> Yingfeng >>> >>> On Mon, Aug 24, 2015 at 9:38 PM, Yingfeng Wang >>> wrote: >>> According to the following link, http://www.rdkit.org/docs/RDKit_Book.html I get sample code for identifying identify anti-aromatic bonds like >>> from rdkit import Chem >>> m=Chem.MolFromSmiles('O=C1C=CC(=O)C2=C1OC=CO2') >>> m.GetBondBetweenAtoms(6,7).GetIsAromatic() Is there a way to identify anti-aromatic bonds using Rdkit? Thanks. Yingfeng >>> >>> >> >> >> -- >> >> ___ >> 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] Clustering 1M molecules
Hi Jing, Most fingerprints are binary, thus can be stored as np.bool_, which compared to double should be 64 times more memory efficient. Best, Maciej Pozdrawiam, | Best regards, Maciek Wójcikowski mac...@wojcikowski.pl 2015-08-27 16:15 GMT+02:00 Jing Lu : > Hi Greg, > > Thanks! It works! But, is that possible to fold the fingerprint to smaller > size? np.zeros((100,2048)) still takes a lot of memory... > > > Best, > Jing > > On Wed, Aug 26, 2015 at 11:02 PM, Greg Landrum > wrote: > >> >> On Thu, Aug 27, 2015 at 3:00 AM, Jing Lu wrote: >> >>> >>> So, I wonder is there any way to convert fingerprint to a numpy vector? >>> >> >> Indeed there is: >> >> In [11]: from rdkit import Chem >> >> In [12]: from rdkit import DataStructs >> >> In [13]: import numpy >> >> In [14]: m =Chem.MolFromSmiles('C1CCC1') >> >> In [15]: fp = Chem.RDKFingerprint(m) >> >> In [16]: fpa = numpy.zeros((len(fp),),numpy.double) >> >> In [17]: DataStructs.ConvertToNumpyArray(fp,fpa) >> >> >> Best, >> -greg >> >> > > > -- > > ___ > 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] Clustering 1M molecules
Hi Greg, Thanks! It works! But, is that possible to fold the fingerprint to smaller size? np.zeros((100,2048)) still takes a lot of memory... Best, Jing On Wed, Aug 26, 2015 at 11:02 PM, Greg Landrum wrote: > > On Thu, Aug 27, 2015 at 3:00 AM, Jing Lu wrote: > >> >> So, I wonder is there any way to convert fingerprint to a numpy vector? >> > > Indeed there is: > > In [11]: from rdkit import Chem > > In [12]: from rdkit import DataStructs > > In [13]: import numpy > > In [14]: m =Chem.MolFromSmiles('C1CCC1') > > In [15]: fp = Chem.RDKFingerprint(m) > > In [16]: fpa = numpy.zeros((len(fp),),numpy.double) > > In [17]: DataStructs.ConvertToNumpyArray(fp,fpa) > > > Best, > -greg > > -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] identify anti-aromatic bonds
Hi Yingfeng, Non-aromatic is not a problem, but there's no easy way I can think of off the top of my head for identifying anti-aromatic systems without making C++ code changes. If you were willing to limit yourself to simple rings, you could write some python code to identify all the conjugated simple rings and do an electron count according to whatever rules you think are relevant. -greg On Thu, Aug 27, 2015 at 1:52 PM, Yingfeng Wang wrote: > Could anyone please share your experience with identifying non-aromatic > bonds using RDKit? I would greatly appreciate your help. > > Yingfeng > > > On Mon, Aug 24, 2015 at 9:42 PM, Yingfeng Wang wrote: > >> Sorry, my previous email has a typo. >> >> According to the following link, >> >> http://www.rdkit.org/docs/RDKit_Book.html >> >> I get sample code for identifying aromatic bonds like >> >> >>> from rdkit import Chem >> >>> m=Chem.MolFromSmiles('O=C1C=CC(=O)C2=C1OC=CO2') >> >>> m.GetBondBetweenAtoms(6,7).GetIsAromatic() >> >> Is there a way to identify anti-aromatic bonds using Rdkit? >> >> Thanks. >> >> Yingfeng >> >> On Mon, Aug 24, 2015 at 9:38 PM, Yingfeng Wang >> wrote: >> >>> According to the following link, >>> >>> http://www.rdkit.org/docs/RDKit_Book.html >>> >>> I get sample code for identifying identify anti-aromatic bonds like >>> >>> >>> from rdkit import Chem >>> >>> m=Chem.MolFromSmiles('O=C1C=CC(=O)C2=C1OC=CO2') >>> >>> m.GetBondBetweenAtoms(6,7).GetIsAromatic() >>> >>> Is there a way to identify anti-aromatic bonds using Rdkit? >>> >>> Thanks. >>> >>> Yingfeng >>> >> >> > > > -- > > ___ > 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] identify anti-aromatic bonds
Could anyone please share your experience with identifying non-aromatic bonds using RDKit? I would greatly appreciate your help. Yingfeng On Mon, Aug 24, 2015 at 9:42 PM, Yingfeng Wang wrote: > Sorry, my previous email has a typo. > > According to the following link, > > http://www.rdkit.org/docs/RDKit_Book.html > > I get sample code for identifying aromatic bonds like > > >>> from rdkit import Chem > >>> m=Chem.MolFromSmiles('O=C1C=CC(=O)C2=C1OC=CO2') > >>> m.GetBondBetweenAtoms(6,7).GetIsAromatic() > > Is there a way to identify anti-aromatic bonds using Rdkit? > > Thanks. > > Yingfeng > > On Mon, Aug 24, 2015 at 9:38 PM, Yingfeng Wang wrote: > >> According to the following link, >> >> http://www.rdkit.org/docs/RDKit_Book.html >> >> I get sample code for identifying identify anti-aromatic bonds like >> >> >>> from rdkit import Chem >> >>> m=Chem.MolFromSmiles('O=C1C=CC(=O)C2=C1OC=CO2') >> >>> m.GetBondBetweenAtoms(6,7).GetIsAromatic() >> >> Is there a way to identify anti-aromatic bonds using Rdkit? >> >> Thanks. >> >> Yingfeng >> > > -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Re: [Rdkit-discuss] problem of 3D flag when renumbering atms
Hi, this was the result of a bug in the way the conformation was copied from the first molecule to the new one. I just checked in a fix (https://github.com/rdkit/rdkit/issues/584) Best, -greg On Wed, Aug 26, 2015 at 11:54 AM, Jose Manuel < jose-manuel.ga...@univ-orleans.fr> wrote: > #/usr/bin/env python > > from rdkit import Chem, rdBase > > # define test molecule > molblock="""TEST_INPUT > RDKit 2D > >5 5 0 0 0 0 0 0 0 0999 V2000 > -0.1105 -0.53570. N 0 0 0 0 0 0 0 0 0 0 0 0 > -0.7779 -1.02070. C 0 0 0 0 0 0 0 0 0 0 0 0 > -0.5230 -1.80520. C 0 0 0 0 0 0 0 0 0 0 0 0 > 0.3020 -1.80520. C 0 0 0 0 0 0 0 0 0 0 0 0 > 0.5569 -1.02070. C 0 0 0 0 0 0 0 0 0 0 0 0 >1 2 1 0 >2 3 1 0 >3 4 1 0 >4 5 1 0 >1 5 1 0 > M END > > $$ > """ > > print rdBase.rdkitVersion > > print molblock# RDKIT 2D > > # renumber test molecule by canonical atom rank > mol = Chem.MolFromMolBlock(molblock) > order_c = list(Chem.CanonicalRankAtoms(mol, breakTies=True, > includeChirality=True)) > mol_c = Chem.RenumberAtoms(mol,order_c) > mol_c.SetProp("_Name", "TEST_OUTPUT") > > # check result > print Chem.MolToMolBlock(mol_c)# RDKIT 3D! > -- ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss