Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-27 Thread Jean-Marc Nuzillard

Yes !

Cheers,

Jean-Marc


Le 27/07/2023 à 12:54, Paolo Tosco a écrit :

from rdkit import Chem
from rdkit.Chem.Draw import rdDepictor
from rdkit.Chem.Draw import rdMolDraw2D
from PIL import Image
from io import BytesIO
smi = "C1CC[C@H]2[C@@H]2C1"
filenameOut = "img.png"
mol = Chem.MolFromSmiles(smi)
rdDepictor.SetPreferCoordGen(True)
rdDepictor.Compute2DCoords(mol)
d2d = rdMolDraw2D.MolDraw2DCairo(350, 300)
dopts = d2d.drawOptions()
dopts.baseFontSize = 0.6
dopts.prepareMolsBeforeDrawing = False
mol_draw = rdMolDraw2D.PrepareMolForDrawing(mol, addChiralHs=False)
d2d.DrawMolecule(mol_draw, legend='', highlightAtoms=[])
d2d.FinishDrawing()
bio = BytesIO(d2d.GetDrawingText())
draw_code = Image.open(bio)
draw_code.save(filenameOut)




--
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


Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-27 Thread Jean-Marc Nuzillard

Dear Paolo,

your code works perfectly well.

Running it with the SMILES of trans-decalin, C1CC[C@H]2[C@@H]2C1,
I obtained
.
The code with ReapplyMolBlockWedging() inside (that you proposed me
in a previous post) was intended to have no H atom displayed at ring 
junctions.
Sure, the SMILES of trans-decalin I propose, generated by rdkit from a 
molblock

devoid of H atoms, has explicit H atoms inside at the ring junction.
So, starting from an isomeric SMILES, I would like to produce PNG 
drawings that retain
the existing configuration information and do not show H atoms at ring 
junctions.


Best,

Jean-Marc


Le 27/07/2023 à 10:33, Paolo Tosco a écrit :

Dear Jean-Marc,

You are generating the molecule from SMILES, therefore it does not 
have molblock wedging information.
When you call ReapplyMolBlockWedging(), first existing wedging info 
will be stripped.

Then, the molblock wedging will be applied, but there is none.
Hence, you get no wedging.

You may simplify your code and get the expected wedging as follows:

from rdkit import Chem
from rdkit.Chem.Draw import rdDepictor
from rdkit.Chem.Draw import rdMolDraw2D
from PIL import Image
from io import BytesIO
smi = "C=C[C@@](/C=C/c1ccc(cc1)O)(CCC=C(C)C)C"
filenameOut = "img.png"
mol = Chem.MolFromSmiles(smi)
rdDepictor.SetPreferCoordGen(True)
rdDepictor.Compute2DCoords(mol)
d2d = rdMolDraw2D.MolDraw2DCairo(350, 300)
dopts = d2d.drawOptions()
dopts.baseFontSize = 0.6
d2d.DrawMolecule(mol, legend='', highlightAtoms=[])
d2d.FinishDrawing()
bio = BytesIO(d2d.GetDrawingText())
draw_code = Image.open(bio)
draw_code.save(filenameOut)


Cheers.
p.

On 27 Jul 2023, at 07:31, Jean-Marc Nuzillard 
 wrote:



Hi David,

thank you for your suggestion.
Setting wedgeBonds=True does not change anything,
probably because wedging is performed later by
the call to Chem.ReapplyMolBlockWedging()

Best,

Jean-Marc

Le 26/07/2023 à 22:28, David Cosgrove a écrit :

Hi,
I’m away from my computer at the moment, so can’t try anything, but 
I wonder if it’s anything to do with the ‘wedgeBonds=False’ option 
you gave when preparing the drawing.

Dave


On Wed, 26 Jul 2023 at 20:45, Jean-Marc Nuzillard 
 wrote:


Dear all,

I use the following code to produce PNG drawings. I use RDKit
version 2023.03.1 .
The SMILES chain describes a molecule with a single chiral
center of defined configuration.

from rdkit import Chem
from rdkit.Chem import rdCoordGen
from rdkit.Chem.Draw import rdMolDraw2D
from PIL import Image
from io import BytesIO

smi  = "C=C[C@@](/C=C/c1ccc(cc1)O)(CCC=C(C)C)C"
filenameOut = "img.png"

mol = Chem.MolFromSmiles(smi)
rdCoordGen.AddCoords(mol)
print(Chem.MolToMolBlock(mol))
d2d = rdMolDraw2D.MolDraw2DCairo(350, 300)
dopts = d2d.drawOptions()
dopts.baseFontSize = 0.6
dopts.prepareMolsBeforeDrawing = False
mol_draw = rdMolDraw2D.PrepareMolForDrawing(mol,
addChiralHs=False, wedgeBonds=False)
Chem.ReapplyMolBlockWedging(mol_draw)
d2d.DrawMolecule(mol_draw, legend='', highlightAtoms=[])
d2d.FinishDrawing()
bio = BytesIO(d2d.GetDrawingText())
draw_code = Image.open(bio)
draw_code.save(filenameOut)

The resulting image does not show the chirality wedge:



The script prints the MolBlock that comes from the SMILES and
the calculation of the 2D atomic coordinates:
_

 RDKit  2D

 19 19  0  0  0  0  0  0  0  0999 V2000
    2.0515    1.2242    0. C   0  0  0  0  0 0  0  0  0  0  0  0
    1.0515    1.2214    0. C   0  0  0  0  0 0  0  0  0  0  0  0
    0.5539    0.3540    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -0.4459    0.3512    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -0.9435   -0.5162    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -1.9435   -0.5190    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -2.4411   -1.3866    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -3.4411   -1.3892    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -3.9435   -0.5246    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -3.4459    0.3428    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -2.4459    0.3456    0. C   0  0  0  0  0 0  0  0  0  0  0  0
   -4.9435   -0.5274    0. O   0  0  0  0  0 0  0  0  0  0  0  0
    1.4215   -0.1436    0. C   0  0  0  0  0 0  0  0  0  0  0  0
    2.2861    0.3588    0. C   0  0  0  0  0 0  0  0  0  0  0  0
    3.1535   -0.1388    0. C   0  0  0  0  0 0  0  0  0  0  0  0
    4.0181    0.3636    0. C   0  0  0  0  0 0  0  0  0  0  0  0
    4.0153    1.3636    0. C   0  0  0  0  0 0  0  0  0  0  0  0
    4.8855   -0.1338    0. C   0  0  0  0  0 0  0  0  0  0  0  0
    0.5567   -0.6460    0. C   0  0  0  0  0 0  0  0  0  0  0  0
  1  2  2  0
  2  3  1  0
  3  4  1  0
  4  5  2  0
  5  6  1  0
  6

Re: [Rdkit-discuss] Chirality wedge disappears in PNG depiction

2023-07-26 Thread Jean-Marc Nuzillard

Hi David,

thank you for your suggestion.
Setting wedgeBonds=True does not change anything,
probably because wedging is performed later by
the call to Chem.ReapplyMolBlockWedging()

Best,

Jean-Marc

Le 26/07/2023 à 22:28, David Cosgrove a écrit :

Hi,
I’m away from my computer at the moment, so can’t try anything, but I 
wonder if it’s anything to do with the ‘wedgeBonds=False’ option you 
gave when preparing the drawing.

Dave


On Wed, 26 Jul 2023 at 20:45, Jean-Marc Nuzillard 
 wrote:


Dear all,

I use the following code to produce PNG drawings. I use RDKit
version 2023.03.1 .
The SMILES chain describes a molecule with a single chiral center
of defined configuration.

from rdkit import Chem
from rdkit.Chem import rdCoordGen
from rdkit.Chem.Draw import rdMolDraw2D
from PIL import Image
from io import BytesIO

smi  = "C=C[C@@](/C=C/c1ccc(cc1)O)(CCC=C(C)C)C"
filenameOut = "img.png"

mol = Chem.MolFromSmiles(smi)
rdCoordGen.AddCoords(mol)
print(Chem.MolToMolBlock(mol))
d2d = rdMolDraw2D.MolDraw2DCairo(350, 300)
dopts = d2d.drawOptions()
dopts.baseFontSize = 0.6
dopts.prepareMolsBeforeDrawing = False
mol_draw = rdMolDraw2D.PrepareMolForDrawing(mol,
addChiralHs=False, wedgeBonds=False)
Chem.ReapplyMolBlockWedging(mol_draw)
d2d.DrawMolecule(mol_draw, legend='', highlightAtoms=[])
d2d.FinishDrawing()
bio = BytesIO(d2d.GetDrawingText())
draw_code = Image.open(bio)
draw_code.save(filenameOut)

The resulting image does not show the chirality wedge:


The script prints the MolBlock that comes from the SMILES and the
calculation of the 2D atomic coordinates:
_

 RDKit  2D

 19 19  0  0  0  0  0  0  0  0999 V2000
    2.0515    1.2242    0. C   0  0  0  0  0  0  0 0  0  0  0  0
    1.0515    1.2214    0. C   0  0  0  0  0  0  0 0  0  0  0  0
    0.5539    0.3540    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -0.4459    0.3512    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -0.9435   -0.5162    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -1.9435   -0.5190    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -2.4411   -1.3866    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -3.4411   -1.3892    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -3.9435   -0.5246    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -3.4459    0.3428    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -2.4459    0.3456    0. C   0  0  0  0  0  0  0 0  0  0  0  0
   -4.9435   -0.5274    0. O   0  0  0  0  0  0  0 0  0  0  0  0
    1.4215   -0.1436    0. C   0  0  0  0  0  0  0 0  0  0  0  0
    2.2861    0.3588    0. C   0  0  0  0  0  0  0 0  0  0  0  0
    3.1535   -0.1388    0. C   0  0  0  0  0  0  0 0  0  0  0  0
    4.0181    0.3636    0. C   0  0  0  0  0  0  0 0  0  0  0  0
    4.0153    1.3636    0. C   0  0  0  0  0  0  0 0  0  0  0  0
    4.8855   -0.1338    0. C   0  0  0  0  0  0  0 0  0  0  0  0
    0.5567   -0.6460    0. C   0  0  0  0  0  0  0 0  0  0  0  0
  1  2  2  0
  2  3  1  0
  3  4  1  0
  4  5  2  0
  5  6  1  0
  6  7  2  0
  7  8  1  0
  8  9  2  0
  9 10  1  0
 10 11  2  0
  9 12  1  0
  3 13  1  0
 13 14  1  0
 14 15  1  0
 15 16  2  0
 16 17  1  0
 16 18  1  0
  3 19  1  1
 11  6  1  0
M  END
_

The wedge bond (3-19) is apparently here but is not drawn as such.

Is there a remedy for that?

Best regards,

Jean-Marc

    -- 
    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

--
David Cosgrove
Freelance computational chemistry and chemoinformatics developer
http://cozchemix.co.uk




--
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] Chirality wedge disappears in PNG depiction

2023-07-26 Thread Jean-Marc Nuzillard

Dear all,

I use the following code to produce PNG drawings. I use RDKit version 
2023.03.1 .
The SMILES chain describes a molecule with a single chiral center of 
defined configuration.


from rdkit import Chem
from rdkit.Chem import rdCoordGen
from rdkit.Chem.Draw import rdMolDraw2D
from PIL import Image
from io import BytesIO

smi  = "C=C[C@@](/C=C/c1ccc(cc1)O)(CCC=C(C)C)C"
filenameOut = "img.png"

mol = Chem.MolFromSmiles(smi)
rdCoordGen.AddCoords(mol)
print(Chem.MolToMolBlock(mol))
d2d = rdMolDraw2D.MolDraw2DCairo(350, 300)
dopts = d2d.drawOptions()
dopts.baseFontSize = 0.6
dopts.prepareMolsBeforeDrawing = False
mol_draw = rdMolDraw2D.PrepareMolForDrawing(mol, addChiralHs=False, 
wedgeBonds=False)

Chem.ReapplyMolBlockWedging(mol_draw)
d2d.DrawMolecule(mol_draw, legend='', highlightAtoms=[])
d2d.FinishDrawing()
bio = BytesIO(d2d.GetDrawingText())
draw_code = Image.open(bio)
draw_code.save(filenameOut)

The resulting image does not show the chirality wedge:


The script prints the MolBlock that comes from the SMILES and the 
calculation of the 2D atomic coordinates:

_

 RDKit  2D

 19 19  0  0  0  0  0  0  0  0999 V2000
    2.0515    1.2242    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    1.0515    1.2214    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    0.5539    0.3540    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.4459    0.3512    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.9435   -0.5162    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -1.9435   -0.5190    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -2.4411   -1.3866    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.4411   -1.3892    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.9435   -0.5246    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -3.4459    0.3428    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -2.4459    0.3456    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -4.9435   -0.5274    0. O   0  0  0  0  0  0  0  0  0  0 0  0
    1.4215   -0.1436    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    2.2861    0.3588    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    3.1535   -0.1388    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    4.0181    0.3636    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    4.0153    1.3636    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    4.8855   -0.1338    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    0.5567   -0.6460    0. C   0  0  0  0  0  0  0  0  0  0 0  0
  1  2  2  0
  2  3  1  0
  3  4  1  0
  4  5  2  0
  5  6  1  0
  6  7  2  0
  7  8  1  0
  8  9  2  0
  9 10  1  0
 10 11  2  0
  9 12  1  0
  3 13  1  0
 13 14  1  0
 14 15  1  0
 15 16  2  0
 16 17  1  0
 16 18  1  0
  3 19  1  1
 11  6  1  0
M  END
_

The wedge bond (3-19) is apparently here but is not drawn as such.

Is there a remedy for that?

Best regards,

Jean-Marc

--
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


Re: [Rdkit-discuss] H atoms at ring junction

2023-06-08 Thread Jean-Marc Nuzillard

Thanks again!

Jean-Marc


Le 08/06/2023 à 10:31, Paolo Tosco a écrit :

Dear Jean-Marc,

I wrote my email in an iPad, and probably attaching the image failed 
somehow.


You may save the SVG image to a file as follows; it is a plain text 
XML string:


svg_image = drawer.GetDrawingText()
with open(“ h_atoms_at_ring_jn.svg”, “w”) as hnd:
    hnd.write(svg_image)

Cheers,
p.

On 8 Jun 2023, at 10:22, Jean-Marc Nuzillard 
 wrote:



I guessed that for some reason the drawing did not show up in Paolo's 
reply
to my question but I did not try to investigate further to find an 
explanation,
since I run his code without any problem and was then able to adapt 
it for the

creation of PNG images.

How did you create file h_atoms_at_ring_jn.svg?

The execution of SVG(drawer.GetDrawingText())
returns an object of type IPython.core.display.SVG
that is nicely displayed as a chemical structure by spyder
but from which I do not know how to produce a .svg file.

Best,

Jean-Marc

Le 07/06/2023 à 23:53, Jeremy Monat a écrit :
Very nice! The picture in the thread above didn't come through for 
me. I re-ran that code and got the following output, included as 
both an inline PNG and an attached SVG so hopefully it shows up for 
folks in at least one:




On Mon, Jun 5, 2023 at 3:15 AM Jean-Marc Nuzillard 
 wrote:


Dear Paolo,

many thanks, your solution worked like a charm!

Best regards,

Jean-Marc


Le 01/06/2023 à 23:57, Paolo Tosco a écrit :

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.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

Re: [Rdkit-discuss] H atoms at ring junction

2023-06-08 Thread Jean-Marc Nuzillard

I guessed that for some reason the drawing did not show up in Paolo's reply
to my question but I did not try to investigate further to find an 
explanation,
since I run his code without any problem and was then able to adapt it 
for the

creation of PNG images.

How did you create file h_atoms_at_ring_jn.svg?

The execution of SVG(drawer.GetDrawingText())
returns an object of type IPython.core.display.SVG
that is nicely displayed as a chemical structure by spyder
but from which I do not know how to produce a .svg file.

Best,

Jean-Marc

Le 07/06/2023 à 23:53, Jeremy Monat a écrit :
Very nice! The picture in the thread above didn't come through for me. 
I re-ran that code and got the following output, included as both an 
inline PNG and an attached SVG so hopefully it shows up for folks in 
at least one:

h_atoms_at_ring_jn.png

On Mon, Jun 5, 2023 at 3:15 AM Jean-Marc Nuzillard 
 wrote:


Dear Paolo,

many thanks, your solution worked like a charm!

Best regards,

Jean-Marc


Le 01/06/2023 à 23:57, Paolo Tosco a écrit :

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.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

htt

Re: [Rdkit-discuss] H atoms at ring junction

2023-06-05 Thread Jean-Marc Nuzillard

Dear Paolo,

many thanks, your solution worked like a charm!

Best regards,

Jean-Marc


Le 01/06/2023 à 23:57, Paolo Tosco a écrit :

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.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  <https://nuzillard.github.io/PyLSD>




--
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


Re: [Rdkit-discuss] about SMILES

2022-06-14 Thread Jean-Marc Nuzillard

Thanks, Greg!

Jean-Marc

Le 14/06/2022 à 07:50, Greg Landrum a écrit :

Hi Jean-Marc,

The question about atom data was answered elsewhere by Nils, but on 
atom ordering:


On Mon, Jun 13, 2022 at 2:50 PM Jean-Marc Nuzillard 
 wrote:



About mol = Chem.MolFromSmiles(smi), I would like to know
whether the atoms indexes in mol follow always exactly the apparition
order of
the atoms in smi.


The RDKit preserves the atom ordering. The only exception to this is 
that by default any hydrogens which are present in the SMILES will be 
removed (you can turn this off), so 'FC(O[H])Br' ends up being a four 
atom molecule with indices 0:F, 1:C, 2:O, 3:Br


-greg




--
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
http://eos.univ-reims.fr/LSD/CSNteam.html

https://nuzillard.github.io/PyLSD
http://eos.univ-reims.fr/LSD/JmnSoft
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] about SMILES

2022-06-13 Thread Jean-Marc Nuzillard

Dear Nils,

thank you for pointing out the existence CXSMILES.
In CXSMILES, the SMILES is written first and is followed by atom data.
This is not what I had in mind first but this is ok for me.
The good point is that the ad hoc reader and writer are already 
available through rdkit.


Best regards,

Jean-Marc



Le 13/06/2022 à 17:04, Nils Weskamp a écrit :

Dear Jean-Marc,

I am not entirely sure I understand what you mean with "insert atom 
data inside of a chain". There are a number of proprietary extensions 
of smiles, such as e.g. CXSMILES


https://docs.chemaxon.com/display/docs/chemaxon-extended-smiles-and-smarts-cxsmiles-and-cxsmarts.md 



that offer various additional options. To some extent, CXSMILES are 
supported by RDKit:


https://www.rdkit.org/docs/RDKit_Book.html#cxsmiles-cxsmarts-extensions

Hope ths helps,
Nils

Am 13.06.2022 um 14:30 schrieb Jean-Marc Nuzillard:

Dear all,

About mol = Chem.MolFromSmiles(smi), I would like to know
whether the atoms indexes in mol follow always exactly the apparition 
order of

the atoms in smi.

Are there extensions of the SMILES format that would allow one to insert
atom data inside of a chain? If yes, where could I find
details about these extensions?

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
http://eos.univ-reims.fr/LSD/CSNteam.html

https://nuzillard.github.io/PyLSD
http://eos.univ-reims.fr/LSD/JmnSoft



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


[Rdkit-discuss] about SMILES

2022-06-13 Thread Jean-Marc Nuzillard

Dear all,

About mol = Chem.MolFromSmiles(smi), I would like to know
whether the atoms indexes in mol follow always exactly the apparition 
order of

the atoms in smi.

Are there extensions of the SMILES format that would allow one to insert
atom data inside of a chain? If yes, where could I find
details about these extensions?

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
http://eos.univ-reims.fr/LSD/CSNteam.html

https://nuzillard.github.io/PyLSD
http://eos.univ-reims.fr/LSD/JmnSoft



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


[Rdkit-discuss] 2D drawing with template

2022-03-23 Thread Jean-Marc Nuzillard

Dear all,

The 2D structure drawing code

from rdkit import Chem
from rdkit.Chem import rdCoordGen

m = 
Chem.MolFromSmiles('CN1C[C@H]2[C@]3([C@@H]1C[C@@H](C=C3)OC)C4=CC5=C(C=C4[C@@H](O2)O)OCO5')

template = Chem.MolFromMolFile('template.mol')
params = rdCoordGen.CoordGenParams()
params.SetTemplateMol(template)
rdCoordGen.AddCoords(m, params)
writer = Chem.SDWriter('compound_2D.sdf')
writer.write(m)
writer.close()

with file template.mol containing

template.mol
  ChemDraw03232214592D

  9  9  0  0  1  0  0  0  0  0999 V2000
   -1.4289    0.8250    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -1.4289    0.    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.7146   -0.4125    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.0002    0.    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.0002    0.8250    0. C   0  0  0  0  0  0  0  0  0  0 0  0
   -0.7146    1.2375    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    0.7141   -0.4125    0. C   0  0  0  0  0  0  0  0  0  0 0  0
    1.4289    0.    0. O   0  0  0  0  0  0  0  0  0  0 0  0
    0.7141   -1.2375    0. O   0  0  0  0  0  0  0  0  0  0 0  0
  1  2  2  0
  2  3  1  0
  3  4  2  0
  4  5  1  0
  5  6  2  0
  6  1  1  0
  4  7  1  0
  7  8  1  0
  7  9  1  0
M  END

The template looks like



in which the H in OH groups have been added to have a nice drawing
but are not part of the mol file.

The result in compound_2D.sdf is



as if no template were provided.
I succeeded already to obtain what I wanted with the same code
but for other molecules and templates.
I use rdkit version 2021.03.2 .

Can you reproduce that?
Is there a better way to do it?

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
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] generating smiles using RDKit

2021-12-22 Thread Jean-Marc Nuzillard

Dear all,

A solution to the SMILES generation problem proposed by Gyro two weeks 
ago may be found

at https://github.com/nuzillard/SCCP/ .
It relies on the pyLSD software for computer-assisted structure 
elucidation from NMR data,
even though pyLSD was not designed for nearly-unconstrained isomer 
generation and counting.
PyLSD found 442,705 unique and valid SMILES while the text-based 
(ultra-fast) scripts proposed

by Wim and Andrew resulted in 440,334 structures.
Unicity and validity were checked using rdkit.
I admit I did not attempt to compare my structure set with the one 
obtained by Wim and Andrew.


Best regards,

Jean-Marc


Le 08/12/2021 à 11:02, Gyro Funch a écrit :

Hello,

I am not a chemist, but have been using RDKit to generate descriptors 
and fingerprints for molecules with known SMILES. It is a very useful 
package!


I have a problem on which I hope someone can provide some guidance.

My work is in the area of toxicology and I am interested in generating 
SMILES for molecules referred to as 'short chain chlorinated 
paraffins' (SCCP).


A general definition that is sometimes used is that an SCCP is given 
by the molecular formula


C_{x} H_{2x-y+2} Cl_{y}

where

x = 10-13
y = 3-12

and the average chlorine content ranges from 40-70% by mass.

-

Can anyone provide guidance on how to generate the list of SMILES 
corresponding to the above rules?


Thank you very much for your help!

Kind regards,
gyro


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


--
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
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] para-stereochemistry

2021-05-26 Thread Jean-Marc Nuzillard

Dear Paolo,

According to https://goldbook.iupac.org/terms/view/P04921
your interpretation is certainly the correct one.
I still have to find how this r/s assignment is determined.

Many thanks again,

Jean-Marc


Le 26/05/2021 à 22:40, Paolo Tosco a écrit :

Dear Jean-Marc,

I believe it indicates what the IUPAC Gold Book refers to as pseudoasymmetry.
Let’s see if others agree with my interpretation.

Cheers,
P.


On 26 May 2021, at 22:28, Jean-Marc Nuzillard  
wrote:

I believed I sent a message with the same title a few minutes ago, but 
apparently something went wrong.

Reading the RDKit book about function FindMolChiralCenters(),
I saw that it provides a better handling of para-stereochemisry.
This concept is not familiar to me.
Google did not help and sent me back to the RDKit Book.
So, what is para-stereochemistry?

Best regards,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


[Rdkit-discuss] para-stereochemistry

2021-05-26 Thread Jean-Marc Nuzillard
I believed I sent a message with the same title a few minutes ago, but 
apparently something went wrong.


Reading the RDKit book about function FindMolChiralCenters(),
I saw that it provides a better handling of para-stereochemisry.
This concept is not familiar to me.
Google did not help and sent me back to the RDKit Book.
So, what is para-stereochemistry?

Best regards,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


[Rdkit-discuss] para-stereochemistry

2021-05-26 Thread Jean-Marc Nuzillard































































































Dear all,

the RDKit Book mentions, about function FindPotentialStereo(), the 
improved handling of "para-stereochemistry".

Google sends me back to the the RDKit book when I search for this keyword.
So, what is para-stereochemistry?

Best regards,

Jean-Marc























--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] Create an asymmetric carbon.

2021-05-26 Thread Jean-Marc Nuzillard

Hi Paolo,

the SetChiralTag() function is exactly what I missed.

Many thanks for your help,

Best regards,

Jean-Marc


Le 26/05/2021 à 18:21, Paolo Tosco a écrit :

Hi Jean-Marc,

You can use Chem.Atom.SetChiralTag():

from rdkit import Chem
from rdkit.Chem.Draw import IPythonConsole
IPythonConsole.drawOptions.addAtomIndices = True
IPythonConsole.ipython_useSVG=True
m = Chem.AddHs(Chem.MolFromSmiles('CCO'))
m
image.png
a = m.GetAtomWithIdx(6)
a.SetIsotope(2)
chiral_c = m.GetAtomWithIdx(1)
Chem.FindMolChiralCenters(m, force=True, includeUnassigned=True, 
useLegacyImplementation=False)

[(1, '?')]
chiral_c.GetChiralTag()
rdkit.Chem.rdchem.ChiralType.CHI_UNSPECIFIED
chiral_c.SetChiralTag(Chem.ChiralType.CHI_TETRAHEDRAL_CW)
Chem.AssignStereochemistry(m, cleanIt=True, force=True)
chiral_c.GetChiralTag()
rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CW
Chem.FindMolChiralCenters(m, force=True, includeUnassigned=True, 
useLegacyImplementation=False)

[(1, 'S')]
m
image.png
chiral_c.SetChiralTag(Chem.ChiralType.CHI_TETRAHEDRAL_CCW)
Chem.AssignStereochemistry(m, cleanIt=True, force=True)
chiral_c.GetChiralTag()
rdkit.Chem.rdchem.ChiralType.CHI_TETRAHEDRAL_CCW
Chem.FindMolChiralCenters(m,force=True,includeUnassigned=True,useLegacyImplementation=False)
[(1, 'R')]
m
image.png

Cheers,
p.

On Wed, May 26, 2021 at 5:20 PM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear all,

starting from ethanol with added Hs:

 >>> m = Chem.AddHs(Chem.MolFromSmiles('CCO'))

the C atom of the CH2  group is indexed by "1" and is bound to H
atoms
indexed "6" and "7".

Replacing the H atom indexed "6" by a deuterium atom
 >>> a = m.GetAtomWithIdx(6)
 >>> a.SetIsotope(2)

creates an undefined asymmetric carbon atom:
 >>>

Chem.FindMolChiralCenters(m,force=True,includeUnassigned=True,useLegacyImplementation=False)
[(1, '?')]

How is it possible to create, starting from this molecule m, two
molecules, m1 and m2, with opposite absolute configurations?

Many thanks in advance,

Jean-Marc

-- 
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr <http://www.univ-reims.fr/icmr>
http://eos.univ-reims.fr/LSD/CSNteam.html
<http://eos.univ-reims.fr/LSD/CSNteam.html>

http://www.univ-reims.fr/LSD/ <http://www.univ-reims.fr/LSD/>
http://www.univ-reims.fr/LSD/JmnSoft/
<http://www.univ-reims.fr/LSD/JmnSoft/>



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




--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] Create an asymmetric carbon.

2021-05-26 Thread Jean-Marc Nuzillard

Dear all,

starting from ethanol with added Hs:

>>> m = Chem.AddHs(Chem.MolFromSmiles('CCO'))

the C atom of the CH2  group is indexed by "1" and is bound to H atoms 
indexed "6" and "7".


Replacing the H atom indexed "6" by a deuterium atom
>>> a = m.GetAtomWithIdx(6)
>>> a.SetIsotope(2)

creates an undefined asymmetric carbon atom:
>>> 
Chem.FindMolChiralCenters(m,force=True,includeUnassigned=True,useLegacyImplementation=False)

[(1, '?')]

How is it possible to create, starting from this molecule m, two 
molecules, m1 and m2, with opposite absolute configurations?


Many thanks in advance,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
 http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] enexpected chiral center

2021-05-17 Thread Jean-Marc Nuzillard

Thanks, Greg!

So, "C[C@H](O)C(O)[C@@H](O)C" --> [(1, 'S'), (3, '?'), (5, 'S')]
and "C[C@H](O)C(O)[C@H](O)C" --> [(1, 'S'), (3, '?'), (5, 'R')]
and therefore I understand that changing the configuration at position 5 
does not informs me

about the change of status of atom 3, even though it changes from
"non-asymmetric carbon" to "asymmetric carbon".

As you suggested, imposing a definite configuration to carbon 3 leads to:
"C[C@H](O)[C@H](O)[C@@H](O)C" --> [(1, 'S'), (3, '?'), (5, 'S')]  C-3 is 
non-asymmetric but appears as asymmetric-but-undefined

"C[C@H](O)[C@H](O)[C@H](O)C" --> [(1, 'S'), (3, 's'), (5, 'R')] OK
"C[C@H](O)[C@@H](O)[C@H](O)C" --> [(1, 'S'), (3, 'r'), (5, 'R')] OK

I will change my question for an another one.
Having created molecule m as Chem.MolFromSmiles("C[C@H](O)C[C@@H](O)C") 
of from a MOL file,
with a CH2 in the middle of the molecule, how would it be possible to 
create molecules m1 and m2 from m
with a substitution H -> OH (or H->D) at the central position with the 2 
possible configurations, so that I can reproduce the three examples 
here-above?


Best,

Jean-Marc


Le 17/05/2021 à 13:09, Greg Landrum a écrit :

Hi Jean-Marc,

In that particular configuration:
image.png
 the central atom is not a chiral center since atoms 1 and 5 have the 
same absolute stereo.


However, if you change the stereo of either atom 1 or 5, then the 
central atom can be a chiral center:

image.png

This possibility is why FindMolChiralCenters() flags that atom as a 
possible stereocenter.


-greg



On Mon, May 17, 2021 at 12:09 PM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear all,

The determination of the absolute configuration of chiral centres is
certainly not an easy problem.
Even recognizing that a carbon atom is an asymmetric one is not that
trivial, even for humans.
I tried:
 >>> smi = "C[C@H](O)C(O)[C@@H](O)C"
 >>> m = Chem.MolFromSmiles(smi)
 >>>

Chem.FindMolChiralCenters(m,force=True,includeUnassigned=True,useLegacyImplementation=False)
[(1, 'S'), (3, '?'), (5, 'S')]
    but the central carbon atom of this compound, indexed "3", is not an
asymmetric one, is it?

Best regards,

Jean-Marc

-- 
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr <http://www.univ-reims.fr/icmr>
http://eos.univ-reims.fr/LSD/CSNteam.html
<http://eos.univ-reims.fr/LSD/CSNteam.html>

http://www.univ-reims.fr/LSD/ <http://www.univ-reims.fr/LSD/>
http://www.univ-reims.fr/LSD/JmnSoft/
<http://www.univ-reims.fr/LSD/JmnSoft/>



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




--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] enexpected chiral center

2021-05-17 Thread Jean-Marc Nuzillard

Dear all,

The determination of the absolute configuration of chiral centres is 
certainly not an easy problem.
Even recognizing that a carbon atom is an asymmetric one is not that 
trivial, even for humans.

I tried:
>>> smi = "C[C@H](O)C(O)[C@@H](O)C"
>>> m = Chem.MolFromSmiles(smi)
>>> 
Chem.FindMolChiralCenters(m,force=True,includeUnassigned=True,useLegacyImplementation=False)

[(1, 'S'), (3, '?'), (5, 'S')]
but the central carbon atom of this compound, indexed "3", is not an 
asymmetric one, is it?


Best regards,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] explicit H atoms

2021-03-11 Thread Jean-Marc Nuzillard

Hi,

it seems that the answer to my initial question depends on how the 
prescription:

"stereobonds between stereocenters should be avoided at all costs"
is followed.

Many thanks!

Jean-Marc


Le 10/03/2021 à 20:24, Ling Chan a écrit :

Hello Mark,

I thought you could depict it like the attached, since only the narrow 
end of a wedged bond counts. Sure, it is confusing, but it is doable. 
Except that in section ST-0.5 of the IUPAC guidelines pointed out by Greg
https://www.degruyter.com/document/doi/10.1351/pac200678101897/html 
<https://www.degruyter.com/document/doi/10.1351/pac200678101897/html>
it says that "stereobonds between stereocenters should be avoided at 
all costs".


Just that there are times when "stereobonds between stereocenters" are 
not avoidable, if all four neighbours of a chiral carbon are 
themselves chiral.


I guess for practical purposes having H's could make things clearer, 
but in theory you may not need them for chiral atoms.


Ling


Mark Mackey via Rdkit-discuss <mailto:rdkit-discuss@lists.sourceforge.net>> 於 2021年3月10日週三 
上午2:33寫道:


I believe it's not possible to represent the chirality of the
attached molecule's ring fusion carbons without using an explicit H.

Regards,
Mark

--
Mark Mackey
Chief Scientific Officer
Cresset
New Cambridge House, Bassingbourn Road, Litlington,
Cambridgeshire, SG8 0SS, UK
tel: +44 (0)1223 858890    mobile: +44 (0)7595 099165    fax: +44
(0)1223 853667
email: m...@cresset-group.com <mailto:m...@cresset-group.com>  
web: www.cresset-group.com <http://www.cresset-group.com>   skype:
mark_cresset



    -Original Message-
From: Jean-Marc Nuzillard mailto:jm.nuzill...@univ-reims.fr>>
Sent: 08 March 2021 13:55
To: RDKit Discuss mailto:rdkit-discuss@lists.sourceforge.net>>
Subject: [Rdkit-discuss] explicit H atoms

Dear all,

my question of the day is more general than directly related to
RDKit but the link is indirect.

Is it always possible to represent an organic molecule in 2D with
all necessary configuration hints (bond wedges pointing to the
front or to the back) without introducing any explicit hydrogen atom?

May be my question is very naive, all my apologies in advance for
that.

Best,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr <http://www.univ-reims.fr/icmr>
http://eos.univ-reims.fr/LSD/CSNteam.html
<http://eos.univ-reims.fr/LSD/CSNteam.html>

http://www.univ-reims.fr/LSD/ <http://www.univ-reims.fr/LSD/>
http://www.univ-reims.fr/LSD/JmnSoft/
<http://www.univ-reims.fr/LSD/JmnSoft/>



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

This email has been sent from Cresset BioMolecular Discovery
Limited, registered in England and Wales, Company Number:
04151475. The information in this email and any attachments are
confidential and may be privileged. It is intended solely for the
addressee and access to this email by anyone else is unauthorised.
If an addressing or transmission error has misdirected this email,
please notify the author by replying to this email. If you are not
the intended recipient you must not use, disclose, distribute,
store or copy the information in any medium. Although this e-mail
and any attachments are believed to be free from any virus or
other defect which might affect any system into which they are
opened or received, it is the responsibility of the recipient to
check that they are virus-free and that they will in no way affect
systems and data. No responsibility is accepted by Cresset
BioMolecular Discovery Limited for any loss or damage arising in
any way from their receipt, opening or use. Privacy
notice<https://www.cresset-group.com/privacy/
<https://www.cresset-group.com/privacy/>>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
<https://lists.sourceforge.net/lists/listinfo/rdkit-discuss>




--
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 

Re: [Rdkit-discuss] explicit H atoms

2021-03-10 Thread Jean-Marc Nuzillard

Dear Mark,

Many thanks for this nice example !

Best,

Jean-Marc


Le 10/03/2021 à 09:52, Mark Mackey a écrit :

I believe it's not possible to represent the chirality of the attached 
molecule's ring fusion carbons without using an explicit H.

Regards,
Mark

--
Mark Mackey
Chief Scientific Officer
Cresset
New Cambridge House, Bassingbourn Road, Litlington, Cambridgeshire, SG8 0SS, UK
tel: +44 (0)1223 858890mobile: +44 (0)7595 099165fax: +44 (0)1223 853667
email: m...@cresset-group.comweb: www.cresset-group.comskype: 
mark_cresset



-Original Message-
From: Jean-Marc Nuzillard 
Sent: 08 March 2021 13:55
To: RDKit Discuss 
Subject: [Rdkit-discuss] explicit H atoms

Dear all,

my question of the day is more general than directly related to RDKit but the 
link is indirect.

Is it always possible to represent an organic molecule in 2D with all necessary 
configuration hints (bond wedges pointing to the front or to the back) without 
introducing any explicit hydrogen atom?

May be my question is very naive, all my apologies in advance for that.

Best,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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

This email has been sent from Cresset BioMolecular Discovery Limited, registered in 
England and Wales, Company Number: 04151475. The information in this email and any 
attachments are confidential and may be privileged. It is intended solely for the 
addressee and access to this email by anyone else is unauthorised. If an addressing 
or transmission error has misdirected this email, please notify the author by 
replying to this email. If you are not the intended recipient you must not use, 
disclose, distribute, store or copy the information in any medium. Although this 
e-mail and any attachments are believed to be free from any virus or other defect 
which might affect any system into which they are opened or received, it is the 
responsibility of the recipient to check that they are virus-free and that they will 
in no way affect systems and data. No responsibility is accepted by Cresset 
BioMolecular Discovery Limited for any loss or damage arising in any way from their 
receipt, opening or use. Privacy notice<https://www.cresset-group.com/privacy/>



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/




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


Re: [Rdkit-discuss] explicit H atoms

2021-03-10 Thread Jean-Marc Nuzillard

Dear Greg, Jason, and Maciek,

many thanks for your feedback.
The reading of the IUPAC guidelines will certainly bring useful information.

Best,

Jean-Marc


Le 10/03/2021 à 09:28, Greg Landrum a écrit :


On Wed, Mar 10, 2021 at 9:05 AM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:



Your answer about tetragonal carbons goes in the same direction as
my initial feeling did,
but my feeling was only a feeling, just like yours.
I was wondering whether someone had some more formal view about
this question.


If you're looking for formal, I find the IUPAC guidelines really 
helpful for stuff like this:

https://www.degruyter.com/document/doi/10.1351/pac200678101897/html
<https://www.degruyter.com/document/doi/10.1351/pac200678101897/html>
Again I don't always agree with them, but they are pretty clear and 
include a bunch of examples of both good and bad representations.


-greg




--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] explicit H atoms

2021-03-10 Thread Jean-Marc Nuzillard

Dear Ling,

Your answer about tetragonal carbons goes in the same direction as my 
initial feeling did,

but my feeling was only a feeling, just like yours.
I was wondering whether someone had some more formal view about this 
question.


Many thanks!

Jean-Marc


Le 09/03/2021 à 20:42, Ling Chan a écrit :
This is the continuation of the previous reply, to elaborate on "the 
stripped structure can always be represented using wedged bonds".


One potential problem is that a bond is required to be wedged from 
both ends. But this should not happen. For an atom to be chiral, it 
needs to be attached to at least 3 other atoms. If it is attached to 3 
atoms, its chirality can be specified by using a wedge on any one of 
the three bonds. Hence there should always be enough possibilities to 
avoid the potential problem.


I could be wrong. I can't proof it. But this is what it feels like to 
me, especially if no atom is bonded to more than 4 other atoms.



Ling Chan mailto:lingtrek...@gmail.com>> 於 
2021年3月9日週二 上午11:32寫道:


Hello Jean-Marc,

This is a very interesting question.

Given any molecule, consider its structure stripped of all H's.
There is no reason why this stripped structure cannot be
represented using wedged bonds etc. (Will continue on the next
reply.) Hence potential problems can only arise when the added Hs
themselves introduce new chirality / stereochemistry, or that the
position of the added H itself is not uniquely defined by the
stripped structure.

One example I can think of is the secondary amine, if you only
consider one state  (say if the temperature is so low that it is
locked in that geometry). But if there is a rule saying that "the
implicit hydrogen is understood to lie in the plane of the paper",
then everything will still be fine. Just that the drawings may
look a bit strange, as attached.

But for stereo bonds, perhaps there is no escape. You will need to
draw the explicit hydrogen. See attached.

But then how about the orientation of hydroxyl groups in general?
They are usually neglected in chemical representations, aren't they??

    Ling




Jean-Marc Nuzillard mailto:jm.nuzill...@univ-reims.fr>> 於 2021年3月9日週二
上午1:04寫道:

Sure, testosterone may be drawn as



Jean-Marc


Le 08/03/2021 à 18:26, Rocco Moretti a écrit :

On Mon, Mar 8, 2021 at 11:17 AM Paul Emsley
mailto:pems...@mrc-lmb.cam.ac.uk>> wrote:

    On 08/03/2021 13:55, Jean-Marc Nuzillard wrote:
>
> Is it always possible to represent an organic molecule
in 2D with all necessary
> configuration hints (bond wedges pointing to the front
or to the back)
> without introducing any explicit hydrogen atom?

No. Testosterone.


Is that "not possible" or simply "against convention"? One
could certainly imagine someone attempting to put the dashed
and wedged designations on the ring bonds, and leaving the
hydrogens implicit. (Flagrantly ignoring how much it would
mess with steroid chemists' brains.)


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



-- 
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr  <http://www.univ-reims.fr/icmr>
http://eos.univ-reims.fr/LSD/CSNteam.html  
<http://eos.univ-reims.fr/LSD/CSNteam.html>

http://www.univ-reims.fr/LSD/  <http://www.univ-reims.fr/LSD/>
http://www.univ-reims.fr/LSD/JmnSoft/  
<http://www.univ-reims.fr/LSD/JmnSoft/>

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




--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

__

Re: [Rdkit-discuss] explicit H atoms

2021-03-09 Thread Jean-Marc Nuzillard

Hi Maciek,

I would find your example rather readable even without explicit H atoms.



I drew it like that because I do not have the wavy wedge at hand.

Thanks for your proposal,
Best,

Jean-Marc



Le 09/03/2021 à 11:26, Maciek Wójcikowski a écrit :

Hi,

I'd say that for a tetrahedral stereo that is possible to remove all 
of Hs. But for double bonds it might not be as easy, or impossible for 
some edge cases - conjugated double bonds in particular. Here is one:

image.png
[H]\C(=C/C)C=C\C([H])=C\C



Pozdrawiam,  |  Best regards,
Maciek Wójcikowski
mac...@wojcikowski.pl <mailto:mac...@wojcikowski.pl>


wt., 9 mar 2021 o 10:47 Paul Emsley <mailto:pems...@mrc-lmb.cam.ac.uk>> napisał(a):


On 09/03/2021 09:01, Jean-Marc Nuzillard wrote:
> Sure, testosterone may be drawn as
> [snip]

OK :-)

That's a top quality rendering by the way. How did you make it?

Paul.


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
<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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] explicit H atoms

2021-03-09 Thread Jean-Marc Nuzillard

The structure I posted was drawn with ChemDraw (now sold by PerkinElmer).

Best,

Jean-Marc

Le 09/03/2021 à 10:44, Paul Emsley a écrit :

On 09/03/2021 09:01, Jean-Marc Nuzillard wrote:

Sure, testosterone may be drawn as
[snip]


OK :-)

That's a top quality rendering by the way. How did you make it?

Paul.


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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] explicit H atoms

2021-03-09 Thread Jean-Marc Nuzillard

Sure, testosterone may be drawn as



Jean-Marc


Le 08/03/2021 à 18:26, Rocco Moretti a écrit :
On Mon, Mar 8, 2021 at 11:17 AM Paul Emsley <mailto:pems...@mrc-lmb.cam.ac.uk>> wrote:


On 08/03/2021 13:55, Jean-Marc Nuzillard wrote:
>
> Is it always possible to represent an organic molecule in 2D
with all necessary
> configuration hints (bond wedges pointing to the front or to the
back)
> without introducing any explicit hydrogen atom?

No. Testosterone.


Is that "not possible" or simply "against convention"? One could 
certainly imagine someone attempting to put the dashed and wedged 
designations on the ring bonds, and leaving the hydrogens implicit. 
(Flagrantly ignoring how much it would mess with steroid chemists' 
brains.)



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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] explicit H atoms

2021-03-08 Thread Jean-Marc Nuzillard

Dear all,

my question of the day is more general than directly related to RDKit
but the link is indirect.

Is it always possible to represent an organic molecule in 2D with all 
necessary

configuration hints (bond wedges pointing to the front or to the back)
without introducing any explicit hydrogen atom?

May be my question is very naive, all my apologies in advance for that.

Best,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] ETKDG in rdkit-blog

2021-02-23 Thread Jean-Marc Nuzillard

Hi Greg,

Sure, it works better with py3dmol installed...
Many thanks !

Jean-Marc



Le 23/02/2021 à 18:15, Greg Landrum a écrit :

Hi Jean-Marc,

Hmm, which version of py3dmol do you have installed?
I have v0.8.0:

$ conda list | grep 3dmol
py3dmol                   0.8.0                    py_0    conda-forge


-greg


On Tue, Feb 23, 2021 at 5:22 PM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear all,

I tried to reproduce the workflow in the recent blog post by Greg

https://greglandrum.github.io/rdkit-blog/conformers/exploration/2021/02/22/etkdg-and-distance-constraints.html

<https://greglandrum.github.io/rdkit-blog/conformers/exploration/2021/02/22/etkdg-and-distance-constraints.html>

and everything was running fine up to

IPythonConsole.drawMol3D(m,confId=cids[1])

that returned:

AttributeError Traceback (most recent call last)
 in 
> 1 IPythonConsole.drawMol3D(m,confId=cids[1])

~\Anaconda3\envs\rdkit3\lib\site-packages\rdkit\Chem\Draw\IPythonConsole.py

in drawMol3D(m, view, confId, drawAs, bgColor, size)
  71 size = molSize_3d
  72   if view is None:
---> 73 view = py3Dmol.view(width=size[0], height=size[1])
  74   view.removeAllModels()
  75   try:

AttributeError: module 'py3Dmol' has no attribute 'view'

I am using a freshly installed rdkit 2020.09.4 from conda under
windows.
Is there something I can do to see the 3D structure?

    Best,

Jean-Marc Nuzillard



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




--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] ETKDG in rdkit-blog

2021-02-23 Thread Jean-Marc Nuzillard

Dear all,

I tried to reproduce the workflow in the recent blog post by Greg
https://greglandrum.github.io/rdkit-blog/conformers/exploration/2021/02/22/etkdg-and-distance-constraints.html

and everything was running fine up to

IPythonConsole.drawMol3D(m,confId=cids[1])

that returned:

AttributeError Traceback (most recent call last)
 in 
> 1 IPythonConsole.drawMol3D(m,confId=cids[1])

~\Anaconda3\envs\rdkit3\lib\site-packages\rdkit\Chem\Draw\IPythonConsole.py 
in drawMol3D(m, view, confId, drawAs, bgColor, size)

 71 size = molSize_3d
 72   if view is None:
---> 73 view = py3Dmol.view(width=size[0], height=size[1])
 74   view.removeAllModels()
 75   try:

AttributeError: module 'py3Dmol' has no attribute 'view'

I am using a freshly installed rdkit 2020.09.4 from conda under windows.
Is there something I can do to see the 3D structure?

Best,

Jean-Marc Nuzillard



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


Re: [Rdkit-discuss] Valence coding in atom block of SDF files written by RDKit

2020-08-27 Thread Jean-Marc Nuzillard

Dear Paolo,

many thanks for this regex-based answer to my question.

Best,

Jean-Marc


Le 26/08/2020 à 23:34, Paolo Tosco a écrit :

Hi Jean-Marc,

You can strip the valence field from the MolBlock with a regex:

import re

regex = re.compile(r"^(\s*\d+\.\d{4}\s*\d+\.\d{4}\s*\d+\.\d{4} ... \d 
 \d  \d  \d  \d  )(\d)(.*)$")
print("\n".join(regex.sub(r"\g<1>0\g<3>", ...: line) for line in 
Chem.MolToMolBlock(Chem.    ...: MolFromSmiles("[NH4+]")).split("\n")))

     RDKit          2D

  1  0  0  0  0  0  0  0  0  0999 V2000
    0.    0.    0. N   0  0  0  0  0  0  0  0  0  0  0  0
M  CHG  1   1   1
M  END

HTH, cheers
p.

On Wed, Aug 26, 2020 at 5:00 PM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear all,

the atom block of the Connection Table produced by RDKit
(Chem.MolToMolBlock() function)
from the '[NH4+]' SMILES chain is
  0.    0.    0. N   0  0  0  0  0  4  0  0 0  0  0

in which the '4' in column 10 indicates that the number of bonds
of the
N atoms (implicit Hs included) is 4.
This makes sense but may be not necessary because the electric charge
information is brought by the
"M  CHG  1   1   1" line.
My ctfile.pdf file (by accelrys, dated 2011, any more recent version
around?) shows the example of alanine
in zwitterionic form and the valence column in the atom block only
contains '0' values.
Having this '4' for any organic ammonium ion is misinterpreted by the
ACDLabs software
I use for NMR chemical shift prediction. Replacing the '4' by a '0'
solves the problem.

Apart editing by myself the atom block (by hand or by scripting), is
there a way
to keep the value of the valence field to 0 for electrically charged
    atoms when writing sdf files?

Best,

Jean-Marc


-- 
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html
<http://eos.univ-reims.fr/LSD/CSNteam.html>

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/
<http://www.univ-reims.fr/LSD/JmnSoft/>



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




--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] Valence coding in atom block of SDF files written by RDKit

2020-08-26 Thread Jean-Marc Nuzillard

Dear all,

the atom block of the Connection Table produced by RDKit 
(Chem.MolToMolBlock() function)

from the '[NH4+]' SMILES chain is
 0.    0.    0. N   0  0  0  0  0  4  0  0  0  0  0

in which the '4' in column 10 indicates that the number of bonds of the 
N atoms (implicit Hs included) is 4.
This makes sense but may be not necessary because the electric charge 
information is brought by the

"M  CHG  1   1   1" line.
My ctfile.pdf file (by accelrys, dated 2011, any more recent version 
around?) shows the example of alanine
in zwitterionic form and the valence column in the atom block only 
contains '0' values.
Having this '4' for any organic ammonium ion is misinterpreted by the 
ACDLabs software
I use for NMR chemical shift prediction. Replacing the '4' by a '0' 
solves the problem.


Apart editing by myself the atom block (by hand or by scripting), is 
there a way
to keep the value of the valence field to 0 for electrically charged 
atoms when writing sdf files?


Best,

Jean-Marc


--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] Random structure generator based on chemical formula?

2020-06-16 Thread Jean-Marc Nuzillard

Dear all,

I used the pyLSD software (http://eos.univ-reims.fr/LSD/JmnSoft/PyLSD/) 
to solve the problems

of isomer generation for the C11H24 and C12H9N formula.
The similarity of the two problems in only apparent.
The 159 isomers of formula C11H24 were generated within a few seconds.
I stopped the resolution process for C12H9N after a few millions of 
solutions

because it could have lasted for days, if not for weeks.

Best,

Jean-Marc Nuzillard

Le 16/06/2020 à 11:44, Joshua Meyers a écrit :

Hey Theo,

As others have mentioned, this is indeed a non-trivial problem.
One method would be to use a de novo molecular generator with the aim 
of recovering these isomers.


The ability of a generator to generate isomers is actually one of the 
benchmarks of a de novo method in GuacaMol.
i.e. how many of the 159 isomers of C11H24 can be recovered by a 
method (that target excludes stereochemistry).

https://github.com/BenevolentAI/guacamol/blob/da0917a679f27abdf1d526ebbf84ee6792bac2a4/guacamol/standard_benchmarks.py#L15-L28

You may be able to adapt this for your use case?

Cheers,
Josh

...Incidentally, Jan's method is also implemented there :D

On Mon, 15 Jun 2020 at 12:32, theozh <mailto:the...@gmx.net>> wrote:


Hello Jan,

thank you very much for your effort.
It might take a while until I will have digested what you have
implemented.
So far, I don't have Jupyter Notebook installed and I'm running
still RDKit 2019.03 or older.
I'm running RDKit on Windows, but in general, it's might be a good
opportunity to start with Linux.

best,
Theo.

Am 14.06.2020 um 12:48 schrieb Jan Halborg Jensen:
> I whipped up something quick and dirty:

https://colab.research.google.com/drive/18esebASwEfPviu-zn9xIs1fwmED-7Yi3?usp=sharing
>
>
>> On 13 Jun 2020, at 10.54, theozh mailto:the...@gmx.net> <mailto:the...@gmx.net
<mailto:the...@gmx.net>>> wrote:
>>
>> Dear RDKit-Community,
>>
>> is there maybe a way with RDKit to generate random (but valid)
molecules with a given chemical sumformula?
>> For example:
>> C12H9N could generate Carbazole as valid compound.
>> The output would be mol or SMILES.
>>
>> I haven't found (yet) anything in this direction in the RDKit
documentation and in the web.
>> But maybe I overlooked some modules, functions or examples
which could be the base for realizing such a random generator?
>>
>> Thank you for any hints,
>> Theo.
>>


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto: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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] Number of sp3 atoms

2020-05-31 Thread Jean-Marc Nuzillard

Le 31/05/2020 à 16:52, Andrew Dalke a écrit :

On May 31, 2020, at 15:23, Chris Swain via Rdkit-discuss 
 wrote:

I’d like to include the number of sp3 atoms, is there an easy way to do this?

I don't easily see a function for that. There's rdMolDescriptors.CalcFractionCSP3() which 
"returns the fraction of C atoms that are SP3 hybridized".

You can do it yourself by looking at the atom's hybridization:



mol = Chem.MolFromSmiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C")
sum((a.GetHybridization() == Chem.HybridizationType.SP3) for a in 
mol.GetAtoms())

3

Cheers,

Andrew
da...@dalkescientific.com




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

Yes, but

>>> mol = Chem.MolFromSmiles("O=COC")
>>> sum((a.GetHybridization() == Chem.HybridizationType.SP3) for a in 
mol.GetAtoms())

1

because the two oxygen atoms are SP2.

Best regards,

Jean-Marc


--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] Hybridization state

2020-05-26 Thread Jean-Marc Nuzillard

Dear Ivan,

I understand the underlying idea,
even though the result is not the one I expected.

Many thanks for the explanations.

Best regards,

Jean-Marc


Le 26/05/2020 à 14:52, Ivan Tubert-Brohman a écrit :

Hi Jean-Marc,

RDKit says that the oxygen is sp2 because it has a special rule that 
considers the conjugation. Whether that is the "true" hybridization 
for the oxygen could be a long debate; I sometimes hear that it's 
somewhere between sp2 and sp3, perhaps not as close to sp2 as the 
nitrogen in amides, but that's all fuzzy and in the end a 
cheminformatics toolkit needs to have a clear rule.


As far as I can tell here's the relevant code: 
https://github.com/greglandrum/rdkit/blob/d41752d558bf7200ab67b98cdd9e37f1bdd378de/Code/GraphMol/ConjugHybrid.cpp#L172


I'll quote the comment here (the "case 4" refers to the return value 
of numBondsPlusLonePairs() for the atom).


        case 4:
          // potentially SP3, but we'll set it down to SP2
          // if we have a conjugated bond (like the second O
          // in O=CO)
          // we'll also avoid setting the hybridization down to
          // SP2 in the case of an atom with degree higher than 3
          // (e.g. things like CP1(C)=CC=CN=C1C, where the P
          //   has norbs = 4, and a conjugated bond, but clearly should
          //   not be SP2)
          // This is Issue276

Hope this helps,
Ivan

On Tue, May 26, 2020 at 8:10 AM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear all,

I recently arrived to this:

>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles("C(=O)OC")
>>> for x in m.GetAtoms():
... if x.GetSymbol() == 'O':
... print(repr(x.GetHybridization()))
...
rdkit.Chem.rdchem.HybridizationType.SP2
rdkit.Chem.rdchem.HybridizationType.SP2
>>>

even though an oxygen atom is really SP2 but the other one is SP3.
I use version 2020.03.1 of RDKit.

Best regards,

Jean-Marc

-- 


Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

ORCID: -0002-5120-2556
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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




--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] Hybridization state

2020-05-26 Thread Jean-Marc Nuzillard

Dear all,

I recently arrived to this:

>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles("C(=O)OC")
>>> for x in m.GetAtoms():
... if x.GetSymbol() == 'O':
... print(repr(x.GetHybridization()))
...
rdkit.Chem.rdchem.HybridizationType.SP2
rdkit.Chem.rdchem.HybridizationType.SP2
>>>

even though an oxygen atom is really SP2 but the other one is SP3.
I use version 2020.03.1 of RDKit.

Best regards,

Jean-Marc

--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

ORCID: -0002-5120-2556
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] Unexpected hybridization state of oxygens

2020-05-06 Thread Jean-Marc Nuzillard

Dear all,

from:

m = Chem.MolFromSmiles("C(=O)OC")
[print(repr(x.GetHybridization())) for x in m.GetAtoms() if 
x.GetSymbol() == 'O']


I obtained:

rdkit.Chem.rdchem.HybridizationType.SP2
rdkit.Chem.rdchem.HybridizationType.SP2

which is confusing because in methyl formiate, one of the two oxygens is sp2
and the other one is sp3.
The carbons are OK.

Is there a better way than repr(x.GetHybridization()) to access the value
of the hybridization state?

Best,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-05 Thread Jean-Marc Nuzillard

Dear Paolo,

this answers my question as well, but in an unexpected way.

Best,

Jean-Marc


Le 05/05/2020 à 14:52, Paolo Tosco a écrit :


Dear Quoc-Tuan,

this should do what you need:

https://gist.github.com/ptosco/dc4d27153e6e8e45aed654761e4d7409

Cheers,
p.

On 05/05/2020 11:52, Quoc-Tuan DO wrote:


Dear Paolo,

Thank you for your reply.

I understand now... I did not use uniquify option first then only 
uniquify=True. I thought the default would be uniquify=False.


Actually my problem is to find 2 distinct units of isoprene (pattern) 
in the borneol (smiles) as the latter is a monoterpene.


Do you have any idea I can do this ?

Thanks in advance for your time.

Best regards,

QT



Le 04/05/2020 à 19:53, Paolo Tosco a écrit :


Dear Quoc-Tuan,

On 04/05/2020 09:10, Greenpharma S.A.S. wrote:


Dear All,

Please could you help with the following problem (I could not find 
answers in discussion list) ?


pattern='C~C~C(~C)~C'

smiles='O[C@H]1C[C@H]2C([C@@]1(C)CC2)(C)C'


pat = Chem.MolFromSmiles(pattern)
mol = Chem.MolFromSmiles(smiles)
res = mol.GetSubstructMatches(pat, uniquify=True)


The results are:

((1, 2, 3, 4, 8), (1, 5, 4, 3, 9), (1, 5, 4, 3, 10), (1, 5, 4, 9, 
10), (2, 1, 5, 4, 6), (2, 1, 5, 4, 7), (2, 1, 5, 6, 7), (2, 3, 4, 
5, 9), (2, 3, 4, 5, 10), (2, 3, 4, 9, 10), (3, 4, 5, 1, 6), (3, 4, 
5, 1, 7), (3, 4, 5, 6, 7), (5, 4, 3, 2, 8), (6, 5, 4, 3, 9), (6, 5, 
4, 3, 10), (6, 5, 4, 9, 10), (7, 5, 4, 3, 9), (7, 5, 4, 3, 10), (7, 
5, 4, 9, 10), (7, 8, 3, 2, 4), (8, 3, 4, 5, 9), (8, 3, 4, 5, 10), 
(8, 3, 4, 9, 10), (8, 7, 5, 1, 4), (8, 7, 5, 1, 6), (8, 7, 5, 4, 
6), (9, 4, 3, 2, 8), (9, 4, 5, 1, 6), (9, 4, 5, 1, 7), (9, 4, 5, 6, 
7), (10, 4, 3, 2, 8), (10, 4, 5, 1, 6), (10, 4, 5, 1, 7), (10, 4, 
5, 6, 7))



I expect to have only 2 matches with uniquify=True as I only have 2 
units of the pattern.


GetSubstructMatches() will report all matches of the pattern against 
your molecule. In your case, there are 35 matches which are all 
constituted by different atom indices.



Furthermore, with or without uniquify, I have the same answers.

If you set uniquify=False, you actually get 70 matches, so twice as 
many answers. This time, matches can be constitued by the same 
indices, provided they are in a different permutation.


I have uploaded a gist here:

https://gist.github.com/ptosco/6d70cec235361fbaddc7cbc2cf9c3b5d

that hopefully will make this clearer.

Cheers,
p.

I also expected that there should be 2 "independent" lists but 
here, there is always at least one common atom between each list.


Is there something misunderstood or misused?

Thanks in advance for your help and explanations.

Best regards,

Quoc-Tuan



___
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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] GetSubstructMatches and unique match

2020-05-04 Thread Jean-Marc Nuzillard

Dear Quoc-Tuan,

GetSubstructMatches() tries to find isoprene at all positions where this 
is possible.


You may want to test your SMARTS and its matching with structures at 
this great place:

https://smartsview.zbh.uni-hamburg.de/

Maybe you would prefer to known whether borneol
follows the isoprene rule or not by trying to cover its structure
with two, unbound, isoprene units.
I really would like to know how to write that with SMARTS.

Jean-Marc


Le 04/05/2020 à 10:10, Greenpharma S.A.S. a écrit :


Dear All,

Please could you help with the following problem (I could not find 
answers in discussion list) ?


pattern='C~C~C(~C)~C'

smiles='O[C@H]1C[C@H]2C([C@@]1(C)CC2)(C)C'


pat = Chem.MolFromSmiles(pattern)
mol = Chem.MolFromSmiles(smiles)
res = mol.GetSubstructMatches(pat, uniquify=True)


The results are:

((1, 2, 3, 4, 8), (1, 5, 4, 3, 9), (1, 5, 4, 3, 10), (1, 5, 4, 9, 10), 
(2, 1, 5, 4, 6), (2, 1, 5, 4, 7), (2, 1, 5, 6, 7), (2, 3, 4, 5, 9), 
(2, 3, 4, 5, 10), (2, 3, 4, 9, 10), (3, 4, 5, 1, 6), (3, 4, 5, 1, 7), 
(3, 4, 5, 6, 7), (5, 4, 3, 2, 8), (6, 5, 4, 3, 9), (6, 5, 4, 3, 10), 
(6, 5, 4, 9, 10), (7, 5, 4, 3, 9), (7, 5, 4, 3, 10), (7, 5, 4, 9, 10), 
(7, 8, 3, 2, 4), (8, 3, 4, 5, 9), (8, 3, 4, 5, 10), (8, 3, 4, 9, 10), 
(8, 7, 5, 1, 4), (8, 7, 5, 1, 6), (8, 7, 5, 4, 6), (9, 4, 3, 2, 8), 
(9, 4, 5, 1, 6), (9, 4, 5, 1, 7), (9, 4, 5, 6, 7), (10, 4, 3, 2, 8), 
(10, 4, 5, 1, 6), (10, 4, 5, 1, 7), (10, 4, 5, 6, 7))



I expect to have only 2 matches with uniquify=True as I only have 2 
units of the pattern. Furthermore, with or without uniquify, I have 
the same answers. I also expected that there should be 2 "independent" 
lists but here, there is always at least one common atom between each 
list.


Is there something misunderstood or misused?

Thanks in advance for your help and explanations.

Best regards,

Quoc-Tuan



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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] MolLogP

2020-04-25 Thread Jean-Marc Nuzillard

Dear all,

Lipinski's rule of 5 indicates logP <5.
Is rdkit.Chem.Crippen.MolLogP() the suitable function
to calculate this logP?

JM


--

Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

ORCID : -0002-5120-2556
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] Closing a file opened by Chem.SDMolSupplier?

2020-03-29 Thread Jean-Marc Nuzillard

Ok Paulo,

with open(tempfn, 'rb') as reader:
    fsuppl = Chem.ForwardSDMolSupplier(reader)
    for m2 in fsuppl:
        print(m2.GetProp('_Name'))

works fine for what I want to do.

Best,

Jean-Marc


Le 29/03/2020 à 16:35, Jean-Marc Nuzillard a écrit :

Hi Paolo,

neither tempfn (a string)  nor reader (a SDMolSupplier) have a close() 
method.


I am not sure about what you wrote about the "with" statement.

Attempting:
with Chem.SDMolSupplier(tempfn) as reader:
    m2 = reader[0]
    print(m2.GetProp('_Name'))

resulted in:
    with Chem.SDMolSupplier(tempfn) as reader:
AttributeError: __enter__

Best,

Jean-Marc


Le 29/03/2020 à 15:51, Paolo Tosco a écrit :

Hi Jean-Marc,

tempfn.close() should allow you to delete the file.
A better alternative would be using using

with temp file.TemporaryFile as tempfn
 ...

As the file will be automatically closed and deleted for you as soon 
as it goes out of scope at the end of the context manager block.


Cheers,
p.

On 29 Mar 2020, at 13:44, Jean-Marc Nuzillard 
 wrote:


Dear all,

The following code:
__
from rdkit import Chem
import os
import tempfile

# create temp .sdf file with a benzene molecule inside
m1 = Chem.MolFromSmiles('c1c1')
m1.SetProp('_Name', 'benzene')
tempfn = tempfile.mktemp('.sdf')
writer = Chem.SDWriter(tempfn)
writer.write(m1)
writer.close()

# read the molecule from temp .sdf file and print compound name
reader = Chem.SDMolSupplier(tempfn)
m2 = reader[0]
print(m2.GetProp('_Name'))

# unlik temp file
os.unlink(tempfn)
__

running it in windows gives:

benzene
Traceback (most recent call last):
   File "rdclose.py", line 21, in 
 os.unlink(tempfn)
PermissionError: [WinError 32] The process cannot access the file 
because it is being used by another process:

'C:\\Users\\jmn\\AppData\\Local\\Temp\\tmpojn1j4nb.sdf'

I suspect the reason is that reader file is not closed.
Trying reader.close() results in a message saying that reader has no 
close() method.


Thank you in advance for helping me to get rid of the temp file.

Take care,

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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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






--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] Closing a file opened by Chem.SDMolSupplier?

2020-03-29 Thread Jean-Marc Nuzillard

Hi Paolo,

neither tempfn (a string)  nor reader (a SDMolSupplier) have a close() 
method.


I am not sure about what you wrote about the "with" statement.

Attempting:
with Chem.SDMolSupplier(tempfn) as reader:
    m2 = reader[0]
    print(m2.GetProp('_Name'))

resulted in:
    with Chem.SDMolSupplier(tempfn) as reader:
AttributeError: __enter__

Best,

Jean-Marc


Le 29/03/2020 à 15:51, Paolo Tosco a écrit :

Hi Jean-Marc,

tempfn.close() should allow you to delete the file.
A better alternative would be using using

with temp file.TemporaryFile as tempfn
 ...

As the file will be automatically closed and deleted for you as soon as it goes 
out of scope at the end of the context manager block.

Cheers,
p.


On 29 Mar 2020, at 13:44, Jean-Marc Nuzillard  
wrote:

Dear all,

The following code:
__
from rdkit import Chem
import os
import tempfile

# create temp .sdf file with a benzene molecule inside
m1 = Chem.MolFromSmiles('c1c1')
m1.SetProp('_Name', 'benzene')
tempfn = tempfile.mktemp('.sdf')
writer = Chem.SDWriter(tempfn)
writer.write(m1)
writer.close()

# read the molecule from temp .sdf file and print compound name
reader = Chem.SDMolSupplier(tempfn)
m2 = reader[0]
print(m2.GetProp('_Name'))

# unlik temp file
os.unlink(tempfn)
__

running it in windows gives:

benzene
Traceback (most recent call last):
   File "rdclose.py", line 21, in 
 os.unlink(tempfn)
PermissionError: [WinError 32] The process cannot access the file because it is 
being used by another process:
'C:\\Users\\jmn\\AppData\\Local\\Temp\\tmpojn1j4nb.sdf'

I suspect the reason is that reader file is not closed.
Trying reader.close() results in a message saying that reader has no close() 
method.

Thank you in advance for helping me to get rid of the temp file.

Take care,

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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


[Rdkit-discuss] Closing a file opened by Chem.SDMolSupplier?

2020-03-29 Thread Jean-Marc Nuzillard

Dear all,

The following code:
__
from rdkit import Chem
import os
import tempfile

# create temp .sdf file with a benzene molecule inside
m1 = Chem.MolFromSmiles('c1c1')
m1.SetProp('_Name', 'benzene')
tempfn = tempfile.mktemp('.sdf')
writer = Chem.SDWriter(tempfn)
writer.write(m1)
writer.close()

# read the molecule from temp .sdf file and print compound name
reader = Chem.SDMolSupplier(tempfn)
m2 = reader[0]
print(m2.GetProp('_Name'))

# unlik temp file
os.unlink(tempfn)
__

running it in windows gives:

benzene
Traceback (most recent call last):
  File "rdclose.py", line 21, in 
    os.unlink(tempfn)
PermissionError: [WinError 32] The process cannot access the file 
because it is being used by another process:

'C:\\Users\\jmn\\AppData\\Local\\Temp\\tmpojn1j4nb.sdf'

I suspect the reason is that reader file is not closed.
Trying reader.close() results in a message saying that reader has no 
close() method.


Thank you in advance for helping me to get rid of the temp file.

Take care,

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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] SMARTS and ring closure

2020-01-21 Thread Jean-Marc Nuzillard

Dear Brice and Richard,

for some reason, I missed your answers.

Many thanks !
I also checked your solution (inserting a ~ between C and n)
with SMARTSviewer, https://smartsview.zbh.uni-hamburg.de/ ,
for which I am pleased to advertise.

Best,

Jean-Marc


Le 17/01/2020 à 11:21, Brice Hoffmann a écrit :

Dear Jean-Marc,
adding '~' between C and ring number seems to work:

'm1 = Chem.MolFromSmiles('C1(=C12)2')
m2 = Chem.MolFromSmiles('C1CCC=C(C12)2')
pattern = Chem.MolFromSmarts('C~1~C~C~2~C~C~C~C~C~2~C~C~1')
print(m1.HasSubstructMatch(pattern))
print(m2.HasSubstructMatch(pattern))

return True and True

Best regards,
Brice


Le ven. 17 janv. 2020 à 10:55, Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> a écrit :


Dear all,

I would like to write a SMARTS chain that matches any compound
with a decalin ring system,
whatever bond multiplicity.
I wrote it as 'C1~C~C2~C~C~C~C~C2~C~C1' with ~ standing for "any
bond".
The C1-C1 and C2-C2 bonds have the "default type", which is single
or aromatic.
The code

m1 = Chem.MolFromSmiles('C1(=C12)2')
m2 = Chem.MolFromSmiles('C1CCC=C(C12)2')
pattern = Chem.MolFromSmarts('C1~C~C2~C~C~C~C~C2~C~C1')
print(m1.HasSubstructMatch(pattern))
print(m2.HasSubstructMatch(pattern))

prints False for m1 and True for m2 because the double bond in m1
is located
at the place of one of the ring closure bonds in pattern.

My question is how to write a SMARTS chain that fits in all cases
for decalin
or any other ring system and is more related to SMARTS-writing
than to RDKit, I admit.

Best,

Jean-Marc

    -- 


    Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

ORCID: -0002-5120-2556
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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



--
Brice HOFFMANN
Senior Scientist,
Molecular Modeling & Computational Chemistry
iktos.ai <http://iktos.ai/>
24 rue chaptal 75009 Paris








--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] SMARTS and ring closure

2020-01-17 Thread Jean-Marc Nuzillard

Dear all,

I would like to write a SMARTS chain that matches any compound with a 
decalin ring system,

whatever bond multiplicity.
I wrote it as 'C1~C~C2~C~C~C~C~C2~C~C1' with ~ standing for "any bond".
The C1-C1 and C2-C2 bonds have the "default type", which is single or 
aromatic.

The code

m1 = Chem.MolFromSmiles('C1(=C12)2')
m2 = Chem.MolFromSmiles('C1CCC=C(C12)2')
pattern = Chem.MolFromSmarts('C1~C~C2~C~C~C~C~C2~C~C1')
print(m1.HasSubstructMatch(pattern))
print(m2.HasSubstructMatch(pattern))

prints False for m1 and True for m2 because the double bond in m1 is located
at the place of one of the ring closure bonds in pattern.

My question is how to write a SMARTS chain that fits in all cases for 
decalin
or any other ring system and is more related to SMARTS-writing than to 
RDKit, I admit.


Best,

Jean-Marc

--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

ORCID: -0002-5120-2556
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] SDMolSupplier, next()

2019-10-15 Thread Jean-Marc Nuzillard

Dear all,

The code:

from rdkit import Chem
sdfnamein = "simple.sdf"
suppl = Chem.SDMolSupplier(sdfnamein)
m = suppl.next()
print(m.GetNumAtoms())

prints:

Traceback (most recent call last):
  File "demo.py", line 4, in 
    m = suppl.next()
AttributeError: 'SDMolSupplier' object has no attribute 'next'

even though the code in 
http://www.rdkit.org/docs/source/rdkit.Chem.rdmolfiles.html#rdkit.Chem.rdmolfiles.SDMolSupplier,

at paragraph "Lazy evaluation 2" indicates:


suppl  =  SDMolSupplier('in.sdf')
mol1  =  suppl.next()


I run rdkit 2018.09.1.0 from Anaconda in Windows 10.

for  mol  in  suppl:
mol.GetNumAtoms()

works fine.

Best,

Jean-Marc

--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] reaction SMARTS and double bonds

2019-04-04 Thread Jean-Marc Nuzillard

Problem solved. Many Thanks,

Jean-Marc

Le 04/04/2019 à 06:54, Greg Landrum a écrit :



On Wed, Apr 3, 2019 at 8:26 PM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear Greg,

In [10] and Out[10] of your answer below (thanks!) incited me to
believe that the geometry of double bonds
outside of the reactive center in the reaction product is not lost
for ever, contrarily to what my example showed.
So, I went back to my example and printed the SMILES
representations of the reagent and of the product.
The double bond are there and in good shape:
C/C=C(\C=C(C)\C=C(C)\C=C/C=C(/C)C(=O)[C@]12O[C@H]1[C@@](O)(CCO)N=C2O)C(=O)OC
for the reagent
C/C=C(\C=C(C)\C=C(C)\C=C/C=C(/C)C(=O)[C@]12O[C@H]1[C@@](O)(CCO)NC2=O)C(=O)OC
for the product.
So, what I conclude is that MolToInchi does not consider the
double bond geometry in the reaction product
but that MolToSmiles does it.



Apologies... I didn't read your original email closely enough and 
answered the wrong question.
What's going on in your case is that the stereochemistry information 
in the products of the reaction hasn't been updated.
This doesn't happen automatically (just as the products of reactions 
are not automatically sanitized).


If you call Chem.AssignStereochemistry() on the products you get the 
expected result:


In [38]: inchi1 = 
"InChI=1S/C23H29NO7/c1-6-17(19(27)30-5)13-15(3)12-14(2)8-7-9-16(4)18(26)23-20(31-23)22(29,10-11-25)24-21(23)28/h6-9,1
    ...: 
2-13,20,25,29H,10-11H2,1-5H3,(H,24,28)/b8-7-,14-12+,15-13+,16-9-,17-6+/t20-,22-,23-/m0/s1" 


    ...: m1 = Chem.MolFromInchi(inchi1)
    ...: rxn = 
AllChem.ReactionFromSmarts('[C:1]([OH:2])=[N:3]>>[C:1](=[OH0:2])[NH:3]')

    ...: ps = rxn.RunReactants((m1,))
    ...: m2 = ps[0][0]
    ...: Chem.AssignStereochemistry(m2,force=True,cleanIt=True)
    ...: inchi2 = Chem.MolToInchi(m2)
    ...: print(inchi1)
    ...: print(inchi2)
    ...: print(inchi1 == inchi2)
InChI=1S/C23H29NO7/c1-6-17(19(27)30-5)13-15(3)12-14(2)8-7-9-16(4)18(26)23-20(31-23)22(29,10-11-25)24-21(23)28/h6-9,12-13,20,25,29H,10-11H2,1-5H3,(H,24,28)/b8-7-,14-12+,15-13+,16-9-,17-6+/t20-,22-,23-/m0/s1
InChI=1S/C23H29NO7/c1-6-17(19(27)30-5)13-15(3)12-14(2)8-7-9-16(4)18(26)23-20(31-23)22(29,10-11-25)24-21(23)28/h6-9,12-13,20,25,29H,10-11H2,1-5H3,(H,24,28)/b8-7-,14-12+,15-13+,16-9-,17-6+/t20-,22-,23-/m0/s1
True

The creation of new Mol objects from these two SMILES and the
subsequent
generation of InChI strings produces identical results
as expected, because the reagent and the product are tautomers.

By the way, does the last RDKit release correct the problem you
mentioned about MolFromSmiles
in you email dated February 14, 2019?


Part of it, but not everything. I will file a bug for the problem you 
reported so that it doesn't get lost. Maybe I can find/fix it before 
the next patch release.


-greg


Best regards,

Jean-Marc



Le 03/04/2019 à 18:16, Greg Landrum a écrit :

Hi Jean-Marc,

Unfortunately not. The RDKit currently ignores stereo information
from "mapped bonds" (bonds for which both atoms are mapped) from
the reactants. If you include stereo info in the reaction itself,
that will be copied over in to the products, but that is not what
you're looking for. Here's an example:

In [4]: r1 =

AllChem.ReactionFromSmarts('[C:1][C:2]=[C:3][F:4]>>[C:1][C:2]=[C:3][Cl:4]')


In [5]:
Chem.MolToSmiles(r1.RunReactants((Chem.MolFromSmiles('CC=CF'),))[0][0])

Out[5]: 'CC=CCl'

In [6]:

Chem.MolToSmiles(r1.RunReactants((Chem.MolFromSmiles('C/C=C/F'),))[0][0])

Out[6]: 'CC=CCl'

In [7]: r2 =

AllChem.ReactionFromSmarts('[C:1]/[C:2]=[C:3]/[F:4]>>[C:1]/[C:2]=[C:3]/[Cl:4]')


In [8]:

Chem.MolToSmiles(r2.RunReactants((Chem.MolFromSmiles('C/C=C/F'),))[0][0])

Out[8]: 'C/C=C/Cl'

In [9]:
Chem.MolToSmiles(r2.RunReactants((Chem.MolFromSmiles('CC=CF'),))[0][0])

Out[9]: 'C/C=C/Cl'

In [10]:

Chem.MolToSmiles(r1.RunReactants((Chem.MolFromSmiles('C/C=C/CC=CF'),))[0][0])

Out[10]: 'C/C=C/CC=CCl'


It's more tolerant of atomic stereochemistry:

In [11]: r3 =
AllChem.ReactionFromSmarts('[C:1][C:2][F:3]>>[C:1][C:2][O:3]')

In [12]:

Chem.MolToSmiles(r3.RunReactants((Chem.MolFromSmiles('N[C@H](Cl)CF'),))[0][0])

Out[12]: 'N[C@H](Cl)CO'

In [13]:

Chem.MolToSmiles(r3.RunReactants((Chem.MolFromSmiles('C[C@H](F)Cl'),))[0][0])

Out[13]: 'C[C@H](O)Cl'


Figuring out a good solution for the double bond handling would
be a nice challenge for the next release.

Best,
    -greg



On Wed, Apr 3, 2019 at 5:54 PM Jean-Marc Nuzillard
mailto:jm.nuzill...@univ-reims.fr>>
wrote:

Dear all,

I have a molecule 

Re: [Rdkit-discuss] reaction SMARTS and double bonds

2019-04-03 Thread Jean-Marc Nuzillard

Dear Greg,

In [10] and Out[10] of your answer below (thanks!) incited me to believe 
that the geometry of double bonds
outside of the reactive center in the reaction product is not lost for 
ever, contrarily to what my example showed.
So, I went back to my example and printed the SMILES representations of 
the reagent and of the product.

The double bond are there and in good shape:
C/C=C(\C=C(C)\C=C(C)\C=C/C=C(/C)C(=O)[C@]12O[C@H]1[C@@](O)(CCO)N=C2O)C(=O)OC 
for the reagent
C/C=C(\C=C(C)\C=C(C)\C=C/C=C(/C)C(=O)[C@]12O[C@H]1[C@@](O)(CCO)NC2=O)C(=O)OC 
for the product.
So, what I conclude is that MolToInchi does not consider the double bond 
geometry in the reaction product

but that MolToSmiles does it.
The creation of new Mol objects from these two SMILES and the subsequent
generation of InChI strings produces identical results
as expected, because the reagent and the product are tautomers.

By the way, does the last RDKit release correct the problem you 
mentioned about MolFromSmiles

in you email dated February 14, 2019?

Best regards,

Jean-Marc



Le 03/04/2019 à 18:16, Greg Landrum a écrit :

Hi Jean-Marc,

Unfortunately not. The RDKit currently ignores stereo information from 
"mapped bonds" (bonds for which both atoms are mapped) from the 
reactants. If you include stereo info in the reaction itself, that 
will be copied over in to the products, but that is not what you're 
looking for. Here's an example:


In [4]: r1 =
AllChem.ReactionFromSmarts('[C:1][C:2]=[C:3][F:4]>>[C:1][C:2]=[C:3][Cl:4]')


In [5]:
Chem.MolToSmiles(r1.RunReactants((Chem.MolFromSmiles('CC=CF'),))[0][0])

Out[5]: 'CC=CCl'

In [6]:
Chem.MolToSmiles(r1.RunReactants((Chem.MolFromSmiles('C/C=C/F'),))[0][0])

Out[6]: 'CC=CCl'

In [7]: r2 =

AllChem.ReactionFromSmarts('[C:1]/[C:2]=[C:3]/[F:4]>>[C:1]/[C:2]=[C:3]/[Cl:4]')


In [8]:
Chem.MolToSmiles(r2.RunReactants((Chem.MolFromSmiles('C/C=C/F'),))[0][0])

Out[8]: 'C/C=C/Cl'

In [9]:
Chem.MolToSmiles(r2.RunReactants((Chem.MolFromSmiles('CC=CF'),))[0][0])

Out[9]: 'C/C=C/Cl'

In [10]:

Chem.MolToSmiles(r1.RunReactants((Chem.MolFromSmiles('C/C=C/CC=CF'),))[0][0])

Out[10]: 'C/C=C/CC=CCl'


It's more tolerant of atomic stereochemistry:

In [11]: r3 =
AllChem.ReactionFromSmarts('[C:1][C:2][F:3]>>[C:1][C:2][O:3]')

In [12]:

Chem.MolToSmiles(r3.RunReactants((Chem.MolFromSmiles('N[C@H](Cl)CF'),))[0][0])

Out[12]: 'N[C@H](Cl)CO'

In [13]:

Chem.MolToSmiles(r3.RunReactants((Chem.MolFromSmiles('C[C@H](F)Cl'),))[0][0])

Out[13]: 'C[C@H](O)Cl'


Figuring out a good solution for the double bond handling would be a 
nice challenge for the next release.


Best,
-greg



On Wed, Apr 3, 2019 at 5:54 PM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear all,

I have a molecule that comes from an InChI string, that is decoded
as an iminol I would like to transform in its amide tautomer.
The same molecule contains also a series of doubles bonds.

The following code:

inchi1 =

"InChI=1S/C23H29NO7/c1-6-17(19(27)30-5)13-15(3)12-14(2)8-7-9-16(4)18(26)23-20(31-23)22(29,10-11-25)24-21(23)28/h6-9,12-13,20,25,29H,10-11H2,1-5H3,(H,24,28)/b8-7-,14-12+,15-13+,16-9-,17-6+/t20-,22-,23-/m0/s1"
m1 = Chem.MolFromInchi(inchi1)
rxn =
AllChem.ReactionFromSmarts('[C:1]([OH:2])=[N:3]>>[C:1](=[OH0:2])[NH:3]')
ps = rxn.RunReactants((m1,))
m2 = ps[0][0]
inchi2 = Chem.MolToInchi(m2)
print(inchi1)
print(inchi2)
print(inchi1 == inchi2)

prints:
[17:26:42] WARNING: Omitted undefined stereo

InChI=1S/C23H29NO7/c1-6-17(19(27)30-5)13-15(3)12-14(2)8-7-9-16(4)18(26)23-20(31-23)22(29,10-11-25)24-21(23)28/h6-9,12-13,20,25,29H,10-11H2,1-5H3,(H,24,28)/b8-7-,14-12+,15-13+,16-9-,17-6+/t20-,22-,23-/m0/s1

InChI=1S/C23H29NO7/c1-6-17(19(27)30-5)13-15(3)12-14(2)8-7-9-16(4)18(26)23-20(31-23)22(29,10-11-25)24-21(23)28/h6-9,12-13,20,25,29H,10-11H2,1-5H3,(H,24,28)/t20-,22-,23-/m0/s1
False

in which the /b layer has disappeared, leaving the double bond
geometry undefined.

Is there a way to preserve or to recover the lost information?

    Jean-Marc
-- 


Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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




--
Jean-Marc Nuzillard
Directeur de Recherches au CNRS

Institut de Chimie Moléc

Re: [Rdkit-discuss] Reaction SMARTS

2019-02-06 Thread Jean-Marc Nuzillard

Hi Ivan,

I tried the SMARTS you sent and it worked.

Thank you!

Jean-Marc

Le 06/02/2019 à 15:46, Ivan Tubert-Brohman a écrit :

Hi Jean-Marc,

Try the reaction smarts '[C:1]([OH:2])=[N:3]>>[C:1](=[OH0:2])[NH:3]'. 
The only difference is the addition of "H0" to product atom :2. The 
problem is that the hydrogen count from the reactant atom gets copied 
over unless specified otherwise.


Hope this helps,
Ivan


On Wed, Feb 6, 2019 at 9:37 AM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear All,

I need to convert iminol functional groups into amides.

Being new to reaction SMARTS I wrote the following code:

*

from rdkit import Chem
from rdkit.Chem import AllChem
#from rdkit.Chem.Draw import IPythonConsole

sm1 = 'CNC(C)=O'
m1 = Chem.MolFromSmiles(sm1)
#m1
## m1 is an amide

inchi = Chem.MolToInchi(m1)
m2 = Chem.MolFromInchi(inchi)
#m2
## m2 is an iminol, as expected from InChI

rxn =
AllChem.ReactionFromSmarts('[C:1]([OH:2])=[N:3]>>[C:1](=[O:2])[NH:3]')
ps = rxn.RunReactants((m2,))
len(ps)
## 1

m3 = ps[0][0]
#m3
## m3 is wrong and cannot be sanitized
print(Chem.MolToSmiles(m3))
## CNC(C)=[OH]

rxn =
AllChem.ReactionFromSmarts('[H:4][0:1][C:2]=[N:3]>>[O:1]=[C:2][N:3][H:4]')
ps = rxn.RunReactants((m2,))
len(ps)
## 0


The first reaction SMARTS I tried
('[C:1]([OH:2])=[N:3]>>[C:1](=[O:2])[NH:3]')
gives a result but with a trivalent neutral oxygen atom.
Reading more about SMIRKS theory, I tried:
'[H:4][0:1][C:2]=[N:3]>>[O:1]=[C:2][N:3][H:4]' without any success.

Could someone indicate me the correct iminol->amide reaction SMARTS?

    Best regards,

Jean-Marc

-- 
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] Reaction SMARTS

2019-02-06 Thread Jean-Marc Nuzillard

Dear All,

I need to convert iminol functional groups into amides.

Being new to reaction SMARTS I wrote the following code:

*

from rdkit import Chem
from rdkit.Chem import AllChem
#from rdkit.Chem.Draw import IPythonConsole

sm1 = 'CNC(C)=O'
m1 = Chem.MolFromSmiles(sm1)
#m1
## m1 is an amide

inchi = Chem.MolToInchi(m1)
m2 = Chem.MolFromInchi(inchi)
#m2
## m2 is an iminol, as expected from InChI

rxn = AllChem.ReactionFromSmarts('[C:1]([OH:2])=[N:3]>>[C:1](=[O:2])[NH:3]')
ps = rxn.RunReactants((m2,))
len(ps)
## 1

m3 = ps[0][0]
#m3
## m3 is wrong and cannot be sanitized
print(Chem.MolToSmiles(m3))
## CNC(C)=[OH]

rxn = 
AllChem.ReactionFromSmarts('[H:4][0:1][C:2]=[N:3]>>[O:1]=[C:2][N:3][H:4]')

ps = rxn.RunReactants((m2,))
len(ps)
## 0


The first reaction SMARTS I tried 
('[C:1]([OH:2])=[N:3]>>[C:1](=[O:2])[NH:3]')

gives a result but with a trivalent neutral oxygen atom.
Reading more about SMIRKS theory, I tried:
'[H:4][0:1][C:2]=[N:3]>>[O:1]=[C:2][N:3][H:4]' without any success.

Could someone indicate me the correct iminol->amide reaction SMARTS?

Best regards,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


[Rdkit-discuss] SMILES -> MOL -> SMILES

2019-02-06 Thread Jean-Marc Nuzillard

Dear all,

I needed to test whether RDKit-generated SMILES strings were readable again
so that structures could be retrieved after storage.

The following script produced unexpected results.

*

from rdkit import Chem
#from rdkit.Chem import rdCoordGen
#from rdkit.Chem.Draw import IPythonConsole

# PubChem  CID 6436662
inchi = 
'InChI=1/C20H32/c1-16(2)20-14-12-18(4)10-6-8-17(3)9-7-11-19(5)13-15-20/h8,10-12,14,16,20H,6-7,9,13,15H2,1-5H3/b14-12+,17-8+,18-10-,19-11-/t20-/m0/s1'

m1 = Chem.MolFromInchi(inchi)
#rdCoordGen.AddCoords(m1)
#m1
# looks good, like the structure drawn by PubChem
smi1 = Chem.MolToSmiles(m1)
print('smi1 =', smi1)
# smi1 = C/C1=C/C/C=C(\C)CC/C=C(/C)CC[C@@H](C(C)C)/C=C/1
m2 = Chem.MolFromSmiles(smi1)
# [14:01:45] Conflicting single bond directions around double bond at 
index 1.
# [14:01:45]   BondStereo set to STEREONONE and single bond directions 
set to NONE.

#rdCoordGen.AddCoords(m2)
#m2
# a double bond looks bad
smi2 = Chem.MolToSmiles(m2)
print('smi2 =', smi2)
# smi2 = CC1=CC/C=C(\C)CC/C=C(/C)CC[C@@H](C(C)C)/C=C/1
# a double bond is missing
**

For the moment, this molecule will be discarded from my collection...

Best regards,

--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] MolToSmiles(), atom indexes

2019-02-01 Thread Jean-Marc Nuzillard

Dear Jose Manuel,

Many thanks for your quick answer and for your script.

All  the best,

Jean-Marc



Le 01/02/2019 à 13:20, Jose Manuel Gally a écrit :


Dear Jean-Marc,

I believe this can be achieved by using the Mol property 
"_smilesAtomOutputOrder", which is set only after using the function 
Chem.MolToSmiles.


Please find attached a very simple example of how it can be extracted.

Cheers,
Jose Manuel

On 01.02.19 13:03, Jean-Marc Nuzillard wrote:

Dear all,

I am looking for a way to relate atom indexes of a Mol object
and the order of appearance of the atoms along the corresponding SMILES
chain, as produced by Chem.MolToSmiles().
Thanks in advance,

Jean-Marc

--
Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


___
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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] MolToSmiles(), atom indexes

2019-02-01 Thread Jean-Marc Nuzillard

Dear all,

I am looking for a way to relate atom indexes of a Mol object
and the order of appearance of the atoms along the corresponding SMILES
chain, as produced by Chem.MolToSmiles().
Thanks in advance,

Jean-Marc

--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] Warning as error

2019-01-21 Thread Jean-Marc Nuzillard

Each molecule has the _Name I gave it.
Thank you for suggesting to interleave molecule indexes (or names)
with warning messages redirected to unbuffered stderr. It works.
I will use the trick together with Lukas (Thanks!) idea of redirecting 
stderr

for in-script processing.

All the best,

Jean-Marc

Le 21/01/2019 à 21:04, Dimitri Maziuk via Rdkit-discuss a écrit :

On 1/21/19 1:42 PM, Jean-Marc Nuzillard wrote:


             sys.stderr.write("Bad: %s\n" % (mol.GetProp("_Name"),))
I know which bond has a problem but I still do not know in which molecule.

Are you sure they all have _Name's? I'd just print the count outside of
the try/catch block and ignore ones not followed by the warning message.
(And run with #!/usr/bin/python -u and/or flush sys.stdout/stderr on
every iteration for good measure.)



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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Warning as error

2019-01-21 Thread Jean-Marc Nuzillard

Adapting from https://github.com/rdkit/rdkit/issues/642 I wrote:

    reader = Chem.SDMolSupplier(file_sdf, sanitize = False)
    for mol in reader:
        try:
            Chem.SanitizeMol(mol)
        except:
            sys.stderr.write("Bad: %s\n" % (mol.GetProp("_Name"),))
            continue

A good point is that this code does not produce any warning, and that it 
does

when I remove the "sanitize = False" option.
However Chem.SanitizeMol(mol) never raises an error,
unless something is missing in my try/except statements.

The warning message I want to track is:
[19:58:01] Conflicting single bond directions around double bond at 
index 27.
[19:58:01]   BondStereo set to STEREONONE and single bond directions set 
to NONE.

I know which bond has a problem but I still do not know in which molecule.

Jean-Marc

PS. Markus, sorry for the duplicated message.

Le 21/01/2019 à 14:55, Markus Sitzmann a écrit :

Maybe this helps (at least, it is from Greg):

https://github.com/rdkit/rdkit/issues/642

Markus

On Mon, Jan 21, 2019 at 2:25 PM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


My problem is more to know which molecules cause problems
than avoiding the printing of warning messages in the console window.
I am looking for an option that would turn warnings into errors,
if any.

Jean-Marc



Le 21/01/2019 à 13:44, Stephen O'hagan a écrit :
> I've had similar problems; none of the claimed methods to switch
off RDKit logging of warnings has worked for me.
>
> I ended up just re-directing stderr when running the script like
this:
>
> python myfile.py  2> myErrorLog.txt
>
> 
> Dr. Steve O'Hagan,
    >
>
> -Original Message-
> From: Jean-Marc Nuzillard [mailto:jm.nuzill...@univ-reims.fr
<mailto:jm.nuzill...@univ-reims.fr>]
> Sent: 21 January 2019 12:33
> To: RDKit Discuss mailto:rdkit-discuss@lists.sourceforge.net>>
> Subject: [Rdkit-discuss] Warning as error
>
> Dear all,
>
> The minimalist python code:
>   reader = Chem.SDMolSupplier('my_file.sdf')
>   for mol in reader:
>       pass
>
> gives me warning messages when run on a particular SD file.
> How can I simply run a specific action for the molecules that
    cause problem, possibly using  try/catch statements?
> Best,
>
> Jean-Marc
>
>
> --
> 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
>
> Tel : 03 26 91 82 10
> Fax : 03 26 91 31 66
> http://www.univ-reims.fr/ICMR
> http://eos.univ-reims.fr/LSD/CSNteam.html
>
> http://www.univ-reims.fr/LSD/
> http://www.univ-reims.fr/LSD/JmnSoft/
>
>
> ---
> L'absence de virus dans ce courrier électronique a été vérifiée
par le logiciel antivirus Avast.
> https://www.avast.com/antivirus
>
>
>
> _______
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
<mailto:Rdkit-discuss@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


-- 
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



    _______
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Warning as error

2019-01-21 Thread Jean-Marc Nuzillard

My problem is more to know which molecules cause problems
than avoiding the printing of warning messages in the console window.
I am looking for an option that would turn warnings into errors, if any.

Jean-Marc



Le 21/01/2019 à 13:44, Stephen O'hagan a écrit :

I've had similar problems; none of the claimed methods to switch off RDKit 
logging of warnings has worked for me.

I ended up just re-directing stderr when running the script like this:

python myfile.py  2> myErrorLog.txt


Dr. Steve O'Hagan,
  


-Original Message-
From: Jean-Marc Nuzillard [mailto:jm.nuzill...@univ-reims.fr]
Sent: 21 January 2019 12:33
To: RDKit Discuss 
Subject: [Rdkit-discuss] Warning as error

Dear all,

The minimalist python code:
      reader = Chem.SDMolSupplier('my_file.sdf')
      for mol in reader:
          pass

gives me warning messages when run on a particular SD file.
How can I simply run a specific action for the molecules that cause problem, 
possibly using  try/catch statements?
Best,

Jean-Marc


--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus



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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


[Rdkit-discuss] Warning as error

2019-01-21 Thread Jean-Marc Nuzillard

Dear all,

The minimalist python code:
    reader = Chem.SDMolSupplier('my_file.sdf')
    for mol in reader:
        pass

gives me warning messages when run on a particular SD file.
How can I simply run a specific action for the molecules that cause problem,
possibly using  try/catch statements?
Best,

Jean-Marc


--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus



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


[Rdkit-discuss] InChI -> Mol(2D) -> InChI

2019-01-10 Thread Jean-Marc Nuzillard

Dear all,

I wrote some time ago about adding 3D coordinates to atoms in a molecule 
that was created from an InChI string.
The conversion of the molecule to InChI dis not produce the initial 
InChI due to the presence of an intracyclic double bond.

I face them same problem with the generation of 2D coordinates:

inchi_initial = 
"InChI=1S/C20H26O4/c1-12(2)17-11-18(22)14(4)7-5-6-13(3)8-16(21)9-15-10-19(17)24-20(15)23/h6-7,10,12,17,19H,5,8-9,11H2,1-4H3/b13-6-,14-7+/t17-,19-/m1/s1"

m = Chem.MolFromInchi(inchi_initial)
AllChem.Compute2DCoords(m)
inchi_final = Chem.MolToInchi(m)
print(inchi_initial)
print(inchi_final)
print(inchi_initial == inchi_final) # returns False

Is there something I can do to avoid this?
The difference between the initial and final InChI strings is in the 
geometry of the double bonds.

All the best,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/CSNteam.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel 
antivirus Avast.
https://www.avast.com/antivirus



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


Re: [Rdkit-discuss] InChI to Mol to InChi

2018-12-18 Thread JEAN-MARC NUZILLARD
Thank you Christos for confirming what I suspected about double bond 
geometry

and thank you Jason for finding some logics in my observation.

Dimitri, how can alatis help me to find a first draft of 3D structure
for a few ten thousands of compounds from InChI strings?

All the best,

Jean-Marc


Le 18/12/2018 19:43, Jason Biggs a écrit :

see https://github.com/rdkit/rdkit/issues/1852, and
https://sourceforge.net/p/rdkit/mailman/message/36309813/

You can see it in the smiles if you remove stereo after embedding,
then re-detect stereo from the conformation.


inchi1 =


"InChI=1S/C20H26O4/c1-12(2)17-11-18(22)14(4)7-5-6-13(3)8-16(21)9-15-10-19(17)24-20(15)23/h6-7,10,12,17,19H,5,8-9,11H2,1-4H3/b13-6-,14-7+/t17-,19-/m1/s1"


m1 = Chem.MolFromInchi(inchi1)

m1 = Chem.AddHs(m1)

m2 = Chem.Mol(m1)

AllChem.EmbedMolecule(m2)

m3 = Chem.Mol(m2)

Chem.rdmolops.RemoveStereochemistry(m3)

Chem.rdmolops.AssignStereochemistryFrom3D(m3)

sm1 = Chem.MolToSmiles(m1)

sm2 = Chem.MolToSmiles(m2)

sm3 = Chem.MolToSmiles(m3)

print(sm1 == sm2)  # returns true

print(sm2 == sm3) # returns false


The difference between sm2 and sm3 is just swapping a \ for a /,
confirming what Christos was able to read from the InChI.

Why does the inchi reflect the 3D bond stereo but the smiles doesn't
until you remove and re-detect the stereo?  Does the InChI code go to
the 3D structure when present and ignore stereo information in the mol
object?

Jason Biggs

On Tue, Dec 18, 2018 at 12:14 PM Christos Kannas
 wrote:


Hi Jean-Marc,

There difference is due to bond orientation (if my inchi analysis
skills are correct).
See the bold bond layer below (14-7+ vs 14-7-).

m1 ->


InChI=1S/C20H26O4/c1-12(2)17-11-18(22)14(4)7-5-6-13(3)8-16(21)9-15-10-19(17)24-20(15)23/h6-7,10,12,17,19H,5,8-9,11H2,1-4H3/B13-6-,14-7+/t17-,19-/m1/s1


m2 ->


InChI=1S/C20H26O4/c1-12(2)17-11-18(22)14(4)7-5-6-13(3)8-16(21)9-15-10-19(17)24-20(15)23/h6-7,10,12,17,19H,5,8-9,11H2,1-4H3/B13-6-,14-7-/t17-,19-/m1/s1


Not sure why it happens, but I've seen it multiple times...

Best,

Christos

Christos Kannas

Chem[o]informatics Researcher & Software Developer

[1]

On Tue, 18 Dec 2018 at 17:36, JEAN-MARC NUZILLARD
 wrote:


Thank you for your answer but alatis might not be adapted to my
current
problem.

Attempting to understand what was changed by the embedding step I
wrote:

inchi1 =




"InChI=1S/C20H26O4/c1-12(2)17-11-18(22)14(4)7-5-6-13(3)8-16(21)9-15-10-19(17)24-20(15)23/h6-7,10,12,17,19H,5,8-9,11H2,1-4H3/b13-6-,14-7+/t17-,19-/m1/s1"

m1 = Chem.MolFromInchi(inchi1)
m1 = Chem.AddHs(m1)
m2 = Chem.Mol(m1)
AllChem.EmbedMolecule(m2)
sm1 = Chem.MolToSmiles(m1)
sm2 = Chem.MolToSmiles(m2)
print(sm1)
print(sm2)
print(sm1 == sm2)
inc1 = Chem.MolToInchi(m1)
inc2 = Chem.MolToInchi(m2)
print(inc1)
print(inc2)
print(inc1 == inc2)

Molecules m1 and m2 have identical SMILES representations
but different InChI representations, which I find odd.

All the best,

Jean-Marc

Le 18/12/2018 00:40, Dimitri Maziuk via Rdkit-discuss a écrit :

On 12/17/18 4:50 PM, JEAN-MARC NUZILLARD wrote:

Is there any more deterministic procedure than the one of

trying until

success is obtained?

How do I determine the InChI string of a conformer obtained

after

multiple embedding?


This representation keeps 3D config:

http://alatis.nmrfam.wisc.edu/


Generally speaking the problem with InChI is that the only

*required*

layer is the formula. Therefore *an* InChI string cannot be used

to

differentiate conformers, you need the InChI string with all the
relevant layers and all the protons.

https://www.nature.com/articles/sdata201773

___
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



Links:
--
[1] http://cy.linkedin.com/in/christoskannas



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


Re: [Rdkit-discuss] InChI to Mol to InChi

2018-12-18 Thread JEAN-MARC NUZILLARD
Thank you for your answer but alatis might not be adapted to my current 
problem.


Attempting to understand what was changed by the embedding step I wrote:

inchi1 = 
"InChI=1S/C20H26O4/c1-12(2)17-11-18(22)14(4)7-5-6-13(3)8-16(21)9-15-10-19(17)24-20(15)23/h6-7,10,12,17,19H,5,8-9,11H2,1-4H3/b13-6-,14-7+/t17-,19-/m1/s1"

m1 = Chem.MolFromInchi(inchi1)
m1 = Chem.AddHs(m1)
m2 = Chem.Mol(m1)
AllChem.EmbedMolecule(m2)
sm1 = Chem.MolToSmiles(m1)
sm2 = Chem.MolToSmiles(m2)
print(sm1)
print(sm2)
print(sm1 == sm2)
inc1 = Chem.MolToInchi(m1)
inc2 = Chem.MolToInchi(m2)
print(inc1)
print(inc2)
print(inc1 == inc2)

Molecules m1 and m2 have identical SMILES representations
but different InChI representations, which I find odd.

All the best,

Jean-Marc




Le 18/12/2018 00:40, Dimitri Maziuk via Rdkit-discuss a écrit :

On 12/17/18 4:50 PM, JEAN-MARC NUZILLARD wrote:

Is there any more deterministic procedure than the one of trying until
success is obtained?

How do I determine the InChI string of a conformer obtained after
multiple embedding?


This representation keeps 3D config: http://alatis.nmrfam.wisc.edu/

Generally speaking the problem with InChI is that the only *required*
layer is the formula. Therefore *an* InChI string cannot be used to
differentiate conformers, you need the InChI string with all the
relevant layers and all the protons.

https://www.nature.com/articles/sdata201773

___
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] [**SPAM** ? (26%)] Re: InChI to Mol to InChi

2018-12-17 Thread JEAN-MARC NUZILLARD
Is there any more deterministic procedure than the one of trying until 
success is obtained?


How do I determine the InChI string of a conformer obtained after 
multiple embedding?
I know how to do it for a molecule, so, how do I make a molecule from a 
conformer?


All the best,

Jean-Marc



Le 17/12/2018 17:07, Dmitri Maziuk via Rdkit-discuss a écrit :

On Mon, 17 Dec 2018 14:23:32 +0100
JEAN-MARC NUZILLARD  wrote:
...

returns DIFFERENT.

Removing the EmbedMolecule step returns EQUAL.

How could I change that?


You could try generating multiple conformers instead and checking if
one of them returns EQUAL.



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


[Rdkit-discuss] InChI to Mol to InChi

2018-12-17 Thread JEAN-MARC NUZILLARD

Dear all,

I tried to transform an InChI into a Mol and back to InChi.

The following code:

inchi1 = 
"InChI=1S/C20H26O4/c1-12(2)17-11-18(22)14(4)7-5-6-13(3)8-16(21)9-15-10-19(17)24-20(15)23/h6-7,10,12,17,19H,5,8-9,11H2,1-4H3/b13-6-,14-7+/t17-,19-/m1/s1"

m = Chem.MolFromInchi(inchi1)
m = Chem.AddHs(m)
AllChem.EmbedMolecule(m)
inchi2 = Chem.MolToInchi(m)
print(inchi1)
print(inchi2)
print("EQUAL" if inchi1 == inchi2 else "DIFFERENT")

returns DIFFERENT.

Removing the EmbedMolecule step returns EQUAL.

How could I change that?


All the best,

Jean-Marc


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


[Rdkit-discuss] 3D geometry optimization

2018-11-18 Thread Jean-Marc Nuzillard

Hello,

I would to generate a 3D geometry of a molecule from a SMILES string.
Using sucrose as example I wrote:

from rdkit import Chem
from rdkit.Chem import AllChem
m = 
Chem.MolFromSmiles('O([C@@]1(O[C@H](CO)[C@H]([C@@H]1O)O)CO)[C@H]1O[C@@H]([C@@H](O)[C@@H]([C@H]1O)O)CO')

m2 = Chem.AddHs(m)
AllChem.EmbedMolecule(m2)
AllChem.MMFFOptimizeMolecule(m2)
print(Chem.MolToMolBlock(m2),file=open('sucrose.mol','w'))

The resulting structure has very bad bond lengths and angles, as if the
geometry optimization did not do anything.

did I miss something?

For the moment, I am not interested in finding the lowest energy conformer
of the molecule and I will be happy if the configuration of the chiral 
centers and

of the double bonds (if any) in the 3D structure were in agreement
with those indicated in the SMILES string.

All the best,

Jean-Marc

--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



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


Re: [Rdkit-discuss] SMILES, explicit H and chirality

2017-06-19 Thread Jean-Marc Nuzillard

Dear Greg,

When I read that you did not reproduce the problem,
I updated from rdkit-2016-03.1 to rdkit-2017-03.1
and this solved the problem.

Thank you !

Jean-Marc


Le 19/06/2017 à 11:04, Greg Landrum a écrit :

Hi Jean-Marc,

I can't reproduce that:

In [2]: m = Chem.MolFromSmiles('CN1CCC[C@H]1c1cccnc1')

In [3]: Chem.MolToSmiles(m,isomericSmiles=True)
Out[3]: 'CN1CCC[C@H]1c1cccnc1'

In [4]: Chem.MolToSmiles(m,isomericSmiles=True,allHsExplicit=True)
Out[4]: '[CH3][N]1[CH2][CH2][CH2][C@H]1[c]1[cH][cH][cH][n][cH]1'


Can you send some sample code that shows the problem?

-greg


On Mon, Jun 19, 2017 at 10:59 AM, Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear All,

Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=False) with
m being nicotine downloaded from PubChem returns
CN1CCC[C@H]1c1cccnc1 , which is consistent with the structure of
nicotine.
Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=True) returns
[CH3][N]1[CH2][CH2][CH2][CH]1[c]1[cH][cH][cH][n][cH]1 in which
chirality has disappeared.
Would it be possible to get H count and chirality?

All the best,

Jean-Marc

-- 
    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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html
<http://eos.univ-reims.fr/LSD/ISgroup.html>

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/
<http://www.univ-reims.fr/LSD/JmnSoft/>



--
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
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
<https://lists.sourceforge.net/lists/listinfo/rdkit-discuss>




--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
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] SMILES, explicit H and chirality

2017-06-19 Thread Jean-Marc Nuzillard

Dear All,

Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=False) with m 
being nicotine downloaded from PubChem returns

CN1CCC[C@H]1c1cccnc1 , which is consistent with the structure of nicotine.
Chem.MolToSmiles(m, isomericSmiles=True, allHsExplicit=True) returns
[CH3][N]1[CH2][CH2][CH2][CH]1[c]1[cH][cH][cH][n][cH]1 in which chirality 
has disappeared.

Would it be possible to get H count and chirality?

All the best,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
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] Canonical order in SMILES

2017-06-18 Thread Jean-Marc Nuzillard

Dear Brian,

thank you! This is exactly what I needed.

All the best,

Jean-Marc

Le 17/06/2017 à 15:05, Brian Kelley a écrit :

After canonicalization, do the following

d = mol.GetPropsAsDict(True,True)

In the dictionary there will be a key something like _smilesAtomOutputOrder 
which contains a vector of atom indices in output order.


Brian Kelley


On Jun 17, 2017, at 1:42 PM, Jean-Marc Nuzillard <jm.nuzill...@univ-reims.fr> 
wrote:

Dear all,

sorry for asking for something that has certainly been already answered.

Chem.MolToSmiles(m) produced a SMILES string for the the given molecule m.
How is it possible to associate the order of atom apparition in the SMILES chain
to a list of atom indexes in m?

All the best,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
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



--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
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] Canonical order in SMILES

2017-06-17 Thread Jean-Marc Nuzillard

Dear all,

sorry for asking for something that has certainly been already answered.

Chem.MolToSmiles(m) produced a SMILES string for the the given molecule m.
How is it possible to associate the order of atom apparition in the 
SMILES chain

to a list of atom indexes in m?

All the best,

Jean-Marc

--
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR
http://eos.univ-reims.fr/LSD/ISgroup.html

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
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] Stereochemistry

2016-12-19 Thread Jean-Marc Nuzillard
Sure !

I was only looking for a way of doing the things with bonds that
would be similar to the one with the atoms.

All the best,

Jean-Marc

Le 19/12/2016 à 11:55, Paul Emsley a écrit :
> On 19/12/2016 10:42, Jean-Marc Nuzillard wrote:
>> Thank you all!
>>
>> One more point:
>>
>> How do I get the bond indexes for which the E/Z configuration has been set?
>> I seems there are no "magic" properties for bonds and no HasProp() function 
>> for bonds.
> Iterate through the bond list and use bond.GetStereo() to find particular 
> values?
>
> It returns one of:
>
> STEREONONE
> STEREOANY 
> STEREOZ   
> STEREOE
>
> Paul.
>
>
> --
> 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
>


-- 
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry

2016-12-19 Thread Jean-Marc Nuzillard

Thank you all!

One more point:

How do I get the bond indexes for which the E/Z configuration has been set?
I seems there are no "magic" properties for bonds and no HasProp() 
function for bonds.


All the best,

Jean-Marc



Le 19/12/2016 à 04:40, Greg Landrum a écrit :
One more piece that might help: the allHsExplicit to MolToSmiles() is 
there to make sure that implicit Hs (Hs not actually in the graph) 
show up in the output SMILES inside square brackets:

 In [12]: m = Chem.MolFromSmiles('CC(O)(Cl)')

In [13]: Chem.MolToSmiles(m,allHsExplicit=True)
Out[13]: '[CH3][CH]([OH])[Cl]'

If you actually have Hs in the molecular graph they will always be in 
the output SMILES, you don't need to use the allHsExplicit argument::

In [17]: m = Chem.MolFromSmiles('CC(O)(Cl)')

In [18]: mh = Chem.AddHs(m)

In [19]: Chem.MolToSmiles(mh)
Out[19]: '[H]OC([H])(Cl)C([H])([H])[H]'

-greg




On Mon, Dec 19, 2016 at 1:00 AM, Paolo Tosco <paolo.to...@unito.it 
<mailto:paolo.to...@unito.it>> wrote:


Dear Jean-Marc,

as lactic2.sdf is a 3D structure which does not carry any
stereochemistry information in the SDF file, you will need to
perceive stereochemistry from the 3D structure with

Chem.AssignAtomChiralTagsFromStructure(mol)

before calling Chem.AssignStereochemistry().
It looks like allHsExplicit=True prevents SMILES chirality
specifications from being output:

In [1]: from rdkit import Chem

In [2]: molfilename = "lactic2.sdf"

In [3]: mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]

In [4]: Chem.AssignAtomChiralTagsFromStructure(mol)

In [5]: Chem.AssignStereochemistry(mol, cleanIt=False,
force=False, flagPossibleStereoCenters=True)

In [6]: chiralAtoms = [a for a in mol.GetAtoms() if
a.HasProp("_ChiralityPossible")]

In [7]: chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]

In [8]: chiralAtomNums
Out[8]: [4]

In [9]: configs = [a.GetProp("_CIPCode") for a in chiralAtoms]

In [10]: configs
Out[10]: ['S']

In [11]: smi = Chem.MolToSmiles(mol, isomericSmiles=True)

In [12]: smi
Out[12]: '[H]OC(=O)[C@@]([H])(O[H])C([H])([H])[H]'

In [13]: smi = Chem.MolToSmiles(mol, isomericSmiles=True,
allHsExplicit=True)

In [14]: smi
Out[14]: '[H][O][C](=[O])[C]([H])([O][H])[C]([H])([H])[H]'


    Cheers,
p.


On 12/18/2016 11:29 PM, Jean-Marc Nuzillard wrote:

Hi again,

When I run:

#
from rdkit import Chem

molfilename = "lactic2.sdf"
mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]

Chem.AssignStereochemistry(mol, cleanIt=False, force=False,
flagPossibleStereoCenters=True)
chiralAtoms = [a for a in mol.GetAtoms() if
a.HasProp("_ChiralityPossible")]
chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]
print "chiral centers: ",
print chiralAtomNums
configs = [a.GetProp("_CIPCode") for a in chiralAtoms]
print configs

smi = Chem.MolToSmiles(mol, isomericSmiles=True, allHsExplicit=True)
print smi
#

Two (related?) problems arise.
First, _CIPCode rises a KeyError, even for atoms for which
_ChiralityPossible is defined.
When I comment the lines that define and print the configs
variable, the second problem arises.
The string smi does not contain any '@' or '@@', something I
expected from a chiral molecule
for an isomeric smiles string.

The attached lactic2.sdf file comes from PubChem. I removed (set
to 0) the parity flag for atom 4 (index 3)
because there are no parity flags in the files I will have to
deal with later.
Keeping the parity flag does not change anything.

What did I miss?

All the best,

Jean-Marc




--
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
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
<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
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
<https://lists.sourceforge.net/lists/listinfo/rdkit-discuss> 


--
Check o

[Rdkit-discuss] Stereochemistry

2016-12-18 Thread Jean-Marc Nuzillard

Hi again,

When I run:

#
from rdkit import Chem

molfilename = "lactic2.sdf"
mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]

Chem.AssignStereochemistry(mol, cleanIt=False, force=False, 
flagPossibleStereoCenters=True)

chiralAtoms = [a for a in mol.GetAtoms() if a.HasProp("_ChiralityPossible")]
chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]
print "chiral centers: ",
print chiralAtomNums
configs = [a.GetProp("_CIPCode") for a in chiralAtoms]
print configs

smi = Chem.MolToSmiles(mol, isomericSmiles=True, allHsExplicit=True)
print smi
#

Two (related?) problems arise.
First, _CIPCode rises a KeyError, even for atoms for which 
_ChiralityPossible is defined.
When I comment the lines that define and print the configs variable, the 
second problem arises.
The string smi does not contain any '@' or '@@', something I expected 
from a chiral molecule

for an isomeric smiles string.

The attached lactic2.sdf file comes from PubChem. I removed (set to 0) 
the parity flag for atom 4 (index 3)
because there are no parity flags in the files I will have to deal with 
later.

Keeping the parity flag does not change anything.

What did I miss?

All the best,

Jean-Marc

--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

Lactic acid. Atom 4 without parity.
  -OEChem-12181617163D

 12 11  0 1  0  0  0  0  0999 V2000
   -1.38751.11820.1968 O   0  0  0  0  0  0  0  0  0  0  0  0
1.4877   -1.03680.2617 O   0  0  0  0  0  0  0  0  0  0  0  0
1.22631.1148   -0.4123 O   0  0  0  0  0  0  0  0  0  0  0  0
   -0.7078   -0.11180.4002 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.3669   -1.1626   -0.4759 C   0  0  0  0  0  0  0  0  0  0  0  0
0.74810.07810.0295 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.7822   -0.37481.4601 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.2848   -0.8968   -1.5360 H   0  0  0  0  0  0  0  0  0  0  0  0
   -2.4357   -1.2376   -0.2485 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.9100   -2.1472   -0.3365 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.02631.76040.8318 H   0  0  0  0  0  0  0  0  0  0  0  0
2.4313   -0.90490.0279 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  4  1  0  0  0  0
  1 11  1  0  0  0  0
  2  6  1  0  0  0  0
  2 12  1  0  0  0  0
  3  6  2  0  0  0  0
  4  5  1  0  0  0  0
  4  6  1  0  0  0  0
  4  7  1  0  0  0  0
  5  8  1  0  0  0  0
  5  9  1  0  0  0  0
  5 10  1  0  0  0  0
M  END

--
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] MolToSmiles

2016-12-18 Thread Jean-Marc Nuzillard
Thank you Andrew, Brian and David for your answers.

mol.GetProp("_smilesAtomOutputOrder") does the job.
I also expected a.GetProp("molAtomMapNumber") could do it for each atom a.

All the best,

Jean-Marc

Le 18/12/2016 à 19:04, Andrew Dalke a écrit :
> On Dec 18, 2016, at 6:32 PM, Brian Kelley wrote:
>>>>> m.GetProp("_smilesAtomOutputOrder")
>> '[3,2,1,0,]'
>>
>> Note that this returns the list as a string which is sub-optimal.  
>> GetPropsAsDict will convert these to proper python objects, however, this is 
>> considered a private member so you need to return these as well:
>>
>>>>> list(m.GetPropsAsDict(True,True)["_smilesAtomOutputOrder"])
>> [3, 2, 1, 0]
> For fun, here are a few timing numbers:
>
># Common setup
> from rdkit import Chem
> mol = Chem.MolFromSmiles("c1c1Oc1c1")
> Chem.MolToSmiles(mol)'
> import json
> import ujson # third-party JSON decoder
> import re
> integer_pat = re.compile("[0-9]+")
>
>
> # Get the string (give a lower bound)
> mol.GetProp("_smilesAtomOutputOrder")'
> 1 loops, best of 3: 31.3 usec per loop
>
>
> Here are variations for how to get that information as a list of integers:
>
> # Using Python's "eval()" to decode the list (this is generally UNSAFE!)
> eval(mol.GetProp("_smilesAtomOutputOrder"))'
> 1 loops, best of 3: 157 usec per loop
>
> # Use the built-in json module (need to remove the terminal ",")
> json.loads(mol.GetProp("_smilesAtomOutputOrder")[:-2]+"]")'
> 1 loops, best of 3: 66.5 usec per loop
>
> # Use the third-party "ujson" package, which is faster than json.
> ujson.loads(mol.GetProp("_smilesAtomOutputOrder")[:-2]+"]")
> 1 loops, best of 3: 41.2 usec per loop
>
> ("cjson" takes 49.7 usec per loop)
>
> # Use the properties dictionary
> mol.GetPropsAsDict(True,True)["_smilesAtomOutputOrder"]
> 1000 loops, best of 3: 462 usec per loop
>
> # Parse it more directly
> map(int, integer_pat.findall(mol.GetProp("_smilesAtomOutputOrder")))
> 1 loops, best of 3: 89 usec per loop
>
>
>   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
>


-- 
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
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] SetAtomAlias

2016-12-17 Thread Jean-Marc Nuzillard

Sure. I still work with version 2016.03.1.
I will update my installation and try what you suggest.

All the best,

Jean-Marc

Le 17/12/2016 à 14:25, Peter Gedeck a écrit :

Hello

I tried it with the master branch. The function was added August 10, 
so maybe too late for the current release. That commit added functions 
to get/set atom specific MDL features (RLabel, atom alias, atom value).


Best

Peter
On Sat, Dec 17, 2016 at 7:47 AM Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear Peter,

I got:

AttributeError: 'module' object has no attribute 'SetAtomAlias'

with your example code, below.

Best regards,

Jean-Marc


Le 17/12/2016 à 00:44, Peter Gedeck a écrit :

Hello,

SetMolAlias is available in Python as a function and not as an
Atom method:

from rdkit import Chem
import sys
m = Chem.MolFromSmiles('CCC')
for i, atom in enumerate(m.GetAtoms()):
  Chem.SetAtomAlias(atom, 'C' + str(i + 1))
 w = Chem.SDWriter(sys.stdout)
 w.write(m)
 w.close()

Best,

Peter


On Fri, Dec 16, 2016 at 5:31 PM Paolo Tosco <paolo.to...@unito.it
<mailto:paolo.to...@unito.it>> wrote:

Dear Jean-Marc,

here:


https://gist.github.com/ptosco/6e4468350f0fff183e4507ef24f092a1#file-pdb_atom_names-ipynb


there's an example how to use the atom aliases in RDKit.

Cheers,
p.


On 12/16/2016 10:26 PM, Jean-Marc Nuzillard wrote:
> Hi all,
>
> I try add labels to atoms in a molecule, so that lines like
>
> A1
> C12
> A2
> C3
>
> are written when the molecule is written in a SD file.
>
> Considering atom a and alias text txt,
> I expected the function call SetAtomAlias(a, txt) to do the
job.
> I found this function in a documentation page about the
rdchem module.
> So, my script started with
>
> from rdkit import Chem
> from rdkit.Chem import rdchem
>
> I got:
>
> NameError: name 'SetAtomAlias' is not defined.
>
> I guess the solution is trivial.
> Forgive my ignorance.
>
> All the best,
>
> Jean-Marc
>



--
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
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss




-- 
Jean-Marc Nuzillard

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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
    http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/




--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
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] SetAtomAlias

2016-12-17 Thread Jean-Marc Nuzillard

Dear Peter,

I got:

AttributeError: 'module' object has no attribute 'SetAtomAlias'

with your example code, below.

Best regards,

Jean-Marc

Le 17/12/2016 à 00:44, Peter Gedeck a écrit :

Hello,

SetMolAlias is available in Python as a function and not as an Atom 
method:


from rdkit import Chem
import sys
m = Chem.MolFromSmiles('CCC')
for i, atom in enumerate(m.GetAtoms()):
  Chem.SetAtomAlias(atom, 'C' + str(i + 1))
 w = Chem.SDWriter(sys.stdout)
 w.write(m)
 w.close()

Best,

Peter


On Fri, Dec 16, 2016 at 5:31 PM Paolo Tosco <paolo.to...@unito.it 
<mailto:paolo.to...@unito.it>> wrote:


Dear Jean-Marc,

here:


https://gist.github.com/ptosco/6e4468350f0fff183e4507ef24f092a1#file-pdb_atom_names-ipynb


there's an example how to use the atom aliases in RDKit.

Cheers,
p.


On 12/16/2016 10:26 PM, Jean-Marc Nuzillard wrote:
> Hi all,
>
> I try add labels to atoms in a molecule, so that lines like
>
> A1
> C12
> A2
> C3
>
> are written when the molecule is written in a SD file.
>
> Considering atom a and alias text txt,
> I expected the function call SetAtomAlias(a, txt) to do the job.
> I found this function in a documentation page about the rdchem
module.
> So, my script started with
>
> from rdkit import Chem
> from rdkit.Chem import rdchem
>
> I got:
>
> NameError: name 'SetAtomAlias' is not defined.
>
> I guess the solution is trivial.
> Forgive my ignorance.
>
> All the best,
>
> Jean-Marc
>



--
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
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss




--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
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] SetAtomAlias

2016-12-17 Thread Jean-Marc Nuzillard
Dear Paolo,

Many thanks,
Your solution works.
The key point is to considered an Alias as an atom property:

for i, atom in enumerate(m.GetAtoms()):
 atom.SetProp('molFileAlias', 'C' + str(i + 1))


All the best,

Jean-Marc


Le 16/12/2016 à 23:30, Paolo Tosco a écrit :
> Dear Jean-Marc,
>
> here:
>
> https://gist.github.com/ptosco/6e4468350f0fff183e4507ef24f092a1#file-pdb_atom_names-ipynb
>  
>
>
> there's an example how to use the atom aliases in RDKit.
>
> Cheers,
> p.
>
>
> On 12/16/2016 10:26 PM, Jean-Marc Nuzillard wrote:
>> Hi all,
>>
>> I try add labels to atoms in a molecule, so that lines like
>>
>> A1
>> C12
>> A2
>> C3
>>
>> are written when the molecule is written in a SD file.
>>
>> Considering atom a and alias text txt,
>> I expected the function call SetAtomAlias(a, txt) to do the job.
>> I found this function in a documentation page about the rdchem module.
>> So, my script started with
>>
>> from rdkit import Chem
>> from rdkit.Chem import rdchem
>>
>> I got:
>>
>> NameError: name 'SetAtomAlias' is not defined.
>>
>> I guess the solution is trivial.
>> Forgive my ignorance.
>>
>> All the best,
>>
>> Jean-Marc
>>
>
>


-- 
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
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] SetAtomAlias

2016-12-16 Thread Jean-Marc Nuzillard
Hi all,

I try add labels to atoms in a molecule, so that lines like

A1
C12
A2
C3

are written when the molecule is written in a SD file.

Considering atom a and alias text txt,
I expected the function call SetAtomAlias(a, txt) to do the job.
I found this function in a documentation page about the rdchem module.
So, my script started with

from rdkit import Chem
from rdkit.Chem import rdchem

I got:

NameError: name 'SetAtomAlias' is not defined.

I guess the solution is trivial.
Forgive my ignorance.

All the best,

Jean-Marc

-- 

Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



--
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] GetSubstructMatches

2016-12-14 Thread Jean-Marc Nuzillard

Sure, it works!

Thanks, Greg.

Jean-Marc

Le 14/12/2016 à 17:43, Greg Landrum a écrit :

Hi Jean-Marc,

The answer is in the error message, once you know how to read it, 
which isn't really trivial:


On Wed, Dec 14, 2016 at 5:35 PM, Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:



Traceback (most recent call last):
   File "glmap.py", line 11, in 
 matches = mol.GetSubstructMatches(skel)
Boost.Python.ArgumentError: Python argument types in
 Mol.GetSubstructMatches(Mol, str)
did not match C++ signature:
 GetSubstructMatches(class RDKit::ROMol self, class RDKit::ROMol
query, bool uniquify=True, bool useChirality=False, bool
useQueryQueryMatches=False, unsigned int maxMatches=1000)


It's telling you that you called Mol.GetSubstructMatches was called 
with a Mol and a string  (the "Mol" is the object you're calling "mol" 
and the string is the  object you are calling "skel"). It expects, 
however, to be called with a Mol and a Mol.


If you convert skel into an RDKit molecule everything should work.

-greg




--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
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] GetSubstructMatches

2016-12-14 Thread Jean-Marc Nuzillard
Hi all,

I have encountered the following problem :

Traceback (most recent call last):
   File "glmap.py", line 11, in 
 matches = mol.GetSubstructMatches(skel)
Boost.Python.ArgumentError: Python argument types in
 Mol.GetSubstructMatches(Mol, str)
did not match C++ signature:
 GetSubstructMatches(class RDKit::ROMol self, class RDKit::ROMol 
query, bool uniquify=True, bool useChirality=False, bool 
useQueryQueryMatches=False, unsigned int maxMatches=1000)

trying to find substructure skel in molecule mol.
I use RDKit under Windows, using Anaconda python and packages.
Presently, I have rdkitVersion 2016.03.1 and boostVersion 1_56.

I get similar messages with GetSubstructMatch and HasSubstructMatch.

Any idea?

All the best,

Jean-Marc

-- 

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax :33 3 26 91 31 66
http://www.univ-reims.fr/ICMR

http://eos.univ-reims.fr/LSD/
http://eos.univ-reims.fr/LSD/JmnSoft/


--
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] Installation of RDKit on windows 7

2016-11-23 Thread Jean-Marc Nuzillard

Dear Riccardo,

I uninstalled Anaconda2 and reinstalled it for me alone (and not for all 
users
as I did initially) and the installation of rdkit completed without any 
trouble.

I was then able to import Chem from rdkit.

Thank you for suggesting that this global/personal installation of Anaconda
might be a source a trouble.

Best regards,

Jean-Marc

Le 22/11/2016 à 17:34, Riccardo Vianello a écrit :

Hi Jean-Marc,

On Tue, Nov 22, 2016 at 11:31 AM, Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:


Hi,

I am currently attempting to install RDKit after a (forced)
re-installation of windows 7.
I decided to use Anaconda Python and to get RDKit using the conda
installer :

C:\Users\jmn>conda create -y -c https://conda.anaconda.org/rdkit
<https://conda.anaconda.org/rdkit> -n my-rdkit-env rdkit >
rdkit_log.txt 2>&1
The -y flag was added in order to perform a non-interactive
(silent) installation.
Download was OK. Installation was not.
The edited version of the rdkit_log.txt file (attached) reflects
the messages in the console window
when conda is used in interactive mode.

It seems that this "lock" problem has to do with conda but not
with RDKit.


it definitely looks like a conda issue, but the message about the 
failed lock creation should be a warning, and the actual error at the 
end of the log file you sent seems to originate from a unicode issue 
(this kind of issues could be more easily explained if there were any 
accented letters in the user names or filesystem paths, but this 
doesn't seem to be the case)..


In general, installing Anaconda on windows for personal use (under the 
user's profile directory), doesn't require any admin rights and is 
often said to work more reliably, but in this case it doesn't seem to 
be a matter of privileges.


Did you try executing any other simple conda command, just to check 
that the installation is fully functional (something like 'conda list' 
or 'conda search pandas')?


I would also try to execute a 'conda update conda' (will require admin 
privileges given the current setup), just to make sure that the 
problem is still present in the latest version and not already fixed.

Best,
Riccardo


Has someone already experienced such a problem, and possibly
found a workaround?

Best regards,

Jean-Marc

PS. Sorry for the preceding empty message.


-- 
Jean-Marc Nuzillard

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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/
<http://www.univ-reims.fr/LSD/JmnSoft/>



--

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





--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] Installation of RDKit on windows 7

2016-11-22 Thread Jean-Marc Nuzillard

Hi,

I am currently attempting to install RDKit after a (forced) 
re-installation of windows 7.
I decided to use Anaconda Python and to get RDKit using the conda 
installer :


C:\Users\jmn>conda create -y -c https://conda.anaconda.org/rdkit -n 
my-rdkit-env rdkit > rdkit_log.txt 2>&1
The -y flag was added in order to perform a non-interactive (silent) 
installation.

Download was OK. Installation was not.
The edited version of the rdkit_log.txt file (attached) reflects the 
messages in the console window

when conda is used in interactive mode.

It seems that this "lock" problem has to do with conda but not with RDKit.

Has someone already experienced such a problem, and possibly
found a workaround?

Best regards,

Jean-Marc

PS. Sorry for the preceding empty message.


--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

Fetching package metadata ...
Solving package specifications: ..

Package plan for installation in environment 
C:\Users\jmn\.conda\envs\my-rdkit-env:

The following packages will be downloaded:

package|build
---|-
boost-1.56.0   |   py27_3 8.5 MB  rdkit
numpy-1.11.2   |   py27_0 3.0 MB
pip-9.0.1  |   py27_0 1.6 MB
rdkit-2016.03.1|  np111py27_143.8 MB  rdkit

   Total:56.9 MB

The following NEW packages will be INSTALLED:

boost:  1.56.0-py27_3 rdkit
bzip2:  1.0.6-vc9_3 [vc9] (copy)
mkl:11.3.3-1(copy)
numpy:  1.11.2-py27_0  
pip:9.0.1-py27_0   
python: 2.7.12-0(copy)
rdkit:  2016.03.1-np111py27_1 rdkit
setuptools: 27.2.0-py27_1   (copy)
vs2008_runtime: 9.00.30729.1-2  (copy)
wheel:  0.29.0-py27_0   (copy)
zlib:   1.2.8-vc9_3 [vc9] (copy)

Fetching packages ...
boost-1.56.0-p 100% |###| Time: 0:00:05   1.48 MB/s
numpy-1.11.2-p 100% |###| Time: 0:00:00   4.53 MB/s
pip-9.0.1-py27 100% |###| Time: 0:00:00   2.73 MB/s
rdkit-2016.03. 100% |###| Time: 0:00:25   1.78 MB/s
Extracting packages ...
WARNING conda.lock:touch(53): Failed to create lock, do not run conda in 
parallel processes [errno 13]
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:

https://github.com/conda/conda/issues



Current conda install:

   platform : win-64
  conda version : 4.2.9
   conda is private : False
  conda-env version : 4.2.9
conda-build version : 2.0.2
 python version : 2.7.12.final.0
   requests version : 2.11.1
   root environment : C:\Program Files\Anaconda2  (read only)
default environment : C:\Program Files\Anaconda2
   envs directories : C:\Users\jmn\.conda\envs
  C:\Program Files\Anaconda2\envs
  package cache : C:\Users\jmn\.conda\envs\.pkgs
  C:\Program Files\Anaconda2\pkgs
   channel URLs : https://repo.continuum.io/pkgs/free/win-64/
  https://repo.continuum.io/pkgs/free/noarch/
  https://repo.continuum.io/pkgs/pro/win-64/
  https://repo.continuum.io/pkgs/pro/noarch/
  https://repo.continuum.io/pkgs/msys2/win-64/
  https://repo.continuum.io/pkgs/msys2/noarch/
config file : None
   offline mode : False



`$ C:\Program Files\Anaconda2\Scripts\conda-script.py create -y -c 
https://conda.anaconda.org/rdkit -n my-rdkit-env rdkit`



Traceback (most recent call last):
  File "C:\Program Files\Anaconda2\Scripts\conda-script.py", line 5, in 
sys.exit(conda.cli.main())
  File "C:\Program Files\Anaconda2\lib\site-packages\conda\cli\main.py", line 
150, in main
return conda_exception_handler(_main)
  File "C:\Program Files\Anaconda2\lib\site-packages\conda\exceptions.py", line 
491, in conda_exception_handler
print_unexpected_error_message(e)
  File "C:\Program Files\Anaconda2\lib\site-packages\conda\exceptions.py", line 
441, in print_unexpected_error_message
stderrlogger.info('\n'.join('' + line for line in 
traceback.splitlines()))
  File "C:\Progr

[Rdkit-discuss] Installation of Rdkit on windows 7

2016-11-22 Thread Jean-Marc Nuzillard
Hi,

-- 

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax :33 3 26 91 31 66
http://www.univ-reims.fr/ICMR

http://eos.univ-reims.fr/LSD/
http://eos.univ-reims.fr/LSD/JmnSoft/


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


Re: [Rdkit-discuss] Rendering of aromatics

2016-10-11 Thread Jean-Marc Nuzillard

Thanks !

Jean-Marc

Le 11/10/2016 à 10:57, Greg Landrum a écrit :

Here's the explanation of the RDKit's aromaticity model:
https://github.com/rdkit/rdkit/blob/master/Docs/Book/RDKit_Book.rst#aromaticity

-greg


On Tue, Oct 11, 2016 at 9:28 AM, Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:


Hi,

maybe I am a bit off topic but I would not have said that the
nitrogen containing ring is aromatic.
Of course, if all bonds are forced to be aromatic when they are
not necessarily, you may end up
with inconsistencies. A nitrogen in an aromatic ring should bear a
positive
charge when it bears an hydrogen atom (like in a pyridinium ion).
I doubt (but this is only my opinion) that Out[56] represents an
entity with a chemical reality.

The anthracene part in Out[58] could be drawn with aromatic bonds
(or a circle in the middle
of the two hexagons), but I think that the third ring must be left
with an explicit double bond.

All the best,

Jean-Marc


Le 11/10/2016 à 00:31, Peter S. Shenkin a écrit :

Hi,

Please see the attached image for (1) and (2).

1. If I render a molecule via 'SVG(svg)', I get the dotted
aromatic representation.

2. If I render it just by displaying 'MolFromSmiles(smi)', I get
the kekulized representation.

So I guessed that (for some reason) when SVG is used, RDKit
automatically uses the dotted representation.

3. However, if I display MolsToGridImage(mol, useSVG=True), I get
the kekulized form. (This method does not return an SVG, and
therefore I cannot display it using 'SVG(result)' ).

So I have several questions:

a. Is there a way to force MolsToGridImage to return the dotted
aromatic representation? Or to postprocess the result to achieve
this?

b. What is the underlying paradigm which dictates which
representation will be shown, and how can it be controlled?

c. What I would really like is the "circle" representation (i.e.,
benzene as a hexagon with a circle inside). Can this be achieved,
and if so, how?

Thank you,
-P.



--
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
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
<https://lists.sourceforge.net/lists/listinfo/rdkit-discuss>


-- 
Jean-Marc Nuzillard

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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/
<http://www.univ-reims.fr/LSD/JmnSoft/>


--
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
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
<https://lists.sourceforge.net/lists/listinfo/rdkit-discuss> 


--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/
--
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] Rendering of aromatics

2016-10-11 Thread Jean-Marc Nuzillard

Hi,

maybe I am a bit off topic but I would not have said that the nitrogen 
containing ring is aromatic.
Of course, if all bonds are forced to be aromatic when they are not 
necessarily, you may end up

with inconsistencies. A nitrogen in an aromatic ring should bear a positive
charge when it bears an hydrogen atom (like in a pyridinium ion).
I doubt (but this is only my opinion) that Out[56] represents an entity 
with a chemical reality.


The anthracene part in Out[58] could be drawn with aromatic bonds (or a 
circle in the middle
of the two hexagons), but I think that the third ring must be left with 
an explicit double bond.


All the best,

Jean-Marc

Le 11/10/2016 à 00:31, Peter S. Shenkin a écrit :

Hi,

Please see the attached image for (1) and (2).

1. If I render a molecule via 'SVG(svg)', I get the dotted aromatic 
representation.


2. If I render it just by displaying 'MolFromSmiles(smi)', I get the 
kekulized representation.


So I guessed that (for some reason) when SVG is used, RDKit 
automatically uses the dotted representation.


3. However, if I display MolsToGridImage(mol, useSVG=True), I get the 
kekulized form. (This method does not return an SVG, and therefore I 
cannot display it using 'SVG(result)' ).


So I have several questions:

a. Is there a way to force MolsToGridImage to return the dotted 
aromatic representation? Or to postprocess the result to achieve this?


b. What is the underlying paradigm which dictates which representation 
will be shown, and how can it be controlled?


c. What I would really like is the "circle" representation (i.e., 
benzene as a hexagon with a circle inside). Can this be achieved, and 
if so, how?


Thank you,
-P.


--
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



--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
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] molfileAlias

2016-03-19 Thread Jean-Marc Nuzillard

Hi again,

thank you for this efficient answer.

Just one question.
How would have it been possible for me to arrive at this answer
without your help?

Cheers,

Jean-Marc


Le 16/03/2016 17:25, Greg Landrum a écrit :

Hi Jean-Marc,

You use the molFileAlias property like this:


#---
In [9]: m = Chem.MolFromSmiles('CCO')

In [10]: m.GetAtomWithIdx(0).SetProp('molFileAlias','alias 0')

In [11]: m.GetAtomWithIdx(2).SetProp('molFileAlias','the_oxygen')

In [12]: print(Chem.MolToMolBlock(m))

 RDKit

  3  2  0  0  0  0  0  0  0  0999 V2000
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
0.0.0. C   0  0  0  0  0  0  0  0  0  0  0  0
0.0.0. O   0  0  0  0  0  0  0  0  0  0  0  0
  1  2  1  0
  2  3  1  0
A1
alias 0
A3
the_oxygen
M  END
#---

I hope this helps,
-greg


On Wed, Mar 16, 2016 at 8:23 AM, Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear All,

Is there a way, in Python,  to add an alias to an atom in a
molecule so
that is appears
in an "A" line when the molecule is written in an SD file ?
Searching the web, I found an atom attribute named molfileAlias
but how do I practically set/get it?

thanks,

Jean-Marc

--
    Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/



--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss





--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] molfileAlias

2016-03-19 Thread Jean-Marc Nuzillard

Too simple.

Thanks,

Jean-Marc

Le 16/03/2016 19:34, Greg Landrum a écrit :


On Wed, Mar 16, 2016 at 10:58 AM, Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:



thank you for this efficient answer.

Just one question.
How would have it been possible for me to arrive at this answer
without your help?


It's a good question. Often the answer to questions like this are 
"only if you read the code", but this is one of those rare instances 
where some documentation actually exists.


This document:
http://www.rdkit.org/docs/RDKit_Book.html
lists the common property tags that the RDKit uses and includes:
molfileAlias 	the mol file alias for an atom (follows A tags), read 
from/written to CTABs


Atom.SetProp() is then the normal way to set properties on atoms.

-greg




--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-14 Thread Jean-Marc Nuzillard

Dear all,

for sure, having a double bond surrounded by four single bonds makes
the assignment of the E/Z configuration simpler.

You might want also to consider nitrones
https://en.wikipedia.org/wiki/Nitrone
that are sometimes written (CAS does it!) with
a nitrogen atom surrounded by a C=C and a C=O double bond.

Best regards,

Jean-Marc

Le 14/03/2016 13:51, Greg Landrum a écrit :

Dear all,

After reading through this, thinking about it, and searching some 
more, I decided to adopt an alternate solution.


Instead of removing the stereochemistry of the P=C double bond in in 
molecules like:

C/C=P(=O)/OC1=CC=CC=C1
I added that substructure to the list of things that sanitization 
"corrects". It now yields the zwitterionic [P+]-[O-] form. Here's an 
example:


In [*4*]: m = Chem.MolFromSmiles('C/C=P(=O)/OC1=CC=CC=C1')

In [*5*]: print(Chem.MolToSmiles(m,True))

C/C=[P+](\[O-])Oc1c1


Best,
-greg


On Thu, Mar 10, 2016 at 8:11 PM, Greg Landrum <greg.land...@gmail.com 
<mailto:greg.land...@gmail.com>> wrote:


Dear all,

Here's a question for the chemists in the group: do we need to be
concerned about representing the stereochemistry of the P=C bond
in substructures like O=P(/O)=C/C under normal circumstances?

Here's a pubchem compound example that has the double bond crossed
(possibly leading one to believe that it could have stereochemistry):
https://pubchem.ncbi.nlm.nih.gov/compound/56981965
Here's the corresponding substance record (which is how PubChem
received the structure):
https://pubchem.ncbi.nlm.nih.gov/substance/135741697

Another example, this time without the crossed bond in the
compound record:
https://pubchem.ncbi.nlm.nih.gov/compound/87396055

Best,
-greg








--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140


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



--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-14 Thread Jean-Marc Nuzillard

Dear all,

for sure, having a double bond surrounded by four single bonds makes
the assignment of the E/Z configuration simpler.

My might want also to consider nitrones
https://en.wikipedia.org/wiki/Nitrone
that are sometimes written (CAS does it!) with
a nitrogen atom surrounded by a C=C and a C=O double bond.

Best regards,

Jean-Marc


Le 14/03/2016 13:51, Greg Landrum a écrit :

Dear all,

After reading through this, thinking about it, and searching some 
more, I decided to adopt an alternate solution.


Instead of removing the stereochemistry of the P=C double bond in in 
molecules like:

C/C=P(=O)/OC1=CC=CC=C1
I added that substructure to the list of things that sanitization 
"corrects". It now yields the zwitterionic [P+]-[O-] form. Here's an 
example:


In [*4*]: m = Chem.MolFromSmiles('C/C=P(=O)/OC1=CC=CC=C1')

In [*5*]: print(Chem.MolToSmiles(m,True))

C/C=[P+](\[O-])Oc1c1


Best,
-greg


On Thu, Mar 10, 2016 at 8:11 PM, Greg Landrum <greg.land...@gmail.com 
<mailto:greg.land...@gmail.com>> wrote:


Dear all,

Here's a question for the chemists in the group: do we need to be
concerned about representing the stereochemistry of the P=C bond
in substructures like O=P(/O)=C/C under normal circumstances?

Here's a pubchem compound example that has the double bond crossed
(possibly leading one to believe that it could have stereochemistry):
https://pubchem.ncbi.nlm.nih.gov/compound/56981965
Here's the corresponding substance record (which is how PubChem
received the structure):
https://pubchem.ncbi.nlm.nih.gov/substance/135741697

Another example, this time without the crossed bond in the
compound record:
https://pubchem.ncbi.nlm.nih.gov/compound/87396055

Best,
-greg








--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140


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



--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Jean-Marc Nuzillard

Le 11/03/2016 10:38, Giuseppe Marco Randazzo a écrit :
An example can be the case of this isomerism is given by 
triphenylphosphorane (Witting reagents).


Wittig reagents with their three identical phenyl groups on the 
phosphorus atom

do not present any intriguing configuration problem around the P=C bond,
contrarily to the compound that it was about in Greg's first message on 
this topic.


I also wanted to point out that chirality is not necessarily centered on 
an atom

but may be axial, like in allenes:
https://en.wikipedia.org/wiki/Axial_chirality

All the best,

Jean-Marc



Here i give to you some publications were can find a clear publication 
about cis/trans isomerism and the importance.


[1] Conformation isomerism and coupling constants of formylmethylene 
triphenylphosphorane (C6H5)3P=CH-CHO
Comptes Rendus des Seances de l'Academie des Sciences, Serie C: 
Sciences Chimiques (1970), 270, (21), 1747-9.


[2] Structural and conformational analysis of 
2-triphenylphosphoranylidene succinic acid derivatives by 1H, 13C 
and 31P one and two dimensional NMR spectroscopy and molecular modelling
Radu Bacaloglu,   Andrei Blaskó,   Clifford A. Bunton,   Giorgio 
Cerichelli,   Fernando Castaneda and   Enrique Rivera

J. Chem. Soc., Perkin Trans. 2, 1995, 965-972
DOI: 10.1039/P2995965


[3]  Favoured conformations of methyl iso­propyl, ethyl iso­propyl, 
methyl tert-butyl, and ethyl tert-butyl 
2-(tri­phenyl­phospho­ranyl­idene)malonate


[4] Conformations of diester tri­phenyl­phospho­nium ylides with an 
ylidic ester or keto and ester ylidic groups



Best regards
Marco










On 11 Mar 2016, at 10:12, Greg Landrum <greg.land...@gmail.com 
<mailto:greg.land...@gmail.com>> wrote:



On Fri, Mar 11, 2016 at 10:05 AM, Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:



Le 11/03/2016 05:11, Greg Landrum a écrit :


Here's a question for the chemists in the group: do we need to
be concerned about representing the stereochemistry of the P=C
bond in substructures like O=P(/O)=C/C under normal circumstances?


It has a meaning to write that the configuration of the P=C bond
is Z or E.


If this is the case, I'd love to add some real examples to the test 
suite. Can you point me to some examples (or a paper/web page talking 
about the topic)?


-greg
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss





--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Jean-Marc Nuzillard
I do not have the feeling that the handling of a C=P bond should be 
different of the one of a C=C bond.


Jean-Marc


Le 11/03/2016 10:12, Greg Landrum a écrit :


On Fri, Mar 11, 2016 at 10:05 AM, Jean-Marc Nuzillard 
<jm.nuzill...@univ-reims.fr <mailto:jm.nuzill...@univ-reims.fr>> wrote:



Le 11/03/2016 05:11, Greg Landrum a écrit :


Here's a question for the chemists in the group: do we need to be
concerned about representing the stereochemistry of the P=C bond
in substructures like O=P(/O)=C/C under normal circumstances?


It has a meaning to write that the configuration of the P=C bond
is Z or E.


If this is the case, I'd love to add some real examples to the test 
suite. Can you point me to some examples (or a paper/web page talking 
about the topic)?


-greg



--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Jean-Marc Nuzillard

Dear all,

Le 11/03/2016 05:11, Greg Landrum a écrit :

Dear all,

Here's a question for the chemists in the group: do we need to be 
concerned about representing the stereochemistry of the P=C bond in 
substructures like O=P(/O)=C/C under normal circumstances?


It has a meaning to write that the configuration of the P=C bond is Z or E.

All the best,

Jean-Marc



Here's a pubchem compound example that has the double bond crossed 
(possibly leading one to believe that it could have stereochemistry):

https://pubchem.ncbi.nlm.nih.gov/compound/56981965
Here's the corresponding substance record (which is how PubChem 
received the structure):

https://pubchem.ncbi.nlm.nih.gov/substance/135741697

Another example, this time without the crossed bond in the compound 
record:

https://pubchem.ncbi.nlm.nih.gov/compound/87396055






Best,
-greg







--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140


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



--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-11 Thread Jean-Marc Nuzillard

Not sure that the anything[S@H](=O) molecules exist...

Jean-Marc

Le 11/02/2016 11:04, John M a écrit :
Interesting discussion, never decided myself whether it was worth 
handling two implied neighbors:


C[S@H](=O)


Probably v. low barrier to inversion for this example but thought I'd 
share.


John


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140


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



--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Drawing benzene in IPython failed

2015-06-09 Thread Jean-Marc Nuzillard

Dear Greg,

Le 08/06/2015 23:51, Greg Landrum a écrit :
My guess, and this is hard to test, is that the problem is somehow due 
to the fact that you have both PIL and pillow installed.


A quick experiment would be to try uninstalling PIL.


Your guess was correct. I uninstalled PIL and Pillow
and reinstalled Pillow.

The structure of benzene appeared as expected.

Many thanks !!

Jean-Marc




-greg

On Monday, June 8, 2015, Jean-Marc Nuzillard 
jm.nuzill...@univ-reims.fr mailto:jm.nuzill...@univ-reims.fr wrote:


Dear Greg,

Le 08/06/2015 04:41, Greg Landrum a écrit :



On Sun, Jun 7, 2015 at 10:44 PM, Jean-Marc Nuzillard
jm.nuzill...@univ-reims.fr
javascript:_e(%7B%7D,'cvml','jm.nuzill...@univ-reims.fr'); wrote:

Hello,

I just installed RDKit on Windows7, with the intention of
using it from IPython.
I installed python 2.7 for AMD64 (the one distributed by
ActiveState).

 If you're just getting started with python on windows, I would
*strongly* suggest using anaconda (http://continuum.io/downloads)
instead of ActiveState python. Anaconda is a very well supported
scientific python distribution. It also makes it extremely easy
to install the RDKit (https://conda.binstar.org/rdkit).



Thanks for the advice.




---

KeyError   Traceback (most recent call 
last)
...snip ...

KeyError: 'PNG'

I installed a lot of python modules recently :-)

Any idea about the one I missed?


This error is usually due to the fact that libpng is missing on
the system or was not compiled into PIL/Pillow.
On Windows I believe that the latter is more likely to be the case.



I installed PIL 1.1.7 from http://www.pythonware.com/products/pil/
(PIL-1.1.7.win-amd64-py2.7.exe),
most probably because the simple pip install PIL I tried first
did not work.
I also installed pillow from
http://www.lfd.uci.edu/~gohlke/pythonlibs/
http://www.lfd.uci.edu/%7Egohlke/pythonlibs/
(Pillow-2.8.2-cp27-none-win_amd64.whl).

The commands:

/import rdkit//
//from PIL import Image//
//im = Image.open('test.png')//
//im.save('out.png', format='PNG')//
/
operate as expected (from a recent mail by Paul Emsley).
The PIL I installed seems to support the PNG format.


This stackoverflow question makes it look like there's a problem
with the activestate pil build and that you will need to install
that yourself from another place:

http://stackoverflow.com/questions/7616987/pil-png-activestate-on-windows-7-zlib-png-zip-support-not-available

-greg



All the best,

Jean-Marc

-- 
Jean-Marc Nuzillard

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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/




--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] Drawing benzene in IPython failed

2015-06-08 Thread Jean-Marc Nuzillard

Dear Greg,

Le 08/06/2015 04:41, Greg Landrum a écrit :



On Sun, Jun 7, 2015 at 10:44 PM, Jean-Marc Nuzillard 
jm.nuzill...@univ-reims.fr mailto:jm.nuzill...@univ-reims.fr wrote:


Hello,

I just installed RDKit on Windows7, with the intention of
using it from IPython.
I installed python 2.7 for AMD64 (the one distributed by ActiveState).

 If you're just getting started with python on windows, I would 
*strongly* suggest using anaconda (http://continuum.io/downloads) 
instead of ActiveState python. Anaconda is a very well supported 
scientific python distribution. It also makes it extremely easy to 
install the RDKit (https://conda.binstar.org/rdkit).



Thanks for the advice.



---

KeyError   Traceback (most recent call last)
...snip ...

KeyError: 'PNG'

I installed a lot of python modules recently :-)

Any idea about the one I missed?


This error is usually due to the fact that libpng is missing on the 
system or was not compiled into PIL/Pillow.

On Windows I believe that the latter is more likely to be the case.



I installed PIL 1.1.7 from http://www.pythonware.com/products/pil/ 
(PIL-1.1.7.win-amd64-py2.7.exe),
most probably because the simple pip install PIL I tried first did not 
work.
I also installed pillow from http://www.lfd.uci.edu/~gohlke/pythonlibs/ 
(Pillow-2.8.2-cp27-none-win_amd64.whl).


The commands:

/import rdkit//
//from PIL import Image//
//im = Image.open('test.png')//
//im.save('out.png', format='PNG')//
/
operate as expected (from a recent mail by Paul Emsley).
The PIL I installed seems to support the PNG format.

This stackoverflow question makes it look like there's a problem with 
the activestate pil build and that you will need to install that 
yourself from another place:

http://stackoverflow.com/questions/7616987/pil-png-activestate-on-windows-7-zlib-png-zip-support-not-available

-greg



All the best,

Jean-Marc

--
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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


[Rdkit-discuss] Drawing benzene in IPython failed

2015-06-07 Thread Jean-Marc Nuzillard

Hello,

I just installed RDKit on Windows7, with the intention of
using it from IPython.
I installed python 2.7 for AMD64 (the one distributed by ActiveState).

I ranipython notebook, opened a new notebook and typed the following 
commands


/from//  //rdkit//  //import//  //Chem//
//from//  //rdkit.Chem.Draw//  //import//  //IPythonConsole//
//from//  //rdkit.Chem//  //import//  //AllChem//
//from//  //rdkit.Chem//  //import//  //Draw//
//
//m = Chem.MolFromSmiles('c1c1')//
//AllChem.Compute2DCoords(m)//
/
then

/print Chem.MolToMolBlock(m) gives//
/

 RDKit  2D

  6  6  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
   -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  2  0
  2  3  1  0
  3  4  2  0
  4  5  1  0
  5  6  2  0
  6  1  1  0
M  END


that looks good.
But I hoped that

/m//
/
would draw a depiction. I got

---
KeyError   Traceback (most recent call last)
C:\Python27\lib\site-packages\IPython\core\formatters.pyc  in__call__(self, obj)
332  method=  _safe_get_formatter_method(obj,  
self.print_method)
333  if  methodis  not  None:
-- 334  return  method()
335  return  None
336  else:

C:\RDKit_2015_03_1\rdkit\Chem\Draw\IPythonConsole.pyc  in_toPNG(mol)
 98  highlightAtoms=highlightAtoms)
 99  bio=  BytesIO()
-- 100  img.save(bio,format='PNG')
101  return  bio.getvalue()
102  


C:\Python27\lib\site-packages\PIL\Image.pyc  insave(self, fp, format, **params)
   1682  except  KeyError:
   1683  init()
- 1684  save_handler=  SAVE[format.upper()]   # unknown format
   1685  
   1686  if  isPath(fp):


KeyError: 'PNG'

Out[4]:

rdkit.Chem.rdchem.Mol at 0x457ba70

I installed a lot of python modules recently :-)
Any idea about the one I missed?

Many thanks in advance,

Jean-Marc


--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax :33 3 26 91 31 66
http://www.univ-reims.fr/ICMR

http://eos.univ-reims.fr/LSD/
http://eos.univ-reims.fr/LSD/JmnSoft/

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


Re: [Rdkit-discuss] docker.io - container for fully fledged rdkit installation on linux?

2013-11-27 Thread Jean-Marc Nuzillard
Dear Igor,

Le 27/11/2013 16:20, Igor Filippov a écrit :
 Not to criticize or anything, but I've seen this issue quite a few 
 times - perhaps the problem
 is actually with me and everybody else is in the know?

Don't worry, Igor, the same feeling comes to me as well. You are not 
alone ;-)

Jean-Marc

-- 
Jean-Marc Nuzillard
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

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET,  PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] FW: rdkit - ctest mulitiple failures

2012-04-04 Thread JEAN-MARC NUZILLARD
Dear Ryan,

I recently got the same ctest failure messages as those you reported.
After typing 'make', I did not type 'make install' before typing 'cest'.
After typing 'make install', I obtained 100% success for 'ctest'.
Even though identical effects may have different origins,
I hope my observation will help you.

Best regards,

Jean-Marc Nuzillard



--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] unreadable SD File

2012-04-03 Thread JEAN-MARC NUZILLARD

Dear Greg,

I have generated 265 isomers of zadirachtin, a natural product.
When I tried to use RDKit for the creation of 2D depictions,
one of the structures failed to be read.
The corresponding SD file with the only problematic structure is attached.
I generated a depiction by myself that is also attached (as a  
postscript file).

The problem arises by running the following script:

from rdkit import Chem
suppl = Chem.SDMolSupplier(mol226.sdf)
imol = 0
for mol in suppl:
if mol is None: continue
imol += 1
print Count:, imol

that results in:

[22:30:46] Unexpected error hit on line 114
[22:30:46] ERROR: moving to the begining of the next molecule
Count: 0

The 264 other molecules in my isomer collection are OK.

Any idea about the origin of this problem?

Best regards,

Jean-Marc Nuzillard



mol226.sdf
Description: StarMath document


mol226.ps
Description: PostScript document
--
Better than sec? Nothing is better than sec when it comes to
monitoring Big Data applications. Try Boundary one-second 
resolution app monitoring today. Free.
http://p.sf.net/sfu/Boundary-dev2dev___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] LogP

2010-05-17 Thread JEAN MARC NUZILLARD
Dear Greg,

Reading the web, I have found references to ALogP, XLogP, SLogP, CLopg  
descriptors.
Is MolLogP one of these?
Are there significant differences between them?

Best regards,

Jean-Marc Nuzillard




--

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


[Rdkit-discuss] Documentation

2010-05-03 Thread JEAN MARC NUZILLARD
Dear Greg,

I successfully installed RDKit_Q12010_1.
I have been pleased to see that the 2D coordinate
generation algorithm is now able to deal with
all structures in my test structure file.

I was able to generate the C++ documentation using doxygen.
How do you generate the python documentation?
I read something about HappyDoc in RDKit_Overview.pdf.
I tried to install HappyDoc but no setup.py file for its installation.

Maybe a few lines about documentation generation could be added in
the INSTALL file of the RDKit.

Best regards,

Jean-Marc Nuzillard



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


[Rdkit-discuss] structure optimization with UFF

2010-02-10 Thread Jean-Marc Nuzillard
 18  1  0
   4 19  1  0
   4 20  1  0
   5 21  1  0
   6 22  1  0
   6 23  1  0
   7 24  1  0
   7 25  1  0
   7 26  1  0
   8 27  1  0
   8 28  1  0
   8 29  1  0
   9 30  1  0
  10 31  1  0
  10 32  1  0
  11 33  1  0
  12 34  1  0
  12 35  1  0
  14 36  1  0
  14 37  1  0
  14 38  1  0
  15 39  1  0
  15 40  1  0
  15 41  1  0
  16 42  1  0
M  END
*

Two hydrogen atoms have been placed very far from the C atom they are 
bonded with.
Can something be done? Maybe my starting point is too far from a structure 
of minimal energy.
I many other cases, I got correct 3D structures.

I used the code from MinimizeCLI.cpp.

Best regards,

Jean-Marc


Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry
CNRS UMR 6229
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax :33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://www.univ-reims.fr/LSD/JmnSoft


--
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] RDDepict::compute2DCoords

2010-02-09 Thread Jean-Marc Nuzillard
Dear Greg,

A 21:23 08/02/2010 +0100, Greg Landrum a écrit :
  The MinimizeCLI.cpp file in Minimize has a few mol instead of *mol as
  function parameter that prevent it to be compiled right out of the box.

Yes, the MinimizeCLI stuff has not been maintained for rather a long
time; I'm not surprised that it doesn't work.

It works fine, once the * have been added at the right places.

--

I experimented with RDDepict::compute2DCoords on a set 2870 automatically 
generated isomers
of santonin.
Surprisingly, the generation of 2D coordinates failed for four of them.
Here is one faulty structure:

1537
  RDKit  3D

  18 20  0  0 0  0 0  0 0  0999 V2000
 2.41002.52880. C   0  0 0  0 0  0 0  0 0  0 0  0
 0.0.0. C   0  0 0  0 0  0 0  0 0  0 0  0
 5.04240.77170. C   0  0 0  0 0  0 0  0 0  0 0  0
 2.5681   -1.20200. C   0  0 0  0 0  0 0  0 0  0 0  0
 2.87080.75000. C   0  0 0  0 0  0 0  0 0  0 0  0
 4.17242.31870. C   0  0 0  0 0  0 0  0 0  0 0  0
-1.1727   -0.93520. C   0  0 0  0 0  0 0  0 0  0 0  0
-1.17272.43520. C   0  0 0  0 0  0 0  0 0  0 0  0
 4.3064   -0.84350. C   0  0 0  0 0  0 0  0 0  0 0  0
 0.1.50000. C   0  0 0  0 0  0 0  0 0  0 0  0
-2.63512.10150. C   0  0 0  0 0  0 0  0 0  0 0  0
 5.2418   -2.01610. C   0  0 0  0 0  0 0  0 0  0 0  0
 1.6771   -0.89370. C   0  0 0  0 0  0 0  0 0  0 0  0
 1.49961.53290. C   0  0 0  0 0  0 0  0 0  0 0  0
 1.35823.59840. C   0  0 0  0 0  0 0  0 0  0 0  0
 1.67712.39370. O   0  0 0  0 0  0 0  0 0  0 0  0
 0.7382   -1.30580. O   0  0 0  0 0  0 0  0 0  0 0  0
 2.6672   -2.69870. O   0  0 0  0 0  0 0  0 0  0 0  0
   1  6  1  0
   1  5  2  0
   1 15  1  0
   2 10  1  0
   2  7  1  0
   2 17  2  0
   3  6  2  0
   3  9  1  0
   4  9  1  0
   4  7  1  0
   4 18  2  0
   5 16  1  0
   5 13  1  0
   7 16  1  0
   8 11  1  0
   8 10  1  0
   8 13  1  0
   9 12  1  0
   9 11  1  0
  10 14  1  0
M  END

The existing 2D coordinates were generated by the CDK from atom connectivities
and I wanted to replace them by possibly better ones.
The problem is that I do not see the reason for which this structure is 
particular
while so many other ones are not. Any idea?

Best regards,


Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry
CNRS UMR 6229
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax :33 3 26 91 31 66
http://www.univ-reims.fr/ICMR
http://www.univ-reims.fr/LSD/JmnSoft


--
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


  1   2   >