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

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 termina

[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

[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

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"

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

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

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 th

Re: [Open Babel] Asking about SMARTS

2011-02-24 Thread Fredrik Wallner
MARTS 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 s

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 though

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

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 pr

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 2

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 pointer

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

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 represe

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

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

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

2012-10-04 Thread Fredrik Wallner
ecognized 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:

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

2012-10-04 Thread Fredrik Wallner
ry 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 Ope

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

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 t

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

2012-12-04 Thread Fredrik Wallner
hanks 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 Fr

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 o

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 ins

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.

[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

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

Re: [Open Babel] Segmentation fault in inchi conversion

2013-04-11 Thread Fredrik Wallner
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

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

Re: [Open Babel] Problems with png formats

2013-06-24 Thread Fredrik Wallner
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

Re: [Open Babel] Segmentation fault in inchi conversion

2013-06-26 Thread Fredrik Wallner
4,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 Wall

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

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

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

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

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 s

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

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

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

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

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 >

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 t

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

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

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 wi

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 you

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

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

2015-03-25 Thread Fredrik Wallner
d 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, > > Tha

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

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

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 lin

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

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

2015-11-30 Thread Fredrik Wallner
> 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

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

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 plugin

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.

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

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

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

Re: [Open Babel] error with complin

2016-11-29 Thread Fredrik Wallner
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..

Re: [Open Babel] error with complin

2016-11-29 Thread Fredrik Wallner
chi/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 f

Re: [Open Babel] error with complin

2016-11-29 Thread Fredrik Wallner
gt; 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 ac

Re: [Open Babel] error with complin

2016-11-29 Thread Fredrik Wallner
hammad > > > > 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

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 (”cond

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

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 di

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 instal

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,

Re: [Open Babel] conversion AddOption doesn't work

2017-05-08 Thread Fredrik Wallner
ens 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 t

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 >

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

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

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 O

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.

Re: [Open Babel] Issue

2018-01-16 Thread Fredrik Wallner
* [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 > &

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

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

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

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 in

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

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