Name

setCheckpointFilename Controls the name of the (NetCDF) file into which the results from a self-consistent calculation are stored. If a file name is not specified using this function, a NetCDF file is not written.

Synopsis

Namespace: ATK
setCheckpointFilename(filename)

Description

The function setCheckpointFilename() is used to set the name of the checkpoint NetCDF file created by ATK during the self-consistent calculation. After the self-consistent iteration has converged, the checkpoint file will contain all information needed to proceed with further analysis without the need to redo the self-consistent calculation.

List of arguments

checkpoint_filename

Name and location of the file in which the checkpoint data is stored during the self-consistent iteration. Setting this argument to None disables the use of the checkpoint file and no file is generated; this is the default situation in ATK if no checkpoint file is defined.

Usage examples

Generate checkpoint data in a specific file, in a specific directory:

import ATK
ATK.setCheckpointFilename('../results/diamond.nc')

Notes

The name of the checkpoint file can also be specified using a parameter dictionary argument to the self-consistent calculation; see runtimeParameters().

The checkpoint file can be restored with the function restoreSelfConsistentCalculation(), and may subsequently be used for analyzing or resuming the self-consistent iteration. The latter situation is your safe guard either if the calculation was prematurely interrupted or if it did not converge.