Make DFTD3 use temporary directory to avoid collisions
This fixes the issue discovered by @BorisWasBezet that multiple GPAW calculations with DFTD3 running in the same folder would sometimes give crashes and sometimes silently give the wrong result, due to collisions between the temporary file names used by the DFTD3 calculator. As this has affected projects by several of my students, I find it necessary to fix (although it could be argued that it is "expected behaviour" of a FileIOCalculator).
This closes #1717. Note that the issue mentioned in the comment #1717 (comment 2750982781) is not fixed, it is beyond the scope of this MR. This MR works around it instead, see comment in code.
Checklist: x (done) or ~ (irrelevant)
-
I am familiar with ASE's contribution guidelines. -
Doc strings in code changed in this MR are up to date. -
Unit tests have been added for new or changed code. -
Changes have been added in changelog.dusingscriv. -
Issue is resolved via "closes #XXXX" if applicable.
NB: I have not come up with a relevant unit test for this change, but a small change needed to be made to one of the existing unit tests to accomodate it.