Re: [Rdkit-discuss] Rdkit-discuss Digest, Vol 88, Issue 13
Kindly look through this aspect of my script below. I keep getting the error: AttributeError: 'tuple' object has no attribute 'HasSubstructMatch' #!/usr/bin/python from rdkit import Chem from rdkit.Chem import Draw from rdkit.Chem import AllChem pains = []# Contains my PAINS query molecules #Loop through data with PAINS query for p in pains: match = [x for x in mols if x.HasSubstructMatch(p)] a = len(match) print a Thank you Samuel Ayodele Egieyeh South African National Bioinformatics Institute University of the Western Cape Send Rdkit-discuss mailing list submissions to rdkit-discuss@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/rdkit-discuss or, via email, send a message with subject or body 'help' to rdkit-discuss-requ...@lists.sourceforge.net You can reach the person managing the list at rdkit-discuss-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than Re: Contents of Rdkit-discuss digest... Today's Topics: 1. Re: Chem.Draw darker colors (Soren Wacker) 2. Re: Chem.Draw darker colors (David Hall) 3. Re: Inchi installation in postgresql database driving me mad (Jan Holst Jensen) 4. Re: Docker images (Greg Landrum) 5. Re: Inchi installation in postgresql database driving me mad (JP) -- Message: 1 Date: Thu, 12 Feb 2015 17:58:42 + From: Soren Wacker swac...@ucalgary.ca Subject: Re: [Rdkit-discuss] Chem.Draw darker colors To: Greg Landrum greg.land...@gmail.com Cc: RDKit Discuss rdkit-discuss@lists.sourceforge.net Message-ID: cf4e4cc78f22f44bb773c76c066a3dd109255...@itcimexch03.uc.ucalgary.ca Content-Type: text/plain; charset=us-ascii but how? Soren From: Greg Landrum [greg.land...@gmail.com] Sent: Wednesday, February 11, 2015 10:27 PM To: Soren Wacker Cc: RDKit Discuss Subject: Re: [Rdkit-discuss] Chem.Draw darker colors My other answer about using the DrawingOptions object applies here too. Instead of setting elemDict to be a defaultDict, you would just change the colors for S and F to whatever you prefer. -greg On Thu, Feb 12, 2015 at 12:13 AM, Soren Wacker swac...@ucalgary.camailto:swac...@ucalgary.ca wrote: Hi, I printed some moecules with the Draw module of rdkit and generated some useful figures. I noticed that for some elements the contrast to white is very low. Therefore, I suggest to change the default colors to the darker versions. E.g. darkyellow instead of yellow for sulfur and darkcyan instead of cyan for fluorine kind regards Soren -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.netmailto:Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Message: 2 Date: Thu, 12 Feb 2015 13:14:35 -0500 From: David Hall li...@cowsandmilk.net Subject: Re: [Rdkit-discuss] Chem.Draw darker colors To: Soren Wacker swac...@ucalgary.ca Cc: RDKit Discuss rdkit-discuss@lists.sourceforge.net, Greg Landrum greg.land...@gmail.com Message-ID: 1a6e481e-8a31-46cc-b719-6fd1a4e2c...@cowsandmilk.net Content-Type: text/plain; charset=us-ascii In [6]: opt.elemDict Out[6]: {0: (0.5, 0.5, 0.5), 1: (0.55, 0.55, 0.55), 7: (0, 0, 1), 8: (1, 0, 0), 9: (0.2, 0.8, 0.8), 15: (1, 0.5, 0), 16: (0.8, 0.8, 0), 17: (0, 0.8, 0), 35: (0.5, 0.3, 0.1)} presumably, you set fluorine and sulfur by changing the values of 9 and 16. -David On Feb 12, 2015, at 12:58 PM, Soren Wacker swac...@ucalgary.ca wrote: but how? Soren From: Greg Landrum [greg.land...@gmail.com] Sent: Wednesday, February 11, 2015 10:27 PM To: Soren Wacker Cc: RDKit Discuss Subject: Re: [Rdkit-discuss] Chem.Draw darker colors My other answer about using the DrawingOptions object applies here too. Instead of setting elemDict to be a defaultDict, you would just change the colors for S and F to whatever you prefer. -greg On Thu, Feb 12, 2015 at 12:13 AM, Soren Wacker swac...@ucalgary.camailto:swac...@ucalgary.ca wrote: Hi, I printed some moecules with the Draw module of rdkit and generated some useful figures. I noticed that for some elements the contrast to white is very low. Therefore, I suggest to change the default
Re: [Rdkit-discuss] Rdkit-discuss Digest, Vol 88, Issue 13
Hi Samuel, The problem is that x is a tuple in your case not an rdkit molecule object. Check your code to see what mols list actually has inside. I'm guessing that x is a tuple containing a molecule object plus some other info. Best. Christos Christos Kannas Researcher Ph.D Student Mob (UK): +44 (0) 7447700937 Mob (Cyprus): +357 99530608 [image: View Christos Kannas's profile on LinkedIn] http://cy.linkedin.com/in/christoskannas On 13 February 2015 at 12:14, segie...@sanbi.ac.za wrote: Kindly look through this aspect of my script below. I keep getting the error: AttributeError: 'tuple' object has no attribute 'HasSubstructMatch' #!/usr/bin/python from rdkit import Chem from rdkit.Chem import Draw from rdkit.Chem import AllChem pains = []# Contains my PAINS query molecules #Loop through data with PAINS query for p in pains: match = [x for x in mols if x.HasSubstructMatch(p)] a = len(match) print a Thank you Samuel Ayodele Egieyeh South African National Bioinformatics Institute University of the Western Cape Send Rdkit-discuss mailing list submissions to rdkit-discuss@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/rdkit-discuss or, via email, send a message with subject or body 'help' to rdkit-discuss-requ...@lists.sourceforge.net You can reach the person managing the list at rdkit-discuss-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than Re: Contents of Rdkit-discuss digest... Today's Topics: 1. Re: Chem.Draw darker colors (Soren Wacker) 2. Re: Chem.Draw darker colors (David Hall) 3. Re: Inchi installation in postgresql database driving me mad (Jan Holst Jensen) 4. Re: Docker images (Greg Landrum) 5. Re: Inchi installation in postgresql database driving me mad (JP) -- Message: 1 Date: Thu, 12 Feb 2015 17:58:42 + From: Soren Wacker swac...@ucalgary.ca Subject: Re: [Rdkit-discuss] Chem.Draw darker colors To: Greg Landrum greg.land...@gmail.com Cc: RDKit Discuss rdkit-discuss@lists.sourceforge.net Message-ID: cf4e4cc78f22f44bb773c76c066a3dd109255...@itcimexch03.uc.ucalgary.ca Content-Type: text/plain; charset=us-ascii but how? Soren From: Greg Landrum [greg.land...@gmail.com] Sent: Wednesday, February 11, 2015 10:27 PM To: Soren Wacker Cc: RDKit Discuss Subject: Re: [Rdkit-discuss] Chem.Draw darker colors My other answer about using the DrawingOptions object applies here too. Instead of setting elemDict to be a defaultDict, you would just change the colors for S and F to whatever you prefer. -greg On Thu, Feb 12, 2015 at 12:13 AM, Soren Wacker swac...@ucalgary.camailto:swac...@ucalgary.ca wrote: Hi, I printed some moecules with the Draw module of rdkit and generated some useful figures. I noticed that for some elements the contrast to white is very low. Therefore, I suggest to change the default colors to the darker versions. E.g. darkyellow instead of yellow for sulfur and darkcyan instead of cyan for fluorine kind regards Soren -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.netmailto: Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss -- Message: 2 Date: Thu, 12 Feb 2015 13:14:35 -0500 From: David Hall li...@cowsandmilk.net Subject: Re: [Rdkit-discuss] Chem.Draw darker colors To: Soren Wacker swac...@ucalgary.ca Cc: RDKit Discuss rdkit-discuss@lists.sourceforge.net, Greg Landrum greg.land...@gmail.com Message-ID: 1a6e481e-8a31-46cc-b719-6fd1a4e2c...@cowsandmilk.net Content-Type: text/plain; charset=us-ascii In [6]: opt.elemDict Out[6]: {0: (0.5, 0.5, 0.5), 1: (0.55, 0.55, 0.55), 7: (0, 0, 1), 8: (1, 0, 0), 9: (0.2, 0.8, 0.8), 15: (1, 0.5, 0), 16: (0.8, 0.8, 0), 17: (0, 0.8, 0), 35: (0.5, 0.3, 0.1)} presumably, you set fluorine and sulfur by changing the values of 9 and 16. -David On Feb 12, 2015, at 12:58 PM, Soren Wacker swac...@ucalgary.ca wrote: but how? Soren From: Greg Landrum [greg.land...@gmail.com] Sent:
[Rdkit-discuss] New RDKit drawing code
Dear all, Noel's great blog post on using the RDKit from emscripten ( http://baoilleach.blogspot.ch/2015/02/cheminformaticsjs-rdkit.html) made me realize that I should post something here about the new RDKit drawing code that's currently available in github. Rather than do a long email message, I did a quick blog post that demonstrates some of the functionality: http://rdkit.blogspot.com/2015/02/new-drawing-code.html I'm still actively working on this, but I think what's there is already worth showing off a bit. :-) Many thanks are due to Dave Cosgrove, who did the initial work that makes this all possible. -greg -- Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/___ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss