Re: [Rdkit-discuss] convert a smiles file to a xyz file

2018-05-24 Thread Chenyang Shi
Thank you Prof. Jensen. I will study the module.

Best,
Chenyang

On Thu, May 24, 2018 at 1:30 AM, Jan Halborg Jensen 
wrote:

> Have a look at write_xtb_input_file in this module: https://github.com/
> jensengroup/take_elementary_step/blob/master/write_input_files.py
>
> The xtb input is simple an xyz file with some additional lines below if
> the molecule is charged. You can simply those lines in the code.
>
> Best regards, Jan
>
> On 23 May 2018, at 17:23, Chenyang Shi  wrote:
>
> Hi Everyone,
>
> I am seeking helps about how to convert a SMILES file to a series of
> coordinates for the molecule, in the format of xyz.
> I saw some online service that can do the job (e.g.
> http://www.cheminfo.org/Chemistry/Cheminformatics/
> FormatConverter/index.html), but it is not convenient to use.
>
> I am wondering how can we do this by writing RDKit code. A separate
> question is that is the converted molecular structure from SMILES the same
> as that taken from a crystal structure?
>
> Many thanks!
> Chenyang
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org !
> http://sdm.link/slashdot___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] convert a smiles file to a xyz file

2018-05-24 Thread Jan Halborg Jensen
Have a look at write_xtb_input_file in this module: 
https://github.com/jensengroup/take_elementary_step/blob/master/write_input_files.py

The xtb input is simple an xyz file with some additional lines below if the 
molecule is charged. You can simply those lines in the code.

Best regards, Jan

On 23 May 2018, at 17:23, Chenyang Shi 
> wrote:

Hi Everyone,

I am seeking helps about how to convert a SMILES file to a series of 
coordinates for the molecule, in the format of xyz.
I saw some online service that can do the job (e.g. 
http://www.cheminfo.org/Chemistry/Cheminformatics/FormatConverter/index.html), 
but it is not convenient to use.

I am wondering how can we do this by writing RDKit code. A separate question is 
that is the converted molecular structure from SMILES the same as that taken 
from a crystal structure?

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

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


Re: [Rdkit-discuss] convert a smiles file to a xyz file

2018-05-23 Thread Chenyang Shi
Thank you all. It seems OpenBabel supports this.

Here is a tutorial I found from Dr. Kulik's group that might be useful
http://hjkgrp.mit.edu/content/geometries-strings-smiles-and-openbabel.

On Wed, May 23, 2018 at 10:59 AM, Benjamin Bucior <
bbuc...@u.northwestern.edu> wrote:

> I'm not sure which flags the online tool uses, but it's based on Open
> Babel so you might have some success with that tool.
> http://open-babel.readthedocs.io/en/latest/3DStructureGen/Overview.html
>
> For a quick guess at the structure, an example with the command line tool
> is something like
> obabel -:"[O-]C(=O)c1ccc(cc1)C(=O)[O-]" --gen3D -O structure.xyz
>
> If your workflow is in Python, there are some make3D and addh (for
> hydrogens) convenience functions in the openbabel (or its pybel) package.
>
> As Dima mentioned, there's several challenges/nonuniqueness in going from
> SMILES to 3D.  Some of the conformer search tools in the link can help a
> little bit, but in general it's a tricky problem.
>
> Best,
> Ben
>
> On Wed, May 23, 2018 at 10:30 AM, Dimitri Maziuk via Rdkit-discuss <
> rdkit-discuss@lists.sourceforge.net> wrote:
>
>> On 5/23/2018 10:23 AM, Chenyang Shi wrote:
>>
>> A separate question is that is the converted molecular structure from
>>> SMILES the same as that taken from a crystal structure?
>>>
>>
>> Provided there's no undefined/different stereochemistry on SMILES side,
>> no quirks with added protons, and so on and so forth... for a small simple
>> molecule... maybe.
>>
>> Dima
>>
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
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] convert a smiles file to a xyz file

2018-05-23 Thread Markus Sitzmann
In reminiscence of old times, you can do this with the Chemical Identifier
Resolver, for instance with the SMILES string for ethanol, CCO:

https://cactus.nci.nih.gov/chemical/structure/CCO/file?format=xyz

On Wed, May 23, 2018 at 5:24 PM Chenyang Shi  wrote:

> Hi Everyone,
>
> I am seeking helps about how to convert a SMILES file to a series of
> coordinates for the molecule, in the format of xyz.
> I saw some online service that can do the job (e.g.
> http://www.cheminfo.org/Chemistry/Cheminformatics/FormatConverter/index.html),
> but it is not convenient to use.
>
> I am wondering how can we do this by writing RDKit code. A separate
> question is that is the converted molecular structure from SMILES the same
> as that taken from a crystal structure?
>
> Many thanks!
> Chenyang
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] convert a smiles file to a xyz file

2018-05-23 Thread Benjamin Bucior
I'm not sure which flags the online tool uses, but it's based on Open Babel
so you might have some success with that tool.
http://open-babel.readthedocs.io/en/latest/3DStructureGen/Overview.html

For a quick guess at the structure, an example with the command line tool
is something like
obabel -:"[O-]C(=O)c1ccc(cc1)C(=O)[O-]" --gen3D -O structure.xyz

If your workflow is in Python, there are some make3D and addh (for
hydrogens) convenience functions in the openbabel (or its pybel) package.

As Dima mentioned, there's several challenges/nonuniqueness in going from
SMILES to 3D.  Some of the conformer search tools in the link can help a
little bit, but in general it's a tricky problem.

Best,
Ben

On Wed, May 23, 2018 at 10:30 AM, Dimitri Maziuk via Rdkit-discuss <
rdkit-discuss@lists.sourceforge.net> wrote:

> On 5/23/2018 10:23 AM, Chenyang Shi wrote:
>
> A separate question is that is the converted molecular structure from
>> SMILES the same as that taken from a crystal structure?
>>
>
> Provided there's no undefined/different stereochemistry on SMILES side, no
> quirks with added protons, and so on and so forth... for a small simple
> molecule... maybe.
>
> Dima
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] convert a smiles file to a xyz file

2018-05-23 Thread Dimitri Maziuk via Rdkit-discuss

On 5/23/2018 10:23 AM, Chenyang Shi wrote:

A separate 
question is that is the converted molecular structure from SMILES the 
same as that taken from a crystal structure?


Provided there's no undefined/different stereochemistry on SMILES side, 
no quirks with added protons, and so on and so forth... for a small 
simple molecule... maybe.


Dima


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