Commit Graph

155 Commits

Author SHA1 Message Date
Noel O'Boyle
13fbcc822b Initial changes 2019-02-27 21:06:04 +00:00
Christoph Hille
56776d15a6 Using pillow instead of PIL
The problem of PIL: the latest version is of 2009 and so there are dependency problems with the new version of numpy and matplotlib
I'm using python2.7 and conda. With pillow there are no dependency problems with the newest numpy and matplotlib versions and "the molecule drawing functianality" works well (y)
2018-04-18 00:02:59 +02:00
Eloy Felix
336abe5694 removed OASA comment. OASA is not used anymore for 2D coordinates generation 2018-02-04 20:48:22 +00:00
Eloy Felix
4baf8a674b add Molecule.make2D function, fixed test 2018-01-24 17:30:14 +00:00
Eloy Felix
06e233e2ca add Molecule.make2D function 2018-01-24 16:49:44 +00:00
Noel O'Boyle
d11d460514 Merge pull request #1673 from Acpharis/pybel_bytes_filename
Use isinstance to test if filename is bytes. Fixes #1615.
2017-10-26 16:37:53 +01:00
David Hall
3194850fc3 use isinstance to test if filename is bytes
Address #1615 by testing if filename is an instance of bytes and use a
bytes suffix in that case. This seems to be the approach used in cpython
source code, so I take it for being pythonic at the moment. (e.g.
https://github.com/python/cpython/blob/3f9183b/Lib/posixpath.py#L119 )
2017-10-24 08:31:28 -04:00
Thomas Heavey
5830d0c2f1 clarified required use of OBMol object
While running the code as given originally would work, the re`import` of openbabel made it seem that the second and third examples would work independently when in fact they won't without defining `mol = openbabel.OBMol()`.
2017-10-06 15:00:39 -04:00
Karol M. Langner
4c3fe03b57 Avoid IndexError for plugins with empty names 2016-12-10 22:03:43 -08:00
Matt Swain
72be31f3fa Python setup.py fixes for 2.4.0 release
This commit contains a few minor changes to the Python setup.py file that is used for independent installation of the Python bindings.

- Version bumped to 2.4.0 to match the main Open Babel version.
- The custom install command sublcass was fixed to just call the superclass install method after the extra build_ext command. This resolved an issue with running bdist_wheel.
- `zip_safe` changed to `False`, so running `python setup.py install` behaviour is more like `pip install openbabel`.
2016-09-23 21:59:16 +01:00
Matt Swain
41337524ba Fix swig include_dirs+library_dirs in setup.py
distutils/setuptools now appear to add some default SWIG `include_dirs` and `library_dirs`, so we should append the openbabel paths to these lists rather than overwriting them entirely.
2015-08-15 18:34:49 +01:00
Geoff Hutchison
98f4465a50 Merge branch 'ipython' of https://github.com/patrickfuller/openbabel into patrickfuller-ipython
Conflicts:
	scripts/python/pybel.py
2015-04-28 14:06:26 -04:00
Geoff Hutchison
b4c645ae4d Merge pull request #140 from mcs07/pythonswig
Remove duplicate swig files
2015-04-19 19:02:26 -04:00
Matt Swain
0c368799f7 Remove duplicate swig files
- Remove the duplicate swig interface files from the `python` directory.
- Remove the rule specifying those files from `MANIFEST.in`.
- Modify `setup.py` to pull in the interface files from the parent directory when preparing the distrubution using `sdist`.
- Add the rule `exclude openbabel.py` to `MANIFEST.in`, to help prevent accidentally including a copy of the resulting swig bindings in the source distribution.
- Bump the python bindings version number to 1.8.2 to allow these changes to be pushed to PyPI.
2015-04-10 14:21:46 +01:00
Patrick Fuller
f070fdde9b Pybel _repr_svg_ cleans up openbabel svg to match IPython requirements 2015-04-06 21:35:47 -05:00
Patrick Fuller
0cc3e4e822 Switched 3d rendering to pip dependency 2015-04-06 20:54:46 -05:00
Geoff Hutchison
81caf8f8fd Fix permissions on scripting interfaces. 2015-02-15 10:41:28 -05:00
Maciek Wójcikowski
08f2b2703d Check for gz in extension and compress output if necessary 2015-02-12 10:12:30 +01:00
Maciek Wójcikowski
62b32d14ce Make clones of OBMol before displaying to prevent changes in coordinates 2015-01-19 15:38:02 +01:00
Patrick Fuller
4a7966cc85 setup.py now 2/3 compatible 2014-11-02 21:42:46 -06:00
Patrick Fuller
a8ff003d8c IPython 3D view now has a draggable resizer 2014-09-10 11:37:36 -05:00
Patrick Fuller
7fa5c42e31 Updated IPython rendering to use v2.0 style, now works on nbviewer and on local machines 2014-08-24 12:54:59 -05:00
Geoff Hutchison
5f083787cf Fix pybel test failure by renaming expected output to UNL from LIG 2014-03-15 15:59:37 -04:00
Matt Swain
668e5f8179 Bump python bindings version to 1.8.1 2014-01-28 17:02:31 +00:00
Matt Swain
9962917d9d Add more info to python README and revert package name change
Change the python bindings package name back to 'openbabel', but make clear in the Python README that this is just the python bindings, not the main Open Babel library, just in case anyone stumbles across the PyPI page by accident.
2014-01-28 10:48:59 +00:00
Matt Swain
099f67badb Change python bindings package name to openbabel-python 2014-01-24 11:11:52 +00:00
Matt Swain
e65bf4bfbc Make pkg-config check more robust and allow manual override
Add a sensible fallback if pkg-config fails to locate the Open Babel include and library directories, and a helpful error message if that fallback also fails.

Allow Open Babel include and library directories to be manually specified as command line options to setup.py using the build_ext command with -I and -L options.
2014-01-20 18:22:13 +00:00
Matt Swain
d6a44bcd40 Ensure build_ext runs before build_py
The setup.py build and install commands run a number of subcommands, including build_ext, which runs SWIG to generate openbabel.py, and build_py, which copies openbabel.py and other python sources to the build directory.

The default ordering is for build_py to be run before build_ext, causing errors as build_py attempts to copy openbabel.py before it exists. This change ensures build_ext is always run first at the start of both the build and install commands.
2014-01-20 18:07:07 +00:00
Matt Swain
b94f4b7f83 Add proper python README
- Convert README to restructuredtext format so it displays correctly on PyPI
- Update email address to current mailing list
- Tidy up setup.py
2014-01-20 17:58:42 +00:00
Patrick Fuller
668536d591 Improved error messages of calccharges 2014-01-15 10:52:34 -06:00
Patrick Fuller
1612e84ef9 Small fix 2014-01-15 10:16:39 -06:00
Patrick Fuller
e5ef11f521 Improvements to proposed pybel charge method 2014-01-15 10:05:46 -06:00
Patrick Fuller
843ecae262 Added a charge function 2014-01-14 13:04:55 -05:00
S. Joshua Swamidass
42335bd889 missed setup.py in last committ 2014-01-05 08:57:27 -10:00
S. Joshua Swamidass
3cf839f34e Rewrote setup.py so that it can independentley install python bindings. Symbolic links to swig files added to enable this. 2014-01-05 08:51:47 -10:00
Patrick Fuller
e0b2dc2c67 Changed url of 3d molecule viewer 2013-12-24 13:03:37 -05:00
Patrick Fuller
d869efe9ac Reduced footprint of 3D ipython rendering 2013-12-23 16:24:52 -05:00
Patrick Fuller
d02d57f3f9 2D/3D toggle now accessible by pybel.ipython_3d boolean 2013-12-09 09:38:12 -06:00
Patrick Fuller
995326303f pybel.py made PEP8 compliant 2013-12-08 20:49:10 -06:00
Patrick Fuller
d4826d10c3 Rough implementation of Javascript IPython rendering 2013-09-29 17:48:43 -05:00
Maciek Wójcikowski
9c5bad432e Fix documentation of residues in pybel 2013-03-20 13:33:34 +01:00
Geoff Hutchison
e4804d9c26 Merge pull request #1 from mwojcikowski/master
Fix missing LPMD file in src/format
2013-03-15 11:10:28 -07:00
Maciek Wójcikowski
7c8a9b6327 Pybel residue support 2013-03-06 13:26:38 +01:00
Björn Grüning
006a9351ad add ConvertDativeBonds to pybel 2013-03-05 23:37:00 +01:00
Noel O'Boyle
df59c4a630 Drat! Trival fix to re-enable Molecule.draw() after recent changes to PNG2. 2012-10-29 15:26:47 +00:00
Reinis Danne
7366f780bb setup.py: There are no separate pybel_pyX.py files anymore 2012-10-15 12:18:03 +00:00
Noel O'Boyle
c19f75c45f scripts/python/testpybel.py: Minor fix to enable failing test to pass. Failures due to the new MOL Chiral Flag data that I stored a while ago. 2012-10-01 20:40:36 +00:00
Geoffrey Hutchison
c08b71defc Add test Python script from Andrew Dalke. 2012-07-26 19:12:40 +00:00
Noel O'Boyle
2c9aa50fef pybel.py: Fix for previous commit to remove tabs. 2012-06-26 13:49:31 +00:00
Noel O'Boyle
0e6c1f59ee Simplify installation of Python bindings: Now there is only one version of pybel.py for Py 2.x and Py 3.x. It also includes support for Jython and IronPython. 2012-06-26 13:43:25 +00:00