(apologies: this was a reply to the discussion
Re: [Open Babel] Put atoms of target molecule in same order as reference
clicked on the wrong email).
On 07/24/2017 09:59 AM, Stefano Forli wrote:
We've been using this method [1] from an old post in Noel's blog, and it was
quite
successful.
You might have to massage your structures a bit if they're distorted and bond
order
perception gets different results between input and reference, but overall it
works pretty
well.
Needless to say, it would be good to have this streamlined and implemented as a
'blessed' method in OB.
[1]
http://baoilleach.blogspot.com/2010/11/automorphisms-isomorphisms-symmetry.html
On 07/23/2017 03:09 AM, Noel O'Boyle wrote:
Not sure, but just so you know, you will need a different wheel for
each version of Python you wish to support.
Since it works for you with a normal build and install, why not just
copy the relevant .so files out of the install and then use them to
create your wheel. That's how I create the wheels for Windows. You
just need to do this several times to create the wheels for each
version of Python (this doesn't take long once OB itself is built).
- Noel
On 17 July 2017 at 21:36, Oliver Stueker <ostue...@gmail.com> wrote:
(The previous email was sent accidentally while I was still composing)
Dear Open Babel developers and community,
I'm currently trying to build a pre-compiled Python wheel for Open Babel
2.4.1
that is to be installed on Compute Canada's HPC clusters so that users can
quickly install tested python packages into their home directory.
I have already installed Open Babel 2.4.1, which works just fine, but once I
want to use the pybel installed with "pip install ..." - either from a wheel
that I have created with "pip wheel openbabel" - or like demonstrated below
by compiling on installation, I get the error following error when testing:
"ValueError: smi is not a recognised Open Babel format"
The environment variables BABEL_LIBDIR and BABEL_DATADIR are set correctly
and when I run ldd on the `_openbabel.so`, it can find all dependencies,
as our compilers set RUNPATHs for all executables and libraries.
I have confirm with `readelf -d _openbabel.so` that the RPATH is correctly
set.
The curious thing is, that before when I installed the Python bindings with
CMake, it
worked just fine. The disadvantage with that however is that I can only
install either
the Python 2.x or 3.y bindings and that I need to set a PYTHON path in the
environment module, which can make problems when someone wants to use
a different Python version.
Having pre-compiled wheels in a wheelhouse that can swiftly be installed
in a virtual env is a much cleaner solution.
Below I demonstrate how I load my modules, show that obabel works,
create a python virtualenv in which the python bindings are installed.
When running readstring("smi", "CCCC") python will throw the error.
Does anyone have an idea where could be the problem?
Oliver
$ module load openbabel python/2.7.13
$ module list
Currently Loaded Modules:
1) nixpkgs/16.09 (S) 7) openmpi/2.1.1 (m)
2) icc/.2016.4.258 (H) 8) StdEnv/2016.4 (S)
3) gcccore/.5.4.0 (H) 9) eigen/3.3.2 (math)
4) ifort/.2016.4.258 (H) 10) boost/1.60.0 (t)
5) intel/2016.4 (t) 11) openbabel/2.4.1
6) imkl/11.3.4.258 (math) 12) python/2.7.13 (t)
$ echo CCCC | obabel -i smi -o cml -
<?xml version="1.0"?>
<molecule xmlns="http://www.xml-cml.org/schema">
<atomArray>
<atom id="a1" elementType="C"/>
<atom id="a2" elementType="C"/>
<atom id="a3" elementType="C"/>
<atom id="a4" elementType="C"/>
</atomArray>
<bondArray>
<bond atomRefs2="a1 a2" order="1"/>
<bond atomRefs2="a2 a3" order="1"/>
<bond atomRefs2="a3 a4" order="1"/>
</bondArray>
</molecule>
1 molecule converted
$ virtualenv babel
New python executable in /home/stuekero/openbabel_test/babel/bin/python2.7
Also creating executable in /home/stuekero/openbabel_test/babel/bin/python
Installing setuptools, pip, wheel...done.
$ source babel/bin/activate
(babel)$ pip --no-cache-dir install openbabel
Collecting openbabel
Downloading openbabel-2.4.1.tar.gz (74kB)
100% |####################| 81kB 6.5MB/s
Installing collected packages: openbabel
Running setup.py install for openbabel ... done
Successfully installed openbabel-2.4.1
(babel)$ python test_openbabel.py
Traceback (most recent call last):
File "test_openbabel.py", line 4, in <module>
mymol = readstring("smi", "CCCC")
File
"/home/stuekero/openbabel_test/babel/lib/python2.7/site-packages/pybel.py",
line 199, in readstring
raise ValueError("%s is not a recognised Open Babel format" % format)
ValueError: smi is not a recognised Open Babel format
(babel)$ echo $BABEL_LIBDIR
/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/intel2016.4/openbabel/2.4.1/lib/openbabel/2.4.1
(babel)$ echo $BABEL_DATADIR
/cvmfs/soft.computecanada.ca/easybuild/software/2017/avx2/Compiler/intel2016.4/openbabel/2.4.1/share/openbabel/2.4.1
(babel)$ python -c "from pybel import * ; print 'smi' in informats "
True
------------------------------------------------------------------------------
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
--
Stefano Forli, PhD
Assistant Professor
Dept. of Integrative Structural
and Computational Biology, MB-112A
The Scripps Research Institute
10550 North Torrey Pines Road
La Jolla, CA 92037-1000, USA.
tel: +1 (858)784-2055
fax: +1 (858)784-2860
email: fo...@scripps.edu
http://www.scripps.edu/~forli/
------------------------------------------------------------------------------
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