Script load errors on MacOS

I’ve been playing around with the new forcefield interface in Avogadro2 1.98.1. This appears to be an excellent addition, thanks for all your hard work on it.

I’ll give some system info below, but I’m getting the following errors (regarding finding scripts) when launching from the CLI. Do you have any suggestions on what I can try to attempt to fix them?

Deep breath

Extension plugins dynamically found… 47

“Checking for energy scripts in path /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/energy”

“Checking for energy scripts in path /Library/Application Support/OpenChemistry/Avogadro/energy”

“Checking for energy scripts in path /Applications/Avogadro2.app/Contents/Resources/energy”

“Checking for energy scripts in path /Applications/Avogadro2.app/Contents/MacOS/…/lib/avogadro2/scripts/energy”

“Cannot load script /Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/energy/ani2x.py”

“Cannot load script /Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/energy/gfn1.py”

“Cannot load script /Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/energy/gfn2.py”

“Cannot load script /Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/energy/gfnff.py”

register GAFF

register MMFF94

register UFF

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” “-L charges”

OBProcess::executeObabel: Running “/Applications/Avogadro2.app/Contents/MacOS/obabel” “-V”

“/Applications/Avogadro2.app/Contents/MacOS/obabel” found: “”

“Checking for commands scripts in path /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands”

“Checking for commands scripts in path /Library/Application Support/OpenChemistry/Avogadro/commands”

“Checking for commands scripts in path /Applications/Avogadro2.app/Contents/Resources/commands”

“Checking for commands scripts in path /Applications/Avogadro2.app/Contents/MacOS/…/lib/avogadro2/scripts/commands”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-build-ase/mx2.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-build-ase/ribbon.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-rdkit/assign-stereo.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-rdkit/canon-conf.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-rdkit/etkdg.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-rdkit/mmff94.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-rdkit/standardize.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-rdkit/select-smarts.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-rdkit/tautomer.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-rdkit/uff.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-scikit-nano/swnt.py”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/commands/avogadro-scikit-nano/mwnt.py”

“Checking for inputGenerators scripts in path /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/inputGenerators”

“Checking for inputGenerators scripts in path /Library/Application Support/OpenChemistry/Avogadro/inputGenerators”

“Checking for inputGenerators scripts in path /Applications/Avogadro2.app/Contents/Resources/inputGenerators”

“Checking for inputGenerators scripts in path /Applications/Avogadro2.app/Contents/MacOS/…/lib/avogadro2/scripts/inputGenerators”

“Checking for charges scripts in path /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/charges”

“Checking for charges scripts in path /Library/Application Support/OpenChemistry/Avogadro/charges”

“Checking for charges scripts in path /Applications/Avogadro2.app/Contents/Resources/charges”

“Checking for charges scripts in path /Applications/Avogadro2.app/Contents/MacOS/…/lib/avogadro2/scripts/charges”

“Cannot load script /Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/charges/antechamber.py”

“Checking for formatScripts scripts in path /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/formatScripts”

“Checking for formatScripts scripts in path /Library/Application Support/OpenChemistry/Avogadro/formatScripts”

“Checking for formatScripts scripts in path /Applications/Avogadro2.app/Contents/Resources/formatScripts”

“Checking for formatScripts scripts in path /Applications/Avogadro2.app/Contents/MacOS/…/lib/avogadro2/scripts/formatScripts”

“Cannot load script /Users/ch1jgh/Library/Application Support/OpenChemistry/Avogadro/formatScripts/avogadro-cclib/cclibScript.py”

Process encountered an error, and did not execute correctly.

Exit code: 6

Exit status: QProcess::CrashExit

Exit output: “”

Process encountered an error, and did not execute correctly.

Exit code: 6

Exit status: QProcess::CrashExit

Exit output: “”

Process encountered an error, and did not execute correctly.

Exit code: 6

Exit status: QProcess::CrashExit

Exit output: “”

Open Babel formats ready: 0

Process encountered an error, and did not execute correctly.

Exit code: 6

Exit status: QProcess::CrashExit

Exit output: “”

Open Babel formats ready: 0

This is on MacOS 13.6.1 on an M2 Pro (Mac mini). I have installed both openbabel and xtb-python in a conda environment. The Python path within Avogadro is set to point to the Python in this conda env.

I can confirm that the first script that Avogadro complains that it can’t find does indeed exist in that location.

/Applications/Avogadro2.app/Contents/lib/avogadro2/scripts/energy/ani2x.py

I’m a bit stumped.

Making some progress as I’ve now got gfn1.py, gfn2.py and gfnff.py scripts loaded. It turns out the xtb-python throws import errors if the typing_extensions module isn’t available. A conda install -c conda-forge typing_extensions fixed this. I assume it’s an upstream problem for xtb-python and its conda requirements.

I’ll continue to try to work through these manually and post back in case it helps anyone else.

At the moment, the scripts don’t install dependencies. So I can see, for example that you don’t have rdkit installed in that conda environment.

I included a few examples … I’ll be moving ani2x.py into a separate torchani plugin, for example.

Same thing with the build-ase plugin - try conda install -c conda-forge ase

I’m working on some bits to install pre-requisites, but of course that also needs to determine whether someone uses conda, etc.

Oh, there’s also a report of an obabel error on M1 / Apple Silicon Macs. Not sure what happened, but I’ll work on that today. That’s probably the CrashExit issues.

Thanks, I’ve got there with most of the dependencies for the parts that I think I might use in the near future. If it would be helpful for me to write some user-facing docs on this then I’d be happy to try and carve out the time. However, it sounds like things are still a little bit in flux?

Thanks! I’m always going to welcome more docs. It’s generally easier to edit / adjust than to write them in the first place. :slight_smile:

Also, if you have suggestions / ideas for other plugin scripts, I’d be curious to hear them.

I certainly have some ideas of what I would personally find useful. I guess I first need to figure out if they can already be done in Avogadro. :slight_smile: