Writing restart files¶
to include also the wave functions.
You can register an automatic call to the
write method, every
n’th iteration of the SCF cycle like this:
calc.attach(calc.write, n, 'xyz.gpw')
calc.attach(calc.write, n, 'xyz.gpw', mode='all')
This can be useful for very expensive calculations, where the SCF cycle may be interrupted before it completes. In this way, you can resume the calculation from an intermediate electronic structure.
Reading restart files¶
The calculation can be read from file like this:
calc = GPAW('xyz.gpw')
atoms, calc = restart('xyz.gpw')
By adding the option txt=None you can suppress text output when restarting (e.g. when plotting a DOS):
atoms, calc = restart('xyz.gpw', txt=None)