1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
.. _restart_files:
=============
Restart files
=============
Writing restart files
=====================
Use ``calc.write('xyz.gpw')`` or ``calc.write('xyz.gpw', mode='all')``
to include also the wave functions.
You can register an automatic call to the ``write`` method, every
``n``'th iteration like this::
calc.attach(calc.write, n, 'xyz.gpw')
or::
calc.attach(calc.write, n, 'xyz.gpw', mode='all')
Reading restart files
=====================
The calculation can be read from file like this::
calc = GPAW('xyz.gpw')
or this::
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)
|