aiidateam / aiida-quantumespresso

The official AiiDA plugin for Quantum ESPRESSO
https://aiida-quantumespresso.readthedocs.io
Other
52 stars 77 forks source link

Protocols: Set default of `clean_workdir` to `False`? #915

Closed mbercx closed 1 year ago

mbercx commented 1 year ago

Currently, the default value of clean_workdir is set to True for all workflow protocols. I'm wondering if we should use False as the default instead (which is also the default used when specifying the input). Although it is often desirable to clean the working directory, the fact that is the default may be confusing and/or frustrating for new users. Example use cases:

Use case A

A user has run an scf calculation using the PwBaseWorkChain (as should be recommended), and wants to run a bands calculation on top. Putting the scf remote_folder as the parent_folder of the bands run won't work, since the default is to clean the working directory and the charge density is (sensibly) not retrieved. The user might even try this, but it will fail because the directory is not there.

Use case B

The user has run a bunch of scf calculations using the PwBaseWorkChain, and now wants to do some manual operations, e.g.:

Since the default is to clean the working directory, these files are lost, and the user might not immediately even understand why.

Conclusion

I think when setting defaults, it's best to err on the side of caution. Unless the user is running a lot of calculations, not cleaning the working directory has little side effects and can be performed manually. So I would set the clean_workdir default to False in the protocols.

sphuber commented 1 year ago

I agree, fine to change