Name

restoreSelfConsistentCalculation Restores results from a previously performed calculation.

Synopsis

Namespace: ATK.KohnSham or ATK.TwoProbe
SelfConsistentCalculation restoreSelfConsistentCalculation(filename)

Description

This function is used to load a self-consistent calculation from a NetCDF checkpoint file generated during the self-consistent iteration of a previous run. The restored calculation can be used as if it was obtained directly by calling the function executeSelfConsistentCalculation().

List of arguments:

filename

The filename of a the NetCDF checkpoint file which contains a previously performed self-consistent calculation.

Default: None

Usage examples

The following two scripts are for all practical purposes equivalent and can be continued in exactly the same way (e.g. with some analysis commands, as shown in the example):

from ATK.KohnSham import *
import ATK

ATK.setCheckpointFilename('filename.nc')
sc_calc = executeSelfConsistentCalculation(...)
print calculateTotalEnergy(scf)
  

and

from ATK.KohnSham import *
...
sc_calc = restoreSelfConsistentCalculation('filename.nc')
print calculateTotalEnergy(scf)

Notes

The checkpoint file is generated during the self-consistent calculation, and its name and location is specified using either runtimeParameters() or the setCheckpointFilename() function.

[Warning] Warning

The inclusion in ATK 2008.02 of a new algorithm for the generation of interacting atom pairs has slightly modified the way in which quantities are stored in the NetCDF checkpoint file. NetCDF files generated with versions older than ATK 2008.02 can be still used in order to restore calculations. In this case, however, due to the changes in the structure of the NetCDF file, the restored calculation is not anymore a fully self-consistent one for ATK 2008.02 (but very close to it!). This means that physical quantity such as, e.g., total energies and forces, calculated from the restored calculation might have slightly different values than for the original (generated with versions older than ATK 2008.02) self-consistent calculation.

A fully self-consistent result for ATK 2008.02 can be obtained by using the function executeSelfConsistentCalculation() with the restored self-consistent calculation as initial_calculation.