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

Just wanted to piggy back here to note that with v. 1.94 I am seeing exactly the same thing as src (with MacOS Mojave).

Please try the latest nightly:
https://nightly.link/OpenChemistry/avogadrolibs/workflows/build_cmake/master/macOS.dmg

I think weā€™ve ironed out all of those issues, but would like to know for sure.

I can verify that CIF files are an option in the file type list and I can open them in this build. Thanks for the prompt reply.
Now, off to figure out how to build some supercells.

1 Like

One difference I see is that in v1.20, the Super Cell Builder function adds atoms with the bonds displayed. In v1.94 (Avogadro2) using the Build Supercell adds atoms without bonds (the only bonds showing are for the original unit cell). I can select Bond Atoms but, with the default parameters, unphysical bonds are added (e.g. Ti-Ti bonds in TiO2).

Could you please file an issue for the bonding (e.g. give an example file for the Ti-Ti bonds).

I made an account and did that, however inelegantly.

1 Like