File: restart_files.rst

package info (click to toggle)
gpaw 21.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 14,492 kB
  • sloc: python: 121,997; ansic: 14,138; sh: 1,125; csh: 139; makefile: 43
file content (37 lines) | stat: -rw-r--r-- 734 bytes parent folder | download | duplicates (2)
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)