Standard location of extra plugins for Avogadro2-libs

Dear avogadro developers,

I would like to install one plugin “Nanocar” in Avogadro2-libs v1.93.0. Could you help us?

This plugin requires a location of “OpenChemistry” in a home directory.

But, we would like to make an RPM package of a plugin of Avogadro2, not in home directory. Where the directory should be? We did not use the OpenChemistry in our installation and the RPM build.

python install_plugin.py /home/<username>/.local/share/OpenChemistry/Avogadro

** I can see the scripts and plugins are in the avogadro2 library in python3. Is it the standard location you expect? And, how could we enable the plugin in “Build” menu?

/usr/lib64/python3.6/site-packages/avogadro2
/usr/lib64/python3.6/site-packages/avogadro2/scripts
/usr/lib64/python3.6/site-packages/avogadro2/scripts/commands
/usr/lib64/python3.6/site-packages/avogadro2/scripts/commands/pycache
/usr/lib64/python3.6/site-packages/avogadro2/scripts/commands/pycache/scale.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/commands/pycache/scale.cpython-36.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/commands/scale.py
/usr/lib64/python3.6/site-packages/avogadro2/scripts/formatScripts
/usr/lib64/python3.6/site-packages/avogadro2/scripts/formatScripts/pycache
/usr/lib64/python3.6/site-packages/avogadro2/scripts/formatScripts/pycache/cclibScript.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/formatScripts/pycache/cclibScript.cpython-36.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/formatScripts/pycache/zyx.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/formatScripts/pycache/zyx.cpython-36.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/formatScripts/cclibScript.py
/usr/lib64/python3.6/site-packages/avogadro2/scripts/formatScripts/zyx.py
/usr/lib64/python3.6/site-packages/avogadro2/scripts/inputGenerators
/usr/lib64/python3.6/site-packages/avogadro2/scripts/inputGenerators/pycache
/usr/lib64/python3.6/site-packages/avogadro2/scripts/inputGenerators/pycache/dalton.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/inputGenerators/pycache/dalton.cpython-36.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/inputGenerators/pycache/gamessuk.cpython-36.opt-1.pyc
/usr/lib64/python3.6/site-packages/avogadro2/scripts/inputGenerators/pycache/gamessuk.cpython-36.pyc

Thank you in advance,
Gen

I’ll admit that i hadn’t thought of this on a /usr perspective (i.e. system-wide) but rather a per-user case.

The loading code is in avogadro/qtgui/scriptloader.cpp and uses QStandardPaths::AppLocalDataLocation:
https://doc.qt.io/qt-5/qstandardpaths.html

I’m open to suggestions - I started a class to load scripts into the appropriate place, but haven’t finished it.

Hi,

thank you for the answer. I am now putting the code of the Nanoccar plugin into %{python3_sitearch}/avogadro2/scripts directory.

I’d look at the class you wrote, once the builds of the required packages are done.