Home   Manual

Can't open a .cif file in Avogadro

I believe this to be a bug with Avogadro

Environment Information

Avogadro version: 1.93.0
Operating system and version: MacOS 11.2.3

Expected Behavior

I tried to open a .cif file.

Actual Behavior

I downloaded Avogadro from the following link (nightly.link | Repository OpenChemistry/avogadrolibs | Workflow build_cmake.yml | Branch master) but a .cif file does not appear as an acceptable file format when I try to open one.

Steps to Reproduce

Can you post a screenshot of what you do see in the list?

This is what I see on my MacBook from that version.

The default should be “All Supported Formats” or blank - either should open the CIF.

Here you go. As you can see, I don’t see an option for a *.cif file.

Huh. Those are built-in to Avogadro2, but none of the Open Babel formats are available.

If you Control-click the App you downloaded, there’s “Show Package Contents” and you can see the paths inside the binary. It should look like this:

Contents => lib => openbabel => many *.so files

In Contents => MacOS there should also be an obabel binary.

Assuming all of that checks out (and it should - we downloaded the same package), I’d want you to run it from the Terminal to see what kind of error messages come up, something like:

~  /Applications/Avogadro2.app/Contents/MacOS/Avogadro2

(Whatever the path to the Avogadro2.app bundle that you want to run. You’ll get something like this.)

Locale:  "en_US"
"/Applications/Avogadro2.app/Contents/translations"
Extension plugins dynamically found... 35
Checking for  "commands"  scripts in "/Users/ghutchis/Library/Application Support/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/Library/Application Support/OpenChemistry/Avogadro/commands"
Checking for  "commands"  scripts in "/Applications/Avogadro2.app/Contents/Resources/commands"
Checking for  "commands"  scripts in "/Applications/Avogadro2.app/Contents/MacOS/../lib/avogadro2/scripts/commands"
OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L formats read"
OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L formats write"
OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L forcefields"
OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-V"
"/Applications/Avogadro2.app/Contents/MacOS/obabel"  found:  "/Applications/Avogadro2.app/Contents/MacOS/obabel: Open Babel 3.1.0 -- Sep  6 2020 -- 15:40:59"

Thanks.

In Contents => MacOS there is indeed an executable “obabel”.

When I type in the terminal

~ /Applications/Avogadro2.app/Contents/MacOS/Avogadro2

I get an error message “zsh: permission denied”. Sorry for the block-headed message, but I’m new at this. Do you have any suggestion for a workaround so that I can check the error messages you suggested?

I’ll guess that the various file formats were there under Contents => lib => openbabel as well?

Is that the path that you installed that build of Avogadro2?

Like if you left it in Downloads, it might be ~/Downloads/Avogadro2.app/Contents/MacOS/Avogadro

Put another way, you can save yourself some typing if zsh auto-completes the path for you.
/App + [tab] => /Applications => Avogadro2 + [tab] = /Applications/Avogadro2.app/

If you can tab-complete the path, you should be able to run the program from the Terminal.

If that doesn’t work, let’s find time to check this over Zoom. I’m really confused why it’s not finding the Open Babel formats and it’s kind of a problem (i.e., Avogadro2 will be missing a lot of features).

Thanks, Geoff. Okay, I was able to open Avogadro from Terminal. Here’s what I get:

“Error running script ‘/Users/runner/hostedtoolcache/Python/3.9.2/x64/bin/python3 /Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/commands/scale.py --display-name --lang en_US’: Timed out waiting for finish (Script failed to start.).”

“Error running script ‘/Users/runner/hostedtoolcache/Python/3.9.2/x64/bin/python3 /Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/inputGenerators/dalton.py --display-name --lang en_US’: Timed out waiting for finish (Script failed to start.).”

“Error running script ‘/Users/runner/hostedtoolcache/Python/3.9.2/x64/bin/python3 /Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/inputGenerators/gamessuk.py --display-name --lang en_US’: Timed out waiting for finish (Script failed to start.).”

And a number of similar errors. Does that help?

If it’s still a mystery, we can zoom. Thank you so much for your willingness to help!!!

Thanks. Yeah, I’m not worried about those… Were there Open Babel comments in there like this?

OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L formats read"
OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L formats write"
OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L forcefields"
OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-V"
"/Applications/Avogadro2.app/Contents/MacOS/obabel"  found:  "/Applications/Avogadro2.app/Contents/MacOS/obabel: Open Babel 3.1.0 -- Sep  6 2020 -- 15:40:59"

If not, I guess I have a few ideas and will put together a debug build tomorrow.

Yes, there were:

OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L formats read" OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L formats write" OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-L forcefields" OBProcess::executeObabel: Running "/Applications/Avogadro2.app/Contents/MacOS/obabel" "-V" "/Applications/Avogadro2.app/Contents/MacOS/obabel" found: "/Applications/Avogadro2.app/Contents/MacOS/obabel: Open Babel 3.1.0 -- Mar 17 2021 -- 18:57:57"

Looks like I can only upload images here, but feel free to email me (redacted) if you’d like a readout of all of the messages, or I can post it here even though it’s quite long.

Thanks again.

I’ll send you an e-mail to see if we can figure this out. There will be a build with some debugging bits turned on from here:

I’ll send the specific link in a bit.

Okay, here’s the link if you can try running this from the Terminal:
https://github.com/OpenChemistry/avogadrolibs/suites/2403710835/artifacts/51172251