CheckpointHandler — Class for representing the parameters used for saving the configuration and calculator at regular intervals during self-consistent iterations.
The name of the checkpoint file.
Type: String. Can either be given as absolute path or a relative path (interpreted as relative to the temporary folder on the computer). The absolute path of the checkpoint file is written in the output of the calculator.
Default:
File of the form: 'TEMP/checkpointXXXXXXXXXXXXXXXX.nc', where TEMP means the temporary folder on the computer and X means a random digit.
The approximate time between saving. The program will check if the time since last save is exceeds the time interval after each self-consistent iteration.
Type: PhysicalQuantity with a time unit - e.g 1*Hour.
Default:
0.5*Hour
A CheckpointHandler object provides the following methods:
fileName(): Returns the name of the checkpoint file.
timeInterval(): Returns the length of the time interval.
Set the checkpoint file to "/home/checkpoint.nc" and tell the calculator to store itself every 20 minutes.
checkpoint_handler = CheckpointHandler('/home/checkpoint.nc', 20*Minute)
calculator = LCAOCalculator(checkpoint_handler=checkpoint_handler)
Turn off checkpoint handling for a calculator in this way.
calculator = LCAOCalculator(checkpoint_handler=NoCheckpointHandler)