Open sphuber opened 1 year ago
Thanks @sphuber
Usability: Reduce required setup to run codes (scripts, executables, shell commands, ...) through AiiDA
As mentioned in https://github.com/aiidateam/team-compass/issues/4#issuecomment-1424256451, I think maybe the title should be something like:
Usability: Allow users to run "plugin-less" codes, with minimal setup
then move the explanation of what you mean by a code (script, executable, shell command, ...) to the motivation section
Motivation
Currently, when one wants to run a code through AiiDA, there is quite a bit of setup that needs to be done. If one is lucky and a
CalcJob
plugin already exists, before it can be used aComputer
and aCode
first need to be created and configured. If a plugin doesn't exist, the problem get's worse as one should first develop aCalcJob
andParser
plugin and even create a Python package to install them with entry points. These requirements are a huge barrier for early adopters, especially for those from fields where little to no plugins exist.Desired Outcome
It should be as easy as possible for a new user to start running their code with AiiDA with minimal to no required setup.
Impact
If this is successful, it will significantly lower the barrier for adoption of AiiDA by new users, and especially by users of other scientific domains than we currently have.
Complexity
A solution has already been implemented in the form of a plugin and so the complexity is minimal as it does not require any changes to
aiida-core
.Progress
An AEP has been created and the proposed solution has already been implemented in the plugin package `aiida-shell. Essentially, this package provides a
CalcJob
andParser
implementation that allows running any executable. Most importantly, it provides a simply utility function that makes launching such aCalcJob
trivial, as it will automatically create the requiredComputer
andCode
on-the-fly.The most basic example is running a bash command, e.g.,
date
, which looks something like:Note that all the setup that is required is an AiiDA installation with a configured profile. It is no longer necessary to configure a
Computer
orCode
as that is done automatically. By default the command is run on the localhost but anyComputer
can be defined through the inputs and it will be run on the remote computer as normal with calculation jobs.As a concrete example of how this would lower the adoption barrier for new users, let's consider an example from biochemistry using the package
pdb-tools
which allows to manipulate protein structures. In the command line, a typical workflow would look like:With
aiida-shell
this can be run through AiiDA as follows:Note that this script is complete and no additional setup is required other than a functional AiiDA installation and the
pdb-tools
package installed.Now imagine what a user would have to do without
aiida-shell
. Requiring users to create calculation and parser plugins for each command is simply untenable and unreasonable.