Avogenerators - how to install

Hello,

I recently downloaded the file avogenerators-master.zip which provides additional files for reading output from various QM calculations.

But, I am having a problem installing them. While loading avogadro2, I receive errors that files are not loaded properly.

Can someone provide a way to properly install these files? I am using debian Linux.

Thanks so much for your help with this.

Kind regards,

Angelo

The following are the errors I obtain. There was a post similar to this, but I could not understand exactly how to correct them

Thank you.

May 01 15:06:47 [rossi@debian Downloads]$avogadro2
Locale: “C”
“/usr/share/qt5/translations”
Extension plugins dynamically found… 22
Checking for “commands” scripts in “/home/rossi/.local/share/OpenChemistry/Avogadro/commands”
Checking for “commands” scripts in “/usr/share/xfce4/OpenChemistry/Avogadro/commands”
Checking for “commands” scripts in “/usr/local/share/OpenChemistry/Avogadro/commands”
Checking for “commands” scripts in “/usr/share/OpenChemistry/Avogadro/commands”
Checking for “commands” scripts in “/usr/bin/…/lib/x86_64-linux-gnu/avogadro2/scripts/commands”
Command: Unable to retrieve menu name for: “/home/rossi/.local/share/OpenChemistry/Avogadro/commands/other/dalton.py” . “Error running script ‘/usr/bin/python3 /home/rossi/.local/share/OpenChemistry/Avogadro/commands/other/dalton.py --menu-path --lang C’: Abnormal exit status 2 (Unknown error.: Unknown error)\n\nOutput:\nusage: Generate a DALTON input file. [-h] [–debug] [–print-options]\n [–generate-input] [–display-name]\n [–lang [LANG]]\nGenerate a DALTON input file.: error: unrecognized arguments: --menu-path\n”
Command: Unable to retrieve menu name for: “/home/rossi/.local/share/OpenChemistry/Avogadro/commands/other/gamessuk.py” . "Error running script ‘/usr/bin/python3 /home/rossi/.local/share/OpenChemistry/Avogadro/commands/other/gamessuk.py --menu-path --lang C’: Abnormal exit status 2 (Unknown error.: Unknown error)\n\nOutput:\nusage: Generate a GAMESS-UK input file. [-h] [–debug] [–print-options]\n [–generate-input] [–display-name]\n

Well, you have generator scripts installed in the commands directory. If you want to update the generators they should go into /home/rossi/.local/share/OpenChemistry/Avogadro/generators instead.

1 Like

Hello,
I really apologize for talking so long to reply.

Here is what is in the current
/home/rossi/.local/share/OpenChemistry/Avogadro/generators directory
LICENSE dalton.py* gaussian.py* inputgeneratortest.py* mopac.py* orca.py* psi4.py* qchem.py*
README.md gamessuk.py* generators.cmake molpro.py* nwchem.py* plugin.json pyscf.py* terachem.py*

Do they have to be installed somehow? I obtained them from the avogenerators-master.zip
file which I downloaded. There really aren’t any clear instructions on what to do with the contents of this file one one downloads it.

Also the errors I am getting, and there are a lot of them for each plugin seems to be more than having them in the wrong directory.

Command: Unable to retrieve menu name for: “/home/rossi/.local/share/OpenChemistry/Avogadro/commands/other/dalton.py” . "Error running script ‘/usr/bin/python3 /home/rossi/.local/share/OpenChemistry/Avogadro/commands/other/dalton.py --menu-path --lang C’: Abnormal exit status 2 (Unknown error.: Unknown error)\n\nOutput:\nusage: Generate a DALTON input file. [-h] [–debug] [–print-options]\n [–generate-input] [–display-name]\n [–lang [LANG]]\nGenerate a DALTON input file.: error: unrecognized ar

The issue seems to be related to this post, i.e a python issue??

Can you please help with this? I am using Debian Linux.

The reason for my delay in responding is that I am giving a computational chemistry workshop for grad students and postdocs, and I wanted to show them Avogadro2.

Kind regards,

Angelo

1 Like

It’s not a python issue. You have files in the “commands” directory, so it’s attempting to ask what menu they should install. Since they’re not commands, there’s an expected error and it will ignore them.

Once I get a bit of free time this week, I’m going to add an “install this script” feature and fix the download plugin feature.

If you have the generators in /home/rossi/.local/share/OpenChemistry/Avogadro/generators they will be used.

Hello,

I am running Linux Mint and I just installed Avogaro2 from the software repository. I am not sure how to use the Avogenerators scripts.

Following your comments in this thread, I moved the scripts into .local/share/OpenChemistry/Avogadro/generators

Now what? Am I supposed to see a new menu item when I run Avogadro? There doesn’t seem to be anything that I can find in the menus. How do I run these scripts?

Would it matter that I have Python3 installed?

Thanks,
Steve

Yes. There would be new menu items - one for each program. In current versions, they would appear under Quantum => Input Generators. IIRC, there’s currently about 10.

(I say under current versions. Going forward with 1.94, there’s a new “Input” menu. Wording suggestions welcome.)

There seem to be some issues with the default packages. On Ubuntu at least, these features (which currently use Molequeue) aren’t enabled. There’s a new Flatpak, which has them turned on.

Nope. We use Python3, although they should be compatible with 2.7 for now.

I installed the flatpack version and I can see an Input Generators option under the Quantum menu, but it only lists CP2K and GAMESS, but none of the other options such as Mopac which is what I’m interested in using.

As a Mac user, I’m not entirely sure - especially since others seem to have been testing Molequeue integration.

I’d suggest posting in this thread:

In particular, it would be good to know which paths it’s searching and whether the Flatpak is having problems accessing scripts outside the “sandbox.”

I run Avogadro Flatpak in command line.

flatpak run org.openchemistry.Avogadro2

Which show that it is looking for plugins in these location.

Checking for “inputGenerators” scripts in “/app/share/OpenChemistry/Avogadro/inputGenerators”
Checking for “inputGenerators” scripts in “/usr/share/OpenChemistry/Avogadro/inputGenerators”
Checking for “inputGenerators” scripts in “/usr/share/runtime/share/OpenChemistry/Avogadro/inputGenerators”
Checking for “inputGenerators” scripts in “/run/host/share/OpenChemistry/Avogadro/inputGenerators”
Checking for “inputGenerators” scripts in “/app/bin/…/lib/avogadro2/scripts/inputGenerators”

So I put the inputgenerators plugin here.

/home/.local/share/flatpak/app/org.openchemistry.Avogadro2/current/active/files/share/OpenChemistry/Avogadro/inputGenerators/

which is the same location as “/app/share/OpenChemistry/Avogadro/inputGenerators”

And it found the plugin.

I tried using the plugin downloader. It install the plugins in this location.
Which is not the same place it is looking for. So I recommend you to place the plugins in the directory I show above.

Downloading crystals.zip to /home/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro
Extracting /home/kev/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/crystals.zip to /home/kev/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/other/
Extraction successful

The plugin downloader and the app use QStandardPaths::standardLocations(QStandardPaths::AppLocalDataLocation)

The code is in avogadro/qtgui/scriptloader.cpp

It’s pretty easy to add other paths (e.g., adding a compile-time -DFLATPAK_PLUGIN_DIR=…) but I’m not sure what path you’d want:

  • It could be relative to the app in the Flatpak (but can users write to the Flatpak?)
  • It can be somewhere else (but Flatpak can be in different locations like a USB stick, right?)

The plugin downloader code (and plugin directory) need some fixes anyway… but I’d need to know a reliable user-writable path for the downloads.

So Flatpak install the apps into these location when install per-user basis.

/home/.local/share/flatpak/app/org.openchemistry.Avogadro2/

and

/home/.var/app/org.openchemistry.Avogadro2/

Which the .var location persists over app upgrades according to this.

The plugin downloader right now put the plugins here,

/home/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/other/

Now, if the user decide to install system-wide, which need root permission.
The location will be here,

/var/lib/flatpak/app/org.openchemistry.Avogadro2/

but however,

/home/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/other/

will still be create for system-wide installation as well.

Which I think is where it should be. So I think add “/home/.var/app/org.openchemistry.Avogadro2/data/OpenChemistry/Avogadro/other/” directory to plugin search path for Flatpak.

Not sure if it will work, will have to try it.

User can write to Flatpak, but if they install as system-wide, they will need root permission. It depends, but I encourage to install as user.

It is possible to install in external device like a USB storage. Using --installation flag. But I don’t think anyone really does it.

https://docs.flatpak.org/en/latest/tips-and-tricks.html?highlight=system-wide%20installation#adding-a-custom-installation

A post was split to a new topic: Trouble with Generators in 1.97