[Rdkit-discuss] H atoms at ring junction

2023-06-01 Thread Paolo Tosco
Dear Jean-Marc,

you may retain the original mol block wedging and avoid introducing H atoms
as follows:

from rdkit import Chem
from rdkit.Chem.Draw import rdMolDraw2D
from IPython.display import SVG

mol = Chem.MolFromMolBlock("""trans-decalin
 RDKit  2D

 10 11  0  0  0  0  0  0  0  0999 V2000
1.50000.0. C   0  0  0  0  0  0  0  0  0  0 0  0
0.7500   -1.29900. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.7500   -1.29900. C   0  0  0  0  0  0  0  0  0  0 0  0
   -1.50000.0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.0.0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.75001.29900. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.2.59810. C   0  0  0  0  0  0  0  0  0  0 0  0
   -1.50002.59810. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.75001.29900. C   0  0  0  0  0  0  0  0  0  0 0  0
0.75001.29900. C   0  0  0  0  0  0  0  0  0  0 0  0
  1  2  1  0
  2  3  1  0
  4  3  1  1
  4  5  1  0
  5  6  1  0
  6  7  1  0
  7  8  1  0
  9  8  1  6
  9 10  1  0
 10  1  1  0
  9  4  1  0
M  END
""")

drawer = rdMolDraw2D.MolDraw2DSVG(300, 200)
drawer.drawOptions().prepareMolsBeforeDrawing = False
mol_draw = rdMolDraw2D.PrepareMolForDrawing(mol, addChiralHs=False,
wedgeBonds=False)
Chem.ReapplyMolBlockWedging(mol_draw)
drawer.DrawMolecule(mol_draw)
drawer.FinishDrawing()
SVG(drawer.GetDrawingText())




Cheers,
p.

On Thursday, June 1, 2023, Jean-Marc Nuzillard 
wrote:

> Dear all,
>
> starting from this mol block:
> trans-decalin
>  RDKit  2D
>
>  10 11  0  0  0  0  0  0  0  0999 V2000
> 1.50000.0. C   0  0  0  0  0  0  0  0  0  0  0  0
> 0.7500   -1.29900. C   0  0  0  0  0  0  0  0  0  0  0  0
>-0.7500   -1.29900. C   0  0  0  0  0  0  0  0  0  0  0  0
>-1.50000.0. C   0  0  0  0  0  0  0  0  0  0  0  0
>-3.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
>-3.75001.29900. C   0  0  0  0  0  0  0  0  0  0  0  0
>-3.2.59810. C   0  0  0  0  0  0  0  0  0  0  0  0
>-1.50002.59810. C   0  0  0  0  0  0  0  0  0  0  0  0
>-0.75001.29900. C   0  0  0  0  0  0  0  0  0  0  0  0
> 0.75001.29900. C   0  0  0  0  0  0  0  0  0  0  0  0
>   1  2  1  0
>   2  3  1  0
>   4  3  1  1
>   4  5  1  0
>   5  6  1  0
>   6  7  1  0
>   7  8  1  0
>   9  8  1  6
>   9 10  1  0
>  10  1  1  0
>   9  4  1  0
> M  END
>
> I tried to experiment with the great post recently published
> in the rdkit-blog about drawing options.
> The Mol block hereabove has no explicit hydrogen
> but the function DrawMolecule()
> adds two hydrogen atoms at the ring junction :
>
> Even though this feature can be very helpful,
> is it possible to let wedges along C-C bonds
> carry out the geometry information without
> introducing H atoms at the ring junction?
>
> Best,
>
> Jean-Marc Nuzillard
>
> --
> Jean-Marc Nuzillard
> Directeur de Recherches au CNRS
>
> Institut de Chimie Moléculaire de Reims
> CNRS UMR 7312
> Moulin de la Housse
> CPCBAI, Bâtiment 18
> BP 1039
> 51687 REIMS Cedex 2
> France
>
> ORCID : -0002-5120-2556
> Tel : +33 (0)3 26 91 82 10
> http://www.univ-reims.fr/icmr
> https://nuzillard.github.io/PyLSD
>
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] H atoms at ring junction

2023-06-01 Thread Jean-Marc Nuzillard

Dear all,

starting from this mol block:
trans-decalin
 RDKit  2D

 10 11  0  0  0  0  0  0  0  0999 V2000
    1.5000    0.    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    0.7500   -1.2990    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.7500   -1.2990    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -1.5000    0.    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.    0.    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.7500    1.2990    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.    2.5981    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -1.5000    2.5981    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.7500    1.2990    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    0.7500    1.2990    0. C   0  0  0  0  0  0  0  0  0  0 0  0
  1  2  1  0
  2  3  1  0
  4  3  1  1
  4  5  1  0
  5  6  1  0
  6  7  1  0
  7  8  1  0
  9  8  1  6
  9 10  1  0
 10  1  1  0
  9  4  1  0
M  END

I tried to experiment with the great post recently published
in the rdkit-blog about drawing options.
The Mol block hereabove has no explicit hydrogen
but the function DrawMolecule()
adds two hydrogen atoms at the ring junction :

Even though this feature can be very helpful,
is it possible to let wedges along C-C bonds
carry out the geometry information without
introducing H atoms at the ring junction?

Best,

Jean-Marc Nuzillard

--
Jean-Marc Nuzillard
Directeur de Recherches au CNRS

Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

ORCID : -0002-5120-2556
Tel : +33 (0)3 26 91 82 10

http://www.univ-reims.fr/icmr

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