aiida-core
aiida-core copied to clipboard
✨ Allow user to specify working directory
Is your feature request related to a problem? Please describe
During a recent discussion on user friendliness with @superstar54, he raised the issue that users can't specify the working directory for the calculation jobs they want to run. AiiDA will always shard the directory using the UUID and create something that is always unique, but perhaps not very informative. Especially beginners that haven't gotten used to doing everything with AiiDA will appreciate such a feature.
There are more use cases too:
- Restarts: Currently we typically copy or symlink files for restarts, but why not simply run in the same folder? It does have the same issue as restarts via symlinks, i.e. if two calculations are based on the same parent can conflict, but that should be an obvious side effect.
- Some users may want to organise their calculations in a certain directory structure, to e.g. be able to easily delete or back up certain parts.
Describe the solution you'd like
I suggest we add a new work_dir
input to the metadata
Namespace of CalcJob
, which overrides the typical sharded directory used by AiiDA.
Other considerations
One counter argument might be that this will promote un-AiiDA-like behaviour. Users might keep on specifying folders and grab the data from there for their analysis instead of using e.g. the QueryBuilder
,
My first instinct is to indeed go against this for the very reason you state: this goes against the idea of AiiDA of abstracting away the submission/running of jobs. Can I ask for the specific use-case @superstar54 had in mind?
For example, I have different systems in my previous calculations: bulk
, surface
, and molecule
. I organize all the calculations in folders like the one below:
- bulk
- Pt
- Au
- molecule
- h2o
- co
- surface
- pt-111
- pt-111-co
In this way, I know where my calculations are. If my jobs fail and I want to check the outputs of several calculations, I can easily switch from pt-111
folder to pt-111-co
folder.
For advanced AiiDA users, this is superfluous. But from user comes from non-AiiDA communities, it could improve usability. It's nice if AiiDA provides this option, and let's the user decide whether to use it or not.