Giter Site home page Giter Site logo

conda-openbabel's Introduction

Open Babel

GitHub release Download Open Babel Travis CI Google Scholar Citations

Open Babel is a chemical toolbox designed to speak the many languages of chemical data. It's an open, collaborative project allowing anyone to search, convert, analyze, or store data from molecular modeling, chemistry, solid-state materials, biochemistry, or related areas.

  • Ready-to-use programs, and complete programmer's toolkit
  • Read, write and convert over 90 chemical file formats
  • Filter and search molecular files using SMARTS and other methods
  • Generate 2D and 3D coordinates for SMILES, InChI and other formats
  • Supports molecular modeling, cheminformatics, bioinformatics, organic chemistry, inorganic chemistry, solid-state materials, nuclear chemistry...

Open Babel is distributed under the GNU General Public License (GPL). This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. Full details can be found in the file "COPYING" which should be included in your distribution.

For more information, check the Open Babel website.

conda-openbabel's People

Contributors

baoilleach avatar fredrikw avatar mwojcikowski avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

conda-openbabel's Issues

cannot install openbabel.tar.bz2 from local package via conda

hi,

while I tried to install openbabel-3.1.1-source.tar.bz2 downloaded from github reopo, the local installation via conda failed.

my command used for installing package.
conda install --use-local openbabel-3.1.1-source.tar.bz2

the error reported as below

Downloading and Extracting Packages
                                                                                                                |   0% ERROR: Encountered corrupt package tarball at C:\Users\..\.conda\pkgs\openbabel-3.1.1-source.tar.bz2. Conda has left it in place. Please report this to the maintainers of the package.

could you please help to explain the issues and how can I install the openbabel locally from the package? many thanks,

Shengyang

Invalid Openbabel Installation

I tried the following on Ubuntu 18.04 and centos 7 - both under Docker and on a regular virtual machine. Both with Miniconda 3 latest and Anaconda 3 latest, and always received the same results:

conda create --name env
conda install -c openbabel openbabel

All is well. Then I try obabel -i <pdb filename> or even just babel and get a long list of

*** Open Babel Error  in openLib
  /root/anaconda3/envs/env/lib/openbabel/2.4.1/fastsearchformat.so did not load properly.
 Error: libXrender.so.1: cannot open shared object file: No such file or directory
.
.  I get this once for every *format.so in the Open Babel directory
.
Segmentation fault

When using the Python API to read a file, I get the same errors written to the terminal, and open babel fails to open the file because it doesn't know how to handle PDB files.

Is libgcc (as opposed to libgcc-ng) needed for openbabel?

I recently ran into an issue where we thought that having packages that depend on libgcc and libgcc-ng caused problems (see conda issue here). We were told to rebuild all of our dependencies that required libgcc in favor of libgcc-ng, which included openbabel. I took a look at your conda recipe for 2.4.1 (python 2.7 version shown, but python 3.7 version has the same features) and found something interesting: openbabel requires libgcc-ng to build, but libgcc instead is listed as a requirement to run.

# This file created by conda-build 3.17.7
# meta.yaml template originally from:
# /recipe, last modified Sat Jan 19 10:20:14 2019
# ------------------------------------------------

package:
    name: openbabel
    version: 2.4.1
source:
    fn: openbabel-2-4-1.zip
    patches:
        - fix_babel_test_paths.diff
        - fix_data_path.diff
        - fix_library_path_search.diff
        - python_link.diff
    sha1: 6fefb2355601b665bea5840fe8e6f95bd48023c9
    url: https://github.com/openbabel/openbabel/archive/openbabel-2-4-1.zip
build:
    detect_binary_files_with_prefix: true
    number: '5'
    string: py27_5
requirements:
    build:
        - bzip2 1.0.6 h14c3975_5
        - ca-certificates 2018.03.07 0
        - cairo 1.14.12 h8948797_3
        - certifi 2018.11.29 py27_0
        - cmake 3.12.2 h52cb24c_0
        - eigen 3.2.8 2
        - expat 2.2.6 he6710b0_0
        - fontconfig 2.13.0 h9420a91_0
        - freetype 2.9.1 h8a8886c_1
        - glib 2.56.2 hd408876_0
        - icu 58.2 h9c2bf20_1
        - krb5 1.16.1 h173b8e3_7
        - libcurl 7.63.0 h20c2e04_1000
        - libedit 3.1.20170329 h6b74fdf_2
        - libffi 3.2.1 hd88cf55_4
        - libgcc-ng 8.2.0 hdf63c60_1
        - libpng 1.6.36 hbc83047_0
        - libssh2 1.8.0 h1ba5d50_4
        - libstdcxx-ng 8.2.0 hdf63c60_1
        - libuuid 1.0.3 h1bed415_2
        - libxcb 1.13 h1bed415_1
        - libxml2 2.9.8 h26e45fe_1
        - ncurses 6.1 he6710b0_1
        - openssl 1.1.1a h7b6447c_0
        - pcre 8.42 h439df22_0
        - pip 18.1 py27_0
        - pixman 0.36.0 h7b6447c_0
        - python 2.7.15 h9bab390_6
        - readline 7.0 h7b6447c_5
        - rhash 1.3.7 h1ba5d50_0
        - setuptools 40.6.3 py27_0
        - sqlite 3.26.0 h7b6447c_0
        - swig 3.0.12 h38cdd7d_3
        - tk 8.6.8 hbc83047_0
        - wheel 0.32.3 py27_0
        - xz 5.2.4 h14c3975_4
        - zlib 1.2.11 h7b6447c_3
    run:
        - bzip2 >=1.0.6,<2.0a0
        - cairo >=1.14.12,<2.0a0
        - libgcc
        - libxml2 >=2.9.8,<2.10.0a0
        - python >=2.7,<2.8.0a0
        - zlib >=1.2.11,<1.3.0a0
test:
    commands:
        - obabel --help
        - obabel -:c1ccccc1 --gen3d -omol2
        - obabel -:c1ccccc1 --gen3d -oinchi
        - obabel -:c1ccccc1 -opng -O img.png
    imports:
        - openbabel
        - pybel
about:
    home: http://www.openbabel.org/
    license: GPLv2
    summary: A chemical toolbox designed to speak the many languages of chemical data
extra:
    copy_test_source_files: true
    final: true

Is there a reason why openbabel needs libgcc to run as opposed to libgcc-ng even though it is built with libgcc-ng? If not this is probably not something worth immediately rebuilding your packages for (our issue ended up not being directly related to this anyways), but it might be worth updating the recipe so that future builds only depend on libgcc-ng. I am not a conda expert at all but based on the feedback we got from conda it appears that they want to move away from libgcc in favor of libgcc-ng.

How should users install Open Babel using conda?

Can @mwojcikowski, @mcs07 and @njzjz tell me what instructions I should add to the website and docs for users to tell them how to install Open Babel 3.0 using conda?

Think here of the naive user. We need one official way, which one/all of you will be able to help fix if there is a problem. We can add more details about different approaches using different channels but we need to agree on an 'official' approach.

compile of developer version

hi Sorry to bother you. I suppose the developer version is the 2.5.x Does anyone can tell me how can i compile it with anaconda? i tried cloning this, but it returns me 2.4.1

Error when running from conda env python exe

Hi,

I have anaconda installed and set up an environment with openbabel. It runs great when running from anaconda however i need to run through other software where i have to set the python interpreter "C:\ProgramData\Anaconda3\envs\python3-10-9\python.exe" and that's where the problems begin. How do i get it to open the environment as a conda environment or what do i have to set in my script to get it to work?

I need it for Spotfire data functions

from the python exe

Python 3.10.9 | packaged by conda-forge | (main, Feb  2 2023, 20:14:58) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from openbabel import pybel
>>> print(pybel.readstring("smi", "CN2C(=O)N(C)C(=O)C1=C2N=CN1C").write("can"))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\envs\python3-10-9\lib\openbabel\pybel.py", line 200, in readstring
    raise ValueError("%s is not a recognised Open Babel format" % format)
ValueError: smi is not a recognised Open Babel format

How do i start python like this? keeping in mind i have to be able to set the path like this "C:\ProgramData\Anaconda3\envs\python3-10-9\python.exe"
what does anaconda run when we click "Run with Python"?

C:\Users\Administrator>conda.bat activate "C:\ProgramData\Anaconda3\envs\python3-10-9"

C:\Users\Administrator>set OLD_BABEL_DATADIR=C:\ProgramData\Anaconda3\envs\python3-10-9\share\openbabel

C:\Users\Administrator>set BABEL_DATADIR=C:\ProgramData\Anaconda3\envs\python3-10-9\share\openbabel
Python 3.10.9 | packaged by conda-forge | (main, Feb  2 2023, 20:14:58) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from openbabel import pybel
>>> print(pybel.readstring("smi", "CN2C(=O)N(C)C(=O)C1=C2N=CN1C").write("can"))
Cn1cnc2c1c(=O)n(C)c(=O)n2C

>>>

Pybel missing library

I tried installing OpenBabel via conda install -c conda-forge openbabel, and it seemed to succeed. I'm able to find the obabel binary and all of the tests in meta.yaml run just fine. However, when I try to run import pybel in python (either a Jupyter notebook or the REPL), I get

ModuleNotFoundError: No module named 'pybel'

It looks like the python bindings aren't built or just not linked to the local library. Is there a quick fix I can do for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.