Re: [Open Babel] extract a single compound from a multimolecular sdf

2017-11-05 Thread David Hall
t; 9782 is not the 9782th molecule in the file. > I also will have to loop through sdf for various other numbers. I asked this > as an example. > > Thanks, > Sundar > > On Sun, Nov 5, 2017 at 7:13 PM, David Hall <mailto:li...@cowsandmilk.net>> wrote: > Assuming you

Re: [Open Babel] extract a single compound from a multimolecular sdf

2017-11-05 Thread David Hall
Assuming you want the 9782’th molecule in the file, using the -f and -l options to obabel is what you are looking for. obabel ../input/in-3D.sdf -O 9782.sdf -f 9782 -l 9782 > On Nov 5, 2017, at 7:49 PM, Sundar wrote: > > Hi, > > I was trying to extract a single molecule from a multimolecular

Re: [Open Babel] gen3d doesn't convert all compounds

2017-10-25 Thread David Hall
gs on Stereochemistry of the molecules and using distance > geometry method instead. > > Thanks, > Sundar > > On Fri, Oct 13, 2017 at 5:56 PM, Sundar Jubilant <mailto:jubilantsun...@gmail.com>> wrote: > Yes. > > Sundar Thangapandian > > On Oct 13, 2017,

Re: [Open Babel] gen3d doesn't convert all compounds

2017-10-13 Thread David Hall
I assume your second command is actually using output2D.sdf as input? -David > On Oct 13, 2017, at 3:46 PM, Sundar wrote: > > Sure. > Here it goes. > > obabel input.smi -h -r -b -c --unique --gen2d --partialcharge mmff94 -O > output2D.sdf > obabel output3D.sdf --gen3d -O output3D.sdf > > out

Re: [Open Babel] suppress "molecule converted" message to the screen

2017-10-02 Thread David Hall
It is printed on stderr , so 2> is the appropriate syntax for a shell type call. Or you can use Capture::Tiny to capture all output http://search.cpan.org/~dagolden/Capture-Tiny-0.46/lib/Capture/Tiny.pm > On Oct 2, 2017, at 11:36 AM, Jose Gascon wrote: > > Greetings > > I have a perl script

Re: [Open Babel] Confab not generating structures

2017-09-07 Thread David Hall
Your molecule has a lot of rotatable bonds and the ability to easily clash with itself. And you are generating very few potential conformations out of the space (less than 1% of the space, or when you ask for 10,000 as in the command, not your output, less than 0.1% of the space). For this molecule

Re: [Open Babel] how to use CMAKE_PREFIX_PATH with openbabel

2017-06-07 Thread David Hall
since FindOpenBabel2.cmake uses pkg-config, you can do something like PKG_CONFIG_PATH=~/opt/lib/pkgconfig/ cmake .. That said, I believe there may a better way to link to openbabel with cmake using the files in: ~/opt/lib/cmake/openbabel2/ but I don't know what that is. On Jun 7, 2017, at 4:22

Re: [Open Babel] How to run readstring in pybel?

2017-05-07 Thread David Hall
That is still the wrong pybel. You should uninstall it (i.e. pip uninstall pybel ) > On May 7, 2017, at 10:38 PM, Peng Yu wrote: > > Hi, I should have installed the correct one. But readstring() is not > available. > print pybel.__dict__.keys() > ['to_bel_path', 'from_json', 'from_cx_pa

Re: [Open Babel] problem with open babel install

2017-03-11 Thread David Hall
It appears you are trying to compile 2.3.1 which was released 5.5 years ago. First suggestion would be to use 2.4.1 which has much improved support for modern versions of OS X https://github.com/openbabel/openbabel/releases -David > On Mar 10,

Re: [Open Babel] Using pybel.readstring() and using pybel in Python 2.7

2017-03-09 Thread David Hall
Quoting from Matt Swain a couple weeks ago: > pip install pybel is not correct. That's an unrelated package. Instead, do > pip install openbabel -David > On Mar 9, 2017, at 8:29 AM, Quim Aguirre wrote: > > Hello, > > I am new at using Open Babel software. My intention is to use "Pybel" to

Re: [Open Babel] OpenBabel for Python 3?

2017-02-19 Thread David Hall
My guess is that your python3 is not at /usr/bin/python3 . Are you sure it isn't at /usr/local/bin/python3 ? Based on your Python.framework information, that would seem to be likely where it is. On that note, we should consider printing an error if the detected version of python is 1.4 ; that mean

Re: [Open Babel] Batch minimization of ligands

2016-12-27 Thread David Hall
I would iterate over the molecules using pybel, calling localopt on each molecule http://open-babel.readthedocs.io/en/latest/UseTheLibrary/Python_PybelAPI.html?highlight=pybel#pybel.Molecule.localopt On Wed, Dec 21, 2016 at 2:01 PM, ishan wrote: > Dear All, > > I have prepared ligands in chemsk

Re: [Open Babel] g++ can't find "openbabel/obconversion.h"

2016-11-20 Thread David Hall
You need libopenbabel-dev > On Nov 20, 2016, at 6:50 PM, James Johnson wrote: > > I installed openbabel on ubuntu using: sudo apt-get install openbabel > -- ___ OpenBabel-d

Re: [Open Babel] Build a pdb molecule. problem to provide the atoms name

2016-11-18 Thread David Hall
Residue->SetAtomId(atom, string) http://openbabel.org/api/2.3/classOpenBabel_1_1OBResidue.shtml#ad4945233e0066b2b6fbfbe0ed73ae7bc -David > On Nov 18, 2016, at 8:27 AM, ivan petit wrote: > > Hi, > > I’m trying to write a pdb file by using OBMol, OBAtom,... class in c++. > I only have a probl

Re: [Open Babel] Java bindings for openbabel 2.4.0

2016-10-05 Thread David Hall
I believe swig is needed for creating java (and python) bindings and it says swig was not found -David > On Oct 4, 2016, at 8:10 PM, Jason Ott wrote: > > Hello all! > > I have been trying all day to build the java bindings for open babel. I have: > installed through mac ports, > downloaded s

Re: [Open Babel] Converting PDB to SMILES and matching atom orders

2016-08-31 Thread David Hall
It is a bit of a hack, but for certain applications where I know it is likely fine, I use networkx to do subgraph isomorphism while considering only the elements and not looking at the order of the bonds. I can trivially draw a molecule where this does the wrong thing, but the majority of the time,

Re: [Open Babel] OpenBabel for Python 3?

2016-08-09 Thread David Hall
do you have python3-dev installed? > On Aug 9, 2016, at 12:57 PM, John wrote: > > PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7 -- What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns

Re: [Open Babel] OpenBabel for Python 3?

2016-08-09 Thread David Hall
If you use the version of openbabel from git (which I would recommend over for the 2.3.2 release), then you can just specify PYTHON_EXECUTABLE as the python3 and it should find everything correctly. $ git clone https://github.com/openbabel/openbabel.git $ cd openbabel $ mkdir build $ cd build $ cm

Re: [Open Babel] GAFF2 in babel?

2016-07-14 Thread David Hall
Is there documentation beyond the Amber source code? Do you know if the difference is just using gaff2.dat instead of gaff.dat? On Wed, Jul 13, 2016 at 4:58 PM, Albert wrote: > Hello: > > I noticed that GAFF2 is released in recent Amber 16. I am just wondering > how can we implement it to open

Re: [Open Babel] GAFF2 in babel?

2016-07-14 Thread David Hall
n. On Thu, Jul 14, 2016 at 9:54 AM, David Hall wrote: > Is there documentation beyond the Amber source code? Do you know if the > difference is just using gaff2.dat instead of gaff.dat? > > > > On Wed, Jul 13, 2016 at 4:58 PM, Albert wrote: > >> Hello: >> >>

Re: [Open Babel] Unable to import pybel in Python

2016-07-08 Thread David Hall
The below is dependent on how you import pybel you did "import pybel", which imports the pybel functions with a "pybel." prefix as shown in your efforts to run things. Some of the examples in the documentation implicitly do "from pybel import *" so the functions are imported without a prefix.

Re: [Open Babel] SMARTS query

2016-03-29 Thread David Hall
I’m confused by why there is -!: Your description suggests this to me: [cH]1[cH]n[cH][cH]c1[r5] It at least looks nice on http://smartsview.zbh.uni-hamburg.de/smartsview/calculate?method=get > On Mar 29, 2016, at 6:33 AM, Gravestock David GBJH > wrote: > > Good day, > > I wonder if s

Re: [Open Babel] - problem with PHP script

2016-03-18 Thread David Hall
Have you tried setting enable_dl to on? http://php.net/manual/en/info.configuration.php#ini.enable-dl Or adding it as an extension that is loaded when PHP starts? http://php.net/manual/en/ini.core.php#ini.extension Note, with either options, you probably need to restart the web server after ea

Re: [Open Babel] pybel.write() produces truncated pdbqt? (R. K. Belew)

2015-08-04 Thread David Hall
It seems I can reproduce the segfault on OS X Yosemite, but not on Ubuntu 14.04. -David > On Aug 4, 2015, at 8:02 PM, R. K. Belew wrote: > > update, if anyone is interested: it seems quite clear the > bug is in the PDBQT output filter: > >>> obabel file1.pdbqt -O file2.pdbqt >>> Segmentation

Re: [Open Babel] Partial charge on OSX system

2015-07-06 Thread David Hall
As far as I know, the current ibabel ( http://www.macinchem.org/ibabel/ibabel3.php ) requires that you install openbabel first. Have you checked that the command line openbabel has the qeq charges? -David > On Jul 3, 2015, at 1:34 AM, Guoyi Li w

Re: [Open Babel] Converting Smiles to XYZ coordinates

2015-04-02 Thread David Hall
questions on this (like all questions) should go to mailing list; I have never looked at how gen3D is implemented or the minimizer that presumably is giving this error, so I am of no help. -David > On Apr 2, 2015, at 10:25 PM, Matthew Guberman wrote: > >Thanks David for your help. I, how

Re: [Open Babel] Converting Smiles to XYZ coordinates

2015-04-02 Thread David Hall
You didn’t tell open babel to generate coordinates. It appears to did tell it to add hydrogens Telling it to generate 3D coordinates: $ obabel -:'[S@]1(C)[Au][S@]([Au][S@](C)[Au][S@]([Au]1)C)C' -oxyz -h --gen3D 24 S -2.62740 -0.178950.14170 C -2.95652 -0.069

Re: [Open Babel] Protonation issues in 2.3.2 version

2015-03-20 Thread David Hall
both these molecules perform as expected in the latest code on github. https://github.com/openbabel/openbabel -David On Thu, Mar 19, 2015 at 9:42 AM, ggbs wrote: > Dear Users, > > I repropose a problem I already mentioned some time ago. > > I am using openbabel to protonate molecules from sdf

Re: [Open Babel] error by installing open babel for mac

2015-03-20 Thread David Hall
Can you tell us what is in ob-src? Presumably it does not have CMakeLists.txt ... That is, what does $ ls ../ob-src say? -David On Mon, Mar 16, 2015 at 1:08 PM, Allassane Camara < allassane.cam...@minddivision.net> wrote: > I used this link for my installation: > http://openbabel.org/wiki/I

Re: [Open Babel] Confab algorithm for openbabel conformer search

2015-01-08 Thread David Hall
using openbabel from github Confab requires a 3D molecule as input, so I generate a 3D sdf of butane and feed it into confab, which generates 2 conformers, the anti- and one of the gauche- conformers. (If you loosen up the RMSD criteria, the other gauche conformer is the third below the energy

Re: [Open Babel] obabel removes atom names

2014-12-08 Thread David Hall
(a) what formats are you converting to and from? (b) I believe openbabel master ( https://github.com/openbabel/openbabel/ ) has better support for this in mol2->pdb->mol2 than the current released version,so if you aren't using that, please give it a try. -David On Mon, Dec 8, 2014 at 7:27 PM, Be

Re: [Open Babel] Smaller static OB for py2exe?

2014-11-28 Thread David Hall
Can you just set the BABEL_LIBDIR environment variable in your python script before you import pybel or openbabel? -David > On Nov 28, 2014, at 7:03 AM, Mathias Laurin wrote: > > Hi, > > > I am including Open Babel in a Python program of mine that I > distribute as an exe file to Windows us

Re: [Open Babel] PDB residue id with obabel

2014-11-04 Thread David Hall
have you used openbabel master from github? Quickly testing, it does not seem to have this problem. -David On Tue, Nov 4, 2014 at 4:35 PM, Mezei, Mihaly wrote: > Greetings, > > I executed > > obabel -ipdb rec0.pdb -xr -p 5.0 -opdbqt > HS0_rec.pdb > > and noticed that the residue id has been sh

Re: [Open Babel] Molecular Analysis 'Scanning'

2014-11-03 Thread David Hall
You also have to call the function to generate 3d coordinates. 1) read smiles into ormolu 2) generate 3d coordinates 3) you can loop over atoms and have coordinates I think if you don’t generate the coordinates, they’ll all be 0,0,0 -David > On Nov 3, 2014, at 8:28 AM, Nathan Pimental wrote: >

Re: [Open Babel] SVG draws unwanted extra hydrogens

2014-09-26 Thread David Hall
You can put brackets around the carbon in carbon monoxide and not get the hydrogen. Otherwise, smiles specifies that carbon must have 4 bonds, so you need a hydrogen to fill the fourth bond. Note, you'll probably now have a little dot next to the carbon. I have no idea how to get rid of that. On

Re: [Open Babel] chirality and SMARTS pattern matching

2014-07-09 Thread David Hall
Development version is on openbabel. https://github.com/openbabel/openbabel/ -David > On Jul 9, 2014, at 3:10 PM, Stefano Forli wrote: > > Hi, > > thanks for the replies. > > Craig, I think I understood what you meant with the incomplete chiral > description and it > makes sense with the m

Re: [Open Babel] chirality and SMARTS pattern matching

2014-07-09 Thread David Hall
I meant to say github -David > On Jul 9, 2014, at 3:10 PM, Stefano Forli wrote: > > Hi, > > thanks for the replies. > > Craig, I think I understood what you meant with the incomplete chiral > description and it > makes sense with the matches returned. > Although, patterns 1 and 2 should not

Re: [Open Babel] Fwd: C++ / segfault / "open file" change?

2014-07-04 Thread David Hall
Hi Paolo, Can you possibly look into what I describe in my message at http://sourceforge.net/p/openbabel/mailman/message/31507998/ Testing today, 20,081 out of 24,867 molecules from VEHICLe cannot be roundtripped through the mol2 format in openbabel and be preserved. removing the lines of code

Re: [Open Babel] Creating an OBMol by hand in C++

2014-05-07 Thread David Hall
Never written something like this, but briefly looking at some code in openbabel for reading molecules, you should do atom = obMol.NewAtom(); At the beginning of each loop. Your code looks like it is just due referencing an unset pointer, so no surprise it segfaults. You maybe also have to do

Re: [Open Babel] Help to conversion format cif_to_pdb

2014-04-14 Thread David Hall
Can you explain what parts of the file are not compatible that you are looking at? Residue numbering? Temperature Factors? Testing briefly, it appears the coordinates agree, so knowing that fields you are looking to preserve would be useful. -David On Sat, Apr 12, 2014 at 3:20 PM, Wellisson Gonç

Re: [Open Babel] How to get PNG support in OpenBabel/Pybel in Centos?

2014-04-11 Thread David Hall
Hi Carolina, Try making a change like shown in this commit to the draw function in pybel.py : https://github.com/openbabel/openbabel/commit/df59c4a630cf753723d1318c40479d48b7507e1c Then, your original python code will hopefully work. -David On Fri, Apr 11, 2014 at 6:58 PM, Carolina Román Sa

Re: [Open Babel] Open Babel

2014-02-27 Thread David Hall
Not sure what you're acting exactly. You can specify isotopes in smiles ( http://daylight.com/dayhtml/doc/theory/theory.smiles.html ). If you want images of the structures that show what is an isotope, you can compare the images produced by these two commands. $ obabel -:C[14C]C[14C] -O isotope.pn

[Open Babel] IsHetAtom

2014-02-19 Thread David Hall
Hi, Playing with some PDBs for the first time with openbabel and I want to know if a particular atom is a HETATM record. Starting from a pybel.Atom, it seems I have to do a.OBAtom.GetResidue().IsHetAtom(a.OBAtom) Is this the best way? Just seems a little obtuse going through the Residue and the

Re: [Open Babel] running Open Babel in parallel / distributed mode

2014-02-04 Thread David Hall
An example for gnu parallel $ parallel -L1000 -k obabel -:{} -osdf --gen2D < gdb11_size09.smi > gdb11_size09.sdf I've taken the gdb11 molecules of size 9, which are 444,313 molecules. Using -L1000 , parallel reads 1000 lines at a time and passes them into openbabel for conversion to sdf By using

Re: [Open Babel] make uninstall target

2014-02-03 Thread David Hall
cmake does not have make uninstall by default . cmake's position is that you should run $ http://www.cmake.org/Wiki/CMake_FAQ#Can_I_do_.22make_uninstall.22_with_CMake.3F -David On Sun, Feb 2, 2014 at 10:56 PM, Francois Berenger wrote: > Hello, > > It would be nice to have one since there is

Re: [Open Babel] How to use openbabel_java library on linux

2014-01-09 Thread David Hall
http://openbabel.org/docs/current/UseTheLibrary/Java.html#macosx-and-linux Does that not work? -David On Jan 9, 2014, at 3:07 AM, 강경태 wrote: > my java project used System.loadLibrary("openbabel_java") > > in window openbabel.jar native path --> openbabel_java.dll > > how to use linux?? > >

Re: [Open Babel] [OpenBabel-scripting] question about pybel for python 3.x

2014-01-04 Thread David Hall
I'm not sure what exactly you're tying to accomplish, but Geoff pointed out that openbabel has a pkg-config file, which is what most people would use. On a typical system install, the file is installed at /usr/lib/pkgconfig/openbabel-2.0.pc (or an architecture dependent equivalent). Rather than loo

Re: [Open Babel] error in installation

2013-12-09 Thread David Hall
Maybe I am stating the obvious, but does that directory exist? Do you have the source for openbabel in that directory? -- David Hall On Saturday, December 7, 2013 at 8:05 AM, Gaurav Pandey wrote: > I tried installing Openbabel-2.3.2, in my Ubuntu 13.04 machine, but its > giving fol

Re: [Open Babel] isotopes

2013-11-14 Thread David Hall
It seems you want a list of the isotopes for a particular element? Looking at the C++ code for openbabel, it seems like this might be easy to expose, but for now, if you have a guess about the range of the function you can get something in python fairly quickly: In [1]: import openbabel In [2]: f

Re: [Open Babel] obspectrophore error: not enough atoms in molecule

2013-11-07 Thread David Hall
I know nothing about what spectrophores are, but I can tell you all the molecules you provided have 2 atoms. The code for spectrophores checks if your molecule has at least 3 atoms. And gives you the error you've listed if your molecule has less than 3 atoms: https://github.com/openbabel/openbabel

Re: [Open Babel] MacOsX 10.8, Python 3 bindings

2013-10-21 Thread David Hall
d out where the python libraries are, and modified the > suggestion of David Hall accordingly. > > However, python 3 bindings are still not installed. (installer still > installs the python 2.7 bindings, but skips the python3 bindings) > > > > > > cmake -DPYTHON_BI

Re: [Open Babel] MacOsX 10.8, Python 3 bindings

2013-10-19 Thread David Hall
I would try something like this, but modified for the mac: cmake -DPYTHON_BINDINGS=ON -DRUN_SWIG=ON -DPYTHON_LIBRARY=/usr/lib/python3.2/config/libpython3.2.so -DPYTHON_INCLUDE_PATH=/usr/include/python3.2 -DPYTHON_EXECUTABLE=/usr/bin/python3.2 ../openbabel-2.3.1 I don't actually know whether openba

[Open Babel] python access to default data dir and lib dir

2013-10-17 Thread David Hall
Hi all, In matploblib, if I want to do where the datadir is, I can do: >>> import matplotlib >>> matplotlib._get_data_path() '/usr/lib64/python2.7/site-packages/matplotlib/mpl-data' And see where matplotlib has put its data. Is there something similar for openbabel's python library where I can s

Re: [Open Babel] reading mol2 breaks aromaticity in 1, 5, 6, 7-Tetrahydro-4-indolone

2013-10-10 Thread David Hall
the can->mol2 transition. Since the behavior of directly going can->can did not change in between versions, nor did the intermediate mol2 files during can->mol2->can, the increase in failures by 20,000 (out of a set of ~25,000 aromatic heterocycles) is likely due to changes in the mol

[Open Babel] reading mol2 breaks aromaticity in 1, 5, 6, 7-Tetrahydro-4-indolone

2013-10-09 Thread David Hall
Hi all, I just wanted to mention a bug I filed this morning: https://sourceforge.net/p/openbabel/bugs/897/ Basically this patch to the mol2 reader: https://github.com/openbabel/openbabel/commit/097636fd7cdba1c842d27a80ccab809c558d0b98#diff-d6e9941b72192e2ba1a2d244948450ae breaks aromaticity for

Re: [Open Babel] GUI Crashes & Command line errors

2013-07-28 Thread David Hall
Can you point us to which file from ZINC? -David On Jul 22, 2013, at 7:03 PM, JHela001 wrote: > Hi All, > > I'm attempting to convert either .mol2 or .sdf to .smi from the zinc > database. > > Using the openbabel GUI, simply opening a file (which contains >100k > compounds) crashes the GUI. >

Re: [Open Babel] openbabel + confab

2013-03-19 Thread David Hall
I added a confab branch to my repository: https://github.com/cowsandmilk/openbabel/tree/confab It has just the confab changes, based on current openbabel/master branch -David On Mon, Mar 18, 2013 at 5:25 PM, Noel O'Boyle wrote: > Hi David, > > Can you put all of the Confab-related code on a bra

Re: [Open Babel] openbabel + confab

2013-03-15 Thread David Hall
While the tree.hh website says GPLv2 or GPLv3, the downloaded code says GPLv3. Looking at the history of tree.hh, there are older versions that say v2 or v3, but then at some point he switched to specifying GPLv3 in his code files, a change that makes me uncomfortable with listening to the website.

[Open Babel] openbabel + confab

2013-03-11 Thread David Hall
Hi all, For some internal purposes, I wanted a combined openbabel/confab code base, so I merged them. If anyone else is interested, I've posted the merge with openbabel HEAD on a fork at https://github.com/cowsandmilk/openbabel/commit/3b782c0d726ad1e35b508cda29abb6bebfe527bb Additionally, if you

Re: [Open Babel] Cannot create objects using C++ API

2013-02-12 Thread David Hall
You have conv->Write It should be conv.Write , just like how you have conv.Read -David On Feb 12, 2013, at 8:48 AM, Peter wrote: > "You need to replace it by a ." > - Sorry I dont get that. Can you please elaborate this. > > Thanks, > Peter > > > > -- > View this message in context: >

Re: [Open Babel] Babel works in shell but not in PHP

2012-02-06 Thread David Hall
Also, I should add, you should see whether your PHP is using safe mode. As described at http://php.net/manual/en/ini.sect.safe-mode.php#ini.safe-mode-exec-dir , safe mode can be used to restrict what directories one can execute programs from. -David On Mon, Feb 6, 2012 at 11:51 AM, David Hall

Re: [Open Babel] Babel works in shell but not in PHP

2012-02-06 Thread David Hall
are the environment variables correct? As in, to run it on the command line, do you have special PATH or other settings? If so, you should use http://www.php.net/putenv to put those variables into the PHP script. -David On Tue, Jan 31, 2012 at 4:25 AM, Sangeetha Subramaniam wrote: > Dear All,