Re: [Open Babel] Error calculating descriptor

2022-05-25 Thread Fredrik Wallner
Hello,

How did you install OpenBabel? It looks like an issue with the BABEL_DATADIR 
environmental variable.

Kind regards,
Fredrik
On 24 May 2022, 21:45 +0200, jiangshan , wrote:
> Dear Sir or Madam,
> > quote_type
> > I'm having some problems computing molecular descriptors using Python's 
> > OpenBabel library and would appreciate your help.
> >
> > OpenBabel version: 3.1.1
> >
> > quote_type
> > The running code is as follows:
> > quote_type
> > > quote_type
> > > from openbabel import openbabel,pybel
> > > quote_type
> > > for mymol in pybel.readfile("mol", "p078579.mol"):
> > > quote_type
> > > > quote_type
> > > > descr_dict = mymol.calcdesc()
> > > quote_type
> > > > quote_type
> > > > FP4_dict = mymol.calcfp(fptype="FP4")
> > quote_type
> >
> > The error message is as follows:
> > quote_type
> > > quote_type
> > > ==
> > > quote_type
> > > *** Open Babel Error  in OpenBabel::OBGroupContrib::ParseFile
> > > quote_type
> > >    Could not find contribution data file.
> > > quote_type
> > > ==
> > > quote_type
> > > *** Open Babel Error  in OpenBabel::OBGroupContrib::ParseFile
> > > quote_type
> > >    Could not find contribution data file.
> > > quote_type
> > > ==
> > > quote_type
> > > *** Open Babel Error  in OpenBabel::OBGroupContrib::ParseFile
> > > quote_type
> > >    Could not find contribution data file.
> > > quote_type
> > > ==
> > > quote_type
> > > *** Open Babel Error  in OpenBabel::PatternFP::ReadPatternFile
> > > quote_type
> > >   Cannot open SMARTS_InteLigand.txt
> >
> > quote_type
> > Attached are the files used in the code.
> > quote_type
> > I would be very grateful if the issue could be resolved. Looking forward to 
> > your reply.
> > quote_type
> > quote_type
> > Yours truly,
> > quote_type
> > Jiang Shan
>
>
>
>
>
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] inquiries about installation

2021-04-21 Thread Fredrik Wallner
Hello,

If you are using Anaconda I would suggest installing via
conda install -c conda-forge openbabel

Kind regards,
Fredrik
On 21 Apr 2021, 18:07 +0200, Li, Xiaolei , wrote:
> Dear Openbabel team,
> Thank you for building such a useful tool for chemists.
> I'm a first-year PhD student, trying to transform SMILES into Formula for my 
> research.
> I was trying to install the package into python (jupyter notebook in 
> Anaconda). using the following code:
> import sys
> !{sys.executable} -m pip install openbabel
> But error shows up. This might be a basic python issue.   But as a beginner 
> in programming, I really don't know how to do it. I was silly enough to copy 
> the  include and library directories into Anaconda route, still not working.
> It would be much appreciated if you could help me out.
> Thank you very much.
> Li
>
> ERROR: Command errored out with exit status 1:
>   command: 'C:\Users\lenovo\anaconda3\python.exe' -u -c 'import sys, 
> setuptools, tokenize; sys.argv[0] = 
> '"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-kbjuf0jl\\openbabel\\setup.py'"'"';
>  
> __file__='"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-kbjuf0jl\\openbabel\\setup.py'"'"';f=getattr(tokenize,
>  '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
> bdist_wheel -d 'C:\Users\lenovo\AppData\Local\Temp\pip-wheel-vyr067gr'
>   cwd: C:\Users\lenovo\AppData\Local\Temp\pip-install-kbjuf0jl\openbabel\
>  Complete output (15 lines):
>  running bdist_wheel
>  running build
>  running build_ext
>  Warning: invalid version number '3.1.1.1'.
>  Guessing Open Babel location:
>  - include_dirs: ['C:\\Users\\lenovo\\anaconda3\\include', 
> 'C:\\Users\\lenovo\\anaconda3\\include', '/usr/local/include/openbabel3']
>  - library_dirs: ['C:\\Users\\lenovo\\anaconda3\\libs', 
> 'C:\\Users\\lenovo\\anaconda3\\PCbuild\\amd64', '/usr/local/lib']
>  building 'openbabel._openbabel' extension
>  swigging openbabel\openbabel-python.i to openbabel\openbabel-python_wrap.cpp
>  swig.exe -python -c++ -small -O -templatereduce -naturalvar 
> -IC:\Users\lenovo\anaconda3\include -IC:\Users\lenovo\anaconda3\include 
> -I/usr/local/include/openbabel3 -o openbabel\openbabel-python_wrap.cpp 
> openbabel\openbabel-python.i
>
>  Error: SWIG failed. Is Open Babel installed?
>  You may need to manually specify the location of Open Babel include and 
> library directories. For example:
>python setup.py build_ext -I/usr/local/include/openbabel3 -L/usr/local/lib
>python setup.py install
>  
>  ERROR: Failed building wheel for openbabel
>ERROR: Command errored out with exit status 1:
> command: 'C:\Users\lenovo\anaconda3\python.exe' -u -c 'import sys, 
> setuptools, tokenize; sys.argv[0] = 
> '"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-kbjuf0jl\\openbabel\\setup.py'"'"';
>  
> __file__='"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-kbjuf0jl\\openbabel\\setup.py'"'"';f=getattr(tokenize,
>  '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', 
> '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' 
> install --record 
> 'C:\Users\lenovo\AppData\Local\Temp\pip-record-laodsi4w\install-record.txt' 
> --single-version-externally-managed --compile --install-headers 
> 'C:\Users\lenovo\anaconda3\Include\openbabel'
> cwd: 
> C:\Users\lenovo\AppData\Local\Temp\pip-install-kbjuf0jl\openbabel\
>Complete output (14 lines):
>running install
>running build_ext
>Warning: invalid version number '3.1.1.1'.
>Guessing Open Babel location:
>- include_dirs: ['C:\\Users\\lenovo\\anaconda3\\include', 
> 'C:\\Users\\lenovo\\anaconda3\\include', '/usr/local/include/openbabel3']
>- library_dirs: ['C:\\Users\\lenovo\\anaconda3\\libs', 
> 'C:\\Users\\lenovo\\anaconda3\\PCbuild\\amd64', '/usr/local/lib']
>building 'openbabel._openbabel' extension
>swigging openbabel\openbabel-python.i to 
> openbabel\openbabel-python_wrap.cpp
>swig.exe -python -c++ -small -O -templatereduce -naturalvar 
> -IC:\Users\lenovo\anaconda3\include -IC:\Users\lenovo\anaconda3\include 
> -I/usr/local/include/openbabel3 -o openbabel\openbabel-python_wrap.cpp 
> openbabel\openbabel-python.i
>
>Error: SWIG failed. Is Open Babel installed?
>You may need to manually specify the location of Open Babel include and 
> library directories. For example:
>  python setup.py build_ext -I/usr/local/include/openbabel3 
> -L/usr/local/lib
>  python setup.py install
>
> ERROR: Command errored out with exit status 1: 
> 'C:\Users\lenovo\anaconda3\python.exe' -u -c 'import sys, setuptools, 
> tokenize; sys.argv[0] = 
> '"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-kbjuf0jl\\openbabel\\setup.py'"'"';
>  
> __file__='"'"'C:\\Users\\lenovo\\AppData\\Local\\Temp\\pip-install-kbjuf0jl\\open

Re: [Open Babel] SMILES to PNG and then PNG to SMILES?

2019-09-26 Thread Fredrik Wallner
Hi,

In order for that to work, you need to embed structural information the 
png-file in the first step. Open Babel is not able to do “chemical OCR”.
obabel -:"NC(SC)=N" -o png -O output.png -xO molfile

Kind regards,
Fredrik
On 24 Sep 2019, 22:59 +0200, Ryan Bannen , 
wrote:
> Hello all,
>
> I installed Open Babel via conda on my Linux workstation and have been 
> enjoying what it can do.  I do have a question regarding png files however:
>
> I was please to find that the following command:
>
> obabel -:"NC(SC)=N" -o png -O output.png
>
> will create a nice png file of the provided SMILES string.
>
> From looking at the available formats when typing  obabel -L formats it would 
> appear that png is an acceptable -input- format and that SMILES would be an 
> acceptable -output- format.  However, when I type:
>
> obabel output.png  -i png -o smi -O output.smi
>
> Open Babel will tell me that it converted 1 molecule, but output.smi will be 
> a file with 0 bytes.
>
> Can Open Babel actually extract SMILES information from provided png files or 
> should I go investigate programs like osra or CLiDE instead?
>
> Thank you very much,
>
> Ryan
> --
> Ryan Bannen, PhD
> Senior Bioinformatics Scientist
>
> Nimble Therapeutics, Inc.
> 500 S. Rosa Rd.
> Madison WI, 53719
> www.nimbletherapeutics.com
>
> Confidentiality Note: This message is intended only for the use of the named 
> recipient(s) and may contain confidential and/or proprietary information. If 
> you are not the intended recipient, please contact the sender and delete this 
> message. Any unauthorized use of the information contained in this message is 
> prohibited.
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Error handling with smi file in pybel?

2019-09-12 Thread Fredrik Wallner
Hi,

That SMILES-string doesn’t look valid. You have half the six-membered ring 
specified as aromatic and the other half as aliphatic. It seems like 
AddHydrogens is fixing this and adds hydrogens to match up the “aromatic” 
carbons.

Med vänliga hälsningar,
Fredrik

On 11 Sep 2019, 20:41 +0200, Scalfani, Vincent , wrote:
> Hi Noel,
>
> Thanks very much, this works great! Also, If I add the DoNotAddH InChI option 
> without adding explicit hydrogens with OBMol.AddHydrogens(), to the molecule 
> before writing InChI, I get InChIs with no H’s.
>
> So, C (methane), becomes:
> InChI=1S/C
>
> Instead of
> InChI=1S/CH4/h1H4
>
> But you are right, it seems that I was specifying the default options anyway, 
> and I do not need to add explicit H nor add the DoNotAddH option. Thanks for 
> the explanation. In general I found the InChIs are the same between the two 
> methods (i.e., no options vs. DoNotAddH). I did find a few examples where 
> these two methods produce different InChIs with Open Babel. However, I think 
> this is an unrelated bug, maybe related to OBMol.AddHydrogens(), and not 
> InChI? I’m not sure though. I’m happy to file a bug report if I uncovered 
> something real.
>
> Here is a Gist for an example of a molecule that has a different InChI based 
> on the two methods. The first InChI is calculated with no InChI options, and 
> the second with specifying DoNotAddH, and adding explicit hydrogens before 
> calculation.
>
> https://nbviewer.jupyter.org/gist/vfscalfani/724c47df3880edf4c0588001ba72d69e
>
> Thanks again.
>
> Vin
>
>
> From: Noel O'Boyle 
> Sent: Wednesday, September 11, 2019 6:05 AM
> To: Scalfani, Vincent 
> Cc: openbabel-discuss@lists.sourceforge.net
> Subject: Re: [Open Babel] Error handling with smi file in pybel?
>
> Hi Vin,
>
> By default the command-line application stops on error, a behavior that can 
> be overridden by "-e". I have to say that this behavior drives me bananas. 
> But anyway...
>
> I've just been trying to do the same through Python, but have been failing. 
> Adding obconversion.AddOption("e", obconversion.GENOPTIONS) should work but 
> doesn't. So I'll file a bug.
>
> But for your purposes you don't need this. Just do what I always do :-)
>
> # loop through molecules and print InChI strings to a file
> with open("mySMILES.smi") as inp:
>     with open("InChI_ouput.inchi", 'w') as f:
>         for line in inp:
>             try:
>                 mol = pybel.readstring("smi", line)
>             except IOError:
>                 f.write("Open_Babel_Error\n")
>                 continue
>
> Pro-tip: name your file handles "inp" and "out" instead of "f", etc. I've 
> been there. :-)
>
> Regarding what you're trying to do, AddHydrogens doesn't actually add 
> hydrogens (I know, I know), it converts from implicit hydrogens to explicit. 
> The hydrogens are already there on every atom. But it's no harm making them 
> explicit, and you should get the same InChI either way. Similarly, I'd have 
> to check to be sure, but I think the code that uses the InChI has "/DoNoAddH" 
> implicitly (it's done through the API). Again, no harm specifying it.
>
> On Mon, 9 Sep 2019 at 22:05, Scalfani, Vincent  wrote:
> > Dear All,
> >
> > I am trying to process a SMILES file (.smi) and calculate InChIs, where 
> > there are some SMILES that Open Babel will not be able to read, due to 
> > syntax or other errors. In those cases, I would like to print a string such 
> > as “Open_Babel_Error” on the line (or something even more descriptive).
> >
> > However, everything I have tried results in Open Babel stopping once it 
> > reads a SMILES string it cannot parse. Here is where I am at (code below), 
> > I did read the Errors and Warnings documentation with OBMessageHandler 
> > class, but I could not figure out how to incorporate that. Any 
> > direction/examples would be much appreciated.
> >
> > Thanks
> >
> > Vin
> > --
> > import pybel
> >
> > # Set up conversion to InChI
> > conv = pybel.ob.OBConversion()
> > conv.SetOutFormat("inchi")
> > conv.AddOption("X", conv.OUTOPTIONS, "DoNotAddH")
> >
> > # Read a SMILES file
> > mols = pybel.readfile("smi","mySMILES.smi")
> >
> > # loop through molecules and print InChI strings to a file
> > with open("InChI_ouput.inchi", 'w') as f:
> >     for mol in mols:
> >     if not mol:
> >     f.write("Open_Babel_Error\n".format(inchi))
> >     continue
> >     # N.B. Adding H's to OB Molecular Object, and not through InChI
> >     mol.OBMol.AddHydrogens()
> >     inchi = conv.WriteString(mol.OBMol)
> >     f.write("{}".format(inchi))
> > f.close()
> >
> > —-
> > Vincent F. Scalfani, Ph.D.
> > University Libraries
> > The University of Alabama
> >
> > ___
> > OpenBabel-discuss mailing list
> > OpenBabel-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> ___
> OpenBabel-discuss ma

Re: [Open Babel] BUG? (Re: generate image dynamically)

2018-12-26 Thread Fredrik Wallner
The svg-format has an option to omit the XML declaration, namely ’x’. So try 
with opt={’u’:None, ’C’:None, ’x’:None}
I haven’t had time to test though...

> 26 dec. 2018 kl. 21:14 skrev Dimitri Maziuk via OpenBabel-discuss 
> :
> 
> (Repost with a catchy Subject)
> 
> Noel, Geoff,
> 
> this sounds like a bug:
> 
> On 12/23/18 2:52 PM, Spencer Trinh wrote:
>> 
>> output=pybel.Outputfile('svg',filename='testsvg.svg',opt={'u':None,'C':None})
>> for name,mol in mols.items():
>> mol.removeh()
>> mol.title=name
>> output.write(mol)
>> output.close()
> 
>> ... The svg file itself has errors. The error is:
>> 
>> This page contains the following errors:
>> error on line 36 at column 6: XML declaration allowed only at the start of
>> the document
> 
> I am guessing every write() writes out the whole shebang starting with
> " 
> -- 
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
> 
> 
> 
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



___
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-19 Thread Fredrik Wallner
If you would like to enumerate stereoisomers (for any reason) I would do it on 
the SMILES string level byt pure text handling. I put together a short python 
function to do this to get you started. It’s not tested or guaranteed to work 
in all cases, but can be found at 
https://gist.github.com/fredrikw/17738a8d3d9da46e8520f0b9affec8ff
(I haven’t used autodock in a long while, but can’t you just allow the 
conformer generation to switch stereo? That way you don’t need to first 
enumerate them separately.)

Kind regards,
Fredrik

On 19 jan. 2018 13:58 +0100, Gonzalo Nuñez , wrote:
> Or for example I use pybel and autodock vina through python, so when docking 
> trying all conformers is something important
>
> > 2018-01-18 20:59 GMT-03:00 Dimitri Maziuk :
> > > On 01/18/2018 07:30 AM, Noel O'Boyle wrote:
> > > > This question has come up before. Can I ask why you would find this 
> > > > useful?
> > >
> > > E.g. in a mixture of isomers NMR can show multiple peaks for "same"
> > > atom. Knowing how many peaks you might get beforehand could be useful.
> > >
> > > ICBW, IANA NMR spectroscopist (I just run their computers), etc.
> > > --
> > > Dimitri Maziuk
> > > Programmer/sysadmin
> > > BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
> > >
> > >
> > > --
> > > 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
> > >
>
>
>
> --
> Gonzalo Núñez
> --
> 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


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-15 Thread Fredrik Wallner
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


Re: [Open Babel] installing problem

2017-10-08 Thread Fredrik Wallner
You need cmake to be able to install OpenBabel. Please see https://cmake.org or 
your favorite package manager for installation of cmake.

Kind regards,
Fredrik

On 8 okt. 2017 19:58 +0200, Elaf Islam , wrote:
> Hi
> When I try to install OpenBabel , I stuck in this step A2
> and I get this message in the terminal
> -bash: cmake: command not found
>
> and
> make: *** No targets specified and no makefile found.  Stop.
>
> please check the attachment to see files
> ---
> Elaf J. Islam
> Master Student
>
> Computational Bioscience Research Center (CBRC)
> King Abdullah University of Science and Technology (KAUST)
>
> Thuwal 23955-6900, Kingdom of Saudi Arabia
>
> This message and its contents, including attachments are intended solely for 
> the original recipient. If you are not the intended recipient or have 
> received this message in error, please notify me immediately and delete this 
> message from your computer system. Any unauthorized use or distribution is 
> prohibited. Please consider the environment before printing this 
> email.--
> 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] Errors with compiling open babel

2017-06-06 Thread Fredrik Wallner
Hi,

Your folder name suggests that you are trying to install version 2.3.1 which is 
rather old. Try the newest release instead (2.4.1).

Kind regards,
Fredrik

On 6 juni 2017 18:03 +0200, Nelly Lian , wrote:
> Hello open babel team,
> This is what appeared after I entered cmake ../openbabel-2.3.1 2>&1 | tee 
> cmake.out on the Mac terminal. I used ../openbabel-2.3.1 instead of ob-src 
> because that is what the source folder is named.
>
> -- Performing Test SCANDIR_NEEDS_CONST - Failed
> -- Could NOT find Eigen2 (missing:  EIGEN2_INCLUDE_DIR EIGEN2_VERSION_OK) 
> (Required is at least version "2.0.0")
> CMake Error at 
> /Applications/CMake.app/Contents/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:137
>  (message):
>   Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
> Call Stack (most recent call first):
>
> Thank you
> ml>--
> 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] having trouble generating .png picture in c++

2017-05-11 Thread Fredrik Wallner
Hi,

I think you should use the format "_png2" instead of "png", at least that's how 
I do it. 

Kind regards,
Fredrik 

Skickat från min iPhone

> 12 maj 2017 kl. 02:40 skrev xh s :
> 
> I can do it from command line fine. 
> 
> Xianghai
> 
>> On Thu, May 11, 2017 at 5:33 PM, Geoffrey Hutchison 
>>  wrote:
>> > I'm trying to convert a SMILES string to a png picture using openbabel C++ 
>> > library. Here's a minimal code that says what I want to do.
>> ...
>> > This compiles and runs fine but it generates a png that's only a few bytes 
>> > and can't be open. I tried the same code with "png" replaced by "svg" and 
>> > it worked. However for various reasons I want to use png instead of svg. I 
>> > guess it might be a cairo issue but I'm not sure.
>> 
>> Ignoring the code for the moment, can you do this from the command line? If 
>> not, it has nothing to do with your code.
>> 
>> -Geoff
>> 
> 
> --
> 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] conversion AddOption doesn't work

2017-05-08 Thread Fredrik Wallner
I would make a copy of it myself, but deleting/adding should also work.

(It’s always good to keep the list cc:ed on replies to maximize the likelihood 
of a reply)

Kind regards,
Fredrik

On 6 maj 2017 00:53 +0200, xh s , wrote:
> Thanks for the reply!
>
> So if I still want the hydrogens in my molecule in the long run, I should 
> delete them before creating the SVG and then add them back?
>
> Xianghai
>
> > On Fri, May 5, 2017 at 3:05 PM, Fredrik Wallner  wrote:
> > > Hi,
> > >
> > > I believe you are using AddOption correct, but not the correct option. 
> > > Option “C” does not turn off explicit hydrogens it turns off terminal C 
> > > with hydrogens (i.e. CH3 groups). If your molecule has explicit 
> > > hydrogens, you should remove them before creating the SVG (or in your 
> > > example code, don’t add them…)
> > >
> > > Kind regards,
> > > Fredrik
> > >
> > > On 5 maj 2017 19:46 +0200, xh s , wrote:
> > > > Hi,
> > > >
> > > > I'd like to output my molecules to svg with some options (e.g. implicit 
> > > > hydrogen). Here's a minimal example code:
> > > >
> > > > #include 
> > > > #include 
> > > > #include 
> > > > using namespace std;
> > > > using namespace OpenBabel;
> > > >
> > > > int main() {
> > > >   stringstream inputSmiles("CCC(CC)C");
> > > >   ofstream pic("minimal_conversion_pic.svg");
> > > >   OBConversion conv(&inputSmiles, &pic);
> > > >   conv.SetInAndOutFormats("can", "svg");
> > > >   OBMol mol;
> > > >   conv.Read(&mol);
> > > >   mol.AddHydrogens();
> > > >   conv.AddOption("C",OBConversion::OUTOPTIONS);
> > > >   conv.Write(&mol);
> > > > }
> > > >
> > > >
> > > > I believe "C" is an option to turn off explicit hydrogen in svg 
> > > > drawing. However this program still prints hydrogens. I tried other 
> > > > options too but none of them worked. Am I using AddOption wrong?
> > > >
> > > > Thank you,
> > > > Xianghai
> > > > --
> > > > 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] conversion AddOption doesn't work

2017-05-05 Thread Fredrik Wallner
Hi,

I believe you are using AddOption correct, but not the correct option. Option 
“C” does not turn off explicit hydrogens it turns off terminal C with hydrogens 
(i.e. CH3 groups). If your molecule has explicit hydrogens, you should remove 
them before creating the SVG (or in your example code, don’t add them…)

Kind regards,
Fredrik

On 5 maj 2017 19:46 +0200, xh s , wrote:
> Hi,
>
> I'd like to output my molecules to svg with some options (e.g. implicit 
> hydrogen). Here's a minimal example code:
>
> #include 
> #include 
> #include 
> using namespace std;
> using namespace OpenBabel;
>
> int main() {
>   stringstream inputSmiles("CCC(CC)C");
>   ofstream pic("minimal_conversion_pic.svg");
>   OBConversion conv(&inputSmiles, &pic);
>   conv.SetInAndOutFormats("can", "svg");
>   OBMol mol;
>   conv.Read(&mol);
>   mol.AddHydrogens();
>   conv.AddOption("C",OBConversion::OUTOPTIONS);
>   conv.Write(&mol);
> }
>
>
> I believe "C" is an option to turn off explicit hydrogen in svg drawing. 
> However this program still prints hydrogens. I tried other options too but 
> none of them worked. Am I using AddOption wrong?
>
> Thank you,
> Xianghai
> --
> 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] Using pybel.readstring() and using pybel in Python 2.7

2017-03-09 Thread Fredrik Wallner
Looking at the error message it looks like you could solve the problem by 
installing Swig. However, there might be easier ways to do it. It looks like 
you installed OpenBabel through Homebrew on a Mac, is that right? If so, did 
you specify "--with-python", that is run the command as "brew install 
open-babel --with-python"?
I think that would be the best way to install the python library on your system.
You can also try "conda install openbabel" to use OpenBabel in the Anaconda 
python distribution.

Kind regards,
Fredrik

On 9 mars 2017 16:01 +0100, Quim Aguirre , wrote:
> Thank you David!
>
> I have also tried installing openbabel, but I get the following error:
>
> $> pip install openbabel
>
> Collecting openbabel
> Downloading openbabel-2.4.1.tar.gz (74kB)
> 100% || 81kB 1.1MB/s
> Installing collected packages: openbabel
> Running setup.py install for openbabel ... error
> Complete output from command /usr/bin/python -u -c "import setuptools, 
> tokenize;__file__='/private/tmp/pip-build-7qwutX/openbabel/setup.py';f=getattr(tokenize,
>  'open', open)(__file__);code=f.read().replace('\r\n', 
> '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record 
> /tmp/pip-q5ZfA0-record/install-record.txt --single-version-externally-managed 
> --compile:
> running install
> running build_ext
> Open Babel location automatically determined by pkg-config:
> - include_dirs: 
> ['/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7',
>  '/usr/local/Cellar/open-babel/2.4.0/include/openbabel-2.0']
> - library_dirs: ['/usr/local/Cellar/open-babel/2.4.0/lib']
> building '_openbabel' extension
> swigging openbabel-python.i to openbabel-python_wrap.cpp
> swig -python -c++ -small -O -templatereduce -naturalvar 
> -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 
> -I/usr/local/Cellar/open-babel/2.4.0/include/openbabel-2.0 -o 
> openbabel-python_wrap.cpp openbabel-python.i
> unable to execute 'swig': No such file or directory
>
> Error: SWIG failed. Is Open Babel installed?
> You may need to manually specify the location of Open Babel include and 
> library directories. For example:
> python setup.py build_ext -I/usr/local/include/openbabel-2.0 -L/usr/local/lib
> python setup.py install
>
> 
>
> Do you know why is this error occurring?
>
> Thank you very much for your help,
>
> Quim
>
> 2017-03-09 15:29 GMT+01:00 David Hall  (mailto:li...@cowsandmilk.net)>:
> > Quoting from Matt Swain a couple weeks ago:
> >
> > > pip install pybel is not correct. That's an unrelated package 
> > > (https://pypi.python.org/pypi/PyBEL). Instead, do pip install openbabel
> >
> >
> > -David
> >
> > On Mar 9, 2017, at 8:29 AM, Quim Aguirre  > (mailto:quim.agui...@gmail.com)> wrote:
> >
> > > Hello,
> > >
> > > I am new at using Open Babel software. My intention is to use "Pybel" to 
> > > calculate structural similarity.
> > >
> > > First, I have installed Pybel for Python 3 this way:
> > >
> > > $> pip3 install pybel
> > >
> > > However, I cannot use the function "readstring":
> > >
> > > $> python3
> > > >>> import pybel
> > > >>> smiles = ['', 'CCCN']
> > > >>> mols = [pybel.readstring("smi", x) for x in smiles] # Create a list 
> > > >>> of two molecules
> > > Traceback (most recent call last):
> > > File "", line 1, in 
> > > File "", line 1, in 
> > > AttributeError: module 'pybel' has no attribute 'readstring'
> > >
> > > Do you know why is this happening?
> > >
> > > The other problem is that I am interested in using Pybel in Python 2.7. 
> > > However, I cannot successfully run it. I install it properly this way:
> > >
> > > $> pip install pybel
> > >
> > > But then, when importing it, I get the following error:
> > >
> > > $> python
> > > >>> import pybel
> > > Traceback (most recent call last):
> > > File "", line 1, in 
> > > File "/Library/Python/2.7/site-packages/pybel/__init__.py", line 54, in 
> > > 
> > > from . import io
> > > File "/Library/Python/2.7/site-packages/pybel/io.py", line 31, in 
> > > from .canonicalize import decanonicalize_node
> > > File "/Library/Python/2.7/site-packages/pybel/canonicalize.py", line 9, 
> > > in 
> > > from .parser.language import rev_abundance_labels
> > > File "/Library/Python/2.7/site-packages/pybel/parser/__init__.py", line 
> > > 8, in 
> > > from .parse_bel import BelParser
> > > File "/Library/Python/2.7/site-packages/pybel/parser/parse_bel.py", line 
> > > 15, in 
> > > from .baseparser import BaseParser, WCW, nest, one_of_tags, triple
> > > File "/Library/Python/2.7/site-packages/pybel/parser/baseparser.py", line 
> > > 22, in 
> > > quote = dblQuotedString().setParseAction(removeQuotes)
> > > TypeError: __call__() takes exactly 2 arguments (1 given)
> > >
> > > Do you know what could be the reason of these errors? It would be very 
> > > interesting for me to be able to use this package.
> > >
> > > Thank you very much,
> > >
> > > Quim
> > >
> >

Re: [Open Babel] Cannot use readstring() or readfile()

2017-03-05 Thread Fredrik Wallner
Hi,

If you do “import pybel” you have to use the module name for the readstring 
command, ie. pybel.readstring(). Another option is to do “from pybel import 
readstring”, depending on your use case.

Kind regards,
Fredrik

On 5 mars 2017 20:25 +0100, phuongdnp , wrote:
> I have tried installing different version of python (2.7, 3.3, 3.6) and
> openbabel (2.3, 2.4) (Win 32bit) following these steps:
> - Install python
> - Install pip
> - Install pybel module
> - Install openbabel GUI and also openbabel module
> - Add the Environment variables to python folders
> I can use "import pybel" and "import openbabel" but when I run the examples
> (mol = readstring("smi", "") or readfile()) there always is an error
> "name 'readstring' is not defined"
> I have also tried other windows pc but the same thing happened.
> Please help me to fix this. I appreciate very much.
>
>
>
> --
> View this message in context: 
> http://forums.openbabel.org/Cannot-use-readstring-or-readfile-tp4659795.html
> Sent from the General discussion mailing list archive at Nabble.com.
>
> --
> 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] Openbabel to work with optimize command in pymol

2017-03-03 Thread Fredrik Wallner
Hi,

I'd say that the easiest way to get python access to OpenBabel, is to use the 
conda distribution (”conda install openbabel”) provided that you install and 
use the Anaconda Python distribution (www.continuum.io/downloads).

Kind regards,
Fredrik

On 3 mars 2017 18:27 +0100, Bhattacharjee, Arnab 
, wrote:
> Hi
>
> I was trying to compile the openbabel (2.4.1) in my mac. both in bash and 
> tcsh the command Cmake is not found. My goal is to use optimize in pymol, for 
> which I need openbabel. Any pointer to solve this?
>
> best regards
> Arnab
> --
> 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] open babel source installation - issues

2017-03-01 Thread Fredrik Wallner
Hi,

That warning from CMake (marked as ”for project developers”) should not hinder 
the compilation and installation of OpenBabel. Did you try to move on with make 
and ”make install”?
If all that you need is python access to OpenBabel, you should also be able to 
use the conda distribution (”conda install openbabel”) provided that you 
install and use the Anaconda Python distribution 
(https://www.continuum.io/downloads).

Kind regards,
Fredrik

> 28 feb. 2017 kl. 17:30 skrev Karim Rafie (PG Research) 
> :
> 
> Dear all,
>  
> I’m having a problem compiling openbable on my Mac (macOS Sierra, version 
> 10.12.3). When wanting to compile I receive the following message at the end:
>  
> “CMake Warning (dev):
>   Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
>   --help-policy CMP0042" for policy details.  Use the cmake_policy command to
>   set the policy and suppress this warning.
>  
>   MACOSX_RPATH is not specified for the following targets:
>  
>inchi
>openbabel
>  
> This warning is for project developers.  Use -Wno-dev to suppress it.
>  
> -- Generating done
> CMake Warning:
>   Manually-specified variables were not used by the project:
>  
> EIGEN3_INCLUDE_DIR
>  
>  
> -- Build files have been written to: 
> /Users/kzrafie/Downloads/openbabel-2.3.1/build”
>  
>  
> I assume, due to the paths not specified in MACOSX_RPATH for inchi and 
> openbabel, that I’m having issues with the installation. I would usually go 
> for the pkg/dmg installation; however, I’m putting together a python script 
> for which I need to do a source installation.
>  
> You probably heard about this issue before, however I couldn’t find any 
> decent answers anywhere.
>  
> Best wishe,
> Karim
> ##
> Karim Rafie; M.Sc., AMRSC
> PhD research student
> Daan van Aalten lab
> School of Life Sciences
> University of Dundee
> Scotland / UK
> 
> The University of Dundee is a registered Scottish Charity, No: SC015096 
> --
> 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] error with complin

2016-11-29 Thread Fredrik Wallner
https://github.com/openbabel/openbabel/blob/master/src/ops/opconfab.cpp 
<https://github.com/openbabel/openbabel/blob/master/src/ops/opconfab.cpp>

> 29 nov. 2016 kl. 12:42 skrev Mohammad Goodarzi :
> 
> Hello Again,
> 
> I managed to do it both by compile and through brew now. 
> Open Babel 2.4.1 -- Oct 12 2016 -- 00:37:03
> 
> 
> Thanks for your support. I have one more question which is not a critical one 
> so I ask it here.
> The source code or python code of confab is available ? 
> 
> Thanks again and have a good day
> Cheers,
> Mohammad 
> 
> 
> 
> On Tue, Nov 29, 2016 at 11:18 AM, Fredrik Wallner  <mailto:fred...@wallner.nu>> wrote:
> Hello again,
> 
> If you read the error from the first run to ”brew link open-babel” you will 
> see that the error is exactly the same as bor the inchi folder before, so a 
> good guess would be to use the same method to resolve it.
> 
> Kind regards,
> Fredrik
> 
>> 29 nov. 2016 kl. 11:16 skrev Mohammad Goodarzi > <mailto:mohammad.goda...@gmail.com>>:
>> 
>> The problem is still there 
>> 
>> I did remove the file 
>> sudo rm -r /usr/local/include/inchi
>> 
>> Then I tried again with brew install open-babel 
>> which gave me the same error to use link open-babel
>> 
>> Then I did 
>> 
>> $ brew link open-babel
>> Linking /usr/local/Cellar/open-babel/2.4.1. <http://2.4.1./>.. 
>> Error: Could not symlink include/openbabel-2.0/openbabel/alias.h
>> /usr/local/include/openbabel-2.0/openbabel is not writable.
>> 
>> 
>> I know that I must not use sudo because I can damage a lot, but i gave it a 
>> shot too, look at the error below 
>> 
>> 
>> 
>> $ sudo brew link open-babel
>> Error: Running Homebrew as root is extremely dangerous and no longer 
>> supported.
>> As Homebrew does not drop privileges on installation you would be giving all
>> build scripts full access to your system.
>> 
>> 
>> 
>> 
>> 
>> 
>> On Tue, Nov 29, 2016 at 11:09 AM, Fredrik Wallner > <mailto:fred...@wallner.nu>> wrote:
>> Ok, the last error is that you misspelled open-babel, but that doesn’t 
>> matter. The problem in the second run is that you don’t have permissions to 
>> write in the folder /usr/local/include/inchi. My suggestion there would be 
>> to remove that directory, using sudo (sudo rm -r /usr/local/include/inchi) 
>> and try again.
>> 
>>> 29 nov. 2016 kl. 11:03 skrev Mohammad Goodarzi >> <mailto:mohammad.goda...@gmail.com>>:
>>> 
>>> Hello, 
>>> 
>>> Yes, I have tried that. I did it again , here are the error I get
>>> 
>>> $brew link open-babel
>>> Linking /usr/local/Cellar/open-babel/2.4.1. <http://2.4.1./>.. 
>>> Error: Could not symlink bin/babel
>>> Target /usr/local/bin/babel
>>> already exists. You may want to remove it:
>>>   rm '/usr/local/bin/babel'
>>> 
>>> To force the link and overwrite all conflicting files:
>>>   brew link --overwrite open-babel
>>> 
>>> To list all files that would be deleted:
>>>   brew link --overwrite --dry-run open-babel
>>> 
>>> 
>>> Then as you also said and it is mentioned above , I did the following 
>>> 
>>> $ brew link --overwrite open-babel
>>> Linking /usr/local/Cellar/open-babel/2.4.1. <http://2.4.1./>.. 
>>> Error: Could not symlink include/inchi/inchi_api.h
>>> /usr/local/include/inchi is not writable.
>>> 
>>> 
>>> I thought maybe works for the second time :-D, so I restart the terminal 
>>> and I did 
>>> 
>>> $ brew link --overwrite openbabel
>>> Error: No such keg: /usr/local/Cellar/openbabel
>>> 
>>> 
>>> Thanks and sorry for trouble 
>>> Cheers,
>>> Mo
>>> 
>>> 
>>> 
>>> On Tue, Nov 29, 2016 at 10:57 AM, Fredrik Wallner >> <mailto:fred...@wallner.nu>> wrote:
>>> The error message says that you should run "brew link open-babel". Have you 
>>> tried that?
>>> 
>>> You probably have a problem with an old open-babel version in /use/local 
>>> why HomeBrew will fail on linking. 
>>> 
>>> Run brew doctor to see if it warns on stuff in /usr/local, especially if 
>>> there are stuff related to OpenBabel (e.g. libopenbabel, libinchi…)
>>> 
>>> If ”brew link open-babel" fails you can also try with "brew link 
>>> --overwrite open

Re: [Open Babel] error with complin

2016-11-29 Thread Fredrik Wallner
Hello again,

If you read the error from the first run to ”brew link open-babel” you will see 
that the error is exactly the same as bor the inchi folder before, so a good 
guess would be to use the same method to resolve it.

Kind regards,
Fredrik
> 29 nov. 2016 kl. 11:16 skrev Mohammad Goodarzi :
> 
> The problem is still there 
> 
> I did remove the file 
> sudo rm -r /usr/local/include/inchi
> 
> Then I tried again with brew install open-babel 
> which gave me the same error to use link open-babel
> 
> Then I did 
> 
> $ brew link open-babel
> Linking /usr/local/Cellar/open-babel/2.4.1. <http://2.4.1./>.. 
> Error: Could not symlink include/openbabel-2.0/openbabel/alias.h
> /usr/local/include/openbabel-2.0/openbabel is not writable.
> 
> 
> I know that I must not use sudo because I can damage a lot, but i gave it a 
> shot too, look at the error below 
> 
> 
> 
> $ sudo brew link open-babel
> Error: Running Homebrew as root is extremely dangerous and no longer 
> supported.
> As Homebrew does not drop privileges on installation you would be giving all
> build scripts full access to your system.
> 
> 
> 
> 
> 
> 
> On Tue, Nov 29, 2016 at 11:09 AM, Fredrik Wallner  <mailto:fred...@wallner.nu>> wrote:
> Ok, the last error is that you misspelled open-babel, but that doesn’t 
> matter. The problem in the second run is that you don’t have permissions to 
> write in the folder /usr/local/include/inchi. My suggestion there would be to 
> remove that directory, using sudo (sudo rm -r /usr/local/include/inchi) and 
> try again.
> 
>> 29 nov. 2016 kl. 11:03 skrev Mohammad Goodarzi > <mailto:mohammad.goda...@gmail.com>>:
>> 
>> Hello, 
>> 
>> Yes, I have tried that. I did it again , here are the error I get
>> 
>> $brew link open-babel
>> Linking /usr/local/Cellar/open-babel/2.4.1. <http://2.4.1./>.. 
>> Error: Could not symlink bin/babel
>> Target /usr/local/bin/babel
>> already exists. You may want to remove it:
>>   rm '/usr/local/bin/babel'
>> 
>> To force the link and overwrite all conflicting files:
>>   brew link --overwrite open-babel
>> 
>> To list all files that would be deleted:
>>   brew link --overwrite --dry-run open-babel
>> 
>> 
>> Then as you also said and it is mentioned above , I did the following 
>> 
>> $ brew link --overwrite open-babel
>> Linking /usr/local/Cellar/open-babel/2.4.1. <http://2.4.1./>.. 
>> Error: Could not symlink include/inchi/inchi_api.h
>> /usr/local/include/inchi is not writable.
>> 
>> 
>> I thought maybe works for the second time :-D, so I restart the terminal and 
>> I did 
>> 
>> $ brew link --overwrite openbabel
>> Error: No such keg: /usr/local/Cellar/openbabel
>> 
>> 
>> Thanks and sorry for trouble 
>> Cheers,
>> Mo
>> 
>> 
>> 
>> On Tue, Nov 29, 2016 at 10:57 AM, Fredrik Wallner > <mailto:fred...@wallner.nu>> wrote:
>> The error message says that you should run "brew link open-babel". Have you 
>> tried that?
>> 
>> You probably have a problem with an old open-babel version in /use/local why 
>> HomeBrew will fail on linking. 
>> 
>> Run brew doctor to see if it warns on stuff in /usr/local, especially if 
>> there are stuff related to OpenBabel (e.g. libopenbabel, libinchi…)
>> 
>> If ”brew link open-babel" fails you can also try with "brew link --overwrite 
>> openbabel”. If that also fails, please provide the output of that command.
>> 
>> Kind regards,
>> Fredrik
>> 
>> Skickat från min iPhone
>> 
>> 29 nov. 2016 kl. 10:44 skrev Mohammad Goodarzi > <mailto:mohammad.goda...@gmail.com>>:
>> 
>>> Hello Fredrik, 
>>> 
>>> Thanks , I have tried many things before I ask. I am not getting what I 
>>> really want. 
>>> 
>>> For example, I do have Homebrew 1.1.2
>>> 
>>> and when I simply run brew install open-babel , I am getting this 
>>> 
>>> You can link formula with `brew link open-babel`
>>> Warning: open-babel-2.4.1 already installed, it's just not linked
>>> 
>>> any idea where the problem is ?
>>> 
>>> Cheers,
>>> Mo
>>> 
>>> On Tue, Nov 29, 2016 at 10:37 AM, Fredrik Wallner >> <mailto:fred...@wallner.nu>> wrote:
>>> Hi,
>>> 
>>> I would suggest you go with the HomeBrew option instead.
>>> If you don’t have HomeBrew installed, go to http://brew.sh 
>>>

Re: [Open Babel] error with complin

2016-11-29 Thread Fredrik Wallner
Ok, the last error is that you misspelled open-babel, but that doesn’t matter. 
The problem in the second run is that you don’t have permissions to write in 
the folder /usr/local/include/inchi. My suggestion there would be to remove 
that directory, using sudo (sudo rm -r /usr/local/include/inchi) and try again.
> 29 nov. 2016 kl. 11:03 skrev Mohammad Goodarzi :
> 
> Hello, 
> 
> Yes, I have tried that. I did it again , here are the error I get
> 
> $brew link open-babel
> Linking /usr/local/Cellar/open-babel/2.4.1. <http://2.4.1./>.. 
> Error: Could not symlink bin/babel
> Target /usr/local/bin/babel
> already exists. You may want to remove it:
>   rm '/usr/local/bin/babel'
> 
> To force the link and overwrite all conflicting files:
>   brew link --overwrite open-babel
> 
> To list all files that would be deleted:
>   brew link --overwrite --dry-run open-babel
> 
> 
> Then as you also said and it is mentioned above , I did the following 
> 
> $ brew link --overwrite open-babel
> Linking /usr/local/Cellar/open-babel/2.4.1. <http://2.4.1./>.. 
> Error: Could not symlink include/inchi/inchi_api.h
> /usr/local/include/inchi is not writable.
> 
> 
> I thought maybe works for the second time :-D, so I restart the terminal and 
> I did 
> 
> $ brew link --overwrite openbabel
> Error: No such keg: /usr/local/Cellar/openbabel
> 
> 
> Thanks and sorry for trouble 
> Cheers,
> Mo
> 
> 
> 
> On Tue, Nov 29, 2016 at 10:57 AM, Fredrik Wallner  <mailto:fred...@wallner.nu>> wrote:
> The error message says that you should run "brew link open-babel". Have you 
> tried that?
> 
> You probably have a problem with an old open-babel version in /use/local why 
> HomeBrew will fail on linking. 
> 
> Run brew doctor to see if it warns on stuff in /usr/local, especially if 
> there are stuff related to OpenBabel (e.g. libopenbabel, libinchi…)
> 
> If ”brew link open-babel" fails you can also try with "brew link --overwrite 
> openbabel”. If that also fails, please provide the output of that command.
> 
> Kind regards,
> Fredrik
> 
> Skickat från min iPhone
> 
> 29 nov. 2016 kl. 10:44 skrev Mohammad Goodarzi  <mailto:mohammad.goda...@gmail.com>>:
> 
>> Hello Fredrik, 
>> 
>> Thanks , I have tried many things before I ask. I am not getting what I 
>> really want. 
>> 
>> For example, I do have Homebrew 1.1.2
>> 
>> and when I simply run brew install open-babel , I am getting this 
>> 
>> You can link formula with `brew link open-babel`
>> Warning: open-babel-2.4.1 already installed, it's just not linked
>> 
>> any idea where the problem is ?
>> 
>> Cheers,
>> Mo
>> 
>> On Tue, Nov 29, 2016 at 10:37 AM, Fredrik Wallner > <mailto:fred...@wallner.nu>> wrote:
>> Hi,
>> 
>> I would suggest you go with the HomeBrew option instead.
>> If you don’t have HomeBrew installed, go to http://brew.sh <http://brew.sh/> 
>> Run the command from the installation instructions at openbabel.org 
>> <http://openbabel.org/> (http://openbabel.org/wiki/Category:Installation 
>> <http://openbabel.org/wiki/Category:Installation>): brew install open-babel
>> 
>> The error you are getting is because you are lacking cmake which is one of 
>> the requirements specified in the wiki for installing from the source code, 
>> but it is a lot easier to use the prebuilt versions form HomeBrew or 
>> Anaconda if you are not used to compiling stuff.
>> 
>> Kind regards,
>> Fredrik
>>> 29 nov. 2016 kl. 09:43 skrev Mohammad Goodarzi >> <mailto:mohammad.goda...@gmail.com>>:
>>> 
>>> Hello,
>>> 
>>> I am trying to install open babel on a Mac machine version 10.12.1
>>> 
>>> I used the following to do it 
>>> 
>>> http://openbabel.org/wiki/Install_(source_code) 
>>> <http://openbabel.org/wiki/Install_(source_code)>
>>> 
>>> Here the steps I am doing
>>> 
>>> 1-First I download the latest version to desktop and set my directory in 
>>> terminal to desktop 
>>> 2- tar zxvf openbabel-2.4.1.tar
>>> 3-mv openbabel-2.4.1 ob-src
>>> 4-mkdir ob-build
>>> 
>>> Now on desktop I have two folder one is ob-src and the other is ob-build
>>> 
>>> 
>>> 5-cd ob-build
>>> 6- cmake ../ob-src 2>&1 | tee cmake.out
>>> 
>>> Then  get error as follows:
>>> 
>>> -bash: cmake: command not found 
>>> 
>>> when I do ls , there is nothing whic

Re: [Open Babel] error with complin

2016-11-29 Thread Fredrik Wallner
The error message says that you should run "brew link open-babel". Have you 
tried that?

You probably have a problem with an old open-babel version in /use/local why 
HomeBrew will fail on linking. 

Run brew doctor to see if it warns on stuff in /usr/local, especially if there 
are stuff related to OpenBabel (e.g. libopenbabel, libinchi…)

If ”brew link open-babel" fails you can also try with "brew link --overwrite 
openbabel”. If that also fails, please provide the output of that command.

Kind regards,
Fredrik

Skickat från min iPhone

29 nov. 2016 kl. 10:44 skrev Mohammad Goodarzi mailto:mohammad.goda...@gmail.com>>:

> Hello Fredrik, 
> 
> Thanks , I have tried many things before I ask. I am not getting what I 
> really want. 
> 
> For example, I do have Homebrew 1.1.2
> 
> and when I simply run brew install open-babel , I am getting this 
> 
> You can link formula with `brew link open-babel`
> Warning: open-babel-2.4.1 already installed, it's just not linked
> 
> any idea where the problem is ?
> 
> Cheers,
> Mo
> 
> On Tue, Nov 29, 2016 at 10:37 AM, Fredrik Wallner  <mailto:fred...@wallner.nu>> wrote:
> Hi,
> 
> I would suggest you go with the HomeBrew option instead.
> If you don’t have HomeBrew installed, go to http://brew.sh <http://brew.sh/> 
> Run the command from the installation instructions at openbabel.org 
> <http://openbabel.org/> (http://openbabel.org/wiki/Category:Installation 
> <http://openbabel.org/wiki/Category:Installation>): brew install open-babel
> 
> The error you are getting is because you are lacking cmake which is one of 
> the requirements specified in the wiki for installing from the source code, 
> but it is a lot easier to use the prebuilt versions form HomeBrew or Anaconda 
> if you are not used to compiling stuff.
> 
> Kind regards,
> Fredrik
>> 29 nov. 2016 kl. 09:43 skrev Mohammad Goodarzi > <mailto:mohammad.goda...@gmail.com>>:
>> 
>> Hello,
>> 
>> I am trying to install open babel on a Mac machine version 10.12.1
>> 
>> I used the following to do it 
>> 
>> http://openbabel.org/wiki/Install_(source_code) 
>> <http://openbabel.org/wiki/Install_(source_code)>
>> 
>> Here the steps I am doing
>> 
>> 1-First I download the latest version to desktop and set my directory in 
>> terminal to desktop 
>> 2- tar zxvf openbabel-2.4.1.tar
>> 3-mv openbabel-2.4.1 ob-src
>> 4-mkdir ob-build
>> 
>> Now on desktop I have two folder one is ob-src and the other is ob-build
>> 
>> 
>> 5-cd ob-build
>> 6- cmake ../ob-src 2>&1 | tee cmake.out
>> 
>> Then  get error as follows:
>> 
>> -bash: cmake: command not found 
>> 
>> when I do ls , there is nothing which is logical because I just created it 
>> myself 
>> 
>> 
>> Many thanks for your help
>> Mo
>> 
>> 
>> 
>> 
>> 
>>  
>> --
>> ___
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net 
>> <mailto:OpenBabel-discuss@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss 
>> <https://lists.sourceforge.net/lists/listinfo/openbabel-discuss>
> 
> 
--
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] error with complin

2016-11-29 Thread Fredrik Wallner
Hi,

I would suggest you go with the HomeBrew option instead.
If you don’t have HomeBrew installed, go to http://brew.sh  
Run the command from the installation instructions at openbabel.org 
 (http://openbabel.org/wiki/Category:Installation 
): brew install open-babel

The error you are getting is because you are lacking cmake which is one of the 
requirements specified in the wiki for installing from the source code, but it 
is a lot easier to use the prebuilt versions form HomeBrew or Anaconda if you 
are not used to compiling stuff.

Kind regards,
Fredrik
> 29 nov. 2016 kl. 09:43 skrev Mohammad Goodarzi :
> 
> Hello,
> 
> I am trying to install open babel on a Mac machine version 10.12.1
> 
> I used the following to do it 
> 
> http://openbabel.org/wiki/Install_(source_code) 
> 
> 
> Here the steps I am doing
> 
> 1-First I download the latest version to desktop and set my directory in 
> terminal to desktop 
> 2- tar zxvf openbabel-2.4.1.tar
> 3-mv openbabel-2.4.1 ob-src
> 4-mkdir ob-build
> 
> Now on desktop I have two folder one is ob-src and the other is ob-build
> 
> 
> 5-cd ob-build
> 6- cmake ../ob-src 2>&1 | tee cmake.out
> 
> Then  get error as follows:
> 
> -bash: cmake: command not found 
> 
> when I do ls , there is nothing which is logical because I just created it 
> myself 
> 
> 
> Many thanks for your help
> Mo
> 
> 
> 
> 
> 
>  
> --
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] CMake error

2016-11-06 Thread Fredrik Wallner
Hi,

It looks like your wxWidgets installation i either faulty or of the wrong 
version since cmake complains that 
"wxWidgets wx/version.h file not found in 
/opt/xtal/ccp4-7.0-linux64/lib/wx/include/gtk2-unicode-3.0;/opt/xtal/ccp4-7.0-linux64/include/wx-3.0"

Kind regards,
Fredrik

> 5 nov. 2016 kl. 03:49 skrev Luis Fernando Cofas Vargas :
> 
> Hi, I got the following error.
> 
> Thank you in advance.
> 
> Best regards.
> 
> Fernando
> --
> 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/xeonphi___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
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/xeonphi
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] FW: Mychem SQL query for Tanimoto function

2016-10-20 Thread Fredrik Wallner
Hi,

What versions of OpenBabel and Mychem do you use?

I also think that this question is best answered in the Mychem list so I 
forwarded it there. 

Kind regards,
Fredrik 

Skickat från min iPhone

> 20 okt. 2016 kl. 18:44 skrev Martin Morissette 
> :
> 
> Hi, I would need some help to create a SQL query that returns hits ordered on 
> the tanimoto coefficient of the queried smiles and the fingerprints stored in 
> the database. So far, I was able to set the sql variable as follow :
> SET @fp = (SELECT FINGERPRINT2(SMILES_TO_MOLECULE(‘smiles')));
> Where the smiles is inserted with php from a JSME input
> Then I want to modify the current substructure search query :
> $query = "SELECT compounds.name AS No, pdt.fullname as Name FROM 
> pdt,compounds,bin_structures WHERE pdt.name=compounds.name AND 
> compounds.id=bin_structures.compound_id AND 
> MATCH_SUBSTRUCT('".$_POST['smiles']."',obserialized)";
> to compute the tanimoto of @fp and bin_structures.fp2
> Whenever I try to compute TANIMOTO(@fp, fp2) from bin_structures I get a NULL 
> value.
> I tried the TANIMOTO function examples from the documentation but I always 
> get NULL values.
> If I use two variables @fp1 and @fp2 and set these values with 2 different 
> smiles fingerprints, I can compute the TANIMOTO(@fp1, @fp2).
> I use a LAMP stack on Ubuntu 14.04 64 bits.
> Any help is welcome
> Thank you
> Martin
>  
>  
> --
> 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] tutorials on small molecule energy minimization and substructure searching

2016-08-30 Thread Fredrik Wallner
Hi,
For the second one, look at 
http://openbabel.org/docs/current/Fingerprints/fingerprints.html#id1 Even 
though the docs use babel in that case, obabel is the preferred command and 
could be easily switched in. So obabel mymols.sdf -sN#Cc1c1C#N -O 
results.smi should give the desired result.
For energy minimization, look at obabel -L minimize

Kind regards,
Fredrik

> 29 aug. 2016 kl. 18:33 skrev Benji Horning :
> 
> Hi everyone,
> 
> I'm a new user to openbabel, and my initials goals are to do energy 
> minimization of small molecules and substructure searching within sdf files. 
> I've been trying to find good info or documentation for these uses, but I'm 
> having trouble finding what I'm looking for. Any help would be most 
> appreciated.
> 
> Thanks!
> Benjamin Horning
> --
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Problem assigning Partial Charges with OBChargeModel

2016-06-20 Thread Fredrik Wallner
Hi,

To be able to give a good answer, you should at least provide two more pieces 
of information. The most important is what you mean by ”not working”, what 
exactly is the problem. The second is the example file you are using.

However, a probable guess is that there is a problem with the plugins, usually 
due to errors in the configuration of shared directories. Have you double 
checked that OBChargeModel *mmffCharges = OBChargeModel::FindType("mmff94”); 
returns anything other than nil?

Kind regards,
Fredrik

> 20 juni 2016 kl. 20:37 skrev Marcelino Arciniega :
> 
> Hi all, 
> 
> I am having problems to assing Partial Charges with OBChargeModel.
> I basically copy and paste an example from:
> 
> http://openbabel.org/dev-api/classOpenBabel_1_1OBChargeModel.shtml 
> 
> 
> but it is not working. 
> Can someone please tell me where is my mistake? (the code is here bellow)
> 
> Thanks,
> 
> Marcelino
> 
> include 
> #include 
> #include 
> #include 
> #include 
> 
> using namespace OpenBabel;
> using namespace std;
> 
> int main(int argc,char **argv)
> {
>   OBConversion obconversion;
>   obconversion.SetInFormat("mol2");
>   OBMol mol;
> 
>   bool notatend = obconversion.ReadFile(&mol,"../structures/colorantes.mol2");
>   while (notatend)
>   {
> OBChargeModel *mmffCharges = OBChargeModel::FindType("mmff94");
> std::vector partialCharges;
> if (mmffCharges && mmffCharges->ComputeCharges(mol)) {
>   partialCharges = mmffCharges->GetPartialCharges();
>   cout << " Charges were assigned " << endl;
> }
> 
> mol.Clear();
> notatend = obconversion.Read(&mol);
>   }
> 
>   return(0);
> }
> 
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity planning
> reports. 
> http://sdm.link/zohomanageengine___
>  
> 
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss 
> 
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports. http://sdm.link/zohomanageengine___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] How do you keep "comment-type" information ? (from an SDF file)

2015-12-03 Thread Fredrik Wallner
Hi,

The information is key within open babel, so whether you see it in the end 
depends on the output format. If you keep the files as SDFiles the information 
should be preserved. If there are a few properties you would like to keep, you 
can also add them to the title with the option --append, see 
http://openbabel.org/wiki/--append

Kind regards,
Fredrik
> 2 dec. 2015 kl. 16:55 skrev ashika :
> 
> Hello all,
> 
> I am in the possession of an SDF file containing a chemical library. In this
> file, each molecule is identified by and id number. I am wondering if this
> information can be kept when splitting or acting upon this file. So far I
> have not found a way.
> 
> Thanks,
> Ashika
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/How-do-you-keep-comment-type-information-from-an-SDF-file-tp4659076.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> Go from Idea to Many App Stores Faster with Intel(R) XDK
> Give your users amazing mobile app experiences with Intel(R) XDK.
> Use one codebase in this all-in-one HTML5 development environment.
> Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
> http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Examples of Openbabel fast substructure searching

2015-11-30 Thread Fredrik Wallner
Dear Jyoti,

I really doubt that that SMILES string is an exact copy/paste from what was 
generated by babel since it is invalid. If it really is so, you should report 
it as a bug and send the sdf input with the report. 

Kind regards,
Fredrik
> 29 nov. 2015 kl. 09:02 skrev Jyotiprakash Rath :
> 
> Dear Fedrik,
> 
> I do not know much about the smiles, this particular smiles is being 
> generated by babel from SDF input, therefore i think it should have worked 
> with the babel command. May I know how can I short out the issue.
> 
> Regards
> Jyoti
> 
> On Sat, Nov 28, 2015 at 7:10 PM, Fredrik Wallner  <mailto:fred...@wallner.nu>> wrote:
> Hi,
> 
> The error says Cannot read the SMILES string and if you look at the string it 
> contains one more right parenthesis than left which is why you get the error.
> 
> Kind regards,
> Fredrik
> 
> Skickat från min iPhone
> 
> > 26 nov. 2015 kl. 12:18 skrev rathjyoti  > <mailto:rathjy...@gmail.com>>:
> >
> > Dear friends,
> > I am facing a similar problem.With open babel tutorial I could
> > able to generate a fast-search index (znd_unique) for 30 thousand molecule.
> > I have tried searching matches > 0.5 tanimoto similarity with one molecule
> > and the fast search index it worked well. The command line argument for the
> > same as follows -
> >
> > babel znd_unique.fs similar0.5_CID5310786.sdf
> > -s"O=[P@@](O)(O[C@@H]1[C@H](O)[C@H](O)[C@@H](O)[C@@H](O1)C)O[P@](=O)(O)OC[C@H]1O[C@H](C[C@@H]1O)n1c(=O)[nH]c(=O)c(C)c1"
> > -at0.5
> > 55 molecules converted
> > 1152 audit log messages
> >
> > But, when I tried with another molecule
> > SCCCn1c2c([nH]c1=O)2)c1nc2n(c3c(c2nn1)3)CC it did not work. The
> > command line argument and error message for the same is -
> >
> > babel znd_unique.fs similar0.5_CID5310786.sdf
> > -s"SCCCn1c2c([nH]c1=O)2)c1nc2n(c3c(c2nn1)3)CC" -at0.5
> > ==
> > *** Open Babel Error  in ObtainTarget
> >  Cannot read the SMILES string
> > 0 molecules converted
> > 1 errors 3 audit log messages
> >
> > Please help me out.
> >
> > Jyoti Prakash Rath
> >
> >
> >
> >
> >
> > --
> > View this message in context: 
> > http://forums.openbabel.org/Examples-of-Openbabel-fast-substructure-searching-tp4657120p4659069.html
> >  
> > <http://forums.openbabel.org/Examples-of-Openbabel-fast-substructure-searching-tp4657120p4659069.html>
> > Sent from the General discussion mailing list archive at Nabble.com.
> >
> > --
> > ___
> > OpenBabel-discuss mailing list
> > OpenBabel-discuss@lists.sourceforge.net 
> > <mailto:OpenBabel-discuss@lists.sourceforge.net>
> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss 
> > <https://lists.sourceforge.net/lists/listinfo/openbabel-discuss>
> 
> 
> 
> -- 
> Mr. Jyoti Prakash Rath
> 
> Assistant Professor
> 
> Medical Biotechnology & Bioinformatics
> 
> Medical Bio-nanotechnology Department
> 
> Chettinad University, Chennai
> 

--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741551&iu=/4140___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Examples of Openbabel fast substructure searching

2015-11-28 Thread Fredrik Wallner
Hi,

The error says Cannot read the SMILES string and if you look at the string it 
contains one more right parenthesis than left which is why you get the error.

Kind regards,
Fredrik 

Skickat från min iPhone

> 26 nov. 2015 kl. 12:18 skrev rathjyoti :
> 
> Dear friends,
> I am facing a similar problem.With open babel tutorial I could
> able to generate a fast-search index (znd_unique) for 30 thousand molecule.
> I have tried searching matches > 0.5 tanimoto similarity with one molecule
> and the fast search index it worked well. The command line argument for the
> same as follows -
> 
> babel znd_unique.fs similar0.5_CID5310786.sdf
> -s"O=[P@@](O)(O[C@@H]1[C@H](O)[C@H](O)[C@@H](O)[C@@H](O1)C)O[P@](=O)(O)OC[C@H]1O[C@H](C[C@@H]1O)n1c(=O)[nH]c(=O)c(C)c1"
> -at0.5
> 55 molecules converted
> 1152 audit log messages 
> 
> But, when I tried with another molecule
> SCCCn1c2c([nH]c1=O)2)c1nc2n(c3c(c2nn1)3)CC it did not work. The
> command line argument and error message for the same is -
> 
> babel znd_unique.fs similar0.5_CID5310786.sdf
> -s"SCCCn1c2c([nH]c1=O)2)c1nc2n(c3c(c2nn1)3)CC" -at0.5
> ==
> *** Open Babel Error  in ObtainTarget
>  Cannot read the SMILES string
> 0 molecules converted
> 1 errors 3 audit log messages 
> 
> Please help me out.
> 
> Jyoti Prakash Rath
> 
> 
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Examples-of-Openbabel-fast-substructure-searching-tp4657120p4659069.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Fast Search Indexing Not Working

2015-11-03 Thread Fredrik Wallner
Hi,

I tried to convert your molecule to SMILES to see what was happening and it 
seems like the problem is not so much that it is a radical as it is a problem 
with that specific line. According to the error message when trying to make a 
smiles string, you can only have 8 entries in an M  RAD line, so splitting the 
line into two separate lines seems to fix the problem.


 CID 10832764

 45 45  0  0  0  0  0  0  0  0999 V2000
   -4.5473   -1.4088   -2.6901 C   0  0  0  0  0
   -5.4165   -2.0450   -2.8690 H   0  0  0  0  0
   -4.62540.0247   -3.0188 C   0  0  0  0  0
   -5.55320.4285   -3.4297 H   0  0  0  0  0
   -3.92990.7720   -1.9589 C   0  0  0  0  0
   -4.33471.7254   -1.6153 H   0  0  0  0  0
   -3.4341   -0.1985   -0.9724 C   0  0  0  0  0
   -3.45720.04720.0898 H   0  0  0  0  0
   -3.8044   -1.5461   -1.4275 C   0  0  0  0  0
   -4.1150   -2.2930   -0.6952 H   0  0  0  0  0
   10.1118   -0.1072   -1.0531 C   0  0  0  0  0
   11.0116   -0.6217   -0.7437 H   0  0  0  0  0
   10.00991.3551   -1.0301 C   0  0  0  0  0
   10.83341.9806   -0.7129 H   0  0  0  0  0
8.61341.7095   -0.7671 C   0  0  0  0  0
8.33492.6288   -0.2730 H   0  0  0  0  0
7.85860.4655   -0.6399 C   0  0  0  0  0
8.7768   -0.6591   -0.8155 C   0  0  0  0  0
8.6212   -1.6267   -0.3600 H   0  0  0  0  0
6.41090.3622   -0.3525 C   0  0  0  0  0
6.2081   -0.32200.8999 N   0  0  0  0  0
5.0616   -0.94151.2841 C   0  0  0  0  0
4.9460   -1.49622.3676 O   0  0  0  0  0
4.0816   -0.87580.3425 O   0  0  0  0  0
2.9168   -1.65910.6263 C   0  0  0  0  0
1.9117   -0.90821.4997 C   0  0  0  0  0
1.52410.47600.9757 C   0  0  0  0  0
0.86640.4639   -0.3691 C   0  0  0  0  0
   -0.0280   -0.3898   -0.9697 C   0  0  0  0  0
   -0.36860.0491   -2.2444 N   0  0  0  0  0
0.35551.1482   -2.4053 C   0  0  0  0  0
1.10661.4426   -1.2968 N   0  0  0  0  0
   -1.9075   -0.6661   -3.2877 Fe  0  0  0  0  0
5.9025   -0.1765   -1.1593 H   0  0  0  0  0
5.94681.3505   -0.2651 H   0  0  0  0  0
6.9424   -0.31141.5971 H   0  0  0  0  0
3.1893   -2.61721.0856 H   0  0  0  0  0
2.4654   -1.9092   -0.3396 H   0  0  0  0  0
2.3423   -0.77032.4989 H   0  0  0  0  0
1.0173   -1.52981.6277 H   0  0  0  0  0
2.41091.12110.9522 H   0  0  0  0  0
0.82700.93561.6883 H   0  0  0  0  0
   -0.4327   -1.2943   -0.5237 H   0  0  0  0  0
0.40271.7914   -3.2787 H   0  0  0  0  0
1.73442.2340   -1.1840 H   0  0  0  0  0
  1  9  1  0  0  0
  1  3  1  0  0  0
  1  2  1  0  0  0
  3  5  1  0  0  0
  3  4  1  0  0  0
  5  7  1  0  0  0
  5  6  1  0  0  0
  7  9  1  0  0  0
  7  8  1  0  0  0
  9 10  1  0  0  0
 11 18  1  0  0  0
 11 13  1  0  0  0
 11 12  1  0  0  0
 13 15  1  0  0  0
 13 14  1  0  0  0
 15 17  1  0  0  0
 15 16  1  0  0  0
 17 18  1  0  0  0
 17 20  1  0  0  0
 18 19  1  0  0  0
 20 21  1  0  0  0
 20 34  1  0  0  0
 20 35  1  0  0  0
 21 22  1  0  0  0
 21 36  1  0  0  0
 22 24  1  0  0  0
 22 23  2  0  0  0
 24 25  1  0  0  0
 25 26  1  0  0  0
 25 37  1  0  0  0
 25 38  1  0  0  0
 26 27  1  0  0  0
 26 39  1  0  0  0
 26 40  1  0  0  0
 27 28  1  0  0  0
 27 41  1  0  0  0
 27 42  1  0  0  0
 28 29  2  0  0  0
 28 32  1  0  0  0
 29 30  1  0  0  0
 29 43  1  0  0  0
 30 31  2  0  0  0
 31 32  1  0  0  0
 31 44  1  0  0  0
 32 45  1  0  0  0
M  RAD  8   1   2   3   2   5   2   7   2   9   2  11   2  13   2  15   2
M  RAD  2  17   2  18   2
M  CHG  1  33   2
M  END

Kind regards,
Fredrik
> 2 nov. 2015 kl. 16:03 skrev Wallace Chan :
> 
> Noel,
> 
> Thanks for your reply. I seem to have found the issue. The following molecule 
> (in SDF format) appears to be the problem:
> 
>  CID 10832764
> 
>  45 45  0  0  0  0  0  0  0  0999 V2000
>-4.5473   -1.4088   -2.6901 C   0  0  0  0  0
>-5.4165   -2.0450   -2.8690 H   0  0  0  0  0
>-4.62540.0247   -3.0188 C   0  0  0  0  0
>-5.55320.4285   -3.4297 H   0  0  0  0  0
>-3.92990.7720   -1.9589 C   0  0  0  0  0
>-4.33471.7254   -1.6153 H   0  0  0  0  0
>-3.4341   -0.1985   -0.9724 C   0  0  0  0  0
>-3.45720.04720.0898 H   0  0  0  0  0
>-3.8044   -1.5461   -1.4275 C   0  0  0  0  0
>-4.1150   -2.2930   -0.6952 H   0  0  0  0  0
>10.1118   -0.1072   -1.0531 C   0  0  0  0  0
>11.0116   -0.6217   -0.7437 H   0  0  0  0  0
>10.00991.3551   -1.0301 C   0  0  0  0  0
>10.83341.9806   -0.7129 H   0  0  0  0  0
> 8.61341.7095   -0.7671 C   0  0  0  0  0
> 8.33492.6288   -0.2730 H   0  0  0  0  0
> 7.85860.4655   -0.6399 C   0  0  0  0  0
> 8.7768   -0.6591   -0.8155 C   0  0  0  0  0
> 8.6212   -1.6267   -0.3600 H   0  0  0  0  0
> 6.41090.3622   -0.3525 C   0  0  0  0  0
> 6.2081   -0.32200.8999 N   0  0  0  0  0
> 5.0616   -0.94151.2841 C   0 

Re: [Open Babel] Can't initialize function 'match_substruct'; The second argument is null when to execute match_substruct() function in mychem.0.9.2

2015-06-17 Thread Fredrik Wallner
Hi,

Although I cannot give you an answer to your question, I believe it is better 
to send it to  the MyChem developers/list (see 
http://sourceforge.net/p/mychem/mailman/ 
) since I’m pretty sure it’s a 
problem within the MyChem/MySQL communication. You can also find the same 
problem reported on the MyChem issue tracker at 
https://github.com/mychem/mychem-code/issues/3 


Kind regards,
Fredrik

> 17 jun 2015 kl. 07:40 skrev duanbao...@iccas.ac.cn:
> 
> 
> 
> Hi,
> 
> Mychem.0.9.2 is installed and the tests are passed except two functions 
> 'cml_to_molecule' and 'molecule_to_cml', and then the mychem database is 
> created according to the instructions of " The Mychem Handbook". When  the 
> "select match_substruct('C=O', obserialzied ) from bin_structures " is 
> executed, the message "ERROR 1123 (HY000): Can't initialize function 
> 'match_substruct'; The second argument is null" is returned. 
> substruct_ATOM_IDS() and substruct_count() functions can be executed 
> correctly. Would you like to give me some help about the above error message? 
> Thanks in advance.
> 
> Best Regards
> 
> Duan Baogen 
> 
> 
> 
> --
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] How could I eliminate the line in the converted image

2015-03-25 Thread Fredrik Wallner
Hi,

Could you please state the command you used to create the image (or did you use 
the GUI?), and what format (png or svg).

Kind regards,
Fredrik

> 25 mar 2015 kl. 13:17 skrev shanghongqi...@gmail.com:
> 
> Hello All,
> 
> I used openbable to convert the stucture to image, but why there was a line 
> in the image?  How could I eliminate it?  Thanks.
> 
> 
> 
> Regards,
> Shang Hongqiang
> --
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. 
> http://goparallel.sourceforge.net/___
>  
> 
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net 
> 
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss 
> 
--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] obabel --gen3d changes the number of rotatable bonds?

2015-03-25 Thread Fredrik Wallner
Hello again,

There is definitely something fishy going on here, I’ve filed a bug at 
https://github.com/openbabel/openbabel/issues/134 
<https://github.com/openbabel/openbabel/issues/134> with some more information.

Kind regards,
Fredrik
> 25 mar 2015 kl. 12:41 skrev Aaron Schweiger :
> 
> I just re-ran using ChemBL's canonical SMILES as input, and the resulting 
> .mol2 file looks much more reasonable.  I now get 13 rotors, and the 
> conversion process is much faster.
> 
> Is InChi less mature?
> 
> I cloned the repository and rebuilt just now and got a similar result: 3 
> rotatable bonds.
> 
> Is having consistent NumRotors are reasonable litmus test for --gen3d?
> 
> Thanks,
> 
> Aaron
> 
> 
> On Tue, Mar 24, 2015 at 4:48 AM, Fredrik Wallner  <mailto:fred...@wallner.nu>> wrote:
> Hi,
> 
> That must be a but, the molecule from gen3d is a very weird molecule indeed, 
> the sugar has been completely mangled. I do believe that the 3d-generation 
> code is currently under revision so it might be worth it to recompile with 
> the current head. Mine was a bit older than yours (~1 month) and had the same 
> problem.
> 
> Kind regards,
> Fredrik
>> 24 mar 2015 kl. 06:49 skrev Aaron Schweiger > <mailto:aaron.schwei...@gmail.com>>:
>> 
>> I am writing because I ran into an example where use of --gen3d apparently 
>> changed the number of rotatable bonds from 12 to 3.
>> 
>> Is that to be expected or is it a possible bug?  (If this indicates that the 
>> compound is less flexible than might be inferred from the InChi or SMILES 
>> that would be great.  On the other hand, if the number of rotatable bonds 
>> can increase with --gen3d, then that is less good.)
>> 
>> The compound is CHEMBL1096885 
>> <https://www.ebi.ac.uk/chembl/compound/inspect/CHEMBL1096885>.  ChemBL has 
>> the number of rotatable bonds at 12, as does NumRotors() based on the InChi 
>> key.
>> 
>> Here's is my test:  (hopefully one can copy, paste and reproduce it)
>> 
>> echo 
>> 'InChI=1S/C34H36F3NO13/c1-4-5-9-21(40)49-13-20(39)33(47)11-16-24(19(12-33)51-22-10-17(27(41)14(2)50-22)38-32(46)34(35,36)37)31(45)26-25(29(16)43)28(42)15-7-6-8-18(48-3)23(15)30(26)44/h6-8,14,17,19,22,27,41,43,45,47H,4-5,9-13H2,1-3H3,(H,38,46)/t14-,17-,19-,22-,27+,33-/m0/s1'
>>  > tmp.inchi; obabel -i inchi tmp.inchi --gen3d -o mol2 -O out.mol2 ;  
>> python -c 'import pybel; import sys; import itertools; [ 
>> sys.stdout.write(str(mol.OBMol.NumRotors())+"\t"+str(mol)) for mol in 
>> itertools.chain(pybel.readfile("inchi","tmp.inchi"),pybel.readfile("mol2", 
>> "out.mol2"))];'
>> 1 molecule converted
>> 12   
>> C(=O)OCC(=O)[C@@]1(Cc2c([C@H](C1)O[C@H]1C[C@@H]([C@@H]([C@H](C)O1)O)N=C(C(F)(F)F)O)c(c1c(C(=O)c3(c3C1=O)OC)c2O)O)O
>>   
>> 3
>> C123(=O)OCC(=O)[C@@]4(Cc5c([CH](C4)(O[CH]46C[CH]([CH]7([CH](C([H]6)[H]7)(O4)[H]1)O)(/N=C(\C(F)(F)F)/O)[H]2)[H]3)c(c1c(C(=O)c2(c2C1=O)OC)c5O)O)O
>>  *
>> 
>> My version information:
>> 
>> obabel -V
>> Open Babel 2.3.90 -- Feb 26 2015 -- 00:48:45
>> 
>> Also, what does the "*" mean from pybel's str(mol)?
>> 
>> Aaron Schweiger
>> 
>> p.s.  I sent this to Geoff directly become becoming aware of the proper 
>> etiquette; apologies if already discussed.
>> 
>> --
>> Dive into the World of Parallel Programming The Go Parallel Website, 
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for 
>> all
>> things parallel software development, from weekly thought leadership blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the 
>> conversation now. 
>> http://goparallel.sourceforge.net/___
>>  
>> <http://goparallel.sourceforge.net/___>
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net 
>> <mailto:OpenBabel-discuss@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss 
>> <https://lists.sourceforge.net/lists/listinfo/openbabel-discuss>
> 
> 

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] obabel --gen3d changes the number of rotatable bonds?

2015-03-24 Thread Fredrik Wallner
Hi,

That must be a but, the molecule from gen3d is a very weird molecule indeed, 
the sugar has been completely mangled. I do believe that the 3d-generation code 
is currently under revision so it might be worth it to recompile with the 
current head. Mine was a bit older than yours (~1 month) and had the same 
problem.

Kind regards,
Fredrik
> 24 mar 2015 kl. 06:49 skrev Aaron Schweiger :
> 
> I am writing because I ran into an example where use of --gen3d apparently 
> changed the number of rotatable bonds from 12 to 3.
> 
> Is that to be expected or is it a possible bug?  (If this indicates that the 
> compound is less flexible than might be inferred from the InChi or SMILES 
> that would be great.  On the other hand, if the number of rotatable bonds can 
> increase with --gen3d, then that is less good.)
> 
> The compound is CHEMBL1096885 
> .  ChemBL has 
> the number of rotatable bonds at 12, as does NumRotors() based on the InChi 
> key.
> 
> Here's is my test:  (hopefully one can copy, paste and reproduce it)
> 
> echo 
> 'InChI=1S/C34H36F3NO13/c1-4-5-9-21(40)49-13-20(39)33(47)11-16-24(19(12-33)51-22-10-17(27(41)14(2)50-22)38-32(46)34(35,36)37)31(45)26-25(29(16)43)28(42)15-7-6-8-18(48-3)23(15)30(26)44/h6-8,14,17,19,22,27,41,43,45,47H,4-5,9-13H2,1-3H3,(H,38,46)/t14-,17-,19-,22-,27+,33-/m0/s1'
>  > tmp.inchi; obabel -i inchi tmp.inchi --gen3d -o mol2 -O out.mol2 ;  python 
> -c 'import pybel; import sys; import itertools; [ 
> sys.stdout.write(str(mol.OBMol.NumRotors())+"\t"+str(mol)) for mol in 
> itertools.chain(pybel.readfile("inchi","tmp.inchi"),pybel.readfile("mol2", 
> "out.mol2"))];'
> 1 molecule converted
> 12
> C(=O)OCC(=O)[C@@]1(Cc2c([C@H](C1)O[C@H]1C[C@@H]([C@@H]([C@H](C)O1)O)N=C(C(F)(F)F)O)c(c1c(C(=O)c3(c3C1=O)OC)c2O)O)O
>   
> 3 
> C123(=O)OCC(=O)[C@@]4(Cc5c([CH](C4)(O[CH]46C[CH]([CH]7([CH](C([H]6)[H]7)(O4)[H]1)O)(/N=C(\C(F)(F)F)/O)[H]2)[H]3)c(c1c(C(=O)c2(c2C1=O)OC)c5O)O)O
>  *
> 
> My version information:
> 
> obabel -V
> Open Babel 2.3.90 -- Feb 26 2015 -- 00:48:45
> 
> Also, what does the "*" mean from pybel's str(mol)?
> 
> Aaron Schweiger
> 
> p.s.  I sent this to Geoff directly become becoming aware of the proper 
> etiquette; apologies if already discussed.
> 
> --
> Dive into the World of Parallel Programming The Go Parallel Website, sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for all
> things parallel software development, from weekly thought leadership blogs to
> news, videos, case studies, tutorials and more. Take a look and join the 
> conversation now. 
> http://goparallel.sourceforge.net/___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Invert tetrahedral chirality in Python

2014-06-18 Thread Fredrik Wallner
Hi,

Maybe someone with more insight into the specifics can give a more stable 
answer, but what I’ve found is that you can invert a center with the following 
code:
config.winding = 2 if config.winding == 1 else 1
ts.SetConfig(config)
So replacing config.Invert() with these two lines will make your example work 
at least…

Kind regards,
Fredrik
18 jun 2014 kl. 03:45 skrev Stefano Forli :

> Hi everyone,
> 
> I'm trying to invert the chirality of a chemical group using Python. I had 
> searched quite 
> a while before finding something that I could use (despite the fact the 
> question showed up 
> a few times in the mailing list).
> 
> My starting points were a discussion on Blueobelisk[1] and a guide file[2] 
> that Noel 
> linked in an old mailing list thread but I couldn't find in the current 
> release.
> The example in [2] didn't work in my case, and it seems to use deprecated 
> .Set*ClockwiseStereo() functions, therefore, I tried the other one that's 
> following the 
> blessed way (correct me if I'm wrong) with OBStereoFacade.
> Here is the code, that works up to a certain point:
> 
> -
> import pybel
> ob = pybel.ob
> 
> smarts = pybel.Smarts("c[C@H](C(=O)O)")
> inverse = pybel.Smarts("c[C@@H](C(=O)O)")
> outputfile = pybel.Outputfile('smi', 'converted.smi', overwrite=1)
> 
> inmol = [ '[O]C(=O)[C@H](c1cccnc1)C' ]
> for smi in inmol:
> mol = pybel.readstring('smi', smi)
> old = mol.__str__
> matches = smarts.findall(mol)
> firstmatch = matches[0]
> if matches:
> print "MATCH"
> facade = ob.OBStereoFacade(mol.OBMol)
> for matchingatom in firstmatch:
> ts = facade.GetTetrahedralStereo(matchingatom)
> if ts:
> print "TS\t", ts
> config = ts.GetConfig()
> print "CONFIG\t", config
> # these commands will raise an error
> # ob.OBTetrahedralStereo.Invert(config)
> # ob.OBTetrahedralStereo_invert(config)
> config.Invert()
> 
> ts.SetConfig(config)
> assert inverse.findall(mol), "Hasn't been inverted!"
> outputfile.write(mol)
> new = mol.__str__
> print "STILL THE SAME?", old == new
> 
> outputfile.close()
> -
> When attempting to invert the chirality, it fails with the following error:
> 
>  Traceback (most recent call last):
>File "invertChiralityFacade.py", line 24, in 
>  config.Invert()
>  AttributeError: 'OBTetrahedralConfig' object has no attribute 'Invert'
> 
> I've tried all combinations mentioned here [3] and none of them worked. 
> Besides, it seems 
> here is no mention of the Invert function in openbabel.py.
> I would really appreciate any input on the matter.
> 
> Thanks!
> 
> Stefano
> 
> 
> [1] 
> http://blueobelisk.shapado.com/questions/which-openbabel-dev-version-methods-should-be-used-for-altering-stereochemistry
> [2] 
> http://www.filewatcher.com/p/openbabel-2.3.0.tar.gz.14321281/openbabel-2.3.0/doc/guide/_sources/UseTheLibrary/PythonExamples.txt.html
> [3] https://code.google.com/p/pythonocc/issues/detail?id=20
> 
> 
> -- 
>  Stefano Forli, PhD
> 
>  Staff Scientist
>  Molecular Graphics Laboratory
>  Dept. of Integrative Structural
>   and Computational Biology, MB-112F
>  The Scripps Research Institute
>  10550  North Torrey Pines Road
>  La Jolla,  CA 92037-1000,  USA.
> 
> tel: (858) 784-2055
> fax: (858) 784-2860
> email: fo...@scripps.edu
> http://www.scripps.edu/~forli/
> 
> --
> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
> Find What Matters Most in Your Big Data with HPCC Systems
> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
> Leverages Graph Analysis for Fast Processing & Easy Data Exploration
> http://p.sf.net/sfu/hpccsystems
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
http://p.sf.net/sfu/hpccsystems___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Substructure searching

2014-05-15 Thread Fredrik Wallner
Hi,

I don’t know if it will solve the problem, but your use of the l option is not 
entirely correct. Since you want the read option, you should specify it as 
-al100

Kind regards,
Fredrik

16 maj 2014 kl. 04:28 skrev Jacob Durrant :

> I've been trying to get substructure searches working with Open Babel for 
> some time. I always run into the same frustration.
> 
> I have a SDF file with ~27,000 compounds. I first convert it to an fs file:
> 
> -bash-4.1$ babel compounds.sdf -ofs
> This will prepare an index of compounds.sdf and may take some time...
> It contains 27036 molecules Estimated completion time 0 seconds
> 
>  It took 59 seconds
> 27036 molecules converted
> 37 audit log messages 
> 
> Now I try performing a substructure search:
> 
> -bash-4.1$ babel compounds.fs -ifs -s"C(=O)O" results.smi
> *** Open Babel Warning  in Find
>   Stopped looking after 9778 molecules.
> 
> 4000 candidates from fingerprint search phase
> 3895 molecules converted
> 1 warnings 134948 audit log messages 
> 
> I don't want it to stop looking after 9778 molecules. I want it to search 
> through the entire file. The -l option seemed promising. From the help file:
> 
> Read Options (when searching) e.g. -at0.7
>  t# Do similarity search:#mols or # as min Tanimoto
>  a  Add Tanimoto coeff to title in similarity search
>  l# Maximum number of candidates. Default<4000>
>  e  Exact match
>  Alternative to using exact in ``-s`` parameter, see above
>  n  No further SMARTS filtering after fingerprint phase
> 
> However, using this option doesn't resolve the problem.
> 
> -bash-4.1$ babel compounds.fs -ifs -s"C(=O)O" results.smi -l 100
> *** Open Babel Warning  in Find
>   Stopped looking after 9778 molecules.
> 
> 4000 candidates from fingerprint search phase
> 3895 molecules converted
> 1 warnings 134948 audit log messages 
> 
> Can anyone tell me how to instruct Open Babel to keep searching beyond the 
> initial 9778 molecules? I'm using version 2.3.1 -- Oct 13 2011. Thanks.
> 
> Thanks.
> 
> ~Jacob
> 
> 
> 
> -- 
> ==
> Jacob D. Durrant, PhD
> Rommie E. Amaro Research Group
> University of California, San Diego
> 
> Connect with me on LinkedIn
> jacobdurr...@gmail.com
> jdurr...@ucsd.edu
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] The SMILES of Hip (protonated Histine) is wrong ?

2014-05-15 Thread Fredrik Wallner
Hi,

I suppose you are talking about protonated Histidine, since that’s what is in 
the picture as far as I can tell. However, your coordinates are at most a 
fragment of HIP. My 3D vision isn’t good enough to see structure from 
coordinates, and I don’t know all of OpenBabel’s formats well enough to tell 
which one you have. So, I therefor can’t really tell what your coordinates are 
showing and hence I cannot say if the SMILE is a good representation or not. 
But I can say that it is a difficult problem to assign proper bondorders to 
molecules when only coordinates are given, especially with missing charges and 
even more so if we are talking about fragments. Further, I don’t really 
understand the part where you state that the coordinates back-converted are 
different. Since SMILES don’t carry any information about coordinates, it will 
obviously be lost in the conversion.

If you provide your input file and the commands you use for the conversion, I 
could try to look at it again.

Kind regards,
Fredrik

14 maj 2014 kl. 20:00 skrev Jiaguo :

>  
> 
> The SMILES given by Open Babel for the Hip (protonated Histine), coordinates
> shown below, is "CCC1=CNCN1". 
> 
>> From the coordinates, it should be easily seen that Hip (protonated Histine)
> is +1 charge. However, from the SMILES, this information (and the
> coordination pattern) is lost. In fact, the coordinates back-converted from
> SMILES is quite different.
> 
> I would think this is wrong, but I wonder whether this is be design ?
> 
> 16
> Hip (protonated Histine)
> C -5.83770117   -1.725055440.
> H -6.46253417   -1.64825244   -0.88982300
> C -6.72432417   -1.578933441.23214100
> H -7.46855917   -2.375255441.24137300
> H -6.11155117   -1.644581442.13119600
> C -7.48375317   -0.276836441.32108500
> N -8.333943170.008964562.38296700
> C -7.520631170.800767560.49245500
> H -8.52477017   -0.594842443.16979800
> C -8.848134171.208055562.18249600
> N -8.374448171.693291561.06166200
> H -7.030939171.04067456   -0.45133900
> H -9.548044171.628595562.90455700
> H -8.608835172.597219560.67685400
> H -5.14137252   -0.912635340.
> H -5.33042678   -2.667166200.
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/The-SMILES-of-Hip-protonated-Histine-is-wrong-tp4657433.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Generating a diverse set of conformers

2014-05-13 Thread Fredrik Wallner
I wrote this reply yesterday, but it didn’t make it to the babble list somehow.

When I try 
obabel ~/Desktop/crystal_ligand_flex.sdf -O tst-res.sdf --confab --conf 5
(with your example file), I get a file with 2900 conformers written, so I 
believe there is a problem with your installation. Your list of ops indicate to 
me that the eigen support failed in your compile. I’m not an expert in 
compilation issues, but if you attach the output of cake and make we could try 
to see if there is a problem. To be sure to capture everything, I’d recommend 
that you do it with a clean build directory.

Kind regards,
Fredrik

12 maj 2014 kl. 11:36 skrev Douglas Houston :

> Actually that input file isn't the most flexible, here is a different one
> that is more flexible and also only generates one conformer.
> 
> crystal_ligand_flex.sdf
>   
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Generating-a-diverse-set-of-conformers-tp4656011p4657427.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> "Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
> Instantly run your Selenium tests across 300+ browser/OS combos.
> Get unparalleled scalability from the best Selenium testing platform available
> Simple to use. Nothing to install. Get started now for free."
> http://p.sf.net/sfu/SauceLabs
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Generating a diverse set of conformers

2014-05-09 Thread Fredrik Wallner
Well, you have been asked to provide your input file for easier debugging, one 
option could be to try that…
Anyway, obconformer only outputs one conformer according to it’s documentation, 
that one is written on stdout, so it’s included in your output (which by the 
way didn’t appear when I read the message in my email, only on 
forums.openbabel.org). If you would like to have it in a file, the doc states 
that you need to pipe it like:
/usr/local/bin/obconformer 10 10 crystal_ligand.sdf > generatedconformer.sdf

Have you made sure that when you call obabel, it’s your newly compiled version 
that’s compiled? If you run obabel -V, it will tell you the compilation date 
together with the version number. Did you get any messages during the 
recompilation?

Kind regards,
Fredrik

9 maj 2014 kl. 10:54 skrev Douglas Houston :

> It's gone worryingly quiet ...
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Generating-a-diverse-set-of-conformers-tp4656011p4657420.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Is it possible to change forcefield when using --gen3d?

2014-05-08 Thread Fredrik Wallner
Hi,

Looking at the code for gen3d the force field seems to be hard coded so you 
would have to go to obgen.

Kind regards,
Fredrik

8 maj 2014 kl. 10:26 skrev alchemist :

> I am using openbabel 2.3.1 under 64-bit windows 7.
> As far as I understood from an  old topic
> 
>   
> --gen3d use MMFF94 force field. Am I correct? If so, I was just wondering is
> it possible to change the forcefield or I have to use obgen application
> instead? 
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Is-it-possible-to-change-forcefield-when-using-gen3d-tp4657409.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Generating a diverse set of conformers

2014-05-07 Thread Fredrik Wallner
Continue by running
obabel -L formats
and
obabel -L ops

Kind regards,
Fredrik

Skickat från min iPhone

> 7 maj 2014 kl. 11:06 skrev Douglas Houston :
> 
> /usr/people/douglas/programs/openbabel-2.3.2/build/bin/obabel -L
> 
> outputs:
> 
> charges
> descriptors
> fingerprints
> forcefields
> formats
> loaders
> ops
> 
> How do I tell?
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Generating-a-diverse-set-of-conformers-tp4656011p4657397.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Generating a diverse set of conformers

2014-05-07 Thread Fredrik Wallner
Hi,

Does the input file contain 3D-coordinates? As far as I have seen, neither 
confab nor conformer will generate an initial 3D structure if it’s not already 
present. 

Kind regards,
Fredrik
6 maj 2014 kl. 19:39 skrev Douglas Houston :

> Anyone have any comment on this? I am observing the same problem as OP. I am 
> using the following:
> 
> /usr/people/douglas/programs/openbabel-2.3.2/build/bin/obabel
> crystal_ligand.sdf -O tmp.sdf --conformer --nconf 50  --writeconformers
> 
> I only get 1 conformer in the 1 output file.
> 
> I have also tried the following:
> 
> /usr/people/douglas/programs/openbabel-2.3.2/build/bin/obabel
> crystal_ligand.sdf -O tmp.sdf --confab -rcutoff 0.1 -ecutoff 10 --original
> --verbose
> 
> Still get 1 conformer in the 1 output file. 
> 
> The verbose option seems to have no effect, neither do the rcutoff and
> ecutoff options. I believe there may be something wrong with the way obabel
> is handling the options, it's like they aren't being used at all.
> 
> Can anyone honestly state that they have observed this feature actually
> working?
> 
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Generating-a-diverse-set-of-conformers-tp4656011p4657393.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
> • 3 signs your SCM is hindering your productivity
> • Requirements for releasing software faster
> • Expert tips and advice for migrating your SCM now
> http://p.sf.net/sfu/perforce
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
Is your legacy SCM system holding you back? Join Perforce May 7 to find out:
• 3 signs your SCM is hindering your productivity
• Requirements for releasing software faster
• Expert tips and advice for migrating your SCM now
http://p.sf.net/sfu/perforce___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Bond order in canonical SMILES

2014-03-31 Thread Fredrik Wallner
Hello,

Your first SMILES string contains a pentavalent carbon, so I would argue that 
that one isn’t correct in any file format…

Kind regards,
Fredrik

31 mar 2014 kl. 13:59 skrev Lee-Ping Wang :

> Hi there,
>  
> It would be nice if I had the ability to write (canonical) SMILES strings 
> without any bond order information, as a “round trip” to another format (say, 
> .xyz with gen3D) may cause this information to be lost and I end up with 
> different strings for the same molecule.  For example, [NH3][CH2][C](=O)=O is 
> the same molecule as [NH3][CH2]C(=O)O .  If there was a way to delete bond 
> order information in the OBMol object, I’d be happy with that too, as it 
> would allow me to write the string I want.  Thanks!
>  
> -  Lee-Ping
> --
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Indometacin mol2 -> other format = Segmentation fault

2014-02-12 Thread Fredrik Wallner
Hi,

I tried it on a couple of different installations and I can confirm the problem 
on 2.3.2 (Linux). I could also further simplify the test cases to c1cccn1C 
(segfault) and c1cccn1 (ok). The other installations I had access to were 2.3.1 
(OSX), pretty recent dev (OSX) and 2.2.3 (Linux). On all those it worked 
without problem, so probably this is specific to 2.3.2.

Kind regards,
Fredrik

7 feb 2014 kl. 16:07 skrev Pascal Muller :

> Hi,
> 
> Using Open Babel 2.3.2 (Linux), I'm able to convert the smiles of indometacin
> 
> Cc1c(c2cc(ccc2n1C(=O)c3ccc(cc3)Cl)OC)CC(=O)Oindometacin
> 
> into sdf or mol2, but not from mol2 to an other format (tried smi, sdf, mol2, 
> pdb)  (the mol2 file being produced with Sybyl or obabel 
> obabel indometacin.smi -O indometacin.mol2 )
> 
> So
> obabel indometacin.mol2 -O indometacin.smi
> is only giving:
> Segmentation fault
> 
> Conversion of some other tested mol2 files is OK.
> 
> And when reducing the structure to
> c1c(c2cc(ccc2n1C))
> it's still seg. fault (smi --> mol2 OK, mol2 --> sdf = error)
> 
> but 
> c1c(c2cc(ccc2n1))
> is well converted to mol2 and then to sdf.
> 
> Does it happen to someone else?
> 
> Best regards,
> Pascal
> --
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] bonds in pybel

2013-11-11 Thread Fredrik Wallner
Or, if you import openbabel you can directly do:

for bond in openbabel.OBMolBondIter(obmol):
   print bond.GetBeginAtomIdx(), bond.GetEndAtomIdx(), bond.GetBondOrder()


12 nov 2013 kl. 07:55 skrev Fredrik Wallner :

> Hi,
> 
> Since pybel doesn’t have a ”bond-concept” at the moment, I suppose it needs 
> to be defined first. But if you will settle for OBBonds, the following short 
> generator could work:
> 
> def pybelbonditer(pybmol):
>   for i in range(pybmol.OBMol.NumBonds()):
>   yield pybmol.OBMol.GetBond(i)
> 
> It’s now possible to iterate over the bonds with
> 
> for bond in pybelbonditer(pybelmolecule):
>   print bond.GetBeginAtomIdx(), bond.GetEndAtomIdx(), bond.GetBondOrder()
> 
> Kind regards,
> Fredrik
> 12 nov 2013 kl. 01:01 skrev Dimitri Maziuk :
> 
>> Hi guys,
>> 
>> one for the next release wishlist: is it possible to expose bonds as an
>> iterable, similar to atoms?
>> 
>> -- 
>> Dimitri Maziuk
>> Programmer/sysadmin
>> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
>> 
>> --
>> November Webinars for C, C++, Fortran Developers
>> Accelerate application performance with scalable programming models. Explore
>> techniques for threading, error checking, porting, and tuning. Get the most 
>> from the latest Intel processors and coprocessors. See abstracts and register
>> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk___
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 
> --
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most 
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] bonds in pybel

2013-11-11 Thread Fredrik Wallner
Hi,

Since pybel doesn’t have a ”bond-concept” at the moment, I suppose it needs to 
be defined first. But if you will settle for OBBonds, the following short 
generator could work:

def pybelbonditer(pybmol):
for i in range(pybmol.OBMol.NumBonds()):
yield pybmol.OBMol.GetBond(i)

It’s now possible to iterate over the bonds with

for bond in pybelbonditer(pybelmolecule):
print bond.GetBeginAtomIdx(), bond.GetEndAtomIdx(), bond.GetBondOrder()

Kind regards,
Fredrik
12 nov 2013 kl. 01:01 skrev Dimitri Maziuk :

> Hi guys,
> 
> one for the next release wishlist: is it possible to expose bonds as an
> iterable, similar to atoms?
> 
> -- 
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
> 
> --
> November Webinars for C, C++, Fortran Developers
> Accelerate application performance with scalable programming models. Explore
> techniques for threading, error checking, porting, and tuning. Get the most 
> from the latest Intel processors and coprocessors. See abstracts and register
> http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Fredrik Wallner
Well, I was referring to the fact that
a += b won't work, but a.OBMol += b.OBMol will. That isn't intuitive to me...

/Fredrik

Skickat från min iPhone

> 25 okt 2013 kl. 16:46 skrev Dimitri Maziuk :
> 
>> On 2013-10-25 04:33, Fredrik Wallner wrote:
>> Hi,
>> 
>> Wouldn't this be good to have exposed directly in pybel? Seems a bit 
>> non-intuitive to have to add the OBMols…
> 
> To a programmer it's plenty intuitive. What's not intuitive to this 
> programmer is if a and b have more than one possible binding site, how 
> does it pick one.
> 
> Dima
> 
> 
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Which is the function in API doing the same thing as --join

2013-10-25 Thread Fredrik Wallner
Hi,

Wouldn't this be good to have exposed directly in pybel? Seems a bit 
non-intuitive to have to add the OBMols…

Kind regards,
Fredrik

25 okt 2013 kl. 11:28 skrev "Noel O'Boyle" :

> Maciek hit send before I did :-)
> 
> a = pybel.readstring("smi", "CC")
> b = pybel.readstring("smi", "CCO")
> a.OBMol += b.OBMol
> print a.write("smi")
> ...gives...
> CC.CCO
> 
> On 25 October 2013 10:11, Zhengyh  wrote:
>> Hello,
>> 
>> Thank you all who are helping me with this openbabel.
>> We use --join to join all input molecules into a single output
>> moleculeentry.
>> But which is the right function to do this in the pybel or openbable API?
>> I just can't find it...
>> 
>> Regards!
>> 
>> 
>> --
>> October Webinars: Code for Performance
>> Free Intel webinars can help you accelerate application performance.
>> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
>> the latest Intel processors and coprocessors. See abstracts and register >
>> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
>> ___
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 
> --
> October Webinars: Code for Performance
> Free Intel webinars can help you accelerate application performance.
> Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
> the latest Intel processors and coprocessors. See abstracts and register >
> http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss



signature.asc
Description: Message signed with OpenPGP using GPGMail
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Write a .sdf file

2013-09-09 Thread Fredrik Wallner
Hi,

I don't really understand why you would like to compose the sdfile yourself, 
but you could very well use openbabel itself to get some examples. Just run the 
command "obabel -ismi -:c1c1O -osdf" and you Will get an example file. To 
answer the questions more specificly, for blank lines, \n will do great, 
x. means that 0. should be prefixed with four spaces. Regarding 
line endings I can't remember how it's handled, but \n should always work. 

Kind regards,
Fredrik

Skickat från min iPhone

9 sep 2013 kl. 12:26 skrev Altyr :

> Hi,
> 
> I'm trying to write a .sdf file in order to use it with obabel.
> I read the ctfiles book from accelrys but i don't find the answer.
> 
> For a blank line what should i put ? "\n" ? 
> 
> The same for the ctab, we have something like that
> x.y.z..
> If i write 0. for x., what should i put for the first X wich are
> not provided ? A space ? a specific input ?
> 
> My last question is the same but for the end of a line.
> 
> Thank you in advance for the answers
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Write-a-sdf-file-tp4656603.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58041391&iu=/4140/ostg.clktrk
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Segmentation fault in inchi conversion

2013-06-26 Thread Fredrik Wallner
Hi,

No, I never found a solution to this. I managed a workaround for the specific 
problem (although I cannot remember for sure I believe I accepted some help 
from ChemDraw…) so my needs fainted…

Kind regards,
Fredrik

25 jun 2013 kl. 14:33 skrev Jon Fuller :

> Hi Fredrik,
> 
> Did you find a solution to this problem? I found a similar example:
> I pasted example code for pybel, but running the command below with both 
> inchis in the file inchi.txt:
> babel -iinchi inchi.txt -osdf inchi.sdf
> Will result in "Segmentation fault: 11"
> Remove the second inchi and the command works.
> mol1 = pybel.readstring("inchi", 
> "InChI=1S/C19H22N2O/c1-4-15-7-6-8-16(5-2)18(15)10-9-14-11-17(13-21-12-14)19(22)20-3/h6-13H,4-5H2,1-3H3,(H,20,22)/b10-9+")
> 
> print "molecule one works"
> 
> 
> 
> mol2smiles = pybel.readstring("smiles", 
> "O=C(OC[C@H](\C3=C2/[C@@H](O[C@H]1O[C@@H]([C@@H](O)[C@H](OC(=O)C)[C@H]1O)COC(\C=C)(C)C)[C@H](O)[C@H](C)[C@H]4C(=C/[C@@]2(C)[C@@H](O)C3)\[C@@H](COC)CC4)C)C")
> 
> print "smiles works for molecule two!"
> 
> print mol2smiles
> 
> 
> mol2inchichemspider = pybel.readstring("inchi", 
> "InChI=1S/C36H56O12/c1-10-35(6,7)45-17-26-30(41)33(46-21(5)38)31(42)34(47-26)48-32-28-24(18(2)15-44-20(4)37)13-27(39)36(28,8)14-25-22(16-43-9)11-12-23(25)19(3)29(32)40/h10,14,18-19,22-23,26-27,29-34,39-42H,1,11-13,15-17H2,2-9H3/b25-14-/t18-,19-,22-,23+,26-,27+,29-,30-,31-,32-,33+,34-,36+/m1/s1")
> 
> print "inchi does not work for molecule two"
> 
> print mol2inchichemspider
> 
> 
> 
> Best,
> 
> Jon
> 
> 
> 
> On 11 April 2013 16:21, Fredrik Wallner  wrote:
> Hi again,
> 
> Some more information…
> The InChI "InChI=1S/C8H12/c1-2-4-6-8-7-5-3-1/h1-2,7-8H,3-6H2/b2-1-,8-7-" 
> gives the same problem.
> I have now updated the ubuntu box to also run ob 2.3.2 and it segfaults now 
> as well, so it seems it has something to do with differences between 2.3.1 
> and 2.3.2.
> 
> Kind regards,
> Fredrik
> 
> 11 apr 2013 kl. 14:45 skrev Fredrik Wallner :
> 
> > Hi,
> >
> > I get a segmentation fault when running the following command:
> > obabel -iinchi 
> > -:"InChI=1S/2C8H12.Ni/c2*1-2-4-6-8-7-5-3-1;/h2*1-2,7-8H,3-6H2;/b2*2-1-,8-7-;"
> >  -osmi
> >
> > I'm running Open Babel 2.3.2 on a MacBook Pro, OSX 10.8.3 (installed via 
> > homerbrew).
> > I have also tried it on an Ubuntu box (10.04.4) running ob 2.3.1 and here 
> > it's working without problem. Is there anyone else having problems with 
> > this, or is it just me?
> >
> > Kind regards,
> > Fredrik
> > --
> > Precog is a next-generation analytics platform capable of advanced
> > analytics on semi-structured data. The platform includes APIs for building
> > apps and a phenomenal toolset for data science. Developers can use
> > our toolset for easy data analysis & visualization. Get a free account!
> > http://www2.precog.com/precogplatform/slashdotnewsletter
> > ___
> > OpenBabel-discuss mailing list
> > OpenBabel-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 
> 
> --
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Problems with png formats

2013-06-24 Thread Fredrik Wallner
Hi again,

I just realized (after creating an identical patch myself…) that this was fixed 
in commit df59c4a630cf753723d1318c40479d48b7507e1c although that one isn't in 
the 2.3.2 tag… Anyway, applying those changes to pybel makes everything work as 
usual.

/Fredrik
24 jun 2013 kl. 15:13 skrev Fredrik Wallner :

> Hi,
> 
> I'm using OpenBabel 2.3.2 on Mac (installed via homebrew) and on Ubuntu 12.04 
> (compiled from github tag 2.3.2 with cmake options -DRUN_SWIG=ON and 
> -DPYTHON_BINDINGS=ON). In both these cases I'm having problems with the png 
> format(s) from Python. The command line obabel (obabel -:c1ccncc1 -ismi -O 
> test.png --gen2D) is working great, but when I'm trying to do the same from 
> pybel there are some problems…
> To start with, png2 is not in pybel.outputformats so mol.draw() won't work at 
> all. If I try to use mol.write("png", "test.png") instead I get a 
> Segmentation Fault. Finally, through the openbabel module in python 
> conv.SetInAndOutFormats("smi", "png") yields a string 
> ('\x00\x00\x00\x11tEXtsmiles\x00c1cnccc1\t\n\xce\x88`\x8b') that I suppose is 
> what would be included in the png created by the png2format and using 
> conv.SetInAndOutFormats("smi", "png2") returns False, I suppose due to the 
> fact that png2 can't be loaded.
> 
> Any ideas on what can have gone wrong?
> 
> Kind regards,
> Fredrik
> --
> This SF.net email is sponsored by Windows:
> 
> Build for Windows Store.
> 
> http://p.sf.net/sfu/windows-dev2dev
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


[Open Babel] Problems with png formats

2013-06-24 Thread Fredrik Wallner
Hi,

I'm using OpenBabel 2.3.2 on Mac (installed via homebrew) and on Ubuntu 12.04 
(compiled from github tag 2.3.2 with cmake options -DRUN_SWIG=ON and 
-DPYTHON_BINDINGS=ON). In both these cases I'm having problems with the png 
format(s) from Python. The command line obabel (obabel -:c1ccncc1 -ismi -O 
test.png --gen2D) is working great, but when I'm trying to do the same from 
pybel there are some problems…
To start with, png2 is not in pybel.outputformats so mol.draw() won't work at 
all. If I try to use mol.write("png", "test.png") instead I get a Segmentation 
Fault. Finally, through the openbabel module in python 
conv.SetInAndOutFormats("smi", "png") yields a string 
('\x00\x00\x00\x11tEXtsmiles\x00c1cnccc1\t\n\xce\x88`\x8b') that I suppose is 
what would be included in the png created by the png2format and using 
conv.SetInAndOutFormats("smi", "png2") returns False, I suppose due to the fact 
that png2 can't be loaded.

Any ideas on what can have gone wrong?

Kind regards,
Fredrik
--
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Segmentation fault in inchi conversion

2013-04-11 Thread Fredrik Wallner
Hi again,

Some more information…
The InChI "InChI=1S/C8H12/c1-2-4-6-8-7-5-3-1/h1-2,7-8H,3-6H2/b2-1-,8-7-" gives 
the same problem.
I have now updated the ubuntu box to also run ob 2.3.2 and it segfaults now as 
well, so it seems it has something to do with differences between 2.3.1 and 
2.3.2.

Kind regards,
Fredrik

11 apr 2013 kl. 14:45 skrev Fredrik Wallner :

> Hi,
> 
> I get a segmentation fault when running the following command:
> obabel -iinchi 
> -:"InChI=1S/2C8H12.Ni/c2*1-2-4-6-8-7-5-3-1;/h2*1-2,7-8H,3-6H2;/b2*2-1-,8-7-;" 
> -osmi
> 
> I'm running Open Babel 2.3.2 on a MacBook Pro, OSX 10.8.3 (installed via 
> homerbrew).
> I have also tried it on an Ubuntu box (10.04.4) running ob 2.3.1 and here 
> it's working without problem. Is there anyone else having problems with this, 
> or is it just me?
> 
> Kind regards,
> Fredrik
> --
> Precog is a next-generation analytics platform capable of advanced
> analytics on semi-structured data. The platform includes APIs for building
> apps and a phenomenal toolset for data science. Developers can use
> our toolset for easy data analysis & visualization. Get a free account!
> http://www2.precog.com/precogplatform/slashdotnewsletter
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


[Open Babel] Segmentation fault in inchi conversion

2013-04-11 Thread Fredrik Wallner
Hi,

I get a segmentation fault when running the following command:
obabel -iinchi 
-:"InChI=1S/2C8H12.Ni/c2*1-2-4-6-8-7-5-3-1;/h2*1-2,7-8H,3-6H2;/b2*2-1-,8-7-;" 
-osmi

I'm running Open Babel 2.3.2 on a MacBook Pro, OSX 10.8.3 (installed via 
homerbrew).
I have also tried it on an Ubuntu box (10.04.4) running ob 2.3.1 and here it's 
working without problem. Is there anyone else having problems with this, or is 
it just me?

Kind regards,
Fredrik
--
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


[Open Babel] SMARTS matching and tautomers

2013-04-04 Thread Fredrik Wallner
Hi,

I have a database with standard InChI's that I would like to do substructure 
matches on with openbabel/pybel. My problem is that the InChI's are given with 
non-intuitive tautomers (eg. amides have the double bond to the nitrogen 
instead of the oxygen if possible), leading to confusion when my users are 
searching.

Does anyone have any suggestions as to how this can be solved, preferably 
without creating Fixed-H InChI's.

Kind regards,
Fredrik
--
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] obminimize

2013-02-28 Thread Fredrik Wallner
Hi,

You should have two dashes before ff, that is obabel orig.sdf -O  result.sdf 
--minimize --sd --ff MMFF94

/Fredrik

28 feb 2013 kl. 13:25 skrev Оги Боги :

> Thank you, Chris
> It seems that it works fine now. But I would like to change force field. Ho 
> to do that? I tried
> 
> obabel orig.sdf -O  result.sdf --minimize --sd -ff MMFF94
> 
> but openbabel says:
> Cannot read input format "" for file "MMFF94"
> 
> Could anyone tell me how to change force field?
> alchemist
> 
> 
> 
>  Оригинално писмо  
> От: Chris Morley c.mor...@gaseq.co.uk 
> Относно: Re: [Open Babel] obminimize 
> До: openbabel-discuss@lists.sourceforge.net 
> Изпратено на: Четвъртък, 2013, Февруари 28 12:07:12 EET 
> 
> On 28/02/2013 07:48, Оги Боги wrote:
> > Thank you guys for your answer. I tried what you said but the output is
> > not a sdf file. How to format it in order to obtain normal sdf file?
> 
> An alternative way of accessing the same functionality is to use the 
> --minimize op with obabel, which provides more flexibility in the input 
> and output. So, for instance,
> 
> obabel orig.sdf -O result.sdf --minimize -f1 -l2
> 
> will optimize the first two molecules in orig.sdf and output to 
> result.sdf. Type obabel -L minimize for more details.
> 
> Chris
> 
> 
> 
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> --
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Problems with building Python bindings in Mac OS X

2013-01-17 Thread Fredrik Wallner
Hi,

Your problem seems to be that you don't have pkg-config installed. I would 
however recommend to install open-babel via homebrew on OSX, it has an update 
formula for openbabel 2.3.2 and it has options to be installed with python and 
java bindings as well as png support.
To install, first install homebrew (a very good package manager for OSX), found 
at http://mxcl.github.com/homebrew/
Then run "brew update" (to make sure you have the updated package)
Follow up with "brew info open-babel" to get information on the different 
options
Finally run "brew install open-babel --python" which will take care of 
installing openbabel with python bindings as well as any prerequisites. Please 
adjust as needed for other options.

If you would like to continue manually, I would say that homebrew is the 
easiest way to install pkg-config as well…

Kind regards,
Fredrik

17 jan 2013 kl. 07:07 skrev Yun Lee :

> Hi,
> I'm trying to build openbabel 2.3.2 on Mac OS X (10.8.2) with python 
> bindings, but keep on getting the following
> errors:
> XXX-MacBook-Pro:build XXX$ cmake ../openbabel-2.3.2 -DPYTHON_BINDINGS=ON
> -- Using included inchi library.
> -- Found LibXml2: /usr/lib/libxml2.dylib (found version "2.7.8") 
> -- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") 
> -- Found wxWidgets: TRUE  
> -- Looking for conio.h
> -- Looking for conio.h - not found
> -- Looking for sys/time.h
> -- Looking for sys/time.h - found
> -- Looking for time.h
> -- Looking for time.h - found
> -- Looking for strings.h
> -- Looking for strings.h - found
> -- Looking for rpc/xdr.h
> -- Looking for rpc/xdr.h - not found
> -- Looking for regex.h
> -- Looking for regex.h - found
> -- Looking for C++ include sstream
> -- Looking for C++ include sstream - found
> -- Looking for rint
> -- Looking for rint - found
> -- Looking for snprintf
> -- Looking for snprintf - found
> -- Looking for sranddev
> -- Looking for sranddev - found
> -- Looking for strcasecmp
> -- Looking for strcasecmp - found
> -- Looking for strncasecmp
> -- Looking for strncasecmp - found
> -- Looking for dlopen in dl
> -- Looking for dlopen in dl - found
> -- Looking for sys/types.h
> -- Looking for sys/types.h - found
> -- Looking for stdint.h
> -- Looking for stdint.h - found
> -- Looking for stddef.h
> -- Looking for stddef.h - found
> -- Check size of clock_t
> -- Check size of clock_t - done
> -- Performing Test SCANDIR_NEEDS_CONST
> -- Performing Test SCANDIR_NEEDS_CONST - Failed
> -- Found Eigen3: /usr/local/include/eigen3 (Required is at least version 
> "2.91.0") 
> CMake Error at /Applications/CMake 
> 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97
>  (message):
>   Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
> Call Stack (most recent call first):
>   /Applications/CMake 
> 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291
>  (_FPHSA_FAILURE_MESSAGE)
>   /Applications/CMake 
> 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPkgConfig.cmake:102 
> (find_package_handle_standard_args)
>   cmake/modules/FindCairo.cmake:23 (find_package)
>   CMakeLists.txt:437 (find_package)
> 
> 
> -- Configuring incomplete, errors occurred!
> 
> Am I missing something or doing anything wrong? Thanks for your help!
> 
> 
> --
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] pwscf format

2013-01-03 Thread Fredrik Wallner
Hi,
Could you please attach the file input.txt

/Fredrik

Skickat från min iPhone

1 jan 2013 kl. 02:36 skrev sencer :

> Hi I am trying to use openbabel 2.3.2 for pwscf input/output files. It
> successfully reads the files and get correct number of correct atoms, but it
> doesn't get coordinates of atoms.  Here is a section from the output of
> "obabel -ipwscf input.txt -ocif" command.
> ...
> Ti   Ti1 0.00.00.0
> Ti   Ti2 0.00.00.0
> Ti   Ti3 0.00.00.0
> Ti   Ti4 0.00.00.0
> Ti   Ti5 0.00.00.0
> ...
> 
> What might be the reason for this?
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/pwscf-format-tp4655846.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
> MVPs and experts. ON SALE this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122712
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()

2012-12-04 Thread Fredrik Wallner
Hi,

I was more curious about the output format, not the format of the input files. 
If the problem is indeed in the writing, it would be interesting to know if it 
is a specific format or something more general.

/Fredrik

4 dec 2012 kl. 10:44 skrev Max Pillong :

> Hey Fredrik,
> 
> thanks for the input. The SetInAndOutFormat returns true, so I'm guessing 
> there's nothing worng here. I've experienced this error with several 
> inputfiles of varying format (pdb, sdf, mol2).
> 
> Best regards,
> 
> Max
> 
> Am 04/12/2012 10:41, schrieb Fredrik Wallner:
>> Hi,
>> 
>> You should probably test the result from SetInAndOutFormats, just to be 
>> sure. If that step failed, you're in trouble. Do you get the error 
>> regardless of what format you're using for output?
>> 
>> Kind regards,
>> Fredrik
>> 
>> 4 dec 2012 kl. 10:16 skrev mpillong :
>> 
>>> Hmmm, sorry about that, I was using the < raw > Tag here ... but here's the
>>> original text.
>>> 
>>> Hey everyone,
>>> 
>>> I am currently running OpenBabel on a MacOSX 10.6.8 in Eclipse with Java.
>>> Recently, I encountered the following exception during using the WriteFile()
>>> Method in OBConversion:
>>> 
>>> 'Invalid memory access of location 0xfffb25991558 rip=0x7fff888cb683'
>>> 
>>> 
>>> I have used the same method to write molecules before, the code looks like
>>> this:
>>> 
>>> public static void writeOBMolecule(OBMol mol, String output, String format){
>>> OBConversion obc=new OBConversion();
>>> obc.SetInAndOutFormats(format, format);
>>> obc.WriteFile(mol, output);
>>> }
>>> 
>>> 
>>> I have tried multiple *.pdb files, the same error occurs every time
>>> (although the location does change every time). Any thoughts on this?
>>> 
>>> Thanks in advance!
>>> 
>>> Max
>>> 
>>> 
>>> 
>>> --
>>> View this message in context: 
>>> http://forums.openbabel.org/Invalid-memory-access-during-OBConversion-WriteFile-tp4655729p4655731.html
>>> Sent from the General discussion mailing list archive at Nabble.com.
>>> 
>>> --
>>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>>> Remotely access PCs and mobile devices and provide instant support
>>> Improve your efficiency, and focus on delivering more value-add services
>>> Discover what IT Professionals Know. Rescue delivers
>>> http://p.sf.net/sfu/logmein_12329d2d
>>> ___
>>> OpenBabel-discuss mailing list
>>> OpenBabel-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 
> 
> -- 
> ETH Zurich
> Computer-assisted Drug Design
> Dipl.-Bioinf. Max Pillong
> Institute of Pharmaceutical Sciences
> HCI G 496
> Wolfgang-Pauli-Str. 10
> 8093 Zürich, SWITZERLAND
> 
> Phone: +41 44 633 91 56
> E-Mail: max.pill...@pharma.ethz.ch
> 


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Invalid memory access during OBConversion.WriteFile()

2012-12-04 Thread Fredrik Wallner
Hi,

You should probably test the result from SetInAndOutFormats, just to be sure. 
If that step failed, you're in trouble. Do you get the error regardless of what 
format you're using for output?

Kind regards,
Fredrik

4 dec 2012 kl. 10:16 skrev mpillong :

> Hmmm, sorry about that, I was using the < raw > Tag here ... but here's the
> original text.
> 
> Hey everyone,
> 
> I am currently running OpenBabel on a MacOSX 10.6.8 in Eclipse with Java.
> Recently, I encountered the following exception during using the WriteFile()
> Method in OBConversion:
> 
> 'Invalid memory access of location 0xfffb25991558 rip=0x7fff888cb683'
> 
> 
> I have used the same method to write molecules before, the code looks like
> this:
> 
> public static void writeOBMolecule(OBMol mol, String output, String format){
>   OBConversion obc=new OBConversion();
>   obc.SetInAndOutFormats(format, format);
>   obc.WriteFile(mol, output);
> }
> 
> 
> I have tried multiple *.pdb files, the same error occurs every time
> (although the location does change every time). Any thoughts on this?
> 
> Thanks in advance!
> 
> Max 
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Invalid-memory-access-during-OBConversion-WriteFile-tp4655729p4655731.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] SMARTS output format

2012-10-17 Thread Fredrik Wallner
If you build up the molecule from within OpenBabel, chances are that that 
molecule will be possible to describe as a SMILES string which is valid SMARTS. 

Kind regards,
Fredrik
16 okt 2012 kl. 20:35 skrev J Birch :

> `If I am reading the code correctly, it looks like support for parsing SMARTS 
> strings is there, but I did not see support for building up molecules and 
> atoms then producing SMARTS output.  Correct?
> 
> Thanks!
> Birch
> On Oct 16, 2012, at 1:47 PM, Tim Vandermeersch  
> wrote:
> 
>> Hi,
>> 
>> On Tue, Oct 16, 2012 at 7:05 PM, J Birch  wrote:
>>> Is there any know SMART output format for Open Babel?  If not Open Babel, 
>>> and other chemistry development kit?
>> 
>> OpenBabel does not currently support this. The main reason for this is
>> that OB currently does not manipulate read SMARTS expressions. I'm
>> working on a project that will write SMARTS patterns since it also
>> optimizes SMARTS patterns etc. but this is still in development (see
>> http://moldb.net/smiley.php).
>> 
>> I don't know of any other toolkits supporting this.
>> 
>> Tim
>> 
>>> Thanks!
>>> Birch
>>> --
>>> Don't let slow site performance ruin your business. Deploy New Relic APM
>>> Deploy New Relic app performance management and know exactly
>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>>> http://p.sf.net/sfu/newrelic-dev2dev
>>> ___
>>> OpenBabel-discuss mailing list
>>> OpenBabel-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 
> 
> --
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Compare 3D strucuture of molecules?

2012-10-04 Thread Fredrik Wallner
Then I don't really know what can be the problem. It's working for me with 
2.3.1. I believe Eigen is required for align to work, that might be the reason. 
If you have the build directory left from when you installed it should be 
possible to see if Eigen was found. Otherwise I'd try to reinstall a more 
recent trunk version and make sure Eigen is found during installation.

Kind regards,
Fredrik

4 okt 2012 kl. 13:10 skrev Андрей Гончар :

> Open Babel 2.3.90 -- Mar 19 2012
> 
> 2012/10/4 Fredrik Wallner :
>> Hi,
>> 
>> What version of Open Babel are you using?
>> 
>> Kind regards,
>> Fredrik
>> 
>> 4 okt 2012 kl. 12:32 skrev Андрей Гончар :
>> 
>>> Hi,
>>> 
>>> I'm trying to execute your command, byt this is what I got:
>>> 
>>> ======
>>> *** Open Babel Error  in GetValues
>>> rmsd not recognized as a property or a descriptor
>>> 
>>> 
>>> 2012/10/4 Fredrik Wallner :
>>>> Hi,
>>>> 
>>>> You can get the RMSD between two conformers through the command:
>>>> obabel structure1.xxx structure2.yyy -osmi --align --append rmsd
>>>> or if they are in the same file:
>>>> obabel conformers.sdf -osmi --align --append rmsd
>>>> 
>>>> Kind regards,
>>>> Fredrik
>>>> 
>>>> 2 okt 2012 kl. 17:30 skrev scott_m :
>>>> 
>>>> Hi all,
>>>> 
>>>> Does babel have any conformer comparison function like the molecular 
>>>> overlay
>>>> that can be done in Mercury? I'm looking to get a quantitative measure of
>>>> the similarity of two conformers.
>>>> 
>>>> Cheers,
>>>> 
>>>> Scott
>>>> 
>>>> 
>>>> 
>>>> --
>>>> View this message in context:
>>>> http://forums.openbabel.org/Compare-3D-strucuture-of-molecules-tp4655501.html
>>>> Sent from the General discussion mailing list archive at Nabble.com.
>>>> 
>>>> --
>>>> Don't let slow site performance ruin your business. Deploy New Relic APM
>>>> Deploy New Relic app performance management and know exactly
>>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>>>> http://p.sf.net/sfu/newrelic-dev2dev
>>>> ___
>>>> OpenBabel-discuss mailing list
>>>> OpenBabel-discuss@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Don't let slow site performance ruin your business. Deploy New Relic APM
>>>> Deploy New Relic app performance management and know exactly
>>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>>>> http://p.sf.net/sfu/newrelic-dev2dev
>>>> ___
>>>> OpenBabel-discuss mailing list
>>>> OpenBabel-discuss@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> 
>>> Андрей Гончар
>>> 
>>> --
>>> Don't let slow site performance ruin your business. Deploy New Relic APM
>>> Deploy New Relic app performance management and know exactly
>>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>>> http://p.sf.net/sfu/newrelic-dev2dev
>>> ___
>>> OpenBabel-discuss mailing list
>>> OpenBabel-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>> 
> 
> 
> 
> -- 
> 
> Андрей Гончар
> 
> --
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Compare 3D strucuture of molecules?

2012-10-04 Thread Fredrik Wallner
Hi,

What version of Open Babel are you using?

Kind regards,
Fredrik

4 okt 2012 kl. 12:32 skrev Андрей Гончар :

> Hi,
> 
> I'm trying to execute your command, byt this is what I got:
> 
> ==
> *** Open Babel Error  in GetValues
>  rmsd not recognized as a property or a descriptor
> 
> 
> 2012/10/4 Fredrik Wallner :
>> Hi,
>> 
>> You can get the RMSD between two conformers through the command:
>> obabel structure1.xxx structure2.yyy -osmi --align --append rmsd
>> or if they are in the same file:
>> obabel conformers.sdf -osmi --align --append rmsd
>> 
>> Kind regards,
>> Fredrik
>> 
>> 2 okt 2012 kl. 17:30 skrev scott_m :
>> 
>> Hi all,
>> 
>> Does babel have any conformer comparison function like the molecular overlay
>> that can be done in Mercury? I'm looking to get a quantitative measure of
>> the similarity of two conformers.
>> 
>> Cheers,
>> 
>> Scott
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://forums.openbabel.org/Compare-3D-strucuture-of-molecules-tp4655501.html
>> Sent from the General discussion mailing list archive at Nabble.com.
>> 
>> --
>> Don't let slow site performance ruin your business. Deploy New Relic APM
>> Deploy New Relic app performance management and know exactly
>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>> http://p.sf.net/sfu/newrelic-dev2dev
>> ___
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>> 
>> 
>> 
>> --
>> Don't let slow site performance ruin your business. Deploy New Relic APM
>> Deploy New Relic app performance management and know exactly
>> what is happening inside your Ruby, Python, PHP, Java, and .NET app
>> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
>> http://p.sf.net/sfu/newrelic-dev2dev
>> ___
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>> 
> 
> 
> 
> -- 
> 
> Андрей Гончар
> 
> --
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Compare 3D strucuture of molecules?

2012-10-04 Thread Fredrik Wallner
Hi,

You can get the RMSD between two conformers through the command:
obabel structure1.xxx structure2.yyy -osmi --align --append rmsd
or if they are in the same file:
obabel conformers.sdf -osmi --align --append rmsd

Kind regards,
Fredrik

2 okt 2012 kl. 17:30 skrev scott_m :

> Hi all,
> 
> Does babel have any conformer comparison function like the molecular overlay
> that can be done in Mercury? I'm looking to get a quantitative measure of
> the similarity of two conformers.
> 
> Cheers,
> 
> Scott
> 
> 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/Compare-3D-strucuture-of-molecules-tp4655501.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] OBFit

2012-08-15 Thread Fredrik Wallner
Hi,

15 aug 2012 kl. 10:22 skrev Kareem Khoury:

> Two questions, one of which Im sure is very simple question but i cant seem 
> to figure it out
> 
> 1) 
> When i type in the command for obfit:
> 
> obfit smartscode ref.sdf library.sdf
>  
> it give me the output only in the command prompt window.
> 
> I tried adding -o and ouputfile.sd and nothing happened.  How do i get the 
> program to give me the output to an sd or sdf file?
> 
To do this, you redirect the output to a file like
obfit smartscode ref.sdf library.sdf > outfile.sdf

> 2)
> Is it possible with this program to fit patterns that are not compleatly 
> similar ie if i have a library of compounds with pyrimidines and pyridines 
> could i fit that to a benzyle ring? 
Yes, with the correct SMARTS string it's possible. In your case you should use 
"[c,n]1c[c,n]ccc1".

Kind regards,
Fredrik

> 
> Thanks
> 
> -Kareem
> --
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and 
> threat landscape has changed and how IT managers can respond. Discussions 
> will include endpoint security, mobile security and the latest in malware 
> threats. 
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] SMILES & SMARTS

2012-03-19 Thread Fredrik Wallner
No, Geoff is right. Taken from the Daylight manual at 
http://www.daylight.com/dayhtml/doc/theory/theory.smarts.html
> All SMILES expressions are also valid SMARTS expressions, but the semantics 
> changes because SMILES describes molecules whereas SMARTS describes patterns. 
> The molecule represented by a SMILES string is usually, but not always, 
> matched by the same string when used as a SMARTS
On the other hand, openbabel doesn't seem to handle multi component SMARTS, 
possibly due to the fact that the dot requires some special handling. So if you 
strip salts or something similar to only search for the largest fragment of 
your input molecule it should work fine.

Kind regards,
Fredrik.

19 mar 2012 kl. 10:29 skrev Patrik Mika:

> I think it's the other way around while SMARTS are SMILES one can treat them 
> as such but since SMARTS are more specific and contain information more 
> detailed, one cannot treat SMILES (canonical or not) as SMARTS. 
> Pybel/openbabel seems to agree with me as i get this error message with 
> SMILES but not with SMARTS:
> 
> *** Open Babel Error  in SMARTSError
>   SMARTS Error:
> [Cl-].CCCN(CCC)C1CC1c1cc(F)ccc1O
> 
> 
> 
> 2012/3/18 Geoff Hutchison 
> > I am currently trying to generate SMARTS Patterns from an 'mol' or 'sdf' 
> > file using pybel. So far I haven't been able to succeed.
> > Is it possible to convert Canonical-SMILES (which is possible) into SMARTS? 
> > Or can I use Canonical-SMILES with the pybel.smarts() module?
> > I look forward to your answer.
> 
> A SMILES string (canonical or not) is a SMARTS. What seems to be your 
> specific problem or error?
> 
> Best regards,
> -Geoff
> 
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] intrepretation of fingerprints output

2012-03-15 Thread Fredrik Wallner
The L is just a mark that it is a Long integer.
/Fredrik
15 mar 2012 kl. 09:20 skrev sandeep:

> i can see the numbers as  2147483648L   2181038208L , in the output
> is it possible to get decimal numbers with "L" alphabet 
> 
> --
> View this message in context: 
> http://forums.openbabel.org/intrepretation-of-fingerprints-output-tp4473837p4474195.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] intrepretation of fingerprints output

2012-03-15 Thread Fredrik Wallner
Just by looking at the numbers I would say that your python code is printing 
the bits as decimal numbers and in the "opposite order" to babel, that is 
printing them as hex. The FP2 fingerprint is inherently difficult to interpret, 
but if you search the list you will find discussions with pointers.

/Fredrik

15 mar 2012 kl. 04:05 skrev sandeep:

>i am using open babel for my academic purpose i am trying to generate
> fingerprint for a molecule using python script and command line.
> The syntax i used for command line is  " babel   -ofpt "
> The output what  i am getting is in two different ways , and i am unable to
> interpret.
> please find the attachment of the python script .
> 
> the output of the command line what i got is :
> 
> babel struct10.mol2 -ofpt
> *   44 bits set
> 0002 0008 2300 00010200  
> 8280 0400 0180 00100840  40008000
> 8002  0002 0008 0400 0200
> 00018000 0002 0001 08000200 8001 00400810
> 0100 8000 00422000 4000 0040 0002
> 0400 
> 1 molecule converted
> 14 audit log messages  
> 
> 
> whereas the python script output i got it as
> python fingerprints.py struct10.mol2
> [0, 67108864, 131072, 4194304, 1073741824, 4333568, 2147483648L, 16777216,
> 4196368, 32769, 134218240, 1, 131072, 98304, 33554432, 1024, 8, 2, 0, 32770,
> 1073774592, 0, 1050688, 25165824, 1024, 2181038208L, 0, 0, 66048, 536871680,
> 8, 2]
> 
> 
> can anyone help me in getting solved
>  http://forums.openbabel.org/file/n4473837/fingerprints.py fingerprints.py 
> 
> Thanks in advance.
> 
> --
> View this message in context: 
> http://forums.openbabel.org/intrepretation-of-fingerprints-output-tp4473837p4473837.html
> Sent from the General discussion mailing list archive at Nabble.com.
> 
> --
> This SF email is sponsosred by:
> Try Windows Azure free for 90 days Click Here 
> http://p.sf.net/sfu/sfd2d-msazure
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Feature request - transparent background when converting to svg

2011-11-11 Thread Fredrik Wallner
Hi,In my experience, the SVG always has a transparent background and the b-option only renders the lines and the default text in white. Please see the attached screen shot of a webpage with grey background and two pics of benzene, one without and one with the -xb option.Kind regards,Fredrik11 nov 2011 kl. 10:38 skrev JP:Is it possible to have a transparent background (or user specified) when converting to an svg?The choice of black and white looks very arbitrary.I can only find this in the options:

b black background    The default is white. The atom colors work with both.-Jean-Paul EbejerEarly Stage Researcher
--RSA(R) Conference 2012Save $700 by Nov 18Register nowhttp://p.sf.net/sfu/rsa-sfdev2dev1___OpenBabel-discuss mailing listOpenBabel-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/openbabel-discuss--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] smiles from SDF

2011-10-19 Thread Fredrik Wallner
Hi,

The closest I can find is the following:

obabel file.sdf -O out.smi --title "" --append name MW

That is under the presumption that the SDF fields are named name and MW, and 
that the title of the compound doesn't contain the name (in which case the 
options only would be --append MW).
The problem is that the result is not tab delimited, but instead has the format 
SMILES[tab]name[SPACE]MW, but if your names doesn't contain spaces it can 
easily be fixed upon import. To create a truly tab-delimited file I think you 
need to resort to using pybel.

Kind regards,
Fredrik
 
18 okt 2011 kl. 16:35 skrev Paul Jones:

> Hi,
> 
> I have an SDF file that has the chemical structure (in MOL), MW and
> name. Is it possible to use Openbabel to generate a tabe delimited txt
> file with the Smiles string followed by the Name and MW? The ultimate
> goal is to put the data in to Excel.
> 
> Thanks
> 
> paul
> 
> --
> All the data continuously generated in your IT infrastructure contains a
> definitive record of customers, application performance, security
> threats, fraudulent activity and more. Splunk takes this data and makes
> sense of it. Business sense. IT sense. Common sense.
> http://p.sf.net/sfu/splunk-d2d-oct
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] corresponding fragment for each fp2 fingerprint bit

2011-09-15 Thread Fredrik Wallner
Hi again,
(I realized i forgot to cc the list in my last reply)
15 sep 2011 kl. 12:29 skrev Martin Guetlein:

> On Thu, Sep 15, 2011 at 12:21 PM, Fredrik Wallner  wrote:
> Hi,
> 
> Since the fp2 fingerprint is a path-based hashed fingerprint, there is no 
> such list.
> 
> But the bit at positon  is always the same fragent, right? So it would it 
> general be possible to create such a list?
> 
> Martin

No it's not. The same fragment is always mapping to the same position, but 
multiple fragments can map to the same bit, that's what happens with a hashed 
fingerprint

/Fredrik

> 
>  
> The -xs option (note that it's not -s) is your best alternative. You can then 
> convert these lines into a smart string with string substitutions if you 
> would like, but it really comes down to what you need them for.
> 
> Kind regards,
> Fredrik
> 
> 15 sep 2011 kl. 12:01 skrev Martin Guetlein:
> 
>> Hi,
>> 
>> I would like to have the corresponding fragment for each bit of the fp2 
>> fingerprint.
>> Using the -s param (as described by Noel here: 
>> http://forums.openbabel.org/Need-help-in-calculationg-tanimoto-coefficient-td3233604.html)
>>  is not very practical for what I want to do, I would prefer a list of 1024 
>> smarts strings.
>> Is this available somewhere?
>> 
>> Cheers,
>> Martin
>> 
>> -- 
>> Dipl-Inf. Martin Gütlein
>> Phone:
>> +49 (0)761 203 7633 (office)
>> +49 (0)177 623 9499 (mobile)
>> Email:
>> guetl...@informatik.uni-freiburg.de
>> --
>> Doing More with Less: The Next Generation Virtual Desktop 
>> What are the key obstacles that have prevented many mid-market businesses
>> from deploying virtual desktops?   How do next-generation virtual desktops
>> provide companies an easier-to-deploy, easier-to-manage and more affordable
>> virtual desktop 
>> model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> 
> 
> 
> 
> -- 
> Dipl-Inf. Martin Gütlein
> Phone:
> +49 (0)761 203 7633 (office)
> +49 (0)177 623 9499 (mobile)
> Email:
> guetl...@informatik.uni-freiburg.de

--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] OBConversion() is required before finding a 2.3.0 plugin

2011-08-06 Thread Fredrik Wallner
If I have understood correctly, the fimgerprint plugins moved to the new 
loading system at 2.3.0. 

Kind regards,
Fredrik

Skickat från min iPhone

6 aug 2011 kl. 09:34 skrev Chris Morley :

> On 05/08/2011 23:43, Andrew Dalke wrote:
>>  I can't find this mentioned in the documentation so I thought I would
>> post it here in case others come across it in the future. Or so that
>> people can correct my misunderstanding.
>> 
>>  OpenBabel plugin code seems to have changed with 2.3 . If I want
>> to use OBFingerprint.FindType("FP2") (or FindFingerprint) then I
>> need to call OBConversion() at least once before then to load all
>> of the plugins.
> 
> This "feature" has been discussed several times on the lists before but 
> obviously needs to make its way into the documentation. A very long time 
> ago the plugins were automatically loaded when the library was. but this 
> caused somebody some difficulty and was removed, mistakenly in hindsight.
> 
>> Here's how it works under 2.3.3
> import openbabel as ob
> ob.OBFingerprint.FindType("FP2")
>> > 'OpenBabel::OBFingerprint *' at 0x100448a20>  >
>> 
>>  # As you see, the plugin was found without a problem.
>>  # As OB 2.3.3 doesn't have OBReleaseVersion(), I'll work around it
> I think you mean 2.2.3 not 2.3.3.
> 
> As far as I know, the C++ around this did not change significantly 
> between 2.2.3 and 2.3.0 (or later), so maybe there was some change in 
> the Python bindings.
> 
> Chris
> 
> --
> BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
> The must-attend event for mobile developers. Connect with experts. 
> Get tools for creating Super Apps. See the latest technologies.
> Sessions, hands-on labs, demos & much more. Register early & save!
> http://p.sf.net/sfu/rim-blackberry-1
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Asking about SMARTS

2011-02-24 Thread Fredrik Wallner
Hi again,

On looking at the Pybel code for findall I thought that what you probably want 
is to use the openbabel backbone and call GetMapList instead of GetUMapList as 
findall() does. However, that didn't work either for me (the result was still 
only 1 set of atoms). I also tried MatchesSMARTS as in: 
[x.OBAtom.MatchesSMARTS("C=C") for x in mol.atoms] (mol being C=C) but that 
gave [True, False] and not [True, True] as I would have expected. So, 
unfortunately, I don't have any idea how to solve this at the moment...

Kind regards,
Fredrik
24 feb 2011 kl. 10.52 skrev Fredrik Wallner:

> Hi again,
> 
> Could you please send a small list of SMILES and the expected result along 
> with your code so that we can see what's happening. Please also cc the list.
> 
> Kind regards,
> Fredrik
> 
> 24 feb 2011 kl. 10.45 skrev NGUYEN Thanh Binh:
> 
>> Thank you very much Mr. Fredrik. It is exactly my problem. How can i solve 
>> this problem ?
>> 
>> Best regards,
>> 
>> Thanh Binh
>> 
>> 
>> -- Forwarded message --
>> From: NGUYEN Thanh Binh 
>> Date: 2011/2/24
>> Subject: Re: [Open Babel] Asking about SMARTS
>> To: Noel O'Boyle 
>> 
>> 
>> Dear,
>> 
>> I have not tried the SMARTSWiewer yet. Thank you very much for this useful 
>> link. 
>> 
>> An example SMILES is C=C and C=CC. I want to parse and to regconize two 
>> groups such as -CH= and =CH2. 
>> 
>> Many thanks in advance for your advices.
>> 
>> Thanh Binh.
>> 
>> 
>> 
>> 
>> 2011/2/24 Noel O'Boyle 
>> 
>> Did you try the SmartsViewer? http://smartsview.zbh.uni-hamburg.de/
>> 
>> Can you give an example molecule (SMILES) where you do not get the
>> expected result?
>> 
>> - Noel
>> 
>> On 23 February 2011 10:16, NGUYEN Thanh Binh  wrote:
>> > Dear,
>> >
>> > My name is NGUYEN Thanh Binh. I am working about the SMARTS parsing.
>> > I have used the library OPENBABEL to do it.
>> > But i have a problem that needs your help. My following problem is :
>> >
>> > When i have constructed SMARTS Formulas in order to parse and to count the
>> > fonctional groups for the alpha alkene by using PYBEL, i can not count the
>> > number of groups CH2= of the Ethylene. The rests are good except for
>> > Ethylene. I have tried to correct the SMARTS but unsuccessfully yet.
>> >
>> > My SMARTS formula for CH2= is : [CX3H2]=[#6]
>> >
>> > I write to you for demande some advices about this problem.
>> >
>> > Many thanks in advance for your help,
>> >
>> > Best regards
>> >
>> > NGUYEN Thanh Binh
>> >
>> > P/S: please answer to me by this email adress: thanhbin...@gmail.com
>> >
>> >
>> > --
>> > Free Software Download: Index, Search & Analyze Logs and other IT data in
>> > Real-Time with Splunk. Collect, index and harness all the fast moving IT
>> > data
>> > generated by your applications, servers and devices whether physical,
>> > virtual
>> > or in the cloud. Deliver compliance at lower cost and gain new business
>> > insights. http://p.sf.net/sfu/splunk-dev2dev
>> > ___
>> > OpenBabel-discuss mailing list
>> > OpenBabel-discuss@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>> >
>> >
>> 
>> 
> 
> --
> Free Software Download: Index, Search & Analyze Logs and other IT data in 
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business 
> insights. http://p.sf.net/sfu/splunk-dev2dev 
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Asking about SMARTS

2011-02-24 Thread Fredrik Wallner
What was your expected result for Ethylene? And how did you do the search. I'm 
guessing that you want Ethylene to report two CH2= groups, but since your 
SMARTS matches both atoms in Ethylene, you will only get one result from 
findall(), namely [(1, 2)]. The other hit would be identical and is therefor 
not reported I believe.

/Fredrik
24 feb 2011 kl. 10.33 skrev Noel O'Boyle:

> Did you try the SmartsViewer? http://smartsview.zbh.uni-hamburg.de/
> 
> Can you give an example molecule (SMILES) where you do not get the
> expected result?
> 
> - Noel
> 
> On 23 February 2011 10:16, NGUYEN Thanh Binh  wrote:
>> Dear,
>> 
>> My name is NGUYEN Thanh Binh. I am working about the SMARTS parsing.
>> I have used the library OPENBABEL to do it.
>> But i have a problem that needs your help. My following problem is :
>> 
>> When i have constructed SMARTS Formulas in order to parse and to count the
>> fonctional groups for the alpha alkene by using PYBEL, i can not count the
>> number of groups CH2= of the Ethylene. The rests are good except for
>> Ethylene. I have tried to correct the SMARTS but unsuccessfully yet.
>> 
>> My SMARTS formula for CH2= is : [CX3H2]=[#6]
>> 
>> I write to you for demande some advices about this problem.
>> 
>> Many thanks in advance for your help,
>> 
>> Best regards
>> 
>> NGUYEN Thanh Binh
>> 
>> P/S: please answer to me by this email adress: thanhbin...@gmail.com
>> 
>> 
>> --
>> Free Software Download: Index, Search & Analyze Logs and other IT data in
>> Real-Time with Splunk. Collect, index and harness all the fast moving IT
>> data
>> generated by your applications, servers and devices whether physical,
>> virtual
>> or in the cloud. Deliver compliance at lower cost and gain new business
>> insights. http://p.sf.net/sfu/splunk-dev2dev
>> ___
>> OpenBabel-discuss mailing list
>> OpenBabel-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>> 
>> 
> 
> --
> Free Software Download: Index, Search & Analyze Logs and other IT data in 
> Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
> generated by your applications, servers and devices whether physical, virtual
> or in the cloud. Deliver compliance at lower cost and gain new business 
> insights. http://p.sf.net/sfu/splunk-dev2dev 
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Asking about SMARTS

2011-02-24 Thread Fredrik Wallner
Hi again,

Could you please send a small list of SMILES and the expected result along with 
your code so that we can see what's happening. Please also cc the list.

Kind regards,
Fredrik

24 feb 2011 kl. 10.45 skrev NGUYEN Thanh Binh:

> Thank you very much Mr. Fredrik. It is exactly my problem. How can i solve 
> this problem ?
> 
> Best regards,
> 
> Thanh Binh
> 
> 
> -- Forwarded message --
> From: NGUYEN Thanh Binh 
> Date: 2011/2/24
> Subject: Re: [Open Babel] Asking about SMARTS
> To: Noel O'Boyle 
> 
> 
> Dear,
> 
> I have not tried the SMARTSWiewer yet. Thank you very much for this useful 
> link. 
> 
> An example SMILES is C=C and C=CC. I want to parse and to regconize two 
> groups such as -CH= and =CH2. 
> 
> Many thanks in advance for your advices.
> 
> Thanh Binh.
> 
> 
> 
> 
> 2011/2/24 Noel O'Boyle 
> 
> Did you try the SmartsViewer? http://smartsview.zbh.uni-hamburg.de/
> 
> Can you give an example molecule (SMILES) where you do not get the
> expected result?
> 
> - Noel
> 
> On 23 February 2011 10:16, NGUYEN Thanh Binh  wrote:
> > Dear,
> >
> > My name is NGUYEN Thanh Binh. I am working about the SMARTS parsing.
> > I have used the library OPENBABEL to do it.
> > But i have a problem that needs your help. My following problem is :
> >
> > When i have constructed SMARTS Formulas in order to parse and to count the
> > fonctional groups for the alpha alkene by using PYBEL, i can not count the
> > number of groups CH2= of the Ethylene. The rests are good except for
> > Ethylene. I have tried to correct the SMARTS but unsuccessfully yet.
> >
> > My SMARTS formula for CH2= is : [CX3H2]=[#6]
> >
> > I write to you for demande some advices about this problem.
> >
> > Many thanks in advance for your help,
> >
> > Best regards
> >
> > NGUYEN Thanh Binh
> >
> > P/S: please answer to me by this email adress: thanhbin...@gmail.com
> >
> >
> > --
> > Free Software Download: Index, Search & Analyze Logs and other IT data in
> > Real-Time with Splunk. Collect, index and harness all the fast moving IT
> > data
> > generated by your applications, servers and devices whether physical,
> > virtual
> > or in the cloud. Deliver compliance at lower cost and gain new business
> > insights. http://p.sf.net/sfu/splunk-dev2dev
> > ___
> > OpenBabel-discuss mailing list
> > OpenBabel-discuss@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
> >
> >
> 
> 

--
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev ___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] OBConversion::FindFormat fails in dynamic libraries

2010-11-18 Thread Fredrik Wallner
Hi,

To add to this, you then need to define __CYGWIN__ when compiling your module. 
In 2.3.0, also the fingerprints map is managed by the plugin framework, so in 
my experience you will have a similar problem with them (but then I couldn't 
make it work even with this hack).

Since this problem is popping up here and there, I would like to understand the 
reasoning behind the fix. If I recall correctly, Tim never commented on the 
email from Chris. Is there anyone that has a good explanation?

Kind regards,
Fredrik

18 nov 2010 kl. 10.19 skrev Jerome Pansanel:

> Hi,
> 
> You should add the hack in your module code. You do not modify or  recompile 
> OB.
> 
> I'm using this fix with Mychem . It works perfectly:
> http://mychem.svn.sourceforge.net/viewvc/mychem/mychem3/src/conversion_wrapper.cpp?revision=325&view=markup
> 
> Jerome
> 
> Le jeudi 18 novembre 2010 10:12:11, Imran Haque a écrit :
>> Hi Jerome,
>> 
>> Thanks for the suggestion. I'm actually building under x84_64 Linux, so
>> neither the Cygwin nor MinGW flags will be active, but maybe this is
>> still the right way to get around it. It certainly seems like some
>> function pointer table is not getting initialized (the effects seem
>> similar to not calling _import_array() for Numpy C-API code). Where
>> would I add the PLUGIN_CPP_FILE macro - to the OB source tree, or
>> somewhere in my module source code? A quick look at
>> include/openbabel/plugin.h suggests that I'd need to rebuild the OB
>> libraries - is this true?
>> 
>> Alternatively, is there a function I can call to get the function table
>> set up correctly, without needing to modify OB itself?
>> 
>> Thanks,
>> 
>> Imran
>> 
>> On 11/18/2010 01:00 AM, Jerome Pansanel wrote:
>>> Hi,
>>> 
>>> I've faced the same problem with Mychem. You should use the following
>>> ack:
>>> 
>>> #if defined(__CYGWIN__) || defined(__MINGW32__)
>>> 
>>>   // macro to implement static OBPlugin::PluginMapType&  Map()
>>>   PLUGIN_CPP_FILE(OBFormat)
>>> 
>>> #endif
>>> 
>>> Here is a copy of a mail from Chris about this problem:
>>> =
>>> In 2008 OBFormat was made part of the OBPlugin framework, which now
>>> manages the map relating the formats IDs and the pointers to the
>>> OBFormat objects. FormatFromMime() is a hangover from the old system,
>>> with its map managed by OBFormat itself. It seems the latter is
>>> working but the OBPlugin framework is not.
>>> 
>>> Building OB on MinGW and CygWin gave similar problems with the formats
>>> not being visible, which Tim solved by conditional code in each plugin
>>> type's cpp file. See for instance line 26 of format.cpp . Maybe adding
>>> to the conditional to get this code to run for your build would be a
>>> solution. I'm afraid I don't understand how this fix works; maybe Tim
>>> could comment whether this would be worth trying.
>>> 
>>> Chris
>>> =
>>> 
>>> Cheers,
>>> 
>>> Jerome Pansanel
>>> 
>>> Le jeudi 18 novembre 2010 02:35:21, Imran Haque a écrit :
 Hi,
 
 I have a large set of C++ molecule-manipulation libraries that
 internally use OpenBabel to handle molecule input and structure, and I'm
 trying to wrap them into a Python library using standard Python C API
 techniques. These routines work fine when called from a C program, but
 when called from the .so used for the Python library,
 OBConversion::FindFormat segfaults. I don't know how to follow the code
 path in the source code, as it appears to be generated by macros and
 eventually calls down into an independent set of .so's for each file
 format. Does anyone know how to get the molecule loader routines to work
 from dynamic libraries?
 
 I've put up a minimal test case at
 http://cs.stanford.edu/people/ihaque/ob_bug_repro.tar. You may have to
 adjust the paths in the Makefile to correspond to your Python and OB
 installations. Here's sample output (note that I added a tracing printf
 to OBConversion::FormatFromExt that isn't in the mainline OB 2.3.0
 source):
 
 $ python numatoms.py test.sdf
 Molecule hasFilename test.sdf
 FormatFromExt calling FindFormat with arg sdf
 Segmentation fault
 
 $ ./numatoms test.sdf
 Filename test.sdf
 FormatFromExt calling FindFormat with arg sdf
 Detected format: MDL MOL format
 Reads and writes V2000 and V3000 versions
 Read Options, e.g. -as
 
   s  determine chirality from atom parity flags
 
 This is valid only for 0D information. Atom
 parity is always ignored on reading for MOL files
 containing 2D or 3D information.
 
   T  read title only
   P  read title and properties only
 
 When filtering an sdf file on title or properties
 only, avoid lengthy chemical interpretation by
 using the T or P option together with copy format.
 
 Write Options, e.

Re: [Open Babel] append

2010-11-16 Thread Fredrik Wallner
Hi,

Would --title mol --addoutindex suffice? I think it was added in 2.3.0 (btw, 
the documentation at 
http://openbabel.org/docs/dev/Command-line_tools/babel.html states that the 
option should be called --addindex, but that didn't work on my machine at 
least). That way the name would be "mol 1" and so on.

Kind regards,
Fredrik
 
16 nov 2010 kl. 09.27 skrev christophersw...@btconnect.com:

> Hi Noel,
> 
> I did something similar in Applescript but I wondered if it could be done 
> within OB, it seems like it would be a useful feature.
> 
> Cheers
> 
> Chris
> On 15 Nov 2010, at 21:58, Noel O'Boyle wrote:
> 
>> Hi Chris,
>> 
>> I think that right now it's not possible. The ability to access a
>> molecule's number would also be useful for filtering too.
>> 
>> In the meanwhile, you'll have to have to use Python or something similar:
>> 
>> import pybel
>> output = pybel.Outputfile("sdf", "myoutput.sdf")
>> for mol_num, mol in enumerate(pybel.readfile("sdf", "myfile.sdf")):
>>  mol.title = "mol" + str(mol_num+1)
>>  output.write(mol)
>> output.close()
>> 
>> - Noel
>> 
>> On 15 November 2010 20:57, christophersw...@btconnect.com
>>  wrote:
>>> I have sdf that contains only structures, I'd like each to have a unique 
>>> title is this possible? Adding mol1, mol2, mol3 would be sufficient.
>>> 
>>> Cheers
>>> 
>>> Chris
>>> --
>>> Centralized Desktop Delivery: Dell and VMware Reference Architecture
>>> Simplifying enterprise desktop deployment and management using
>>> Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
>>> client virtualization framework. Read more!
>>> http://p.sf.net/sfu/dell-eql-dev2dev
>>> ___
>>> OpenBabel-discuss mailing list
>>> OpenBabel-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss
>>> 
> 
> 
> --
> Beautiful is writing same markup. Internet Explorer 9 supports
> standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
> Spend less time writing and  rewriting code and more time creating great
> experiences on the web. Be a part of the beta today
> http://p.sf.net/sfu/msIE9-sfdev2dev
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


[Open Babel] SMARTS with explicit H

2010-11-15 Thread Fredrik Wallner
Hi all!

I'm having some problems with SMART matching that I don't really know if they 
are due to my not complete understanding of SMARTS or if there is some kind of 
bug within Open Babel. I'm using Open Babel 2.3.0, the prebuilt Mac version on 
a MacBook running OS X 10.6.5. I was playing around with the PAINS SMARTS, 
inspired by the recent blogpost of Rajarshi. Those SMARTS often have explicit 
hydrogens, stated as "...-[#1]" and in those cases my molecules wouldn't hit 
unless I entered the molecule with explicit hydrogens. Example commands 
follow...

# This is the query I would like to have worked, without modifications on 
either molecule or SMARTS
$ echo "OCCOc1c1C=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R]-[#1]'
0 molecules converted

# Here the explicit hydrogen is removed from the query
$ echo "OCCOc1c1C=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R]'
OCCOc1c1C=C1C(=O)NC(=S)NC1=O
1 molecule converted

# Here the hydrogen is required, but implicit are allowed
$ echo "OCCOc1c1C=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R;H]'
OCCOc1c1C=C1C(=O)NC(=S)NC1=O
1 molecule converted

# Here the molecule to be tested has had an added hydrogen
$ echo "OCCOc1c1[CH]=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R]-[#1]'
OCCOc1c1C=C1C(=O)NC(=S)NC1=O
1 molecule converted

# I also tried with the -h switch to add hydrogens to the molecule with no luck 
(does it add the hydrogens before or after the SMARTS matching?
$ echo "OCCOc1c1C=C1C(=O)NC(=S)NC1=O" | obabel -ismi -ocan -h 
-s'[#6]-1(-[#6](~[!#6&!#1]~[#6]-[!#6&!#1]-[#6]-1=[!#6&!#1])~[!#6&!#1])=[#6;!R]-[#1]'
0 molecules converted

I find it kind of unintuitive that query no 1 and 3 gives different results and 
I would have thought that all should match.

Have I missed something or do anyone among you have an idea how to solve my 
problem without rewriting every SMART...

Kind regards,
Fredrik--
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


[Open Babel] Metals in mol-files

2010-01-26 Thread Fredrik Wallner
Hi all!

I have a problem with some simple mol-files that describes metal salts, i.e. 
Na+OH- and K+OH-. When converting to smiles with the command babel test.mol 
-osmi I get the result [NaH+].[OH-] instead of the expected [Na+].[OH-] which 
is what I get from ChemDraw and seems most intuitive to me. The same problem 
occurs in obprop which returns a molecular weight of 41.005 instead of 39.997.

To me, this would be a bug, but if it's somehow intended I'm wondering if 
there's a setting somewhere to change the properties of Na, K, and such to stop 
this from happening.

I have attached the file test.mol for testing. I have tested myself on Open 
Babel 2.2.2b4 on OSX10.6.2 and Open Babel 2.2.2 on Ubuntu Hardy LTS.

Kind regards,
Fredrik



test.mol
Description: chemical/molfile
--
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___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] Get mol2 file from obminimize

2009-10-14 Thread Fredrik Wallner
Without patches, people should be able to pipe the output through  
babel such that Geoff's original command would be obminimize ... |  
babel -ipdb out.mol2


/Fredrik

14 okt 2009 kl. 16.22 skrev Geoffrey Hutchison:



On Oct 12, 2009, at 2:00 AM, sourceforge@dfgh.net wrote:


But the terminal output geometry from obminimize is always in PDB
format, isn't it?!


Good point. :-)

I'm happy to add an output format flag to obminimize. If people want
patches, I'd be glad to send them -- but it otherwise wouldn't be
incorporated until the next release.

-Geoff

--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart  
your
developing skills, take BlackBerry mobile applications to market and  
stay

ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


Re: [Open Babel] StripSalts argument

2009-10-06 Thread Fredrik Wallner
Hi,

I don't know about your first problem, but I can tell you that the  
argument to StripSalts is the size below which a fragment is  
considered a salt. That is, when you give the argument 2, all  
fragments that contain less than 2 atoms are removed.

Kind regards,
Fredrik
6 okt 2009 kl. 11.17 skrev Dastard:

>
> Hi,
>
> I'm new to OpenBabel and have been trying to use it via pybel. I  
> have 2
> problems with StripSalts.
>
> First with python 2.5/OpenBabel 2.1.1 using with 1 argument - eg.
> StripSalts(3) - gives the error:-
>
>   def StripSalts(*args): return _openbabel.OBMol_StripSalts(*args)
> TypeError: OBMol_StripSalts expected 1 arguments, got 2
>
> StripSalts() works ok and all salts are stripped. Is this a bug  
> fixed in
> later release?
>
> Using python 2.6.2/OpenBabel 2.2.0 the behavour is reversed - no  
> argument
> gives an error. I don't understand exactly what effect the argument  
> has
> though. Here's an example:-
>
 mol=pybel.readstring("smi","NCCNCCN.Cl.Cl.Cl")
 mol.OBMol.StripSalts(0)
> True
 print mol.write("smi")
> NCCNCCN.Cl.Cl.Cl
>
 mol.OBMol.StripSalts(1)
> True
 print mol.write("smi")
> NCCNCCN.Cl.Cl.Cl
>
 mol.OBMol.StripSalts(2)
> True
 print mol.write("smi")
> NCCNCCN
>
 mol=pybel.readstring("smi","NCCNCCN.Cl.Cl.Cl")
 mol.OBMol.StripSalts(7)
> True
 print mol.write("smi")
> NCCNCCN
>
 mol=pybel.readstring("smi","NCCNCCN.Cl.Cl.Cl")
 mol.OBMol.StripSalts(8)
> True
 print mol.write("smi")
>
>

>
> Can someone explain this. Nothing is stripped with argument 0 or 1  
> then with
> 2-7 all salts are stripped. Above this everything goes!
>
> Thanks,
> Dave
>
> -- 
> View this message in context: 
> http://www.nabble.com/StripSalts-argument-tp25765316p25765316.html
> Sent from the openbabel-discuss mailing list archive at Nabble.com.
>
>
> --
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart  
> your
> developing skills, take BlackBerry mobile applications to market and  
> stay
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ___
> OpenBabel-discuss mailing list
> OpenBabel-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openbabel-discuss


--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
___
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss