[Open Babel] Canonical smiles for cis/trans species

2018-01-16 Thread murat keçeli
Hi,

May I learn how I can keep stereo information in a canonical SMILES?

>>> import pybel
>>> mol = pybel.readstring('smi', 'CC(=O)/C=/CO')

>>> print mol.write('can')
CC(=O)C=CO

>>> print mol.write('smi')
CC(=O)C=CO

>>> print mol.write('fix')
CC(=O)C=CO


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


Re: [Open Babel] Canonical smiles for cis/trans species

2018-01-16 Thread Fredrik Wallner
Hi,

I would say that your problem is that the SMILES string that you input is not 
correct. The second ‘/‘ is at the wrong place. If you try with CC(=O)/C=C/O 
instead, it should work.

I was a bit surprised that there was no error with the first version though.

Kind regards,
Fredrik

On 16 jan. 2018 23:51 +0100, murat keçeli , wrote:
> Hi,
>
> May I learn how I can keep stereo information in a canonical SMILES?
>
> >>> import pybel
> >>> mol = pybel.readstring('smi', 'CC(=O)/C=/CO')
>
> >>> print mol.write('can')
> CC(=O)C=CO
>
> >>> print mol.write('smi')
> CC(=O)C=CO
>
> >>> print mol.write('fix')
> CC(=O)C=CO
>
>
> Thank you
> Murat Keceli
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Issue

2018-01-16 Thread Fredrik Wallner
(Please cc the list on replies since that makes it a bigger chance that you 
will have a good answer)

Hi,

Well, if installation failed already at the build phase it’s not at all strange 
that you can’t import it from Python...
As I said earlier, the easiest way of using OpenBabel through Python on a Mac 
is to install the Conda version. If you really want to install it from source, 
you should use a more recent version than 2.3.1.

Kind regards,
Fredrik

On 16 jan. 2018 21:43 +0100, José Suarez Sierra , 
wrote:
> Thank you for replying,
>
> Im trying to install it from source with cmake (on mac), but, when I do make 
> -j2 I get the following:
>
> build josemanuelsuarezsierra$ make -j2
> [  8%] Built target inchi
> [  9%] Building CXX object src/CMakeFiles/openbabel.dir/base.o
> [  9%] Building CXX object src/CMakeFiles/openbabel.dir/alias.o
> In file included from 
> /Users/josemanuelsuarezsierra/openbabel-2.3.1/src/alias.cpp:17:
> In file included from 
> /Users/josemanuelsuarezsierra/openbabel-2.3.1/include/openbabel/alias.h:19:
> /Users/josemanuelsuarezsierra/openbabel-2.3.1/include/openbabel/shared_ptr.h:25:14:
>  fatal error:
>       'tr1/memory' file not found
>     #include 
>              ^
> 1 error generated.
> make[2]: *** [src/CMakeFiles/openbabel.dir/alias.o] Error 1
> make[2]: *** Waiting for unfinished jobs
> make[1]: *** [src/CMakeFiles/openbabel.dir/all] Error 2
> make: *** [all] Error 2
>
> Im using python 2.7 instead of 3 version.
>
> Thank you for your supporting
> > El 15 ene 2018, a las 11:19, Fredrik Wallner  escribió:
> >
> > Hi,
> >
> > Have you installed OpenBabel and in that case, how did you install it? If 
> > you are not used to developing/installing from source I would suggest that 
> > you use the Conda distribution of OpenBabel. Install Anaconda 
> > (Anaconda.org) and then run “conda install openbabel”.
> >
> > Kind regards,
> > Fredrik
> >
> > On 15 Jan 2018, 02:26 +0100, Jose manuel Suarez Sierra 
> > , wrote:
> > > Hello,
> > >
> > > Im having an error when compiling this example code on my macOS
> > >
> > >
> > > from pybel import *
> > >
> > > for molecule in readfile("sdf","../xsaa.sdf"):
> > >print molecule.molwt
> > > I can not make it to work, it prompts the following issue:
> > > Library/Python/2.7/lib/python/site-packages/_openbabel.so
> > >   Reason: image not found
> > >
> > > I’ll be so grateful if you can help me.
> > >
> > > Sincerely yours jm
> > > --
> > > Check out the vibrant tech community on one of the world's most
> > > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > > ___
> > > OpenBabel-discuss mailing list
> > > OpenBabel-discuss@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss