Re: [Rdkit-discuss] looking for feedback on new python API documentation format

2017-03-28 Thread Peter S. Shenkin
Hi, Greg,

Here are my comments.


   - Formatting
  - pdoc at a glance is certainly more handsome than epydoc
  - To my eye, there is a huge amount of wasted space in the pdoc
  documentation.
 - The line spacing is hugely disproportional to the font size
 - Maybe this could be adjusted by font and line-spacing options
 - But it's a problem because so little is shown on a page.
  - Documentation hierarchy
  - The ePydoc documentation requires you to drill down an extra level:
 - epydoc: http://rdkit.org/docs/api/rdkit.Chem.AllChem-module.html
- At the top of this link, you see all the function names
together, but you have to drill down to see the details of
any particular
function
 - pdoc: http://rdkit.org/docs_temp/Chem/AllChem.m.html
- You see each function with its full description at the module
level.
 - I personally prefer epydoc here, because I usually want to see a
 list of (functions, classes, whatever) at the top level to
figure out what
 I want to drill down to.
 - I'm just a "forest" kind of guy, and would like to pick my tree
 before I see all its gory details.
 - I accept that this might just be personal taste.
  - Code Examples
  - ePydoc shows the code examples correctly; pdoc does not.
 - epydoc: Drilling down,
 
http://rdkit.org/docs/api/rdkit.Chem.AllChem-module.html#AssignBondOrdersFromTemplate,
 consider these lines from the example code:
 - >>>  from rdkit.Chem import AllChem
 >>> template =
 AllChem.MolFromSmiles("CN1C(=NC(C1=O)(c2c2)c3c3)N")
 >>> mol = AllChem.MolFromPDBFile(os.path.join(RDConfig.RDCodeDir,
 'Chem', 'test_data', '4DJU_lig.pdb'))
 >>> len([1 for b in template.GetBonds() if b.GetBondTypeAsDouble()
 == 1.0])
 8
 >>> len([1 for b in mol.GetBonds() if b.GetBondTypeAsDouble() ==
 1.0])
 22
 - This is very legible.
  - pdoc: On the same link we were at before,
  http://rdkit.org/docs_temp/Chem/AllChem.m.html, look at the same code
  example:
 - import os from rdkit.Chem import AllChem template =
 AllChem.MolFromSmiles("CN1C(=NC(C1=O)(c2c2)c3c3)N") mol =
 AllChem.MolFromPDBFile(os.path.join(RDConfig.RDCodeDir, 'Chem',
 'test_data', '4DJU_lig.pdb')) len([1 for b in template.GetBonds() if
 b.GetBondTypeAsDouble() == 1.0]) 8 len([1 for b in mol.GetBonds() if
 b.GetBondTypeAsDouble() == 1.0]) 22
 - Line breaks are not observed; prompts are not observed;
 responses don't appear on their new lines, etc. This is illegible.
 - (There is an additional import statement here. That's not a
 problem, but note that the second import is concatenated on
the same line.)
 - This is unacceptable, but perhaps it can be fixed.
  - Summary
  - The fact that epydoc is no longer supported weighs heavily against
  it
  - If the current examples are as good as pdoc can do, it is
  unsatisfactory, especially because of poor code printing; but there could
  be other tigers lurking in the woods.
  - I feel the wasted space in pdoc due to the huge line spacing is
  pretty bad.
  - pdoc would be worth another look if these issues can be fixed, but
  the a second look would be required, because there could be
other problems
  that are obscured by the above.
  - I like Sphynx, and it would be great if it could be made to work
  with RDKit. (With Google style docstrings!)
  - Either way, I wish the RDKit documentation included the types of
  function arguments and return values, which both Sphynx and epydoc have
  provision for.
 - I assume pdoc has provision for this, too, but if not, that's a
 big negative.
 - Adding documentation of arguments and return values would be a
 big job at this point and isn't part of the current effort;
but I feel it's
 important to pick a documentation tool that would allow this
to be done
 later.


On Wed, Mar 29, 2017 at 12:10 AM, Greg Landrum 
wrote:

> Dear all,
>
> TL;DR
> I'd like to switch to a new system for generating the RDKit Python API
> documentation and I'd like some feedback.
>
> Please take a look at this possible API documentation format:
> http://rdkit.org/docs_temp/
> and let me know if it looks like it looks as useful as the old API doc
> format:
> http://rdkit.org/docs/api/index.html
>
>
> More context:
> The current documentation (http://rdkit.org/docs/api/index.html) is
> generated using epydoc. It's functional, though quite "old school" looking.
> The problem is that epydoc is no longer supported (and hasn't been for
> quite a while) and does not support python3 at all. so I would like to move
> off of it.
>
> In 

Re: [Rdkit-discuss] Cannot import rdBase after installed rdkit by source in a non-administrator linux cluster

2017-03-28 Thread Hongbin Yang






Hi, Andrew,
    I did set the LD_LIBRARY_PATH and added the $conda/lib in it.        Today, 
I tried installing a new boost (1.60.0) myself with the following 
commands:```./bootstrap.sh
./b2 install
```        Interestingly, I colud not `make` successfully this time, with the 
several errors such as :```/home/hbyang/.local/lib/libboost_thread.so: 
undefined reference to `std::__cxx11::basic_string::_M_create(unsigned long&, 
unsigned long)@GLIBCXX_3.4.21'

/home/hbyang/.local/lib/libboost_thread.so: undefined reference to 
`std::__cxx11::basic_string::_M_append(char const*, unsigned long)@GLIBCXX_3.4.21' 
```    Then I tried install by conda with     `conda create -c rdkit -n 
hbyang-rdkit-env rdkit`    The same error occured just like what I installed 
from 
source:/home/hbyang/.conda/envs/hbyang-rdkit-env/lib/python2.7/site-packages/rdkit/../../../libboost_serialization.so.1.56.0:
 undefined symbol: 
_ZN5boost13serialization6detail17singleton_wrapperINS_7archive6detail12extra_detail3mapINS3_15binary_oarchive14m_is_destroyedE

    By the way, I found a similar problem reported at the end of the issue 
[#762](https://github.com/rdkit/rdkit/issues/762 ) 
user-agent conda/4.3.4 requests/2.12.4 CPython/2.7.12 Linux/2.6.18-308.el5 
CentOS/5.8 glibc/2.5

Hongbin Yang 杨弘宾

Research: Toxicophore and Chemoinformatics
Pharmaceutical Science, School of Pharmacy

East China University of Science and Technology 

 From: Andrew DalkeDate: 2017-03-29 03:35To: CC: rdkit-discussSubject: Re: 
[Rdkit-discuss] Cannot import rdBase after installed rdkit by source in a 
non-administrator linux clusterOn Mar 28, 2017, at 17:56, 杨弘宾 
 wrote:
> Have you tried install rdkit from source? It's ok when I installed rdkit 
>by conda in my PC. But when I tried installing it in a server in which I am 
>only a user who cannot use "sudo" and the "python" is in a read-only directory.
 
Yes I have, and I find it rather difficult. (My system has Python 2.7 and 
Python 3.5, for several versions of RDKit, so I can do regression testing 
across multiple environments.)
 
I use Python virtual environments which helps, in that I effectively can 
control a Python installation, but also adds its own layer of complexity.
 
 
> But when I used:
> `from rdkit import rdBase`
> error happened:
> ImportError: 
> /home/yccai/Programs/Anaconda/bin/../lib/libboost_serialization.so.1.56.0: 
> undefined symbol: 
> _ZN5boost13serialization6detail17singleton_wrapperINS_7archive6detail12extra_detail3mapINS3_15binary_oarchive14m_is_destroyedE
 
I think you are missing an LD_LIBRARY_PATH entry to point to your Boost 
libraries.
 
 
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

--
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] looking for feedback on new python API documentation format

2017-03-28 Thread Greg Landrum
Dear all,

TL;DR
I'd like to switch to a new system for generating the RDKit Python API
documentation and I'd like some feedback.

Please take a look at this possible API documentation format:
http://rdkit.org/docs_temp/
and let me know if it looks like it looks as useful as the old API doc
format:
http://rdkit.org/docs/api/index.html


More context:
The current documentation (http://rdkit.org/docs/api/index.html) is
generated using epydoc. It's functional, though quite "old school" looking.
The problem is that epydoc is no longer supported (and hasn't been for
quite a while) and does not support python3 at all. so I would like to move
off of it.

In theory the API docs can be generated with Sphinx, which is what I use
for the rest of the documentation, but I haven't been able to get it
working correctly with the rdkit.[1]

I've done a bit of looking around and it seems like the closest thing to a
replacement for epydoc is pdoc (https://github.com/BurntSushi/pdoc). This
was easy enough to figure out (despite the page hosting its own docs being
down) and generates documentation for the RDKit API without too much
trouble. The results (http://rdkit.org/docs_temp/) are certainly more
modern looking that what epydoc generates and seem to be equally useful.

If anyone has suggestions for other things that I should look at, I would
be happy to hear them. Constraints there:
- The system must support extension modules
- It needs to discovery the things to be documented automatically (i.e. I
should only have to tell it to document the rdkit module and it figures out
the rest).
- Anything that requires changing the actual documentation itself is not a
viable option.
- It has to generate HTML


Thanks,
-greg
[1] The specific problem there is that it seems that sphinx-apidoc does not
pick up extension modules, which renders the RDKit API docs rather sparse
and useless. I'd love to find out that this was user error though.
--
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] Cannot import rdBase after installed rdkit by source in a non-administrator linux cluster

2017-03-28 Thread jon

I tried installing rdkit using conda install -c rdkit rdkit into the latest Anaconda2 in a RHEL5 linux cluster I have limited control over. I see exactly the same error when I try 'from rdkit import Chem.' I am running the same release of Anaconda2 on my PC and all is fine. If it is an LD_LIBRARY_PATH problem, I would be overjoyed to have rdkit working.I see libboost_serialization.so.1.56.0 in Anaconda's lib directory. I set LD_LIBRARY_PATH to the Anaconda lib directory it did not help.I had the impression my problem was my linux is just too old. But the suggestion was to build rdkit from scratch, and that does not seem to be helping in your case.I am also using Python 2.7 (2.7.13).If you get a solution, I would love to know what worked.Jon T. Swanson, Ph.D.ChemModeling, LLCSuite 101, 500 Huber Park Ct.Weldon Spring, MO 63304(636) 329-0300


 Original Message 
Subject: [Rdkit-discuss] Cannot import rdBase after installed rdkit by
source in a non-administrator linux cluster
From: 杨弘宾 
Date: Tue, March 28, 2017 10:56 am
To: rdkit-discuss 

 Hi, rdkiters,    Have you tried install rdkit from source? It's ok when I installed rdkit by conda in my PC. But when I tried installing it in a server in which I am only a user who cannot use "sudo" and the "python" is in a read-only directory.Here is my cmake command:`~applic/cmake/bin/cmake -D PYTHON_LIBRARY=/home/yccai/Programs/Anaconda/lib/python2.7/config/libpython2.7.a -D PYTHON_INCLUDE_DIR=/home/yccai/Programs/Anaconda/include/python2.7 -D PYTHON_EXECUTABLE=/home/yccai/Programs/Anaconda/bin/python -D BOOST_ROOT=/home/yccai/Programs/Anaconda -D Boost_NO_SYSTEM_PATHS=ON ..`And output:-- The C compiler identification is GNU 4.1.2 -- The CXX compiler identification is GNU 4.1.2 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check if the system is big endian -- Searching 16 bit integer -- Looking for sys/types.h -- Looking for sys/types.h - found -- Looking for stdint.h -- Looking for stdint.h - found -- Looking for stddef.h -- Looking for stddef.h - found -- Check size of unsigned short -- Check size of unsigned short - done -- Using unsigned short -- Check if the system is big endian - little endian -- Found PythonInterp: /home/yccai/Programs/Anaconda/bin/python (found version "2.7.12") -- Found PythonLibs: /home/yccai/Programs/Anaconda/lib/python2.7/config/libpython2.7.a (found version "2.7.12") -- Boost version: 1.56.0 -- Found the following Boost libraries: -- python -- Could NOT find Eigen3 (missing: EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) (Required is at least version "2.91.0") Eigen3 not found, disabling the Descriptors3D build. -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Boost version: 1.56.0 -- Found the following Boost libraries: -- thread -- system -- Boost version: 1.56.0 -- Found the following Boost libraries: -- serialization == Using strict rotor definition == Updating Filters.cpp from pains file == Done updating pains files -- Boost version: 1.56.0 -- Found the following Boost libraries: -- regex -- Configuring done -- Generating done -- Build files have been written to: /home/hbyang/applic/rdkit-Release_2016_09_4/build There was no error in `make` and `make install`.But when I used:`from rdkit import rdBase`error happened:ImportError: /home/yccai/Programs/Anaconda/bin/../lib/libboost_serialization.so.1.56.0: undefined symbol: _ZN5boost13serialization6detail17singleton_wrapperINS_7archive6detail12extra_detail3mapINS3_15binary_oarchive14m_is_destroyedEI tried the older version of rdkit and got similar error (libboost_python.so.1.56.0).I don't think the problem is in the boost in conda but..   So what can I do to install it (or find where is the problem)?I want to use rdkit to draw molecules in my tool. Is there any alternative way to do so?  Hongbin Yang  --
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 

Re: [Rdkit-discuss] Cannot import rdBase after installed rdkit by source in a non-administrator linux cluster

2017-03-28 Thread Andrew Dalke
On Mar 28, 2017, at 17:56, 杨弘宾  wrote:
> Have you tried install rdkit from source? It's ok when I installed rdkit 
> by conda in my PC. But when I tried installing it in a server in which I am 
> only a user who cannot use "sudo" and the "python" is in a read-only 
> directory.

Yes I have, and I find it rather difficult. (My system has Python 2.7 and 
Python 3.5, for several versions of RDKit, so I can do regression testing 
across multiple environments.)

I use Python virtual environments which helps, in that I effectively can 
control a Python installation, but also adds its own layer of complexity.


> But when I used:
> `from rdkit import rdBase`
> error happened:
> ImportError: 
> /home/yccai/Programs/Anaconda/bin/../lib/libboost_serialization.so.1.56.0: 
> undefined symbol: 
> _ZN5boost13serialization6detail17singleton_wrapperINS_7archive6detail12extra_detail3mapINS3_15binary_oarchive14m_is_destroyedE

I think you are missing an LD_LIBRARY_PATH entry to point to your Boost 
libraries.


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


[Rdkit-discuss] Cannot import rdBase after installed rdkit by source in a non-administrator linux cluster

2017-03-28 Thread 杨弘宾






Hi, rdkiters,
? ? Have you tried install rdkit from source? It's ok when I installed rdkit by 
conda in my PC. But when I tried installing it in a server in which I am only a 
user who cannot use "sudo" and the "python" is in a read-only directory.
Here is my cmake command:`~applic/cmake/bin/cmake -D 
PYTHON_LIBRARY=/home/yccai/Programs/Anaconda/lib/python2.7/config/libpython2.7.a
 -D PYTHON_INCLUDE_DIR=/home/yccai/Programs/Anaconda/include/python2.7 -D 
PYTHON_EXECUTABLE=/home/yccai/Programs/Anaconda/bin/python -D 
BOOST_ROOT=/home/yccai/Programs/Anaconda -D Boost_NO_SYSTEM_PATHS=ON ..`
And output:
-- The C compiler identification is GNU 4.1.2

-- The CXX compiler identification is GNU 4.1.2

-- Check for working C compiler: /usr/bin/cc

-- Check for working C compiler: /usr/bin/cc -- works

-- Detecting C compiler ABI info

-- Detecting C compiler ABI info - done

-- Check for working CXX compiler: /usr/bin/c++

-- Check for working CXX compiler: /usr/bin/c++ -- works

-- Detecting CXX compiler ABI info

-- Detecting CXX compiler ABI info - done

-- Check if the system is big endian

-- Searching 16 bit integer

-- Looking for sys/types.h

-- Looking for sys/types.h - found

-- Looking for stdint.h

-- Looking for stdint.h - found

-- Looking for stddef.h

-- Looking for stddef.h - found

-- Check size of unsigned short

-- Check size of unsigned short - done

-- Using unsigned short

-- Check if the system is big endian - little endian

-- Found PythonInterp: /home/yccai/Programs/Anaconda/bin/python (found version 
"2.7.12") 

-- Found PythonLibs: 
/home/yccai/Programs/Anaconda/lib/python2.7/config/libpython2.7.a (found 
version "2.7.12") 

-- Boost version: 1.56.0

-- Found the following Boost libraries:

--   python

-- Could NOT find Eigen3 (missing:  EIGEN3_INCLUDE_DIR EIGEN3_VERSION_OK) 
(Required is at least version "2.91.0")

Eigen3 not found, disabling the Descriptors3D build.

-- Looking for include file pthread.h

-- Looking for include file pthread.h - found

-- Looking for pthread_create

-- Looking for pthread_create - not found

-- Looking for pthread_create in pthreads

-- Looking for pthread_create in pthreads - not found

-- Looking for pthread_create in pthread

-- Looking for pthread_create in pthread - found

-- Found Threads: TRUE  

-- Boost version: 1.56.0

-- Found the following Boost libraries:

--   thread

--   system

-- Boost version: 1.56.0

-- Found the following Boost libraries:

--   serialization

== Using strict rotor definition

== Updating Filters.cpp from pains file

== Done updating pains files

-- Boost version: 1.56.0

-- Found the following Boost libraries:

--   regex

-- Configuring done

-- Generating done

-- Build files have been written to: 
/home/hbyang/applic/rdkit-Release_2016_09_4/build?

There was no error in `make` and `make install`.
But when I used:`from rdkit import rdBase`error happened:ImportError: 
/home/yccai/Programs/Anaconda/bin/../lib/libboost_serialization.so.1.56.0: 
undefined 
symbol:?_ZN5boost13serialization6detail17singleton_wrapperINS_7archive6detail12extra_detail3mapINS3_15binary_oarchive14m_is_destroyedE
I tried the older version of rdkit and got similar error 
(libboost_python.so.1.56.0).
I don't think the problem is in the boost in conda but.. ? So what can I do to 
install it (or find where is the problem)?
I want to use rdkit to draw molecules in my tool. Is there any alternative way 
to do so?


Hongbin Yang?


--
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] interactive py3Dmol in jupyter notebook - not all py3Dmol.view() are visible

2017-03-28 Thread gosia olejniczak
thank you!
best regards,
gosia

2017-03-28 16:12 GMT+02:00 Greg Landrum :

> Ah got it. I think this is a 3dmol.js/py3dmol question, not an RDKit
> question.
> I'd suggest asking on the 3dmol.js issue tracker: https://github.com/
> 3dmol/3Dmol.js/issues
>
> On Tue, Mar 28, 2017 at 4:06 PM, gosia olejniczak <
> gosia.olejnic...@gmail.com> wrote:
>
>> dear Greg,
>>
>> thank you for your prompt response,
>> yes, that notebook works just fine,
>> however if i try to call py3Dmol.view() many more times, only few windows
>> appear (and they disappear as i scroll down to run cells below), example:
>>
>> http://nbviewer.jupyter.org/github/gosiao/test_notebooks/blo
>> b/master/notes_m1.ipynb
>>
>> best regards,
>> gosia
>>
>>
>> 2017-03-28 16:02 GMT+02:00 Greg Landrum :
>>
>>> I may not have understood the question correctly: when I open that page
>>> all frames are active.
>>>
>>> On Tue, Mar 28, 2017 at 3:56 PM, gosia olejniczak <
>>> gosia.olejnic...@gmail.com> wrote:
>>>
 hello,

 i'm using rdkit with py3Dmol in jupyter notebook, as in this example:
 http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/bl
 ob/master/notebooks/Trying%20py3Dmol.ipynb

 is there a limit of how many py3Dmol.view() frames can be in one
 notebook?
 i'm asking because it seems that jupyter notebook can handle only a
 limited number of these: with running all cells, even one-by-one, only the
 last few frames are visible and the view of the first ones disappear,
 restarting does not help.

 can that be changed somewhere?
 thank you and best regards,
 gosia

 
 --
 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] interactive py3Dmol in jupyter notebook - not all py3Dmol.view() are visible

2017-03-28 Thread Greg Landrum
Ah got it. I think this is a 3dmol.js/py3dmol question, not an RDKit
question.
I'd suggest asking on the 3dmol.js issue tracker:
https://github.com/3dmol/3Dmol.js/issues

On Tue, Mar 28, 2017 at 4:06 PM, gosia olejniczak <
gosia.olejnic...@gmail.com> wrote:

> dear Greg,
>
> thank you for your prompt response,
> yes, that notebook works just fine,
> however if i try to call py3Dmol.view() many more times, only few windows
> appear (and they disappear as i scroll down to run cells below), example:
>
> http://nbviewer.jupyter.org/github/gosiao/test_notebooks/
> blob/master/notes_m1.ipynb
>
> best regards,
> gosia
>
>
> 2017-03-28 16:02 GMT+02:00 Greg Landrum :
>
>> I may not have understood the question correctly: when I open that page
>> all frames are active.
>>
>> On Tue, Mar 28, 2017 at 3:56 PM, gosia olejniczak <
>> gosia.olejnic...@gmail.com> wrote:
>>
>>> hello,
>>>
>>> i'm using rdkit with py3Dmol in jupyter notebook, as in this example:
>>> http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/bl
>>> ob/master/notebooks/Trying%20py3Dmol.ipynb
>>>
>>> is there a limit of how many py3Dmol.view() frames can be in one
>>> notebook?
>>> i'm asking because it seems that jupyter notebook can handle only a
>>> limited number of these: with running all cells, even one-by-one, only the
>>> last few frames are visible and the view of the first ones disappear,
>>> restarting does not help.
>>>
>>> can that be changed somewhere?
>>> thank you and best regards,
>>> gosia
>>>
>>> 
>>> --
>>> 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] interactive py3Dmol in jupyter notebook - not all py3Dmol.view() are visible

2017-03-28 Thread gosia olejniczak
dear Greg,

thank you for your prompt response,
yes, that notebook works just fine,
however if i try to call py3Dmol.view() many more times, only few windows
appear (and they disappear as i scroll down to run cells below), example:

http://nbviewer.jupyter.org/github/gosiao/test_notebooks/blob/master/notes_m1.ipynb

best regards,
gosia


2017-03-28 16:02 GMT+02:00 Greg Landrum :

> I may not have understood the question correctly: when I open that page
> all frames are active.
>
> On Tue, Mar 28, 2017 at 3:56 PM, gosia olejniczak <
> gosia.olejnic...@gmail.com> wrote:
>
>> hello,
>>
>> i'm using rdkit with py3Dmol in jupyter notebook, as in this example:
>> http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/bl
>> ob/master/notebooks/Trying%20py3Dmol.ipynb
>>
>> is there a limit of how many py3Dmol.view() frames can be in one notebook?
>> i'm asking because it seems that jupyter notebook can handle only a
>> limited number of these: with running all cells, even one-by-one, only the
>> last few frames are visible and the view of the first ones disappear,
>> restarting does not help.
>>
>> can that be changed somewhere?
>> thank you and best regards,
>> gosia
>>
>> 
>> --
>> 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] interactive py3Dmol in jupyter notebook - not all py3Dmol.view() are visible

2017-03-28 Thread Greg Landrum
I may not have understood the question correctly: when I open that page all
frames are active.

On Tue, Mar 28, 2017 at 3:56 PM, gosia olejniczak <
gosia.olejnic...@gmail.com> wrote:

> hello,
>
> i'm using rdkit with py3Dmol in jupyter notebook, as in this example:
> http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/bl
> ob/master/notebooks/Trying%20py3Dmol.ipynb
>
> is there a limit of how many py3Dmol.view() frames can be in one notebook?
> i'm asking because it seems that jupyter notebook can handle only a
> limited number of these: with running all cells, even one-by-one, only the
> last few frames are visible and the view of the first ones disappear,
> restarting does not help.
>
> can that be changed somewhere?
> thank you and best regards,
> gosia
>
> 
> --
> 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] interactive py3Dmol in jupyter notebook - not all py3Dmol.view() are visible

2017-03-28 Thread gosia olejniczak
hello,

i'm using rdkit with py3Dmol in jupyter notebook, as in this example:
http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/bl
ob/master/notebooks/Trying%20py3Dmol.ipynb

is there a limit of how many py3Dmol.view() frames can be in one notebook?
i'm asking because it seems that jupyter notebook can handle only a limited
number of these: with running all cells, even one-by-one, only the last few
frames are visible and the view of the first ones disappear, restarting
does not help.

can that be changed somewhere?
thank you and best regards,
gosia
--
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] problems with alignment (py3Dmol + rdkit, jupyter notebook)

2017-03-28 Thread gosia olejniczak
dear all

i am trying to align molecules read from a *sdf file (list of conformers)
against another molecule (reference - a crystal structure), also read from
a *sdf file and make a nice 3d picture in jupyter notebook as shown in:
http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/
blob/master/notebooks/Trying%20py3Dmol.ipynb

i can reproduce all that happens in that notebook, but if i try to read
molecules from *sdf files, "AllChem.AlignMolConformers" fails

a simple example is here:
http://nbviewer.jupyter.org/github/gosiao/test_notebooks/blob/master/wrong_alignment.ipynb


the same thing happens if i generate a list of conformers with rdkit "on
the fly" (example in that notebook also),

in addition i found few difficulties:
- how to write "ConfToMolBlock" - like method - right now i'm writing all
conformers to sdf file and reading them in again as mol
- now i'm using a very small molecule fragment ("core") which i want to be
most-aligned among all molecules - from an example notebook (
http://nbviewer.jupyter.org/github/greglandrum/rdkit_blog/
blob/master/notebooks/Trying%20py3Dmol.ipynb) this works very well, but not
for my molecule. why is that and how can i fix that?

thank you for any tips!
best regards,
gosia
--
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] CanonicalRankAtoms

2017-03-28 Thread Pavel Polishchuk
Hi,

   I experimented a little bit with CanonicalRankAtoms and observed some 
unexpected results.

   I have two mols (actually sets of fragments):
C[*].n[*].C[*].N[*]
CC[*].CC[*].cn([*])c.CN([*])C

   In the first case, pairs of carbons and nitrogens are recognized as 
symmetrical
   [0, 2, 0, 2]
   However, nitrogens are aliphatic and aromatic and I expected they 
will be different.

   In the second case, nitrogen already different, while carbons are 
still identical. That is expected.
[0, 0, 3, 2]

   Is it a bug or a feature?
   Is there a way to solve this issue by RDKit machinery and how?


   Below is a reproducible example:

b1 = 
b'\xef\xbe\xad\xde\x00\x00\x00\x00\x07\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x08\x00\x00\x00\x04\x00\x00\x00\x80\x01\x06\x00`\x00\x00\x00\x01\x03\x00$(\x00\x00\x00\x00\x01,\x01\x00\x00\x00*\x07@h\x00\x00\x00\x03\x01\x02\x00$(\x00\x00\x00\x00\x01,\x01\x00\x00\x00*\x06\x00`\x00\x00\x00\x01\x03\x00$(\x00\x00\x00\x00\x01,\x01\x00\x00\x00*\x07\x00`\x00\x00\x00\x01\x02\x00$(\x00\x00\x00\x00\x01,\x01\x00\x00\x00*\x0b\x00\x01\x00\x02\x03\x00\x04\x05\x00\x06\x07\x00\x14\x00\x17\x00\x00\x00\x00\x16'
q1 = Chem.Mol(b1)

b2 = 
b'\xef\xbe\xad\xde\x00\x00\x00\x00\x07\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x0e\x00\x00\x00\n\x00\x00\x00\x80\x01\x06\x00`\x00\x00\x00\x01\x03\x06\x00`\x00\x00\x00\x02\x02\x00$(\x00\x00\x00\x00\x01,\x01\x00\x00\x00*\x06\x00`\x00\x00\x00\x01\x03\x06\x00`\x00\x00\x00\x02\x02\x00$(\x00\x00\x00\x00\x01,\x01\x00\x00\x00*\x06@h\x00\x00\x00\x03\x02\x02\x07@(\x00\x00\x00\x03\x03\x00$(\x00\x00\x00\x00\x01,\x01\x00\x00\x00*\x06\x00`\x00\x00\x00\x01\x03\x07\x00
 
\x00\x00\x00\x03\x00$(\x00\x00\x00\x00\x01,\x01\x00\x00\x00*\x06@h\x00\x00\x00\x03\x02\x02\x06\x00`\x00\x00\x00\x01\x03\x0b\x00\x01\x00\x01\x02\x00\x03\x04\x00\x04\x05\x00\x06\x07h\x0c\x07\x08\x00\t\n\x00\n\x0b\x00\x07\x0ch\x0c\n\r\x00\x14\x00\x17\x00\x00\x00\x00\x16'
q2 = Chem.Mol(b2)

r1 = [r for a, r in zip(q1.GetAtoms(), Chem.CanonicalRankAtoms(q1, 
False, False, False)) if a.GetSymbol() == "*"]
r2 = [r for a, r in zip(q2.GetAtoms(), Chem.CanonicalRankAtoms(q2, 
False, False, False)) if a.GetSymbol() == "*"]

print(Chem.MolToSmiles(q1, canonical=False))  # to preserve the order of 
atoms and ranks
print(r1)
print(Chem.MolToSmiles(q2, canonical=False))
print(r2)

the output:

C[*].n[*].C[*].N[*]
[0, 2, 0, 2]

CC[*].CC[*].cn([*])c.CN([*])C
[0, 0, 3, 2]


Kind regards,
Pavel.


--
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] scaffold distance algorithm

2017-03-28 Thread Axel Pahl
Well, I guess this means no.
That leaves more fun for me... :-P

-Axel

On 23.03.2017 09:38, Axel Pahl wrote:
> Dear fellow RDKitters,
>
> has someone by any chance tried to implement in RDKit the scaffold
> distance algorithm by Jürgen Bajorath et al. (and would be willing to
> share some code)?
>
> Li, R.; Stumpfe, D.; Vogt, M.; Geppert, H.; Bajorath, J.
> Development of a Method to Consistently Quantify the Structural Distance
> Between Scaffolds and to Assess Scaffold Hopping Potential
> J. Chem. Inf. Model. 2011, 51, 2507
> DOI: 10.1021/ci2003945
>
> Best regards,
> Axel
>
> --
> 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