Author Topic: can we start simulation from middle??  (Read 5137 times)

0 Members and 1 Guest are viewing this topic.

Offline Sarvesh Agarwal

  • Heavy QuantumATK user
  • ***
  • Posts: 60
  • Country: in
  • Reputation: 0
    • View Profile
can we start simulation from middle??
« 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.

Offline kstokbro

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 392
  • Reputation: 13
    • View Profile
    • QuantumWise

Offline kstokbro

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 392
  • Reputation: 13
    • View Profile
    • QuantumWise
Re: can we start simulation from middle??
« Reply #2 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.

Offline sergio

  • Heavy QuantumATK user
  • ***
  • Posts: 56
  • Reputation: 0
    • View Profile
Re: can we start simulation from middle??
« Reply #3 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,

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
Re: can we start simulation from middle??
« Reply #4 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".

Offline sergio

  • Heavy QuantumATK user
  • ***
  • Posts: 56
  • Reputation: 0
    • View Profile
Re: can we start simulation from middle??
« Reply #5 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,

Offline Anders Blom

  • QuantumATK Staff
  • Supreme QuantumATK Wizard
  • *****
  • Posts: 5565
  • Country: dk
  • Reputation: 93
    • View Profile
    • QuantumATK at Synopsys
Re: can we start simulation from middle??
« Reply #6 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.