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
>       [email protected]
>
> 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
>       [email protected]
>
> You can reach the person managing the list at
>       [email protected]
>
> 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 +0000
> From: Soren Wacker <[email protected]>
> Subject: Re: [Rdkit-discuss] Chem.Draw darker colors
> To: Greg Landrum <[email protected]>
> Cc: RDKit Discuss <[email protected]>
> Message-ID:
>       <cf4e4cc78f22f44bb773c76c066a3dd109255...@itcimexch03.uc.ucalgary.ca>
> Content-Type: text/plain; charset="us-ascii"
>
> but how?
> Soren
> ________________________________________
> From: Greg Landrum [[email protected]]
> 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
> <[email protected]<mailto:[email protected]>> 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
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Thu, 12 Feb 2015 13:14:35 -0500
> From: David Hall <[email protected]>
> Subject: Re: [Rdkit-discuss] Chem.Draw darker colors
> To: Soren Wacker <[email protected]>
> Cc: RDKit Discuss <[email protected]>,      Greg Landrum
>       <[email protected]>
> Message-ID: <[email protected]>
> 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 <[email protected]> wrote:
>>
>> but how?
>> Soren
>> ________________________________________
>> From: Greg Landrum [[email protected]]
>> 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
>> <[email protected]<mailto:[email protected]>> 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
>> [email protected]<mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Thu, 12 Feb 2015 22:36:38 +0100
> From: Jan Holst Jensen <[email protected]>
> Subject: Re: [Rdkit-discuss] Inchi installation in postgresql database
>       driving me mad
> To: JP <[email protected]>
> Cc: "[email protected]"
>       <[email protected]>
> Message-ID: <[email protected]>
> Content-Type: text/plain; charset="windows-1252"
>
> On 2015-02-12 17:50, JP wrote:
>> My Makefile now looks:
>>
>>
>>         # -------------------------
>>         #     Variables used and default values:
>>         USE_INCHI=1      # enables InChI functions; requires rdkit
>>         built with inchi support
>>         # USE_AVALON=0     # enables avalon fingerprint; requires
>>         rdkit built with avalon support
>>         USE_POPCOUNT=1   # enables use of the CPU's popcount instruction
>>         # USE_THREADS=0    # links against boost.system; required with
>>         non-ancient boost versions if inchi is enabled or the rdkit is
>>         built with threadsafe SSS
>>         # STATIC_LINK=1    # link against the static RDKit libraries
>>         # --------------------
>>
>
> Hi JP,
>
> You were almost there. I had this problem too. The USE_INCHI line should
> read
>
> USE_INCHI=1
>
> and not
>
> USE_INCHI=1      # enables InChI functions; requires rdkit built with
> inchi support
>
> I guess the comment gets included into the USE_INCHI variable and then
> the check for "is USE_INCHI == 1" in the makefile fails.
>
> Cheers
> -- Jan
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 4
> Date: Fri, 13 Feb 2015 09:38:40 +0100
> From: Greg Landrum <[email protected]>
> Subject: Re: [Rdkit-discuss] Docker images
> To: Maciej Szymkiewicz <[email protected]>
> Cc: RDKit Discuss <[email protected]>
> Message-ID:
>       <cad4fdrssu0vqagvqpbwbrvfz8wxdv6spqkq9vsdiwkty_pg...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> These are cool Maciej.
> Thanks for letting us know about them!
>
> -greg
>
>
> On Thu, Feb 12, 2015 at 5:23 PM, Maciej Szymkiewicz
> <[email protected]>
> wrote:
>
>> Hi everyone,
>>
>> I keep these images for my personal usage and none of these is very well
>> tested but maybe some of you will find it useful:
>>
>> https://registry.hub.docker.com/u/zero323/rdkit/
>>
>> and
>>
>> https://github.com/zero323/docker-rdkit
>>
>> Best,
>> Maciej
>>
>>
>>
>> ------------------------------------------------------------------------------
>> 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
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> Message: 5
> Date: Fri, 13 Feb 2015 10:26:23 +0100
> From: JP <[email protected]>
> Subject: Re: [Rdkit-discuss] Inchi installation in postgresql database
>       driving me mad
> Cc: "[email protected]"
>       <[email protected]>
> Message-ID:
>       <CAKwxoo74muczerV09OipVKfhXbcV5G26QRg=by5s2t9zymt...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> This! This! This was it.  Great find Jan. Thanks.  First instance in my
> life where commenting a bit of code broke it. :)
>
> -
> Jean-Paul Ebejer
> Early Stage Researcher
>
> On 12 February 2015 at 22:36, Jan Holst Jensen <[email protected]>
> wrote:
>
>>  On 2015-02-12 17:50, JP wrote:
>>
>> My Makefile now looks:
>>
>>>
>>>>  # -------------------------
>>>> #     Variables used and default values:
>>>> USE_INCHI=1      # enables InChI functions; requires rdkit built with
>>>> inchi support
>>>> # USE_AVALON=0     # enables avalon fingerprint; requires rdkit built
>>>> with avalon support
>>>> USE_POPCOUNT=1   # enables use of the CPU's popcount instruction
>>>> # USE_THREADS=0    # links against boost.system; required with
>>>> non-ancient boost versions if inchi is enabled or the rdkit is built
>>>> with
>>>> threadsafe SSS
>>>> # STATIC_LINK=1    # link against the static RDKit libraries
>>>> # --------------------
>>>>
>>>>
>> Hi JP,
>>
>> You were almost there. I had this problem too. The USE_INCHI line should
>> read
>>
>> USE_INCHI=1
>>
>> and not
>>
>> USE_INCHI=1      # enables InChI functions; requires rdkit built with
>> inchi support
>>
>>  I guess the comment gets included into the USE_INCHI variable and then
>> the check for "is USE_INCHI == 1" in the makefile fails.
>>
>> Cheers
>> -- Jan
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
> ------------------------------------------------------------------------------
> 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
> End of Rdkit-discuss Digest, Vol 88, Issue 13
> *********************************************
>


-- 
Samuel Ayodele Egieyeh
South African National Bioinformatics Institute
University of the Western Cape
Bellville
7535
Cape Town
South Africa.
Mobile Number: +27843477250
Work Telephone Number: +270219592987


------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to