[Rdkit-discuss] Problems with wildcard atoms in a sdf import

2020-01-15 Thread Michael Wleklinski
I am reading in a .sdf file and experiencing issues with molecules
that have wildcard atoms. The first example ended up placing double
bonds in the molecule. The second example one double bond position is
moved. The information below is the before and after import. Is there
a way to ensure the .sdf file is read exactly as produced?

Below is what I imported
 24 26  0  0  0  0999 V2000
9.95006.42890. C   0  0
9.12506.42890. N   0  0
8.71255.71450. C   0  0
9.12505.0. C   0  0
9.95005.0. C   0  0
   10.36255.71450. C   0  0
   10.36257.14340. O   0  0
7.88755.71450. N   0  0
7.47506.42890. C   0  0
6.65006.42890. C   0  0
6.23755.71450. N   0  0
6.65005.0. C   0  0
7.47505.0. C   0  0
5.41255.71450. C   0  0
5.5.0. C   0  0
8.71257.14340. C   0  0
9.12507.85790. C   0  0
8.71258.57240. O   0  0
9.70848.44130. N   0  0
   10.50538.22770. A   0  0
   11.08868.81110. A   0  0
   10.87519.60800. A   0  0
   10.07829.82150. A   0  0
9.49489.23820. A   0  0
  1  2  1  0
  2  3  1  0
  3  4  2  0
  4  5  1  0
  5  6  2  0
  6  1  1  0
  1  7  2  0
  3  8  1  0
  8  9  1  0
  9 10  1  0
 10 11  1  0
 11 12  1  0
 12 13  1  0
 13  8  1  0
 11 14  1  0
 14 15  1  0
  2 16  1  0
 16 17  1  0
 17 18  2  0
 17 19  1  0
 19 20  1  0
 20 21  1  0
 21 22  1  0
 22 23  1  0
 23 24  1  0
 24 19  1  0
M  END

This is what was produced upon import
 24 26  0  0  0  0  0  0  0  0999 V2000
9.95006.42890. C   0  0  0  0  0  0  0  0  0  0  0  0
9.12506.42890. N   0  0  0  0  0  0  0  0  0  0  0  0
8.71255.71450. C   0  0  0  0  0  0  0  0  0  0  0  0
9.12505.0. C   0  0  0  0  0  0  0  0  0  0  0  0
9.95005.0. C   0  0  0  0  0  0  0  0  0  0  0  0
   10.36255.71450. C   0  0  0  0  0  0  0  0  0  0  0  0
   10.36257.14340. O   0  0  0  0  0  0  0  0  0  0  0  0
7.88755.71450. N   0  0  0  0  0  0  0  0  0  0  0  0
7.47506.42890. C   0  0  0  0  0  0  0  0  0  0  0  0
6.65006.42890. C   0  0  0  0  0  0  0  0  0  0  0  0
6.23755.71450. N   0  0  0  0  0  0  0  0  0  0  0  0
6.65005.0. C   0  0  0  0  0  0  0  0  0  0  0  0
7.47505.0. C   0  0  0  0  0  0  0  0  0  0  0  0
5.41255.71450. C   0  0  0  0  0  0  0  0  0  0  0  0
5.5.0. C   0  0  0  0  0  0  0  0  0  0  0  0
8.71257.14340. C   0  0  0  0  0  0  0  0  0  0  0  0
9.12507.85790. C   0  0  0  0  0  0  0  0  0  0  0  0
8.71258.57240. O   0  0  0  0  0  0  0  0  0  0  0  0
9.70848.44130. N   0  0  0  0  0  0  0  0  0  0  0  0
   10.50538.22770. A   0  0  0  0  0  0  0  0  0  0  0  0
   11.08868.81110. A   0  0  0  0  0  0  0  0  0  0  0  0
   10.87519.60800. A   0  0  0  0  0  0  0  0  0  0  0  0
   10.07829.82150. A   0  0  0  0  0  0  0  0  0  0  0  0
9.49489.23820. A   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0
  2  3  1  0
  3  4  2  0
  4  5  1  0
  5  6  2  0
  6  1  1  0
  1  7  2  0
  3  8  1  0
  8  9  1  0
  9 10  1  0
 10 11  1  0
 11 12  1  0
 12 13  1  0
 13  8  1  0
 11 14  1  0
 14 15  1  0
  2 16  1  0
 16 17  1  0
 17 18  2  0
 17 19  1  0
 19 20  1  0
 20 21  1  0
 21 22  2  0
 22 23  1  0
 23 24  2  0
 24 19  1  0
M  END

This is the second molecule.
20 22  0  0  0  0999 V2000
   10.94216.42890. C   0  0
   10.11706.42890. N   0  0
9.70455.71450. C   0  0
   10.11705.0. C   0  0
   10.94215.0. C   0  0
   11.35465.71450. C   0  0
   11.35467.14340. O   0  0
8.87955.71450. N   0  0
8.46706.42890. C   0  0
7.64206.42890. C   0  0
7.22955.71450. N   0  0
7.64205.0. C   0  0
8.46705.0. C   0  0
6.40455.71450. C   0  0
5.99205.0. O   0  0
5.99206.42900. C   0  0
6.32767.18270. A   0  0
5.71457.73470. A   0  0
5.7.32220. A   0  0
5.17156.51520. A   0  0
  1  2  1  0
  2  3  1  0
  3  4  2  0
  4  5  1  0
  5  6  2  0
  6  1  1  0
  1  7  2  0
  3  8  1  0
  8  9  1  0
  9 10  1  0
 10 11  1  0
 11 12  1  0
 12 13  1  0
 13  8  1  0
 11 14  1  0
 14 15  2  0
 14 16  1  0
 16 17  2  0
 17 18  1  0
 18 19  2  0
 19 20  1  0
 20 16  1  0
M  END

Second molecule after 

Re: [Rdkit-discuss] Interactive plots in Jupyter notebooks

2020-01-15 Thread Jan Halborg Jensen
Hi Chris

Iwatobipen had this example using d3js 
https://iwatobipen.wordpress.com/2019/01/19/plot-chemical-space-with-d3js-based-library-rdkit-chemoinformatics/

I made a simple version here 
https://colab.research.google.com/drive/11rmBtA6nBgJIp_V_i_tafvffE5ZdY5Uz

https://youtu.be/ORKOoLHc-Xg

Best regards, Jan

On 15 Jan 2020, at 10.30, Chris Swain via Rdkit-discuss 
mailto:rdkit-discuss@lists.sourceforge.net>>
 wrote:

Hi,

I've been looking at ways to produce interactive plots within a Jupyter 
notebook and after trying a couple of options I used Plotly. This seems fairly 
straight-forward to use and I can produce interactive data frames, in addition 
to 2D and 3D scatterplots.

https://www.macinchem.org/blog/files/a5cc1afff58a411056af7b8d9b0011dd-2577.php

Whilst I can get text to appear when hovering over a data point I'd be 
interested in ideas of how to get the structure displayed when you mouse over a 
point.

Cheers,

Chris


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Interactive plots in Jupyter notebooks

2020-01-15 Thread Jennifer Hemmerich

Hi Chris,

I remember that a colleague of mine once used images of the molecules 
for that. However he did it in R and so far I also have not really 
succeeded to redo this as his code is not available anymore (but did 
also not try too hard).


If images are an option you can look here, it requires some workarounds 
but might be an option: 
https://github.com/etpinard/plotly-dashboards/tree/master/hover-images


In any case if you find a possibility I would be really interested if 
you would be willing to share =)


Best,

Jennifer

On 15.01.20 11:12, Axel Pahl wrote:

Hi Chris,

i too, looked for this functionality in Plotly, but I was not able to 
find it.

This is the reason I switched to bokeh / holoviews.

https://github.com/apahl/mol_frame/blob/68801e16af3cfb60f846c40f471d190cbe34748b/mol_frame/mol_frame.py#L949 
and

https://github.com/apahl/mol_frame/blob/68801e16af3cfb60f846c40f471d190cbe34748b/mol_frame/mol_frame.py#L1214

Kind regards,
Axel

On 15.01.20 10:30, Chris Swain via Rdkit-discuss wrote:

Hi,

I've been looking at ways to produce interactive plots within a 
Jupyter notebook and after trying a couple of options I used Plotly. 
This seems fairly straight-forward to use and I can produce 
interactive data frames, in addition to 2D and 3D scatterplots.


https://www.macinchem.org/blog/files/a5cc1afff58a411056af7b8d9b0011dd-2577.php

Whilst I can get text to appear when hovering over a data point I'd 
be interested in ideas of how to get the structure displayed when you 
mouse over a point.


Cheers,

Chris




___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Interactive plots in Jupyter notebooks

2020-01-15 Thread Axel Pahl

Hi Chris,

i too, looked for this functionality in Plotly, but I was not able to
find it.
This is the reason I switched to bokeh / holoviews.

https://github.com/apahl/mol_frame/blob/68801e16af3cfb60f846c40f471d190cbe34748b/mol_frame/mol_frame.py#L949
and
https://github.com/apahl/mol_frame/blob/68801e16af3cfb60f846c40f471d190cbe34748b/mol_frame/mol_frame.py#L1214

Kind regards,
Axel

On 15.01.20 10:30, Chris Swain via Rdkit-discuss wrote:

Hi,

I've been looking at ways to produce interactive plots within a
Jupyter notebook and after trying a couple of options I used Plotly.
This seems fairly straight-forward to use and I can produce
interactive data frames, in addition to 2D and 3D scatterplots.

https://www.macinchem.org/blog/files/a5cc1afff58a411056af7b8d9b0011dd-2577.php

Whilst I can get text to appear when hovering over a data point I'd be
interested in ideas of how to get the structure displayed when you
mouse over a point.

Cheers,

Chris




___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Interactive plots in Jupyter notebooks

2020-01-15 Thread Chris Swain via Rdkit-discuss
Hi,

I've been looking at ways to produce interactive plots within a Jupyter 
notebook and after trying a couple of options I used Plotly. This seems fairly 
straight-forward to use and I can produce interactive data frames, in addition 
to 2D and 3D scatterplots.

https://www.macinchem.org/blog/files/a5cc1afff58a411056af7b8d9b0011dd-2577.php 


Whilst I can get text to appear when hovering over a data point I'd be 
interested in ideas of how to get the structure displayed when you mouse over a 
point.

Cheers,

Chris


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss