Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Greg Landrum
On Thu, Sep 14, 2017 at 9:58 PM, Andrew Dalke 
wrote:

> On Sep 14, 2017, at 19:26, Dimitri Maziuk  wrote:
> > Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
> > linux distros that will be officially with us until June 30, 2024.
>
> If only Greg got as much money for long term RDKit support as Red Hat
> gets for long term RHEL support. :)
>

I like the way Andrew thinks! :-)
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Wandré
I have try this command several times and doesn't fixed. Maybe because all
the others commands, this works now.
Thanks for the help

--
Wandré Nunes de Pinho Veloso
Professor Assistente - Unifei - Campus Avançado de Itabira-MG
Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
Inteligência Computacional - UNIFEI
Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG

2017-09-14 19:03 GMT-03:00 Markus Sitzmann :

> Hmm, your last command "conda install -c rdkit rdkit" should have been
> sufficient for the installation (after installing anaconda)
>
> On Thu, Sep 14, 2017 at 11:57 PM, Malitha Kabir 
> wrote:
>
>> That's great to hear you got things running. That was basically due to
>> the path update. Have a great day! - malitha.
>>
>> On Sep 15, 2017 3:44 AM, "Wandré"  wrote:
>>
>>> I don't know what I do, but now everything *is working fine.*
>>> My last commands:
>>>
>>> Reinstall Anaconda2
>>>
>>> Trying to compile the RDKit
>>>
>>>- sudo tar xzvf RDKit_2016_03_1.tgz -C ~/anaconda2/
>>>- vim ~/.bashrc (update the variables with the new path of rdkit)
>>>- . ~/.bashrc
>>>- cd ~/anaconda2/rdkit
>>>- mkdir build
>>>- cd build
>>>- cmake -DRDK_BUILD_INCHI_SUPPORT=ON ..
>>>- make -j 4 (ERROR on 50%)
>>>- make install (ERROR on 24%)
>>>
>>>
>>> sudo apt-get install python-rdkit librdkit1 rdkit-data
>>> sudo apt-get update
>>> conda install -c rdkit rdkit
>>>
>>>
>>> --
>>> Wandré Nunes de Pinho Veloso
>>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
>>> UFMG
>>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>>> Inteligência Computacional - UNIFEI
>>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>>
>>> 2017-09-14 18:28 GMT-03:00 Wandré :
>>>
 I really can't do this right...
 I am thinking in reinstall Ubuntu and try again. Now the RDKit doesn't
 works.


 --
 Wandré Nunes de Pinho Veloso
 Professor Assistente - Unifei - Campus Avançado de Itabira-MG
 Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
 UFMG
 Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
 Inteligência Computacional - UNIFEI
 Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
 Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
 Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG

 2017-09-14 15:07 GMT-03:00 Malitha Kabir :

> Hi Wandré,
>
> Sorry to see you in trouble again.
>
> If you see the massages then
> # All requested packages already installed.
> # packages in environment at /home/wandre/anaconda2:
> #
> rdkit 2017.03.3   np111py27_1rdkit
>
> so your rdkit should be at
> /home/wandre/anaconda2/
>
> But it is trying to import from
> /opt/rdkit-Release_2016_03_1/rdkit/
>
> So the path variable is still NOT correct. It is good to see that you
> installed conda correctly and rdkit i think installed correctly.
>
> Therefore I suspect that you need to remove the previously path for
> rdkit (you probably set those during installing from source).
>
> I forgot what linux command will do that for you. Have a great day!
>
> *** I will update the answer whenever I get the appropriate linux
> command.
>
> - malitha
>
>
>
> On Thu, Sep 14, 2017 at 11:38 PM, Wandré 
> wrote:
>
>> Thanks Malitha,
>>
>> When I install Anaconda I said yes to all questions.
>> When I trying to reinstall the RDKit, this message appears:
>>
>> wandre@wandreLinux:~/anaconda2$ conda install -c rdkit rdkit
>> Fetching package metadata ...
>> Solving package specifications: .
>>
>> # All requested packages already installed.
>> # packages in environment at /home/wandre/anaconda2:
>> #
>> rdkit 2017.03.3   np111py27_1rdkit
>>
>> When I run "python", appears:
>>
>> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016,
>> 23:09:15)
>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> Anaconda is brought to you by Continuum Analytics.
>> Please check out: http://continuum.io/thanks and https://anaconda.org
>> >>> import rdkit

Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Markus Sitzmann
Hmm, your last command "conda install -c rdkit rdkit" should have been
sufficient for the installation (after installing anaconda)

On Thu, Sep 14, 2017 at 11:57 PM, Malitha Kabir 
wrote:

> That's great to hear you got things running. That was basically due to the
> path update. Have a great day! - malitha.
>
> On Sep 15, 2017 3:44 AM, "Wandré"  wrote:
>
>> I don't know what I do, but now everything *is working fine.*
>> My last commands:
>>
>> Reinstall Anaconda2
>>
>> Trying to compile the RDKit
>>
>>- sudo tar xzvf RDKit_2016_03_1.tgz -C ~/anaconda2/
>>- vim ~/.bashrc (update the variables with the new path of rdkit)
>>- . ~/.bashrc
>>- cd ~/anaconda2/rdkit
>>- mkdir build
>>- cd build
>>- cmake -DRDK_BUILD_INCHI_SUPPORT=ON ..
>>- make -j 4 (ERROR on 50%)
>>- make install (ERROR on 24%)
>>
>>
>> sudo apt-get install python-rdkit librdkit1 rdkit-data
>> sudo apt-get update
>> conda install -c rdkit rdkit
>>
>>
>> --
>> Wandré Nunes de Pinho Veloso
>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>> Inteligência Computacional - UNIFEI
>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>
>> 2017-09-14 18:28 GMT-03:00 Wandré :
>>
>>> I really can't do this right...
>>> I am thinking in reinstall Ubuntu and try again. Now the RDKit doesn't
>>> works.
>>>
>>>
>>> --
>>> Wandré Nunes de Pinho Veloso
>>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
>>> UFMG
>>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>>> Inteligência Computacional - UNIFEI
>>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>>
>>> 2017-09-14 15:07 GMT-03:00 Malitha Kabir :
>>>
 Hi Wandré,

 Sorry to see you in trouble again.

 If you see the massages then
 # All requested packages already installed.
 # packages in environment at /home/wandre/anaconda2:
 #
 rdkit 2017.03.3   np111py27_1rdkit

 so your rdkit should be at
 /home/wandre/anaconda2/

 But it is trying to import from
 /opt/rdkit-Release_2016_03_1/rdkit/

 So the path variable is still NOT correct. It is good to see that you
 installed conda correctly and rdkit i think installed correctly.

 Therefore I suspect that you need to remove the previously path for
 rdkit (you probably set those during installing from source).

 I forgot what linux command will do that for you. Have a great day!

 *** I will update the answer whenever I get the appropriate linux
 command.

 - malitha



 On Thu, Sep 14, 2017 at 11:38 PM, Wandré 
 wrote:

> Thanks Malitha,
>
> When I install Anaconda I said yes to all questions.
> When I trying to reinstall the RDKit, this message appears:
>
> wandre@wandreLinux:~/anaconda2$ conda install -c rdkit rdkit
> Fetching package metadata ...
> Solving package specifications: .
>
> # All requested packages already installed.
> # packages in environment at /home/wandre/anaconda2:
> #
> rdkit 2017.03.3   np111py27_1rdkit
>
> When I run "python", appears:
>
> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016,
> 23:09:15)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Anaconda is brought to you by Continuum Analytics.
> Please check out: http://continuum.io/thanks and https://anaconda.org
> >>> import rdkit
> >>> from rdkit import Chem
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line
> 18, in 
> from rdkit import rdBase
> ImportError: cannot import name rdBase
>
>
> --
> Wandré Nunes de Pinho Veloso
> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
> Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
> UFMG
> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
> Inteligência Computacional - UNIFEI
> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
> Laboratório de Bioinformática e Sistemas - LBS, DCC, 

Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Malitha Kabir
That's great to hear you got things running. That was basically due to the
path update. Have a great day! - malitha.

On Sep 15, 2017 3:44 AM, "Wandré"  wrote:

> I don't know what I do, but now everything *is working fine.*
> My last commands:
>
> Reinstall Anaconda2
>
> Trying to compile the RDKit
>
>- sudo tar xzvf RDKit_2016_03_1.tgz -C ~/anaconda2/
>- vim ~/.bashrc (update the variables with the new path of rdkit)
>- . ~/.bashrc
>- cd ~/anaconda2/rdkit
>- mkdir build
>- cd build
>- cmake -DRDK_BUILD_INCHI_SUPPORT=ON ..
>- make -j 4 (ERROR on 50%)
>- make install (ERROR on 24%)
>
>
> sudo apt-get install python-rdkit librdkit1 rdkit-data
> sudo apt-get update
> conda install -c rdkit rdkit
>
>
> --
> Wandré Nunes de Pinho Veloso
> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
> Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
> Inteligência Computacional - UNIFEI
> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>
> 2017-09-14 18:28 GMT-03:00 Wandré :
>
>> I really can't do this right...
>> I am thinking in reinstall Ubuntu and try again. Now the RDKit doesn't
>> works.
>>
>>
>> --
>> Wandré Nunes de Pinho Veloso
>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>> Inteligência Computacional - UNIFEI
>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>
>> 2017-09-14 15:07 GMT-03:00 Malitha Kabir :
>>
>>> Hi Wandré,
>>>
>>> Sorry to see you in trouble again.
>>>
>>> If you see the massages then
>>> # All requested packages already installed.
>>> # packages in environment at /home/wandre/anaconda2:
>>> #
>>> rdkit 2017.03.3   np111py27_1rdkit
>>>
>>> so your rdkit should be at
>>> /home/wandre/anaconda2/
>>>
>>> But it is trying to import from
>>> /opt/rdkit-Release_2016_03_1/rdkit/
>>>
>>> So the path variable is still NOT correct. It is good to see that you
>>> installed conda correctly and rdkit i think installed correctly.
>>>
>>> Therefore I suspect that you need to remove the previously path for
>>> rdkit (you probably set those during installing from source).
>>>
>>> I forgot what linux command will do that for you. Have a great day!
>>>
>>> *** I will update the answer whenever I get the appropriate linux
>>> command.
>>>
>>> - malitha
>>>
>>>
>>>
>>> On Thu, Sep 14, 2017 at 11:38 PM, Wandré  wrote:
>>>
 Thanks Malitha,

 When I install Anaconda I said yes to all questions.
 When I trying to reinstall the RDKit, this message appears:

 wandre@wandreLinux:~/anaconda2$ conda install -c rdkit rdkit
 Fetching package metadata ...
 Solving package specifications: .

 # All requested packages already installed.
 # packages in environment at /home/wandre/anaconda2:
 #
 rdkit 2017.03.3   np111py27_1rdkit

 When I run "python", appears:

 Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016,
 23:09:15)
 [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 Anaconda is brought to you by Continuum Analytics.
 Please check out: http://continuum.io/thanks and https://anaconda.org
 >>> import rdkit
 >>> from rdkit import Chem
 Traceback (most recent call last):
   File "", line 1, in 
   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18,
 in 
 from rdkit import rdBase
 ImportError: cannot import name rdBase


 --
 Wandré Nunes de Pinho Veloso
 Professor Assistente - Unifei - Campus Avançado de Itabira-MG
 Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
 UFMG
 Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
 Inteligência Computacional - UNIFEI
 Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
 Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
 Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG

 2017-09-14 9:17 GMT-03:00 Malitha Kabir :

> Hi Wandré,
>
> Good day! It's malitha.
>
> Considering your first question I would say, the path variable NOT set
> correctly. To avoid having gymnastic with linux system you may consider 
> the
> following steps:
>
>1. Install 

Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Wandré
I don't know what I do, but now everything *is working fine.*
My last commands:

Reinstall Anaconda2

Trying to compile the RDKit

   - sudo tar xzvf RDKit_2016_03_1.tgz -C ~/anaconda2/
   - vim ~/.bashrc (update the variables with the new path of rdkit)
   - . ~/.bashrc
   - cd ~/anaconda2/rdkit
   - mkdir build
   - cd build
   - cmake -DRDK_BUILD_INCHI_SUPPORT=ON ..
   - make -j 4 (ERROR on 50%)
   - make install (ERROR on 24%)


sudo apt-get install python-rdkit librdkit1 rdkit-data
sudo apt-get update
conda install -c rdkit rdkit


--
Wandré Nunes de Pinho Veloso
Professor Assistente - Unifei - Campus Avançado de Itabira-MG
Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
Inteligência Computacional - UNIFEI
Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG

2017-09-14 18:28 GMT-03:00 Wandré :

> I really can't do this right...
> I am thinking in reinstall Ubuntu and try again. Now the RDKit doesn't
> works.
>
>
> --
> Wandré Nunes de Pinho Veloso
> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
> Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
> Inteligência Computacional - UNIFEI
> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>
> 2017-09-14 15:07 GMT-03:00 Malitha Kabir :
>
>> Hi Wandré,
>>
>> Sorry to see you in trouble again.
>>
>> If you see the massages then
>> # All requested packages already installed.
>> # packages in environment at /home/wandre/anaconda2:
>> #
>> rdkit 2017.03.3   np111py27_1rdkit
>>
>> so your rdkit should be at
>> /home/wandre/anaconda2/
>>
>> But it is trying to import from
>> /opt/rdkit-Release_2016_03_1/rdkit/
>>
>> So the path variable is still NOT correct. It is good to see that you
>> installed conda correctly and rdkit i think installed correctly.
>>
>> Therefore I suspect that you need to remove the previously path for rdkit
>> (you probably set those during installing from source).
>>
>> I forgot what linux command will do that for you. Have a great day!
>>
>> *** I will update the answer whenever I get the appropriate linux
>> command.
>>
>> - malitha
>>
>>
>>
>> On Thu, Sep 14, 2017 at 11:38 PM, Wandré  wrote:
>>
>>> Thanks Malitha,
>>>
>>> When I install Anaconda I said yes to all questions.
>>> When I trying to reinstall the RDKit, this message appears:
>>>
>>> wandre@wandreLinux:~/anaconda2$ conda install -c rdkit rdkit
>>> Fetching package metadata ...
>>> Solving package specifications: .
>>>
>>> # All requested packages already installed.
>>> # packages in environment at /home/wandre/anaconda2:
>>> #
>>> rdkit 2017.03.3   np111py27_1rdkit
>>>
>>> When I run "python", appears:
>>>
>>> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016,
>>> 23:09:15)
>>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
>>> Type "help", "copyright", "credits" or "license" for more information.
>>> Anaconda is brought to you by Continuum Analytics.
>>> Please check out: http://continuum.io/thanks and https://anaconda.org
>>> >>> import rdkit
>>> >>> from rdkit import Chem
>>> Traceback (most recent call last):
>>>   File "", line 1, in 
>>>   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18,
>>> in 
>>> from rdkit import rdBase
>>> ImportError: cannot import name rdBase
>>>
>>>
>>> --
>>> Wandré Nunes de Pinho Veloso
>>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
>>> UFMG
>>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>>> Inteligência Computacional - UNIFEI
>>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>>
>>> 2017-09-14 9:17 GMT-03:00 Malitha Kabir :
>>>
 Hi Wandré,

 Good day! It's malitha.

 Considering your first question I would say, the path variable NOT set
 correctly. To avoid having gymnastic with linux system you may consider the
 following steps:

1. Install miniconda or andcona from https://conda.io/miniconda.html
and command yes (y) when it says to add path variable to python shipped
with conda. I mean python within conda would be your default python. 
 After
installing it, when you run the command > from shell you
will see something like <<>> at the screen
   

Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Wandré
I really can't do this right...
I am thinking in reinstall Ubuntu and try again. Now the RDKit doesn't
works.


--
Wandré Nunes de Pinho Veloso
Professor Assistente - Unifei - Campus Avançado de Itabira-MG
Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
Inteligência Computacional - UNIFEI
Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG

2017-09-14 15:07 GMT-03:00 Malitha Kabir :

> Hi Wandré,
>
> Sorry to see you in trouble again.
>
> If you see the massages then
> # All requested packages already installed.
> # packages in environment at /home/wandre/anaconda2:
> #
> rdkit 2017.03.3   np111py27_1rdkit
>
> so your rdkit should be at
> /home/wandre/anaconda2/
>
> But it is trying to import from
> /opt/rdkit-Release_2016_03_1/rdkit/
>
> So the path variable is still NOT correct. It is good to see that you
> installed conda correctly and rdkit i think installed correctly.
>
> Therefore I suspect that you need to remove the previously path for rdkit
> (you probably set those during installing from source).
>
> I forgot what linux command will do that for you. Have a great day!
>
> *** I will update the answer whenever I get the appropriate linux command.
>
> - malitha
>
>
>
> On Thu, Sep 14, 2017 at 11:38 PM, Wandré  wrote:
>
>> Thanks Malitha,
>>
>> When I install Anaconda I said yes to all questions.
>> When I trying to reinstall the RDKit, this message appears:
>>
>> wandre@wandreLinux:~/anaconda2$ conda install -c rdkit rdkit
>> Fetching package metadata ...
>> Solving package specifications: .
>>
>> # All requested packages already installed.
>> # packages in environment at /home/wandre/anaconda2:
>> #
>> rdkit 2017.03.3   np111py27_1rdkit
>>
>> When I run "python", appears:
>>
>> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15)
>> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> Anaconda is brought to you by Continuum Analytics.
>> Please check out: http://continuum.io/thanks and https://anaconda.org
>> >>> import rdkit
>> >>> from rdkit import Chem
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18,
>> in 
>> from rdkit import rdBase
>> ImportError: cannot import name rdBase
>>
>>
>> --
>> Wandré Nunes de Pinho Veloso
>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>> Inteligência Computacional - UNIFEI
>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>
>> 2017-09-14 9:17 GMT-03:00 Malitha Kabir :
>>
>>> Hi Wandré,
>>>
>>> Good day! It's malitha.
>>>
>>> Considering your first question I would say, the path variable NOT set
>>> correctly. To avoid having gymnastic with linux system you may consider the
>>> following steps:
>>>
>>>1. Install miniconda or andcona from https://conda.io/miniconda.html
>>>and command yes (y) when it says to add path variable to python shipped
>>>with conda. I mean python within conda would be your default python. 
>>> After
>>>installing it, when you run the command > from shell you
>>>will see something like <<>> at the screen
>>>2. Install rdkit from https://anaconda.org/rdkit/rdkit on top of
>>>conda
>>>
>>>
>>> For question regarding energy minimization, you may find the following
>>> link helpful.
>>> https://sourceforge.net/p/rdkit/mailman/message/28298074/
>>>
>>> I hope, it helps!
>>>
>>> - malitha
>>>
>>> On Thu, Sep 14, 2017 at 4:22 PM, Wandré  wrote:
>>>
 So,
 1) I run all the commands in tutorial of installation of RDKit in Conda
 (https://github.com/rdkit/conda-rdkit), but, when I run python and try
 to import Chem ("from rdkit import Chem") appears an error message:
 Traceback (most recent call last):
   File "", line 1, in 
   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18,
 in 
 from rdkit import rdBase
 ImportError: cannot import name rdBase

 2) Thanks for all the references

 3) Which function generate this "energy minimized molecule"?

 --
 Wandré Nunes de Pinho Veloso
 Professor Assistente - Unifei - Campus Avançado de Itabira-MG
 Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
 UFMG
 Pesquisador do INSILICO - Grupo 

Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Dimitri Maziuk
On 09/14/2017 03:04 PM, Markus Sitzmann wrote:
> Not on Centos 6 - Docker requires Centos 7 for the host system.

You can't win... :(

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Markus Sitzmann
Not on Centos 6 - Docker requires Centos 7 for the host system.

On Thu, Sep 14, 2017 at 10:01 PM, Dimitri Maziuk 
wrote:

> On 09/14/2017 02:58 PM, Andrew Dalke wrote:
>
> > If only Greg got as much money for long term RDKit support as Red Hat
> > gets for long term RHEL support. :)
>
> Yep. But an rdkit docker container might be feasible.
>
> --
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Dimitri Maziuk
On 09/14/2017 02:58 PM, Andrew Dalke wrote:

> If only Greg got as much money for long term RDKit support as Red Hat
> gets for long term RHEL support. :)

Yep. But an rdkit docker container might be feasible.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Andrew Dalke
On Sep 14, 2017, at 19:26, Dimitri Maziuk  wrote:
> Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
> linux distros that will be officially with us until June 30, 2024.

If only Greg got as much money for long term RDKit support as Red Hat
gets for long term RHEL support. :)


Andrew
da...@dalkescientific.com


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread Jason Biggs
Thanks to Curt, Markus, and John for helping me understand this.  I knew
that inchi had its limitations, but that didn't jump out at me here because
there's no hydrogen migration between the different forms - not realizing
these forms also qualify as tautomers.  But So this is definitely a feature
(or limitation) of inchi.


> No, my "good old" cactus service doesn't do a lookup in this case, it is
> read from the string, which is of of course in opposition to what I just
> said :-). We did quite a bit regarding normalization, first, the CACTVS
> toolkit behind the service is quite good in this regard and I added a few
> things for the web service, too.
>
>
I may look into adding in a step after getting a sanitization error, but
before accepting the unsanitized structure, to see if CACTVS can give a
better SMILES string.

I want to avoid returning to the user 2D structures like the first image in
the thread, when you can point to another structure that equally matches
the input.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Riccardo Vianello
On Thu, Sep 14, 2017 at 9:07 PM, Dimitri Maziuk 
wrote:

>
> All great when it's one computer and that one's your own personal laptop.
>
> > # yum ls \*python27\*
> > ...
> > python27.x86_642.7.13-2.ius.el6
>   @salt-2015.8
> > [...]...
>
> Any guesses as to how many things will break in my infrastructure
> manglement setup (saltstack) if I enable Software Collections and some
> of those get updated from SCL and some: from Salt?
>

sorry, I'm not familiar with saltstack, so I am unable to comment much. as
far as I understood, the RH software collection packages are meant to be
installed in parallel to the system software without overwriting any RHEL
package (it's not just an extension repository, users need to enable the
SCL packages to make them available in the runtime environment, similarly
to how virtualenvs are activated or environment modules are added), I don't
know how the saltstack packages are designed to work, so the discussion
would quickly go further off-topic (but I seem to understand it provides
yet another alternative to the system python, or not?)
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Greg Landrum
On Thu, Sep 14, 2017 at 7:26 PM, Dimitri Maziuk 
wrote:

> On 09/14/2017 10:43 AM, Greg Landrum wrote:
>
> > Just to do some expectation management: python 2.6 is pretty ancient and
> > there's no guarantee that all of the RDKit code will work with it. Python
> > 2.7 is the minimum version that we "officially" support. It's a very good
> > idea to update.
>
> Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
> linux distros that will be officially with us until June 30, 2024.


Yep, but it's not supported by the python community (and hasn't been since
2013).
Newer versions of the RDKit no longer require backwards compatibility with
python 2.6. If you are stuck with an old version of Python, you may well be
stuck with an old version of the RDKit.

-greg
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread Markus Sitzmann
On Thu, Sep 14, 2017 at 8:09 PM, Jason Biggs  wrote:

> Okay, all three of these smiles strings resolve to the same inchi,
>
> "O=[N+](C1=NC2=CC=CC=C2N=C1)[N-](=O)C1=NC2=CC=CC=C2N=C1"
> "C1=CC=C2C(=C1)N=CC(=N2)N(=N(=O)C3=NC4=CC=CC=C4N=C3)=O"
> "[O-][N+](c1cnc2c2n1)=[N+]([O-])c3cnc4c4n3"
>
> even though to me they seem like different structures due to the specified
> charges.  Is this a limitation of inchi, or do I need to rethink my ideas
> of what makes two chemical structures the same?
>
>
Well, but at least the first two ones I would regard as erroneous or
unlikely (not stable) creatures - and that is exactly what John meant with
InChI is an identifier, not a representation. InChI's main purpose
(particularly that one of Standard InChI) is to identify them as the same
(corrected, normalized) molecule, not as three separate species (that would
be the purpose of representation). Of course, in many cases, there might be
a discussion avout where sensible correction/normalization should end and
separation of structures should start but that is long topic.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread Markus Sitzmann
On Thu, Sep 14, 2017 at 8:09 PM, Jason Biggs  wrote:

> Okay, all three of these smiles strings resolve to the same inchi,
>
> "O=[N+](C1=NC2=CC=CC=C2N=C1)[N-](=O)C1=NC2=CC=CC=C2N=C1"
> "C1=CC=C2C(=C1)N=CC(=N2)N(=N(=O)C3=NC4=CC=CC=C4N=C3)=O"
> "[O-][N+](c1cnc2c2n1)=[N+]([O-])c3cnc4c4n3"
>
> even though to me they seem like different structures due to the specified
> charges.  Is this a limitation of inchi, or do I need to rethink my ideas
> of what makes two chemical structures the same?
>
>
Well, but at least the first two ones I would regard as erroneous or
unlikely (not stable) creatures - and that is exactly what John meant with
InChI is an identifier, not a representation. InChI's main purpose
(particularly that one of Standard InChI) is to identify them as the same
(corrected, normalized) molecule, not as three separate species (that would
be the purpose of representation). Of course, in many cases, there might be
a discussion avout where sensible correction/normalization should end and
separation of structures should start but that is long topic.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread Markus Sitzmann
On Thu, Sep 14, 2017 at 7:38 PM, John Mayfield 
wrote:

> InChI is an identifier and not a representation, you should not read
> InChIs... but we are beyond hope there so...
>

Wonderfully said - unfortunately one day they decided to make InChIs
"readable" ...


> The InChI string is correct and is the same if you roundtrip your
> preferred one with charge separated bonds and the 5 valent one.
>
> All toolkits will use the InChI library to read/write InChIs and it
> generates the representation with 5v nitrogens, cactus is either applying
> normalisation after reading or in this case (since it's the name resolved)
> doing a identifier lookup from an original SMILES used to generate this
> InChI:
>

No, my "good old" cactus service doesn't do a lookup in this case, it is
read from the string, which is of of course in opposition to what I just
said :-). We did quite a bit regarding normalization, first, the CACTVS
toolkit behind the service is quite good in this regard and I added a few
things for the web service, too.


 Markus
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread Curt Fischer
I'm not 100% sure about this particular case, but I suspect this is a
limitation of InChI.  For example, the InChI representation of zwitterionic
phenylalanine (negative COO-, positive NH3+) and "neutral" phenylalanine
(neutral COOH, neutral NH2) is exactly the same.  This is by design.  See
https://chemistry.stackexchange.com/questions/34563/pubchem-inchi-smiles-and-uniqueness
for some possibly useful additional discussion.

The InChI FAQ at http://www.inchi-trust.org/technical-faq/#13.2 says:

This is exemplified below by standard InChIKeys as well as standard InChI
> strings for neutral, zwitterionic, anionic and cationic states of glycine
> (note that neutral and zwitterionic states do not differ in the total
> number of protons so they have the same standard InChI/InChIKey):


Is this the same as or at least similar to the issue you are encountering?

Curt

On Thu, Sep 14, 2017 at 11:09 AM, Jason Biggs  wrote:

> Okay, all three of these smiles strings resolve to the same inchi,
>
> "O=[N+](C1=NC2=CC=CC=C2N=C1)[N-](=O)C1=NC2=CC=CC=C2N=C1"
> "C1=CC=C2C(=C1)N=CC(=N2)N(=N(=O)C3=NC4=CC=CC=C4N=C3)=O"
> "[O-][N+](c1cnc2c2n1)=[N+]([O-])c3cnc4c4n3"
>
> even though to me they seem like different structures due to the specified
> charges.  Is this a limitation of inchi, or do I need to rethink my ideas
> of what makes two chemical structures the same?
>
>
>
>
>
> Jason Biggs
>
>
> On Thu, Sep 14, 2017 at 12:38 PM, John Mayfield <
> john.wilkinson...@gmail.com> wrote:
>
>> InChI is an identifier and not a representation, you should not read
>> InChIs... but we are beyond hope there so...
>>
>> The InChI string is correct and is the same if you roundtrip your
>> preferred one with charge separated bonds and the 5 valent one.
>>
>> All toolkits will use the InChI library to read/write InChIs and it
>> generates the representation with 5v nitrogens, cactus is either applying
>> normalisation after reading or in this case (since it's the name resolved)
>> doing a identifier lookup from an original SMILES used to generate this
>> InChI:
>>
>> echo 'InChI=1S/C16H10N6O2/c23-21(15-9-17-11-5-1-3-7-13(11)19-15)
>>> 22(24)16-10-18-12-6-2-4-8-14(12)20-16/h1-10H' | inchi -STDIO
>>> -inChi2Struct -OutputSDF | obabel -imol -osmi
>>
>> c1ccc2c(c1)ncc(n2)N(=N(=O)c1cnc2c2n1)=O Structure #1
>>
>> SDF also attached without going though Open Babel.
>>
>> - John
>>
>>
>>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Dimitri Maziuk
On 09/14/2017 01:41 PM, Riccardo Vianello wrote:

> True, but there shouldn't be any strong need for using the system python
> for running application software. Python 2.7 (together with python 3) has
> been available to RHEL6 subscribers since almost five years, as part of the
> Red Hat Software Collections (also available to non-subscribers from the
> upstream CentOS/Fedora repositories). A detailed discussion is available
> from this post
> http://www.curiousefficiency.org/posts/2015/04/stop-supporting-python26.html
> 
> And the anaconda python distribution of course provides another alternative.

All great when it's one computer and that one's your own personal laptop.

> # yum ls \*python27\*
> ...
> python27.x86_642.7.13-2.ius.el6   
>  @salt-2015.8  
> python27-babel.noarch  0.9.4-5.2.el6  
>  @salt-2015.8  
> python27-chardet.noarch2.2.1-3.el6
>  @salt-2015.8  
> python27-crypto.x86_64 2.6.1-4.el6
>  @salt-2015.8  
> python27-futures.noarch3.0.3-2.el6
>  @salt-2015.8  
> python27-jinja2.noarch 2.8.1-2.el6
>  @salt-2015.8  
> python27-libs.x86_64   2.7.13-2.ius.el6   
>  @salt-2015.8  
> python27-markupsafe.x86_64 0.11-11.el6
>  @salt-2015.8  
> python27-msgpack.x86_640.4.6-2.el6
>  @salt-2015.8  
> python27-psutil.x86_64 5.2.2-1.ius.el6
>  @salt-2015.8  
> python27-pycurl.x86_64 7.19.0-10.el6  
>  @salt-2015.8  
> python27-requests.noarch   2.6.0-4.el6
>  @salt-2015.8  
> python27-six.noarch1.9.0-3.el6
>  @salt-2015.8  
> python27-tornado.x86_644.2.1-3.el6
>  @salt-2015.8  
> python27-urllib3.noarch1.10.2-2.el6   
>  @salt-2015.8  
> python27-zmq.x86_6414.5.0-3.el6   
>  @salt-2015.8  
...
> python27-babel.noarch  0.9.6-7.sc1.el6
>  centos-sclo-rh
> python27-pip.noarch9.0.1-1.ius.el6
>  salt-2015.8   
...
> python27-python.x86_64 2.7.13-3.el6   
>  centos-sclo-rh
> python27-python-babel.noarch   0.9.6-7.sc1.el6
>  centos-sclo-rh
> python27-python-jinja2.noarch  2.6-10.sc1.el6 
>  centos-sclo-rh
> python27-python-libs.x86_642.7.13-3.el6   
>  centos-sclo-rh
> python27-python-markupsafe.x86_64  0.11-11.sc1.el6
>  centos-sclo-rh
> python27-python-pip.noarch 8.1.2-1.el6
>  centos-sclo-rh
...

Any guesses as to how many things will break in my infrastructure
manglement setup (saltstack) if I enable Software Collections and some
of those get updated from SCL and some: from Salt?

And don't get me started on PIP.
-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Fixed scale drawing

2017-09-14 Thread Maciek Wójcikowski
I've tried that, but ended up with molecules out of picture. I'll try again
tomorrow and ping back here should I succeed. The real problem were two
atom molecules, which have delta x or y = 0, such as C=0 or CN.


Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl

2017-09-14 17:21 GMT+02:00 Greg Landrum :

> Hi Maciek,
>
> You can do this by calling setScale() method on MolDraw2D(). There's not a
> decent python example around yet (would be something for the cookbook I
> suppose), but the C++ code isn't too complex and demonstrates how it works:
> https://github.com/rdkit/rdkit/blob/master/Code/
> GraphMol/MolDraw2D/test1.cpp#L1962
>
> Hope this helps,
> -greg
>
>
> On Thu, Sep 14, 2017 at 10:24 AM, Maciek Wójcikowski <
> mac...@wojcikowski.pl> wrote:
>
>> Hi RDKitters!
>>
>> Quick question: is there a way to force drawing to output molecules on a
>> grid image or separate in fixed scale (i.e. constant/matching bond length)?
>>
>> 
>> Pozdrawiam,  |  Best regards,
>> Maciek Wójcikowski
>> mac...@wojcikowski.pl
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Riccardo Vianello
On Thu, Sep 14, 2017 at 7:26 PM, Dimitri Maziuk 
wrote:

> Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
> linux distros that will be officially with us until June 30, 2024.
>

True, but there shouldn't be any strong need for using the system python
for running application software. Python 2.7 (together with python 3) has
been available to RHEL6 subscribers since almost five years, as part of the
Red Hat Software Collections (also available to non-subscribers from the
upstream CentOS/Fedora repositories). A detailed discussion is available
from this post
http://www.curiousefficiency.org/posts/2015/04/stop-supporting-python26.html

And the anaconda python distribution of course provides another alternative.

--Riccardo
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread Jason Biggs
Okay, all three of these smiles strings resolve to the same inchi,

"O=[N+](C1=NC2=CC=CC=C2N=C1)[N-](=O)C1=NC2=CC=CC=C2N=C1"
"C1=CC=C2C(=C1)N=CC(=N2)N(=N(=O)C3=NC4=CC=CC=C4N=C3)=O"
"[O-][N+](c1cnc2c2n1)=[N+]([O-])c3cnc4c4n3"

even though to me they seem like different structures due to the specified
charges.  Is this a limitation of inchi, or do I need to rethink my ideas
of what makes two chemical structures the same?





Jason Biggs


On Thu, Sep 14, 2017 at 12:38 PM, John Mayfield  wrote:

> InChI is an identifier and not a representation, you should not read
> InChIs... but we are beyond hope there so...
>
> The InChI string is correct and is the same if you roundtrip your
> preferred one with charge separated bonds and the 5 valent one.
>
> All toolkits will use the InChI library to read/write InChIs and it
> generates the representation with 5v nitrogens, cactus is either applying
> normalisation after reading or in this case (since it's the name resolved)
> doing a identifier lookup from an original SMILES used to generate this
> InChI:
>
> echo 'InChI=1S/C16H10N6O2/c23-21(15-9-17-11-5-1-3-7-13(11)19-
>> 15)22(24)16-10-18-12-6-2-4-8-14(12)20-16/h1-10H' | inchi -STDIO
>> -inChi2Struct -OutputSDF | obabel -imol -osmi
>
> c1ccc2c(c1)ncc(n2)N(=N(=O)c1cnc2c2n1)=O Structure #1
>
> SDF also attached without going though Open Babel.
>
> - John
>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Malitha Kabir
Hi Wandré,

Sorry to see you in trouble again.

If you see the massages then
# All requested packages already installed.
# packages in environment at /home/wandre/anaconda2:
#
rdkit 2017.03.3   np111py27_1rdkit

so your rdkit should be at
/home/wandre/anaconda2/

But it is trying to import from
/opt/rdkit-Release_2016_03_1/rdkit/

So the path variable is still NOT correct. It is good to see that you
installed conda correctly and rdkit i think installed correctly.

Therefore I suspect that you need to remove the previously path for rdkit
(you probably set those during installing from source).

I forgot what linux command will do that for you. Have a great day!

*** I will update the answer whenever I get the appropriate linux command.

- malitha



On Thu, Sep 14, 2017 at 11:38 PM, Wandré  wrote:

> Thanks Malitha,
>
> When I install Anaconda I said yes to all questions.
> When I trying to reinstall the RDKit, this message appears:
>
> wandre@wandreLinux:~/anaconda2$ conda install -c rdkit rdkit
> Fetching package metadata ...
> Solving package specifications: .
>
> # All requested packages already installed.
> # packages in environment at /home/wandre/anaconda2:
> #
> rdkit 2017.03.3   np111py27_1rdkit
>
> When I run "python", appears:
>
> Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15)
> [GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> Anaconda is brought to you by Continuum Analytics.
> Please check out: http://continuum.io/thanks and https://anaconda.org
> >>> import rdkit
> >>> from rdkit import Chem
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18, in
> 
> from rdkit import rdBase
> ImportError: cannot import name rdBase
>
>
> --
> Wandré Nunes de Pinho Veloso
> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
> Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
> Inteligência Computacional - UNIFEI
> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>
> 2017-09-14 9:17 GMT-03:00 Malitha Kabir :
>
>> Hi Wandré,
>>
>> Good day! It's malitha.
>>
>> Considering your first question I would say, the path variable NOT set
>> correctly. To avoid having gymnastic with linux system you may consider the
>> following steps:
>>
>>1. Install miniconda or andcona from https://conda.io/miniconda.html
>>and command yes (y) when it says to add path variable to python shipped
>>with conda. I mean python within conda would be your default python. After
>>installing it, when you run the command > from shell you
>>will see something like <<>> at the screen
>>2. Install rdkit from https://anaconda.org/rdkit/rdkit on top of conda
>>
>>
>> For question regarding energy minimization, you may find the following
>> link helpful.
>> https://sourceforge.net/p/rdkit/mailman/message/28298074/
>>
>> I hope, it helps!
>>
>> - malitha
>>
>> On Thu, Sep 14, 2017 at 4:22 PM, Wandré  wrote:
>>
>>> So,
>>> 1) I run all the commands in tutorial of installation of RDKit in Conda (
>>> https://github.com/rdkit/conda-rdkit), but, when I run python and try
>>> to import Chem ("from rdkit import Chem") appears an error message:
>>> Traceback (most recent call last):
>>>   File "", line 1, in 
>>>   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18,
>>> in 
>>> from rdkit import rdBase
>>> ImportError: cannot import name rdBase
>>>
>>> 2) Thanks for all the references
>>>
>>> 3) Which function generate this "energy minimized molecule"?
>>>
>>> --
>>> Wandré Nunes de Pinho Veloso
>>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
>>> UFMG
>>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>>> Inteligência Computacional - UNIFEI
>>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>>
>>> 2017-09-13 17:32 GMT-03:00 Malitha Kabir :
>>>
 Hi Wandré,

 1) apt-get installs rdkit 2013 (link below). So, please install it
 through conda (as Markus suggested)
 https://packages.ubuntu.com/trusty/python/python-rdkit

 2) I am not familiar with the case of wrong SMILE generation. But the
 link below says something more that I think you need to know.
 https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3495655/

 3) As you are trying to store 

Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Wandré
Thanks Malitha,

When I install Anaconda I said yes to all questions.
When I trying to reinstall the RDKit, this message appears:

wandre@wandreLinux:~/anaconda2$ conda install -c rdkit rdkit
Fetching package metadata ...
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /home/wandre/anaconda2:
#
rdkit 2017.03.3   np111py27_1rdkit

When I run "python", appears:

Python 2.7.13 |Anaconda custom (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import rdkit
>>> from rdkit import Chem
Traceback (most recent call last):
  File "", line 1, in 
  File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18, in

from rdkit import rdBase
ImportError: cannot import name rdBase


--
Wandré Nunes de Pinho Veloso
Professor Assistente - Unifei - Campus Avançado de Itabira-MG
Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
Inteligência Computacional - UNIFEI
Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG

2017-09-14 9:17 GMT-03:00 Malitha Kabir :

> Hi Wandré,
>
> Good day! It's malitha.
>
> Considering your first question I would say, the path variable NOT set
> correctly. To avoid having gymnastic with linux system you may consider the
> following steps:
>
>1. Install miniconda or andcona from https://conda.io/miniconda.html
>and command yes (y) when it says to add path variable to python shipped
>with conda. I mean python within conda would be your default python. After
>installing it, when you run the command > from shell you
>will see something like <<>> at the screen
>2. Install rdkit from https://anaconda.org/rdkit/rdkit on top of conda
>
>
> For question regarding energy minimization, you may find the following
> link helpful.
> https://sourceforge.net/p/rdkit/mailman/message/28298074/
>
> I hope, it helps!
>
> - malitha
>
> On Thu, Sep 14, 2017 at 4:22 PM, Wandré  wrote:
>
>> So,
>> 1) I run all the commands in tutorial of installation of RDKit in Conda (
>> https://github.com/rdkit/conda-rdkit), but, when I run python and try to
>> import Chem ("from rdkit import Chem") appears an error message:
>> Traceback (most recent call last):
>>   File "", line 1, in 
>>   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18,
>> in 
>> from rdkit import rdBase
>> ImportError: cannot import name rdBase
>>
>> 2) Thanks for all the references
>>
>> 3) Which function generate this "energy minimized molecule"?
>>
>> --
>> Wandré Nunes de Pinho Veloso
>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>> Inteligência Computacional - UNIFEI
>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>
>> 2017-09-13 17:32 GMT-03:00 Malitha Kabir :
>>
>>> Hi Wandré,
>>>
>>> 1) apt-get installs rdkit 2013 (link below). So, please install it
>>> through conda (as Markus suggested)
>>> https://packages.ubuntu.com/trusty/python/python-rdkit
>>>
>>> 2) I am not familiar with the case of wrong SMILE generation. But the
>>> link below says something more that I think you need to know.
>>> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3495655/
>>>
>>> 3) As you are trying to store data, it would be great to consider
>>> whether you are storing energy minimized molecule or not. (my opinion).
>>> Surface area related descriptors will yield different result and bond
>>> connectivity related descriptor will yield same result in both cases.
>>>
>>> 4) Sharing my personal experience, during my undergraduate school part
>>> of my final year project was stressed up with conceptual questions. I
>>> failed to utilize the  blessing of advanced development due to the lack of
>>> time. The later experience was not so good.
>>>
>>> Please keep in mind that we can generate a non redundant database with
>>> few molecules but for millions of molecules it should be quite though task.
>>> Have a great day!
>>>
>>> - malitha
>>>
>>>
>>>
>>>
>>> On Thu, Sep 14, 2017 at 2:05 AM, Markus Sitzmann <
>>> markus.sitzm...@gmail.com> wrote:
>>>
 PS. The conda version has InChI support

 On Wed, Sep 13, 2017 at 10:04 PM, Markus Sitzmann <
 markus.sitzm...@gmail.com> wrote:

> 

Re: [Rdkit-discuss] bad inchi or parsing problem?

2017-09-14 Thread John Mayfield
InChI is an identifier and not a representation, you should not read
InChIs... but we are beyond hope there so...

The InChI string is correct and is the same if you roundtrip your preferred
one with charge separated bonds and the 5 valent one.

All toolkits will use the InChI library to read/write InChIs and it
generates the representation with 5v nitrogens, cactus is either applying
normalisation after reading or in this case (since it's the name resolved)
doing a identifier lookup from an original SMILES used to generate this
InChI:

echo
> 'InChI=1S/C16H10N6O2/c23-21(15-9-17-11-5-1-3-7-13(11)19-15)22(24)16-10-18-12-6-2-4-8-14(12)20-16/h1-10H'
> | inchi -STDIO -inChi2Struct -OutputSDF | obabel -imol -osmi

c1ccc2c(c1)ncc(n2)N(=N(=O)c1cnc2c2n1)=O Structure #1

SDF also attached without going though Open Babel.

- John


inchioutput.sdf
Description: chemical/mdl-sdfile
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Dimitri Maziuk
On 09/14/2017 10:43 AM, Greg Landrum wrote:

> Just to do some expectation management: python 2.6 is pretty ancient and
> there's no guarantee that all of the RDKit code will work with it. Python
> 2.7 is the minimum version that we "officially" support. It's a very good
> idea to update.

Just FYI: python 2.6 is the system python on (at least) RHEL-6 family of
linux distros that will be officially with us until June 30, 2024.

-- 
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu



signature.asc
Description: OpenPGP digital signature
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] counting stereocenters

2017-09-14 Thread Greg Landrum
Hi Daniel,
this is some oddity that happens with molecules constructed from InChIs.
CalcNumAtomStereoCenters() returns sensible results if you call it on the
molecules constructed from SMILES:
In [24]: mol_list2 = [Chem.MolFromSmiles(Chem.MolToSmiles(mol,True)) for
mol in mol_list]

In [25]: [CalcNumUnspecifiedAtomStereoCenters(mol) for mol in mol_list2]
Out[25]: [0, 1, 1]

In [26]: [CalcNumAtomStereoCenters(mol) for mol in mol_list2]
Out[26]: [2, 2, 1]


I will try to track this down.

-greg


On Thu, Sep 14, 2017 at 4:47 PM, Daniel Hitchcock  wrote:

> Hi All,
>
> I have a list of compounds (InChi strings) that I need to filter.
> Basically I need to identify which molecules are missing stereo information.
>
> I came across the "CalcNumUnspecifiedAtomStereoCenters" which sounded
> exactly like what I needed, but unfortunately all it does it return 0s, as
> well as the "CalcNumAtomStereoCenters" function. I've viewed the molecules
> using MolToImage(mol).show() to verify the stereo information is accurate,
> and it's all there.
>
> Here is the code I used. It's in python 3.5.2, and
> rdkit.Chem.rdMolDescriptors._CalcNumUnspecifiedAtomStereoCenters_version
> is 1.0.0
>
> """
> Three molecules with stereochemistry.
> stereo_inchi - 2 stereocenters specified
> am_inchi - 1 sterecenter sepcified, the other ambiguous
> unspec_inchi - 1 stereocenter, unmentioned in the InChi string
>
> Program should output:
> 2 0
> 1 1
> 0 1
> """
> from rdkit.Chem import MolFromInchi, MolToInchi
> from rdkit.Chem.AllChem import CalcNumAtomStereoCenters,
> CalcNumUnspecifiedAtomStereoCenters
> stereo_inchi = 'InChI=1S/C10H10O6/c1-5(9(12)13)16-8-4-6(10(14)15)2-3-7(8)
> 11/h2-4,7-8,11H,1H2,(H,12,13)(H,14,15)/t7-,8-/m1/s1'
> am_inchi = 'InChI=1S/C11H21NO5/c1-8(13)5-11(16)17-9(6-10(14)15)7-12(2,
> 3)4/h8-9,13H,5-7H2,1-4H3/t8?,9-/m1/s1'
> unspec_inchi = 'InChI=1S/C14H27NO4/c1-5-6-7-8-9-14(18)19-12(10-13(16)17)
> 11-15(2,3)4/h12H,5-11H2,1-4H3'
> mol_list = [stereo_inchi, am_inchi, unspec_inchi]
> mol_list = [MolFromInchi(mol) for mol in mol_list]
> for mol in mol_list:
> print(CalcNumAtomStereoCenters(mol), CalcNumUnspecifiedAtomStereoCe
> nters(mol))
>
>
> Thanks in advance!
>
> Cheers,
>
> -daniel
>
> --
> Daniel Hitchcock, PhDwww.linkedin.com/pub/daniel-hitchcock/24/7b8/858/
> Research Scientist I
> Metabolomics Platform
> The Broad Institute of MIT and Harvard
> 415 Main St, Cambridge, 02142
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Greg Landrum
Hi Loris,

On Thu, Sep 14, 2017 at 2:25 PM, Loris Bennett 
wrote:

>
> I am trying to install RDKit on a university cluster running Linux from
> source.  The build seem to go OK and 'make install' copied the
> directories
>
>   lib
>   rdkit
>
> to the NFS share where the software should reside.  I then do
>
>   export RDBASE=/cm/shared/apps/rdkit/rdkit_2017_03_3
>   export PYTHONPATH=$PYTHONPATH:$RDBASE
>   export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDBASE/lib
>
> However when I then run Python (2.6.6) and try
>

Just to do some expectation management: python 2.6 is pretty ancient and
there's no guarantee that all of the RDKit code will work with it. Python
2.7 is the minimum version that we "officially" support. It's a very good
idea to update.


>   import rdkit
>
> I get
>
>   ImportError: No module named rdkit
>
> I am not a Python person and my naive expectation was that there should
> be a file called
>
>   rdkit.py
>

Based on the info provided so far, there should be a directory called rdkit
in the directory:
/cm/shared/apps/rdkit/rdkit_2017_03_3
That directory should contain a number of sub dirs, other files, and a file
called __init__.py (this is the one that tells Python that it can import
the directory as a package).
What do you see there?



> which has to be on my PYTHONPATH.  However, since the unpacked sources
> together with the build don't seem to contain such a file, either
> something is broken or the rdkit module should be found by some other
> mechanism.
>

Again, based on the info above, I would expect that you want "make install"
to copy the "rdkit" and "lib" directories (as well as a couple others) to
/cm/shared/apps/rdkit/rdkit_2017_03_3. Once we figure out what actually
happened I can maybe help you figure out how to fix it.

best.
-greg



> Any ideas what I'm doing wrong or what initialisation file I should
> ensure is on my PYTHONPATH?
>
> Cheers,
>
> Loris
>
> --
> Dr. Loris Bennett (Mr.)
> ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Using the new drawing code

2017-09-14 Thread Greg Landrum
Hi Michal,

There are a couple of things in here.

On Fri, Aug 25, 2017 at 11:42 AM, Michał Nowotka  wrote:

> Hi,
>
> I finally decided to try the new C++ drawing code and I found some
> issues with it. I'll try to descibe my problems.
>
> First, lets start with a code that works perfectly:
>
> from rdkit import Chem
> from rdkit.Chem.AllChem import Compute2DCoords
> from rdkit.Chem.Draw import rdMolDraw2D
>
> m = Chem.MolFromSmiles('O=C(C)Oc1c1C(=O)O')
> Compute2DCoords(m)
> drawer = rdMolDraw2D.MolDraw2DCairo(500, 500)
> drawer.DrawMolecule(m,highlightAtoms=m.GetSubstructMatch(Chem.
> MolFromSmarts('c1c1')))
> drawer.FinishDrawing()
> with open('aspirin_a.png','wb') as f:
> f.write(drawer.GetDrawingText())
>
> This code produces the attached 'aspirin_a.png' image, that looks perfect.
>

Yay! :-)


> Now, apart from the `DrawMolecule` there is also `DrawMolecules`
> function exposed by the `MolDraw2DCairo` module. So what will happen
> when I use it to render the same molecule?
>
> from rdkit import Chem
> from rdkit.Chem.AllChem import Compute2DCoords
> from rdkit.Chem.Draw import rdMolDraw2D
>
> m = Chem.MolFromSmiles('O=C(C)Oc1c1C(=O)O')
> Compute2DCoords(m)
> drawer = rdMolDraw2D.MolDraw2DCairo(500, 500)
> drawer.DrawMolecules([m],highlightAtoms=[m.GetSubstructMatch(Chem.
> MolFromSmarts('c1c1'))])
> drawer.FinishDrawing()
> with open('aspirin_b.png','wb') as f:
> f.write(drawer.GetDrawingText())
>
>
> The image is different - only atoms are highlighted, bonds between
> atoms are not (see the attached 'aspirin_b.png') image.
>

Short answer: DrawMolecules() requires you to provide the list of bonds to
be highlighted too. This is just a couple of lines of code.


> OK, but who would use `DrawMolecules` to render a single compound
> anyway? I think it's meant to render multiple compounds at once. The
> 'old' drawing code has a function called `MolsToGridImage` to do this.
> And it has a `molsPerRow` parameter which makes it easy to define a
> shape of the grid. I couldn't find a similar function in the 'new'
> drawing code so it looks like using `DrawMolecules` is the only way to
> render multiple mols at once. Let's try that:
>
> from rdkit import Chem
> from rdkit.Chem.AllChem import Compute2DCoords
> from rdkit.Chem.Draw import rdMolDraw2D
>
> m1 = Chem.MolFromSmiles('O=C(C)Oc1c1C(=O)O')
> Compute2DCoords(m1)
> m2 = Chem.MolFromSmiles('c1cccnc1O')
> Compute2DCoords(m2)
> drawer = rdMolDraw2D.MolDraw2DCairo(500, 500)
> drawer.DrawMolecules([m1, m2])
> drawer.FinishDrawing()
> with open('mols.png','wb') as f:
> f.write(drawer.GetDrawingText())
>

The MolDraw2D constructors can be called with additional arguments that
provide the size of the panes used to render grids of molecules.
For example, here's the code to draw two molecules side by side derived
from your example:
from rdkit import Chem
from rdkit.Chem.Draw import rdMolDraw2D

m1 = Chem.MolFromSmiles('O=C(C)Oc1c1C(=O)O')
pm1 = rdMolDraw2D.PrepareMolForDrawing(m1)
m2 = Chem.MolFromSmiles('c1cccnc1O')
pm2 = rdMolDraw2D.PrepareMolForDrawing(m2)
drawer = rdMolDraw2D.MolDraw2DCairo(600,300,300,300)
drawer.DrawMolecules([m1, m2])
drawer.FinishDrawing()
with open('mols.png','wb') as f:
f.write(drawer.GetDrawingText())


I've switched to use PrepareMolForDrawing() (because I think it's nice to
have kekule structures and wedged bonds) and provided a canvas size of
600x300 divided into 300x300 panels. The code figures out that this means 2
mols per row.

It's somewhat curious (and I don't mean that in a good way) that this
hasn't made it onto the RDKit master yet (instead of using the hack that's
currently there). I will try to get that done before the next release.

To summarize:

>
> - `DrawMolecules` doesn't highlight bonds in the same way as the
> `DrawMolecule` does


correct. That's by design (correct method described above)

- There is no equivalent of the `MolsToGridImage` where I can define
> the shape of the grid of molecules at least nothing documented in
> http://www.rdkit.org/Python_Docs/rdkit.Chem.Draw.
> rdMolDraw2D.MolDraw2D-class.html


Right, it's not documented, but hopefully what I have above helps you see
how to do it.

>
> - `DrawMolecules` does nothing to layout molecules in such a way that
> they don't obscure each other
>

Correct. It does what you tell it to do, but hopefully the rest of the
answer tells you how to tell it the right thing.

-greg



>
> Regards,
>
> Michał Nowotka
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant 

Re: [Rdkit-discuss] Fixed scale drawing

2017-09-14 Thread Greg Landrum
Hi Maciek,

You can do this by calling setScale() method on MolDraw2D(). There's not a
decent python example around yet (would be something for the cookbook I
suppose), but the C++ code isn't too complex and demonstrates how it works:
https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/MolDraw2D/test1.cpp#L1962

Hope this helps,
-greg


On Thu, Sep 14, 2017 at 10:24 AM, Maciek Wójcikowski 
wrote:

> Hi RDKitters!
>
> Quick question: is there a way to force drawing to output molecules on a
> grid image or separate in fixed scale (i.e. constant/matching bond length)?
>
> 
> Pozdrawiam,  |  Best regards,
> Maciek Wójcikowski
> mac...@wojcikowski.pl
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] counting stereocenters

2017-09-14 Thread Daniel Hitchcock

Hi All,

I have a list of compounds (InChi strings) that I need to filter. 
Basically I need to identify which molecules are missing stereo information.


I came across the "CalcNumUnspecifiedAtomStereoCenters" which sounded 
exactly like what I needed, but unfortunately all it does it return 0s, 
as well as the "CalcNumAtomStereoCenters" function. I've viewed the 
molecules using MolToImage(mol).show() to verify the stereo information 
is accurate, and it's all there.


Here is the code I used. It's in python 3.5.2, and 
rdkit.Chem.rdMolDescriptors._CalcNumUnspecifiedAtomStereoCenters_version 
is 1.0.0


"""
Three molecules with stereochemistry.
stereo_inchi - 2 stereocenters specified
am_inchi - 1 sterecenter sepcified, the other ambiguous
unspec_inchi - 1 stereocenter, unmentioned in the InChi string

Program should output:
2 0
1 1
0 1
"""
from rdkit.Chem import MolFromInchi, MolToInchi
from rdkit.Chem.AllChem import CalcNumAtomStereoCenters, 
CalcNumUnspecifiedAtomStereoCenters
stereo_inchi = 
'InChI=1S/C10H10O6/c1-5(9(12)13)16-8-4-6(10(14)15)2-3-7(8)11/h2-4,7-8,11H,1H2,(H,12,13)(H,14,15)/t7-,8-/m1/s1'
am_inchi = 
'InChI=1S/C11H21NO5/c1-8(13)5-11(16)17-9(6-10(14)15)7-12(2,3)4/h8-9,13H,5-7H2,1-4H3/t8?,9-/m1/s1'
unspec_inchi = 
'InChI=1S/C14H27NO4/c1-5-6-7-8-9-14(18)19-12(10-13(16)17)11-15(2,3)4/h12H,5-11H2,1-4H3'

mol_list = [stereo_inchi, am_inchi, unspec_inchi]
mol_list = [MolFromInchi(mol) for mol in mol_list]
for mol in mol_list:
    print(CalcNumAtomStereoCenters(mol), 
CalcNumUnspecifiedAtomStereoCenters(mol))


Thanks in advance!

Cheers,

-daniel

--
Daniel Hitchcock, PhD
www.linkedin.com/pub/daniel-hitchcock/24/7b8/858/
Research Scientist I
Metabolomics Platform
The Broad Institute of MIT and Harvard
415 Main St, Cambridge, 02142

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] ImportError: No module named rdkit

2017-09-14 Thread Loris Bennett
Hi,

I am trying to install RDKit on a university cluster running Linux from
source.  The build seem to go OK and 'make install' copied the
directories

  lib
  rdkit

to the NFS share where the software should reside.  I then do

  export RDBASE=/cm/shared/apps/rdkit/rdkit_2017_03_3
  export PYTHONPATH=$PYTHONPATH:$RDBASE
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RDBASE/lib

However when I then run Python (2.6.6) and try

  import rdkit

I get

  ImportError: No module named rdkit

I am not a Python person and my naive expectation was that there should
be a file called

  rdkit.py

which has to be on my PYTHONPATH.  However, since the unpacked sources
together with the build don't seem to contain such a file, either
something is broken or the rdkit module should be found by some other
mechanism.

Any ideas what I'm doing wrong or what initialisation file I should
ensure is on my PYTHONPATH?

Cheers,

Loris

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.benn...@fu-berlin.de

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Malitha Kabir
Hi Wandré,

Good day! It's malitha.

Considering your first question I would say, the path variable NOT set
correctly. To avoid having gymnastic with linux system you may consider the
following steps:

   1. Install miniconda or andcona from https://conda.io/miniconda.html and
   command yes (y) when it says to add path variable to python shipped with
   conda. I mean python within conda would be your default python. After
   installing it, when you run the command > from shell you
   will see something like <<>> at the screen
   2. Install rdkit from https://anaconda.org/rdkit/rdkit on top of conda


For question regarding energy minimization, you may find the following link
helpful.
https://sourceforge.net/p/rdkit/mailman/message/28298074/

I hope, it helps!

- malitha

On Thu, Sep 14, 2017 at 4:22 PM, Wandré  wrote:

> So,
> 1) I run all the commands in tutorial of installation of RDKit in Conda (
> https://github.com/rdkit/conda-rdkit), but, when I run python and try to
> import Chem ("from rdkit import Chem") appears an error message:
> Traceback (most recent call last):
>   File "", line 1, in 
>   File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18, in
> 
> from rdkit import rdBase
> ImportError: cannot import name rdBase
>
> 2) Thanks for all the references
>
> 3) Which function generate this "energy minimized molecule"?
>
> --
> Wandré Nunes de Pinho Veloso
> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
> Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
> Inteligência Computacional - UNIFEI
> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>
> 2017-09-13 17:32 GMT-03:00 Malitha Kabir :
>
>> Hi Wandré,
>>
>> 1) apt-get installs rdkit 2013 (link below). So, please install it
>> through conda (as Markus suggested)
>> https://packages.ubuntu.com/trusty/python/python-rdkit
>>
>> 2) I am not familiar with the case of wrong SMILE generation. But the
>> link below says something more that I think you need to know.
>> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3495655/
>>
>> 3) As you are trying to store data, it would be great to consider whether
>> you are storing energy minimized molecule or not. (my opinion). Surface
>> area related descriptors will yield different result and bond connectivity
>> related descriptor will yield same result in both cases.
>>
>> 4) Sharing my personal experience, during my undergraduate school part of
>> my final year project was stressed up with conceptual questions. I failed
>> to utilize the  blessing of advanced development due to the lack of time.
>> The later experience was not so good.
>>
>> Please keep in mind that we can generate a non redundant database with
>> few molecules but for millions of molecules it should be quite though task.
>> Have a great day!
>>
>> - malitha
>>
>>
>>
>>
>> On Thu, Sep 14, 2017 at 2:05 AM, Markus Sitzmann <
>> markus.sitzm...@gmail.com> wrote:
>>
>>> PS. The conda version has InChI support
>>>
>>> On Wed, Sep 13, 2017 at 10:04 PM, Markus Sitzmann <
>>> markus.sitzm...@gmail.com> wrote:
>>>
 Strong recommendation: use the conda version:

 http://www.rdkit.org/docs/Install.html

 On Wed, Sep 13, 2017 at 9:58 PM, Wandré  wrote:

> I just run sudo apt-get install python-rdkit librdkit1 rdkit-data 
> I'm trying to solve this with this link: http://www.blopig.com/bl
> og/2013/02/how-to-install-rdkit-on-ubuntu-12-04/
>
> --
> Wandré Nunes de Pinho Veloso
> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
> Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
> UFMG
> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
> Inteligência Computacional - UNIFEI
> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>
> 2017-09-13 16:55 GMT-03:00 Markus Sitzmann 
> :
>
>> How did you install rdkit so far? And where? Is it the conda/anaconda
>> version?
>>
>> On Wed, Sep 13, 2017 at 9:39 PM, Wandré 
>> wrote:
>>
>>> How to install RDKit with InChI?
>>> When I run Chem.inchi.INCHI_AVAILABLE, the result is False
>>>
>>> --
>>> Wandré Nunes de Pinho Veloso
>>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>>> Doutorando em Bioinformática - Universidade Federal de Minas
>>> Gerais - UFMG
>>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>>> Inteligência Computacional - UNIFEI
>>> Membro do 

Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-14 Thread Greg Landrum
On Thu, Sep 14, 2017 at 12:05 PM, Michał Nowotka  wrote:

> Using
>
> params = AdjustQueryParameters()
> params.makeAtomsGeneric = True
> params.makeBondsGeneric = True
> pattern = AdjustQueryProperties(pattern, params)
>
> Seems to solve my problem - I'm getting a match now (but I haven't yet
> verified if the match is correct and I don't understand why I had to
> set both flags, I'd expect that setting makeBondsGeneric should make
> it work already).
>

I don't think you should need to do "makeAtomsGeneric", but you likely want
to do params.adjustDegree=False.

it's worth being careful with makeBondsGeneric... there you could match
single against triple, which is unlikely to be you want.



> Thank you, Greg!
>
> On Thu, Sep 14, 2017 at 5:58 AM, Greg Landrum 
> wrote:
> > This isn't a really straightforward one.
> >
> > One solution (and I think the best one) is to change the aromaticity
> model
> > used to match whatever is generating the hits (in your case it's the
> Symyx
> > cartridge).
> > The RDKit has functionality to do this already when you call the
> > SetAromaticity() function:
> >
> > In [29]: m2 = Chem.MolFromMolFile('./CHEMBL25.mol',sanitize=False)
> >
> > In [30]: Chem.SanitizeMol(m2,Chem.SANITIZE_ALL^Chem.SANITIZE_
> SETAROMATICITY)
> > Out[30]: rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE
> >
> > In [31]: Chem.SetAromaticity(m2,Chem.AROMATICITY_SIMPLE)
> >
> >
> > The problem here is that there isn't an aromaticity model there for
> > MDL/Symyx. This would be a useful thing to have and can be done quickly.
> If
> > someone can describe the aromaticity model to me, or point me to a
> > description of it, I can add it for the next release (which happens
> soon).
> >
> > Another solution that I think would work is to read the query molecule in
> > without doing aromaticity perception (see input line 30 above) and then
> to
> > convert all the bonds to either single-or-aromatic or double-or-aromatic
> > queries using the approaches described here:
> > http://rdkit.blogspot.ch/2015/08/tuning-substructure-queries.html
> > and here:
> > http://rdkit.blogspot.ch/2016/07/tuning-substructure-queries-ii.html
> >
> > Unfortunately the AdjustQueryParameters function doesn't have anything
> that
> > helps with the kind of bond queries you need, so you'd need to make the
> bond
> > changes in your code. If you want to go down this road and it's not clear
> > how to do so, let me know and I can post some sample code. I'm afraid
> it's
> > not completely trivial with bond queries
> >
> > -greg
> >
> >
> >
> > On Wed, Sep 13, 2017 at 4:42 PM, Michał Nowotka 
> wrote:
> >>
> >> Is there any flag in RDkit to match both 'normal' aspirin and embedded
> >> aromatic analogues?
> >> The problem is that I can't modify user queries by hand in real time :)
> >>
> >> On Wed, Sep 13, 2017 at 2:12 PM, Chris Earnshaw 
> >> wrote:
> >> > Hi
> >> >
> >> > The problem is due to RDkit perceiving the embedded pyranone in
> >> > CHEMBL1999443 as an aromatic system, which is probably correct.
> However,
> >> > in
> >> > the structure of aspirin the carboxyl carbon and singly bonded oxygen
> >> > are
> >> > non-aromatic, so if you just use the SMILES of aspirin as a query it
> >> > won't
> >> > match CHEMBL1999443
> >> >
> >> > You'll need to use a slightly more generic aspirin-like query to allow
> >> > the
> >> > possibility of matching both 'normal' aspirin and embedded aromatic
> >> > analogues. CC(=O)Oc1c1[#6](=O)[#8] should work OK.
> >> >
> >> > Regards,
> >> > Chris
> >> >
> >> > On 13 September 2017 at 13:40, Michał Nowotka 
> wrote:
> >> >>
> >> >> Hi,
> >> >>
> >> >> This problem is probably due to my lack of chemistry knowledge but
> >> >> plese have a look:
> >> >>
> >> >> If I do a substructure search in ChEMBL using aspirin (CHEMBL25) as a
> >> >> query (ChEMBL API uses the Symix catridge):
> >> >>
> >> >> from chembl_webresource_client.new_client import new_client
> >> >> res = new_client.substructure.filter(chembl_id='CHEMBL25')
> >> >>
> >> >> One of them will be CHEMBL1999443:
> >> >>
> >> >> 'CHEMBL1999443' in (r['molecule_chembl_id'] for r in res)
> >> >> >>> True
> >> >>
> >> >> Now I take the molfile:
> >> >>
> >> >> new_client.molecule.set_format('mol')
> >> >> mol = new_client.molecule.get('CHEMBL1999443')
> >> >>
> >> >> and load it with aspirin into rdkit:
> >> >>
> >> >> from rdkit import Chem
> >> >> m = Chem.MolFromMolBlock(mol)
> >> >> pattern = Chem.MolFromMolBlock(new_
> client.molecule.get('CHEMBL25'))
> >> >>
> >> >> If I check if it has an aspirin as a substructure using rdkit, I'm
> >> >> getting false...
> >> >>
> >> >> m.HasSubstructMatch(pattern)
> >> >> >>> False
> >> >>
> >> >> Looking at this blog post:
> >> >>
> >> >>
> >> >> https://github.com/rdkit/rdkit-tutorials/blob/master/
> 

Re: [Rdkit-discuss] is there an issue with my code or with GetNeighbors function ?

2017-09-14 Thread Marta Stępniewska-Dziubińska via Rdkit-discuss
Dear Guillaume,

I'm not sure what your code should do and what behavior you expect. I see
that you do not change the value of t when you see a single bond. So maybe
you just do not update this value and print and old one? Also, you iterate
over bonds of atom's last neighbor (so for H you loop over bonds of
aromatic C). Is that intended?

Best
Marta SD

2017-09-14 11:32 GMT+02:00 Guillaume GODIN :

> ​
>
>
> Dear all
>
>
> from rdkit import Chem
> from rdkit.Chem.rdchem import BondType
>
>
> AROMATIC = BondType.AROMATIC
> SINGLE = BondType.SINGLE
> DOUBLE = BondType.DOUBLE
> TRIPLE = BondType.TRIPLE
>
>
> suppl = 
> Chem.SDMolSupplier('/Users/GVALMTGG/Downloads/neemp-sources/examples/set00.sdf',removeHs
>  = False)
> i=0
> for mol in suppl:
> i+=1
> v=-1
> for atom in mol.GetAtoms():
> v+=1
> t=1
> for bond in atom.GetNeighbors()[-1].GetBonds():
> if bond.GetBondType() == AROMATIC:
> t=1.5
> if bond.GetBondType() == DOUBLE:
> t=2
> if bond.GetBondType() == TRIPLE:
> t=3
> if i<2:
> print str(v) + " " + atom.GetSymbol() + " " + str(t)
>
>
> Why the code return H with 1.5 type bond ?
>
>
> I used anaconda environment to run the code:
>
>
> /Users/GVALMTGG/anaconda/envs/my-rdkit-env/bin/python /Users/GVALMTGG/
> PycharmProjects/neemp/neemp.py
> 0 N 1
> 1 O 2
> 2 O 2
> 3 C 1
> 4 C 1
> 5 C 1
> 6 C 1
> 7 C 1
> 8 C 1
> 9 C 1
> 10 C 1
> 11 C 1.5
> 12 C 2
> 13 C 1
> 14 C 1
> 15 C 2
> 16 C 2
> 17 C 1
> 18 H 1.5
> 19 H 1.5
> 20 H 1.5
> 21 H 1.5
> 22 H 1.5
> 23 H 1.5
> 24 H 1.5
> 25 H 1.5
> 26 H 1.5
> 27 H 1
> 28 H 1
>
>
> *Dr. Guillaume GODIN*
> Principal Scientist
> Chemoinformatic & Datamining
> Innovation
> CORPORATE R DIVISION
> DIRECT LINE +41 (0)22 780 3645 <+41%2022%20780%2036%2045>
> MOBILE  +41 (0)79 536 1039 <+41%2079%20536%2010%2039>
> Firmenich SA
> RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8
>
>
> **
> DISCLAIMER
> This email and any files transmitted with it, including replies and
> forwarded copies (which may contain alterations) subsequently transmitted
> from Firmenich, are confidential and solely for the use of the intended
> recipient. The contents do not represent the opinion of Firmenich except to
> the extent that it relates to their official business.
> **
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Non-redundant database of molecules

2017-09-14 Thread Wandré
So,
1) I run all the commands in tutorial of installation of RDKit in Conda (
https://github.com/rdkit/conda-rdkit), but, when I run python and try to
import Chem ("from rdkit import Chem") appears an error message:
Traceback (most recent call last):
  File "", line 1, in 
  File "/opt/rdkit-Release_2016_03_1/rdkit/Chem/__init__.py", line 18, in

from rdkit import rdBase
ImportError: cannot import name rdBase

2) Thanks for all the references

3) Which function generate this "energy minimized molecule"?

--
Wandré Nunes de Pinho Veloso
Professor Assistente - Unifei - Campus Avançado de Itabira-MG
Doutorando em Bioinformática - Universidade Federal de Minas Gerais - UFMG
Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
Inteligência Computacional - UNIFEI
Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG

2017-09-13 17:32 GMT-03:00 Malitha Kabir :

> Hi Wandré,
>
> 1) apt-get installs rdkit 2013 (link below). So, please install it through
> conda (as Markus suggested)
> https://packages.ubuntu.com/trusty/python/python-rdkit
>
> 2) I am not familiar with the case of wrong SMILE generation. But the link
> below says something more that I think you need to know.
> https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3495655/
>
> 3) As you are trying to store data, it would be great to consider whether
> you are storing energy minimized molecule or not. (my opinion). Surface
> area related descriptors will yield different result and bond connectivity
> related descriptor will yield same result in both cases.
>
> 4) Sharing my personal experience, during my undergraduate school part of
> my final year project was stressed up with conceptual questions. I failed
> to utilize the  blessing of advanced development due to the lack of time.
> The later experience was not so good.
>
> Please keep in mind that we can generate a non redundant database with few
> molecules but for millions of molecules it should be quite though task.
> Have a great day!
>
> - malitha
>
>
>
>
> On Thu, Sep 14, 2017 at 2:05 AM, Markus Sitzmann <
> markus.sitzm...@gmail.com> wrote:
>
>> PS. The conda version has InChI support
>>
>> On Wed, Sep 13, 2017 at 10:04 PM, Markus Sitzmann <
>> markus.sitzm...@gmail.com> wrote:
>>
>>> Strong recommendation: use the conda version:
>>>
>>> http://www.rdkit.org/docs/Install.html
>>>
>>> On Wed, Sep 13, 2017 at 9:58 PM, Wandré  wrote:
>>>
 I just run sudo apt-get install python-rdkit librdkit1 rdkit-data 
 I'm trying to solve this with this link: http://www.blopig.com/bl
 og/2013/02/how-to-install-rdkit-on-ubuntu-12-04/

 --
 Wandré Nunes de Pinho Veloso
 Professor Assistente - Unifei - Campus Avançado de Itabira-MG
 Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
 UFMG
 Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
 Inteligência Computacional - UNIFEI
 Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
 Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
 Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG

 2017-09-13 16:55 GMT-03:00 Markus Sitzmann :

> How did you install rdkit so far? And where? Is it the conda/anaconda
> version?
>
> On Wed, Sep 13, 2017 at 9:39 PM, Wandré 
> wrote:
>
>> How to install RDKit with InChI?
>> When I run Chem.inchi.INCHI_AVAILABLE, the result is False
>>
>> --
>> Wandré Nunes de Pinho Veloso
>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>> Doutorando em Bioinformática - Universidade Federal de Minas Gerais -
>> UFMG
>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>> Inteligência Computacional - UNIFEI
>> Membro do Grupo de Pesquisa Assinaturas Biológicas da FIOCRUZ
>> Membro do Grupo de Pesquisa Bioinformática Estrutural da UFMG
>> Laboratório de Bioinformática e Sistemas - LBS, DCC, UFMG
>>
>> 2017-09-13 16:30 GMT-03:00 Wandré :
>>
>>> Thanks Malitha.
>>> I choose this descriptors because I will store this on my database,
>>> so, will be fast compare one molecule before insert them in database.
>>> My worry now is if the RDKit will generate different SMILES or InChI
>>> in same SDF molecule or equals in different molecules (molecules from 
>>> RCSB
>>> PDB, PubChem, ChemBL, for example).
>>>
>>> --
>>> Wandré Nunes de Pinho Veloso
>>> Professor Assistente - Unifei - Campus Avançado de Itabira-MG
>>> Doutorando em Bioinformática - Universidade Federal de Minas
>>> Gerais - UFMG
>>> Pesquisador do INSILICO - Grupo Interdisciplinar em Simulação e
>>> Inteligência Computacional - UNIFEI
>>> 

Re: [Rdkit-discuss] is there an issue with my code or with GetNeighbors function ?

2017-09-14 Thread Guillaume GODIN
Dear Marta,


this function works now:


from rdkit import Chem
from rdkit.Chem.rdchem import BondType


AROMATIC = BondType.AROMATIC
SINGLE = BondType.SINGLE
DOUBLE = BondType.DOUBLE
TRIPLE = BondType.TRIPLE


def atomtype(mol,atom):
t=1
for linkatoms in atom.GetNeighbors():
bond =  mol.GetBondBetweenAtoms(atom.GetIdx(),linkatoms.GetIdx())
if bond.GetBondType() == AROMATIC:
t=2
if bond.GetBondType() == DOUBLE:
t=2
if bond.GetBondType() == TRIPLE:
t=3
return t


suppl = Chem.SDMolSupplier('examples/set00.sdf',removeHs = False)
i=0
for mol in suppl:
i+=1
v=-1
for atom in mol.GetAtoms():
v+=1
t=atomtype(mol,atom)
if i<2:
print str(v) + " " + atom.GetSymbol() + " " + str(t)




but not with the previous call to that part

atom.GetNeighbors()[-1].GetBonds()


My desire output is:

0 N 1

1 O 2

2 O 2

3 C 2

4 C 2

5 C 2

6 C 2

7 C 2

8 C 2

9 C 2

10 C 2

11 C 2

12 C 2

13 C 2

14 C 2

15 C 2

16 C 2

17 C 1

18 H 1

19 H 1

20 H 1

21 H 1

22 H 1

23 H 1

24 H 1

25 H 1

26 H 1

27 H 1

28 H 1?




Dr. Guillaume GODIN
Principal Scientist
Chemoinformatic & Datamining
Innovation
CORPORATE R DIVISION
DIRECT LINE +41 (0)22 780 3645
MOBILE  +41 (0)79 536 1039
Firmenich SA
RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8


De : Marta Stępniewska-Dziubińska 
Envoyé : jeudi 14 septembre 2017 11:56
A : Guillaume GODIN
Cc : rdkit-discuss@lists.sourceforge.net
Objet : Re: [Rdkit-discuss] is there an issue with my code or with GetNeighbors 
function ?

Dear Guillaume,

I'm not sure what your code should do and what behavior you expect. I see that 
you do not change the value of t when you see a single bond. So maybe you just 
do not update this value and print and old one? Also, you iterate over bonds of 
atom's last neighbor (so for H you loop over bonds of aromatic C). Is that 
intended?

Best
Marta SD

2017-09-14 11:32 GMT+02:00 Guillaume GODIN 
>:

?



Dear all



from rdkit import Chem
from rdkit.Chem.rdchem import BondType


AROMATIC = BondType.AROMATIC
SINGLE = BondType.SINGLE
DOUBLE = BondType.DOUBLE
TRIPLE = BondType.TRIPLE


suppl = 
Chem.SDMolSupplier('/Users/GVALMTGG/Downloads/neemp-sources/examples/set00.sdf',removeHs
 = False)
i=0
for mol in suppl:
i+=1
v=-1
for atom in mol.GetAtoms():
v+=1
t=1
for bond in atom.GetNeighbors()[-1].GetBonds():
if bond.GetBondType() == AROMATIC:
t=1.5
if bond.GetBondType() == DOUBLE:
t=2
if bond.GetBondType() == TRIPLE:
t=3
if i<2:
print str(v) + " " + atom.GetSymbol() + " " + str(t)



Why the code return H with 1.5 type bond ?


I used anaconda environment to run the code:


/Users/GVALMTGG/anaconda/envs/my-rdkit-env/bin/python 
/Users/GVALMTGG/PycharmProjects/neemp/neemp.py
0 N 1
1 O 2
2 O 2
3 C 1
4 C 1
5 C 1
6 C 1
7 C 1
8 C 1
9 C 1
10 C 1
11 C 1.5
12 C 2
13 C 1
14 C 1
15 C 2
16 C 2
17 C 1
18 H 1.5
19 H 1.5
20 H 1.5
21 H 1.5
22 H 1.5
23 H 1.5
24 H 1.5
25 H 1.5
26 H 1.5
27 H 1
28 H 1


Dr. Guillaume GODIN
Principal Scientist
Chemoinformatic & Datamining
Innovation
CORPORATE R DIVISION
DIRECT LINE +41 (0)22 780 3645
MOBILE  +41 (0)79 536 1039
Firmenich SA
RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8


**
DISCLAIMER
This email and any files transmitted with it, including replies and forwarded 
copies (which may contain alterations) subsequently transmitted from Firmenich, 
are confidential and solely for the use of the intended recipient. The contents 
do not represent the opinion of Firmenich except to the extent that it relates 
to their official business.
**

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] HasSubstructMatch doesn't work as expected

2017-09-14 Thread Michał Nowotka
Using

params = AdjustQueryParameters()
params.makeAtomsGeneric = True
params.makeBondsGeneric = True
pattern = AdjustQueryProperties(pattern, params)

Seems to solve my problem - I'm getting a match now (but I haven't yet
verified if the match is correct and I don't understand why I had to
set both flags, I'd expect that setting makeBondsGeneric should make
it work already).
Thank you, Greg!

On Thu, Sep 14, 2017 at 5:58 AM, Greg Landrum  wrote:
> This isn't a really straightforward one.
>
> One solution (and I think the best one) is to change the aromaticity model
> used to match whatever is generating the hits (in your case it's the Symyx
> cartridge).
> The RDKit has functionality to do this already when you call the
> SetAromaticity() function:
>
> In [29]: m2 = Chem.MolFromMolFile('./CHEMBL25.mol',sanitize=False)
>
> In [30]: Chem.SanitizeMol(m2,Chem.SANITIZE_ALL^Chem.SANITIZE_SETAROMATICITY)
> Out[30]: rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE
>
> In [31]: Chem.SetAromaticity(m2,Chem.AROMATICITY_SIMPLE)
>
>
> The problem here is that there isn't an aromaticity model there for
> MDL/Symyx. This would be a useful thing to have and can be done quickly. If
> someone can describe the aromaticity model to me, or point me to a
> description of it, I can add it for the next release (which happens soon).
>
> Another solution that I think would work is to read the query molecule in
> without doing aromaticity perception (see input line 30 above) and then to
> convert all the bonds to either single-or-aromatic or double-or-aromatic
> queries using the approaches described here:
> http://rdkit.blogspot.ch/2015/08/tuning-substructure-queries.html
> and here:
> http://rdkit.blogspot.ch/2016/07/tuning-substructure-queries-ii.html
>
> Unfortunately the AdjustQueryParameters function doesn't have anything that
> helps with the kind of bond queries you need, so you'd need to make the bond
> changes in your code. If you want to go down this road and it's not clear
> how to do so, let me know and I can post some sample code. I'm afraid it's
> not completely trivial with bond queries
>
> -greg
>
>
>
> On Wed, Sep 13, 2017 at 4:42 PM, Michał Nowotka  wrote:
>>
>> Is there any flag in RDkit to match both 'normal' aspirin and embedded
>> aromatic analogues?
>> The problem is that I can't modify user queries by hand in real time :)
>>
>> On Wed, Sep 13, 2017 at 2:12 PM, Chris Earnshaw 
>> wrote:
>> > Hi
>> >
>> > The problem is due to RDkit perceiving the embedded pyranone in
>> > CHEMBL1999443 as an aromatic system, which is probably correct. However,
>> > in
>> > the structure of aspirin the carboxyl carbon and singly bonded oxygen
>> > are
>> > non-aromatic, so if you just use the SMILES of aspirin as a query it
>> > won't
>> > match CHEMBL1999443
>> >
>> > You'll need to use a slightly more generic aspirin-like query to allow
>> > the
>> > possibility of matching both 'normal' aspirin and embedded aromatic
>> > analogues. CC(=O)Oc1c1[#6](=O)[#8] should work OK.
>> >
>> > Regards,
>> > Chris
>> >
>> > On 13 September 2017 at 13:40, Michał Nowotka  wrote:
>> >>
>> >> Hi,
>> >>
>> >> This problem is probably due to my lack of chemistry knowledge but
>> >> plese have a look:
>> >>
>> >> If I do a substructure search in ChEMBL using aspirin (CHEMBL25) as a
>> >> query (ChEMBL API uses the Symix catridge):
>> >>
>> >> from chembl_webresource_client.new_client import new_client
>> >> res = new_client.substructure.filter(chembl_id='CHEMBL25')
>> >>
>> >> One of them will be CHEMBL1999443:
>> >>
>> >> 'CHEMBL1999443' in (r['molecule_chembl_id'] for r in res)
>> >> >>> True
>> >>
>> >> Now I take the molfile:
>> >>
>> >> new_client.molecule.set_format('mol')
>> >> mol = new_client.molecule.get('CHEMBL1999443')
>> >>
>> >> and load it with aspirin into rdkit:
>> >>
>> >> from rdkit import Chem
>> >> m = Chem.MolFromMolBlock(mol)
>> >> pattern = Chem.MolFromMolBlock(new_client.molecule.get('CHEMBL25'))
>> >>
>> >> If I check if it has an aspirin as a substructure using rdkit, I'm
>> >> getting false...
>> >>
>> >> m.HasSubstructMatch(pattern)
>> >> >>> False
>> >>
>> >> Looking at this blog post:
>> >>
>> >>
>> >> https://github.com/rdkit/rdkit-tutorials/blob/master/notebooks/002_SMARTS_SubstructureMatching.ipynb
>> >> I tried to initialize rings and retry:
>> >>
>> >>  Chem.GetSymmSSSR(m)
>> >>  m.HasSubstructMatch(pattern)
>> >>  >>>False
>> >>
>> >> Chem.GetSymmSSSR(pattern)
>> >> m.HasSubstructMatch(pattern)
>> >> >>>False
>> >>
>> >> But as you can see without any luck. Is there anything else I can do
>> >> to get the match anyway?
>> >> Without having a match I can't aligh and higlight asprin substructure
>> >> in CHEMBL1999443 image using GenerateDepictionMatching2DStructure and
>> >> DrawMolecule functions.
>> >>
>> >> Kind regards,
>> >>
>> >> 

[Rdkit-discuss] is there an issue with my code or with GetNeighbors function ?

2017-09-14 Thread Guillaume GODIN
Dear all



from rdkit import Chem
from rdkit.Chem.rdchem import BondType


AROMATIC = BondType.AROMATIC
SINGLE = BondType.SINGLE
DOUBLE = BondType.DOUBLE
TRIPLE = BondType.TRIPLE


suppl = 
Chem.SDMolSupplier('/Users/GVALMTGG/Downloads/neemp-sources/examples/set00.sdf',removeHs
 = False)
i=0
for mol in suppl:
i+=1
v=-1
for atom in mol.GetAtoms():
v+=1
t=1
for bond in atom.GetNeighbors()[-1].GetBonds():
if bond.GetBondType() == AROMATIC:
t=1.5
if bond.GetBondType() == DOUBLE:
t=2
if bond.GetBondType() == TRIPLE:
t=3
if i<2:
print str(v) + " " + atom.GetSymbol() + " " + str(t)



Why the code return H with 1.5 type bond ?


I used anaconda environment to run the code:


/Users/GVALMTGG/anaconda/envs/my-rdkit-env/bin/python 
/Users/GVALMTGG/PycharmProjects/neemp/neemp.py
0 N 1
1 O 2
2 O 2
3 C 1
4 C 1
5 C 1
6 C 1
7 C 1
8 C 1
9 C 1
10 C 1
11 C 1.5
12 C 2
13 C 1
14 C 1
15 C 2
16 C 2
17 C 1
18 H 1.5
19 H 1.5
20 H 1.5
21 H 1.5
22 H 1.5
23 H 1.5
24 H 1.5
25 H 1.5
26 H 1.5
27 H 1
28 H 1


Dr. Guillaume GODIN
Principal Scientist
Chemoinformatic & Datamining
Innovation
CORPORATE R DIVISION
DIRECT LINE +41 (0)22 780 3645
MOBILE  +41 (0)79 536 1039
Firmenich SA
RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8
**  
DISCLAIMER  
This email and any files transmitted with it, including replies and forwarded 
copies (which may contain alterations) subsequently transmitted from Firmenich, 
are confidential and solely for the use of the intended recipient. The contents 
do not represent the opinion of Firmenich except to the extent that it relates 
to their official business.  
**

set00.sdf
Description: set00.sdf
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] is there an issue with my code or with GetNeighbors function ?

2017-09-14 Thread Guillaume GODIN
?



Dear all



from rdkit import Chem
from rdkit.Chem.rdchem import BondType


AROMATIC = BondType.AROMATIC
SINGLE = BondType.SINGLE
DOUBLE = BondType.DOUBLE
TRIPLE = BondType.TRIPLE


suppl = 
Chem.SDMolSupplier('/Users/GVALMTGG/Downloads/neemp-sources/examples/set00.sdf',removeHs
 = False)
i=0
for mol in suppl:
i+=1
v=-1
for atom in mol.GetAtoms():
v+=1
t=1
for bond in atom.GetNeighbors()[-1].GetBonds():
if bond.GetBondType() == AROMATIC:
t=1.5
if bond.GetBondType() == DOUBLE:
t=2
if bond.GetBondType() == TRIPLE:
t=3
if i<2:
print str(v) + " " + atom.GetSymbol() + " " + str(t)



Why the code return H with 1.5 type bond ?


I used anaconda environment to run the code:


/Users/GVALMTGG/anaconda/envs/my-rdkit-env/bin/python 
/Users/GVALMTGG/PycharmProjects/neemp/neemp.py
0 N 1
1 O 2
2 O 2
3 C 1
4 C 1
5 C 1
6 C 1
7 C 1
8 C 1
9 C 1
10 C 1
11 C 1.5
12 C 2
13 C 1
14 C 1
15 C 2
16 C 2
17 C 1
18 H 1.5
19 H 1.5
20 H 1.5
21 H 1.5
22 H 1.5
23 H 1.5
24 H 1.5
25 H 1.5
26 H 1.5
27 H 1
28 H 1


Dr. Guillaume GODIN
Principal Scientist
Chemoinformatic & Datamining
Innovation
CORPORATE R DIVISION
DIRECT LINE +41 (0)22 780 3645
MOBILE  +41 (0)79 536 1039
Firmenich SA
RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8
**  
DISCLAIMER  
This email and any files transmitted with it, including replies and forwarded 
copies (which may contain alterations) subsequently transmitted from Firmenich, 
are confidential and solely for the use of the intended recipient. The contents 
do not represent the opinion of Firmenich except to the extent that it relates 
to their official business.  
**

set00.sdf
Description: set00.sdf
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] is there an issue with my code or with GetNeighbors function ?

2017-09-14 Thread Guillaume GODIN



Dear all



from rdkit import Chem
from rdkit.Chem.rdchem import BondType


AROMATIC = BondType.AROMATIC
SINGLE = BondType.SINGLE
DOUBLE = BondType.DOUBLE
TRIPLE = BondType.TRIPLE


suppl = 
Chem.SDMolSupplier('/Users/GVALMTGG/Downloads/neemp-sources/examples/set00.sdf',removeHs
 = False)
i=0
for mol in suppl:
i+=1
v=-1
for atom in mol.GetAtoms():
v+=1
t=1
for bond in atom.GetNeighbors()[-1].GetBonds():
if bond.GetBondType() == AROMATIC:
t=1.5
if bond.GetBondType() == DOUBLE:
t=2
if bond.GetBondType() == TRIPLE:
t=3
if i<2:
print str(v) + " " + atom.GetSymbol() + " " + str(t)



Why the code return H with 1.5 type bond ?


I used anaconda environment to run the code:


/Users/GVALMTGG/anaconda/envs/my-rdkit-env/bin/python 
/Users/GVALMTGG/PycharmProjects/neemp/neemp.py
0 N 1
1 O 2
2 O 2
3 C 1
4 C 1
5 C 1
6 C 1
7 C 1
8 C 1
9 C 1
10 C 1
11 C 1.5
12 C 2
13 C 1
14 C 1
15 C 2
16 C 2
17 C 1
18 H 1.5
19 H 1.5
20 H 1.5
21 H 1.5
22 H 1.5
23 H 1.5
24 H 1.5
25 H 1.5
26 H 1.5
27 H 1
28 H 1


Dr. Guillaume GODIN
Principal Scientist
Chemoinformatic & Datamining
Innovation
CORPORATE R DIVISION
DIRECT LINE +41 (0)22 780 3645
MOBILE  +41 (0)79 536 1039
Firmenich SA
RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8
**  
DISCLAIMER  
This email and any files transmitted with it, including replies and forwarded 
copies (which may contain alterations) subsequently transmitted from Firmenich, 
are confidential and solely for the use of the intended recipient. The contents 
do not represent the opinion of Firmenich except to the extent that it relates 
to their official business.  
**

set00.sdf
Description: set00.sdf
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Fixed scale drawing

2017-09-14 Thread Maciek Wójcikowski
Hi RDKitters!

Quick question: is there a way to force drawing to output molecules on a
grid image or separate in fixed scale (i.e. constant/matching bond length)?


Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss