Just to clarify: force_restart=True does force the calculation to restart from scratch. But since you use the state from the checkpoint file as initial state, "from scratch" here means from that initial guess rather than from a superposition of atomic densities
Dear Jess,
Thanks for your reply. I understand the way to start a calculation using an initial guess. And I have tested it, it works.
Indeed, I tested using following script,
device_configuration = nlread("checkpoint-0.4.nc")[0]
device_configuration.setCalculator(device_configuration.calculator(), initial_state=device_configuration)
device_configuration.update()
nlsave("Au-C6H4S2-Au-restart.nc", device_configuration)
So what is the difference here between using
device_configuration.update() and
device_configuration.update(force_restart=True), which is the question raised in 8th floor.
(2) And I am puzzling about the force_restart=True in device_configuration.update(), that is what is the difference between device_configuration.update() and device_configuration.update(force_restart=True) since they both trigger a calculation?
My test has shown that there is exactly not any difference between the following two calculations.
device_configuration = nlread("checkpoint-0.4.nc")[0]
device_configuration.setCalculator(device_configuration.calculator(), initial_state=device_configuration)
device_configuration.update()
nlsave("Au-C6H4S2-Au-restart.nc", device_configuration)
and
device_configuration = nlread("checkpoint-0.4.nc")[0]
device_configuration.setCalculator(device_configuration.calculator(), initial_state=device_configuration)
device_configuration.update(force_restart=True)
nlsave("Au-C6H4S2-Au-restart.nc", device_configuration)
With best regards,
Guangping