geem-lab / pnictogen

⚛️ A Python library and a command-line tool that creates input files for computational chemistry packages
https://pypi.org/project/pnictogen/
MIT License
17 stars 4 forks source link

AttributeError: 'module' object has no attribute 'OBConformerSearch' #6

Closed schneiderfelipe closed 5 years ago

schneiderfelipe commented 6 years ago

Some tests at Travis are failing due to:

AttributeError: 'module' object has no attribute 'OBConformerSearch'

It seems that the OpenBabel version provided by Travis (libopenbabel4 amd64 2.3.2+dfsg-1.1 and libopenbabel-dev amd64 2.3.2+dfsg-1.1 at Ubuntu 14.04.5 LTS) has no support for conformer search.

berquist commented 6 years ago

I searched through the Open Babel code + wrapper and had a hard time figuring it out. I think I'm using 2.4.1 locally and also have this problem. Do you know which version you're using?

schneiderfelipe commented 6 years ago

I remember now. I compiled version 2.4.1 with Eigen (libeigen2-dev). From here,

(...) The following are optional when compiling Open Babel, but if not available some features will be missing: (...)

  • Eigen version 2 or newer is required if using the language bindings in the release. In addition, if it not present, some API classes (OBAlign, OBConformerSearch) and plugins (the QEq and QTPIE charge models, the --conformer and --align operations) will not be available.

(...)

I get no errors when I run python setup.py -v nosetests locally (complete output here):

Ran 18 tests in 9.536s

OK

I'm not sure here. Should we remove support for conformer search? Or should we use a try ... except to test if support exists?

berquist commented 6 years ago

If you want the conformer search to stay a part of the project, then it should be tested. Either

  1. Open Babel can be compiled from source rather than using the old package manager version, or
  2. maybe a version on conda exists that has been compiled this way.

Option 1 is not great since it takes so long. I can investigate number 2, and maybe make a new conda package if the right one doesn't exist.

On the other hand, conformer search is tested, but the test doesn't necessarily have anything to do with template generation. Maybe a try/except, or if nose has skip functionality. I don't really know.

schneiderfelipe commented 6 years ago

Great, I will try something along try/except or skip, but I don't have much familiarity with conda packages.

schneiderfelipe commented 5 years ago

Since I delegated molecule manipulation to pyrrole, features like this one should be added there. I plan to have it in the future, but I think we're OK without it now.