Installing Script Plugins#
Scripts can either be installed manually, by dragging to the Avogadro window:
Scripts can also be installed from GitHub repositories through the “Download Plugins…” command:
Directories#
Avogadro will look for plugins either as individual files or subdirectories in a few paths, including system and user directories. Each type of plugin should be in the corresponding subdirectory, e.g.:
The main directory for installing plugins is determined by QStandardPaths::standardLocations(QStandardPaths::AppLocalDataLocation)
:
Linux and BSD:
~/.local/share/avogadro/
macOS:
Library/Application\ Support/OpenChemistry/Avogadro
Windows:
C:/Users/USER/AppData/Local/Avogadro
Inside each of these paths, subdirectories for each category of plugin will be
scanned for both individual files and directories containing plugin.json
files
indicating a plugin “package.”
Plugin Packages and Repositories#
Since some plugins may require additional scripts or resources to function, they can be installed as an entire directory.
avogadro-cclib - reads files through the
cclib
Python module and needs autils.py
helper scriptavogadro-rdkit - packages multiple command scripts together since they all use the
rdkit
package
All repositories must include a plugin.json
file, which is used by Avogadro
to indicate the actual plugin scripts (e.g., multiple commands)
as well as the Download Plugins… command to provide information to the user:
{
"author": "Geoffrey Hutchison",
"version": 1.0,
"url": "https://github.com/ghutchis/avogadro-scikit-nano",
"name": "avogadro-scikit-nano",
"description": "Generate carbon nanomaterial using scikit-nano",
"type": "commands",
"commands": [
{ "name": "SWNT", "command": "swnt.py" },
{ "name": "MWNT", "command": "mwnt.py" }
]
}
Required sections:
author
: a user-visible attribution of the scriptversion
: a version number of the script (which is ignored based on GitHub tags or releases)url
: the URL of the GitHub repositoryname
: the name of the plugin. Initialavogadro-
prefix will be ignored by the Download Plugins… dialog.description
: a brief description of the plugintype
: the category of plugin script, including:charges
for charge / electrostatics modelscommands
for menu commandsformats
for file formatsgenerators
for input generators
commands
: a list of key/value pairs to indicate a potentialname
and thecommand
filename for the script.
Note that any files not listed in the commands
list will be ignored by
Avogadro during launch.