QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: Sarvesh Agarwal on July 9, 2012, 07:26

Title: can we start simulation from middle??
Post by: Sarvesh Agarwal on July 9, 2012, 07:26
Is there any way to restart a simulation from middle, i mean if anyhow our simulation gets stop due to any reason, hence, to save time can we restart the simulation from the point where it was stopped.
Title: Re: can we start simulation from middle??
Post by: kstokbro on July 9, 2012, 07:35
see the tutorial:
http://www.quantumwise.com/publications/tutorials/mini-tutorials/142
Title: Re: can we start simulation from middle??
Post by: kstokbro on July 9, 2012, 07:39
note, this tutorial is to restart the scf iteration where it was stopped, it you have a loop in your python input file, forinstance for doing I-V, you will need to manually change the input file to start at the right loop point.
Title: Re: can we start simulation from middle??
Post by: sergio on May 15, 2013, 23:36
Hi,

In atk 12.8, to restart a stopped calculation, we can use:

configuration = nlread("checkpointfile.nc")[0]
configuration.update(force_restart=True)
nlsave("file.nc",configuration)

given in the mini-tutorials.

In atk 11.2.3 "force_restart" is not recognized. How can we employ this script in atk 11.2.3?

Thanks,
Title: Re: can we start simulation from middle??
Post by: Anders Blom on May 16, 2013, 08:36
That's why we introduced that keyword, to make it easier :)

I think it's possible to use "initial_state" instead in 11.2. So, you take your original script, add
Code: python
checkpoint =  = nlread("checkpointfile.nc")[0]
to the top, and then add the keyword
Code: python
initial_state = checkpoint
to "setCalculator".
Title: Re: can we start simulation from middle??
Post by: sergio on May 16, 2013, 16:05
Thanks for your reply.  However when I do what you have written, even if I have already tem. checkpointfile, I have enecountered with the following in the first statement of the output file:

"Warning:
  The provided initial state parameter has no pre-calculated data.
  Proceeding without setting an initial state."

That is, it starts from the left electrode calculation.

Is there anything wrong?

Thanks,
Title: Re: can we start simulation from middle??
Post by: Anders Blom on May 16, 2013, 20:09
It means the checkpoint file doesn't contain what is required... Hard to say why, you may want to inspect its contents and file size to determine this. It also matters where the calculation was interrupted, if it happened in the equivalent bulk part, it will not work - but then you haven't lost that much anyway, you can just as well rerun.