OpenChemistry / avogadrolibs

Avogadro libraries provide 3D rendering, visualization, analysis and data processing useful in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.
https://two.avogadro.cc/
BSD 3-Clause "New" or "Revised" License
459 stars 172 forks source link

Mac needs to set BABEL_LIBDIR #1753

Open ghutchis opened 2 weeks ago

ghutchis commented 2 weeks ago

The current release seems to print a lot of errors about setting BABEL_LIBDIR

matterhorn103 commented 2 days ago

As does the beta branch of the Flatpak (I know you know this, but just to put it on the record).

ghutchis commented 2 days ago

Can you figure out what part of the code is complaining? I should have made a better note - because it's not happening on my Macs anymore. 🙄

matterhorn103 commented 2 days ago

Classic haha. I can have a look.

matterhorn103 commented 2 days ago

Not looked into the code yet, but the error is shown during the launch process, where the full terminal output after flatpak run org.openchemistry.Avogadro2 is:

Using locale:  "en_GB"
AvogadroApp Translation  "en_GB"  loaded  "/app/bin/../share/avogadro2/i18n/"
AvogadroLibs Translation  "en_GB"  loaded  "/app/bin/../share/avogadro2/i18n/"
Extension plugins dynamically found… 47
OBProcess::executeObabel: Running "/app/bin/obabel" "-L formats read"
OBProcess::executeObabel: Running "/app/bin/obabel" "-L formats write"
OBProcess::executeObabel: Running "/app/bin/obabel" "-L forcefields"
OBProcess::executeObabel: Running "/app/bin/obabel" "-L charges"
OBProcess::executeObabel: Running "/app/bin/obabel" "-V"
"/app/bin/obabel"  found:  "/app/bin/obabel: Open Babel 3.1.1 -- Nov 14 2024 -- 17:10:01"
"Checking for energy scripts in path /home/matt/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /app/share/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /usr/share/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /usr/share/runtime/share/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /run/host/user-share/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /run/host/share/OpenChemistry/Avogadro/energy"
"Checking for energy scripts in path /app/bin/../lib/avogadro2/scripts/energy"
"Cannot load script /app/lib/avogadro2/scripts/energy/ani2x.py"
"Cannot load script /app/lib/avogadro2/scripts/energy/gfn1.py"
"Cannot load script /app/lib/avogadro2/scripts/energy/gfn2.py"
"Cannot load script /app/lib/avogadro2/scripts/energy/gfnff.py"
 registering GPL plugins
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
OBEnergy: method:  MMFF94
OBEnergy: method not found:  MMFF94
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
forcefields is not a recognized plugin type. Those with instances of sub-types loaded are:
ops

==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
OBEnergy: method:  UFF
OBEnergy: method not found:  UFF
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
forcefields is not a recognized plugin type. Those with instances of sub-types loaded are:
ops

==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
OBEnergy: method:  GAFF
OBEnergy: method not found:  GAFF
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
forcefields is not a recognized plugin type. Those with instances of sub-types loaded are:
ops

"Checking for commands scripts in path /home/matt/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/commands"
"Checking for commands scripts in path /app/share/OpenChemistry/Avogadro/commands"
"Checking for commands scripts in path /usr/share/OpenChemistry/Avogadro/commands"
"Checking for commands scripts in path /usr/share/runtime/share/OpenChemistry/Avogadro/commands"
"Checking for commands scripts in path /run/host/user-share/OpenChemistry/Avogadro/commands"
"Checking for commands scripts in path /run/host/share/OpenChemistry/Avogadro/commands"
"Checking for commands scripts in path /app/bin/../lib/avogadro2/scripts/commands"
"Checking for inputGenerators scripts in path /home/matt/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/inputGenerators"
"Checking for inputGenerators scripts in path /app/share/OpenChemistry/Avogadro/inputGenerators"
"Checking for inputGenerators scripts in path /usr/share/OpenChemistry/Avogadro/inputGenerators"
"Checking for inputGenerators scripts in path /usr/share/runtime/share/OpenChemistry/Avogadro/inputGenerators"
"Checking for inputGenerators scripts in path /run/host/user-share/OpenChemistry/Avogadro/inputGenerators"
"Checking for inputGenerators scripts in path /run/host/share/OpenChemistry/Avogadro/inputGenerators"
"Checking for inputGenerators scripts in path /app/bin/../lib/avogadro2/scripts/inputGenerators"
"Checking for charges scripts in path /home/matt/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/charges"
"Checking for charges scripts in path /app/share/OpenChemistry/Avogadro/charges"
"Checking for charges scripts in path /usr/share/OpenChemistry/Avogadro/charges"
"Checking for charges scripts in path /usr/share/runtime/share/OpenChemistry/Avogadro/charges"
"Checking for charges scripts in path /run/host/user-share/OpenChemistry/Avogadro/charges"
"Checking for charges scripts in path /run/host/share/OpenChemistry/Avogadro/charges"
"Checking for charges scripts in path /app/bin/../lib/avogadro2/scripts/charges"
"Cannot load script /app/lib/avogadro2/scripts/charges/antechamber.py"
"Cannot load script /app/lib/avogadro2/scripts/charges/xtb.py"
"Checking for formatScripts scripts in path /home/matt/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/formatScripts"
"Checking for formatScripts scripts in path /app/share/OpenChemistry/Avogadro/formatScripts"
"Checking for formatScripts scripts in path /usr/share/OpenChemistry/Avogadro/formatScripts"
"Checking for formatScripts scripts in path /usr/share/runtime/share/OpenChemistry/Avogadro/formatScripts"
"Checking for formatScripts scripts in path /run/host/user-share/OpenChemistry/Avogadro/formatScripts"
"Checking for formatScripts scripts in path /run/host/share/OpenChemistry/Avogadro/formatScripts"
"Checking for formatScripts scripts in path /app/bin/../lib/avogadro2/scripts/formatScripts"
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
OBEnergy: method:  MMFF94
OBEnergy: method not found:  MMFF94
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
forcefields is not a recognized plugin type. Those with instances of sub-types loaded are:
ops

Open Babel formats ready:  145
Setting default format to cjson.

Then each time "Optimize Geometry" is clicked the following is appended:

==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
==============================
*** Open Babel Error  in LoadAllPlugins
  Unable to find OpenBabel plugins. Try setting the BABEL_LIBDIR environment variable.
 initial  0  gradNorm:  0
 maxSteps 250  steps  125
 optimize  0 0  gradNorm:  0
ghutchis commented 2 days ago

Okay that helps.