doyle-lab-ucla / auto-qchem

Auto-QChem is an automated workflow for the generation and storage of DFT calculations for organic molecules.
https://doyle-lab-ucla.github.io/auto-qchem/
GNU General Public License v3.0
84 stars 18 forks source link

Abnormal molecule structure #2

Closed Yujikaiya closed 1 year ago

Yujikaiya commented 3 years ago

I installed auto-qchem according to installation instructions (Windows), and run example notebook "framework_functionality_test.ipynb", but generated chemical structure is highly distorted.

image

Is it common error when using Openbabel for molecular conformation generaion?? (I do not have experience using Openbabel for such purpose.)

How can I fix it?? (Installing different version of OpenBabel or using Linux instead of Windows?)

Here is my environment.

zuranski commented 3 years ago

Hello,

The structure does not look normal. This sometimes happens when the python wrapper is installed, but it does not point to an installation of openbabel in the Windows system.

To check that please verify that BABEL_DATADIR points to an actual installation

import os
os.environ['BABEL_DATADIR']

If not, please remove the openbabel from conda, intall openbabel for Windows from https://github.com/openbabel/openbabel/releases/tag/openbabel-2-4-1 and reinstall openbabel in conda.

Yujikaiya commented 3 years ago

Thank you very much!! Maybe I installed python wrapper first and that was the problem.

I could not fix it even though I removed openbabel from conda and reinstalled it, but I fixed by manually setting enviroment variable in notebook with codes below.

import os os.environ['BABEL_DATADIR'] = r"C:\Users\xxxx\AppData\Roaming\OpenBabel-2.4.1\data"

The directry of 'BABEL_DATADIR' was found by using windwos command prompt with command below.

echo %BABEL_DATADIR%

Finally I can get the reasonable structure!

image