QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: ATK-user-zuox on March 22, 2016, 06:28

Title: Restarting a device configuration
Post by: ATK-user-zuox on March 22, 2016, 06:28
hello,quantumwise staff :
1.i also met the restarting problems ,here is my confusion:
   there are so many verisions of restart a bias dependent calculation ,but i can't get the uniform answer about it ,there is basically two answers  in the forum :
   first solution ,
Code
# -------------------------------------------------------------
# IV Curve
# -------------------------------------------------------------
calculator=device_configuration.calculator()
device_configuration = nlread("ivcurve_selfconsistent_configurations_bias_0.nc",)[0]

     second solution,
Code
device_configuration.setCalculator(calculator)
nlprint(device_configuration)
device_configuration = nlread("ivcurve_selfconsistent_configurations_bias_0.nc")[0]
device_configuration.update(force_restart=True)
nlsave('CONFIG.nc', device_configuration)
     
      I don't know  the accuracy and differences between these two solutions  and in the
Code
 nlread("ivcurve_selfconsistent_configurations_bias_0.nc")[0]
,what is the exact meaning of
Title: Re: Restarting a device configuration
Post by: zh on March 22, 2016, 06:29
It depends on how much information has been saved in your previous calculations.
Title: Re: Restarting a device configuration
Post by: Jess Wellendorff on March 22, 2016, 17:20
1. There is no straight-forward way to restart an IVCurve calculation that was interrupted. This is because what the analysis really does is to run a range of SCF calculations followed by TransmissionSpectrum analysis. A rather complex operation that requires restarting from previous finite-bias calculations in order to ease convergence. A restart scheme for this is much more complicated than it may appear.

In general, however, you can always start an analysis from the zero-bias calculations, e.g.
Code
device_configuration = nlread("ivcurve_selfconsistent_configurations_bias_0.nc")[0]
where "[ 0 ]" means that you want the first item saved in the file, in this case the zero-bias calculation.

2. Checkpoint files should be used only a last resort. Restarting from the saved zero-bias calculation is a more transparent approach.