Author Topic: Restarting a geometry optimization  (Read 2695 times)

0 Members and 1 Guest are viewing this topic.

Offline Subhban15

  • Heavy QuantumATK user
  • ***
  • Posts: 54
  • Country: in
  • Reputation: 0
    • View Profile
Restarting a geometry optimization
« on: November 21, 2015, 08:28 »
I was trying to OptimizeGeometry of a device when my system turned off due to power outage. I have the checkpoint file and the original python script of the simulation that I was trying to run.

So since the steps in the Script generator were Configuration, New Calculator and OptimizeGeometry,

1.  should I force start the calculation with the help of only the following script

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

or

2. will I have to restart from the original script and make the following changes in it
device_configuration = nlread("checkpointfile.nc")[0]
device_configuration.update(force_restart=True)

or

3. should I start the script from a scratch?

The tutorial doesn't contain much info for Restarting Geometry Optimization.

It will be a great help if anyone could provide steps in detail.

Thanks!!!  :)  :)  :)
« Last Edit: November 23, 2015, 13:39 by Subhban15 »

Offline Umberto Martinez

  • Supreme QuantumATK Wizard
  • *****
  • Posts: 479
  • Country: dk
  • Reputation: 26
    • View Profile
Re: Restarting a geometry optimization
« Reply #1 on: November 24, 2015, 10:37 »
For a geoemtry optimization is always very convenient (99% of the times) to specify the trajectory_filename parameter as described in the reference manual: http://www.quantumwise.com/documents/manuals/latest/ReferenceManual/index.html/ref.optimizegeometry.html In this way, you can restart from the last geometry step by reading the last configuration with something like:
Code
trajectory=nlread("filename.nc", Trjaectory)[-1]
last_configuration=trajectory.lastImage()
did you specified this file? by the way, we are working on a new tutorial about geometry optimization right now, we will be sure to include more info about the restarting issue.

Offline Subhban15

  • Heavy QuantumATK user
  • ***
  • Posts: 54
  • Country: in
  • Reputation: 0
    • View Profile
Re: Restarting a geometry optimization
« Reply #2 on: November 24, 2015, 21:45 »
Thank you Umberto Martinez! :)

I had only the chechpointfile because I didn't choose to save the trajectory while making the script.

Anyway, I will do it from next time.

And, yes a little more info on in the tutorial will be great! :)

Thanks again!