[ase-users] ASE Calculator: delete temporary directory after calculation ?

Gaël Donval G.Donval at bath.ac.uk
Wed May 10 15:01:22 CEST 2017


> Dear ASE users,
> 
> I'd like to inquire if there is a way to clean-up the temporary
> files 
> created by the calculator after running a calculation.
Hi Emmanuel,

You can do whatever you want in your ASE script: if Python can do it
(and it can), then it is possible.

See http://stackoverflow.com/questions/814167/easiest-way-to-rm-rf-in-p
ython for instance.

> 
> Of course, this should only be done after all properties, which read
> the 
> calculator output, have been retrieved.That could already be done by
> your script and as soon as postprocessing is finished, you could
> remove the files using the method described above.

I don't see why it would be a problem: Python can do it just the way
you like it. If you want to postprocess your results, then check that
they are sane then remove files, all of this can be done in your ASE
script.


>  But this could be done for 
> instance just before starting a new calculation (which creates e.g.
> a 
> new directory).
> 
> Is this enough to delete the Calculator.directory before running 
> 'calculate' ?
> 
> Many thanks, Emmanuel.
> 
> 
Gaël
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3199 bytes
Desc: not available
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20170510/e9f14648/attachment.bin>


More information about the ase-users mailing list