QuantumATK Forum

QuantumATK => General Questions and Answers => Topic started by: ems032 on March 7, 2016, 20:50

Title: Restart device optimization with trajectory
Post by: ems032 on March 7, 2016, 20:50
I am trying to restart a device optimization and I have a trajectory file for the first attempt. I read a similar topic at http://quantumwise.com/forum/index.php?topic=3805.msg17364#msg17364 (http://quantumwise.com/forum/index.php?topic=3805.msg17364#msg17364) , so I see how to obtain the last configuration from the trajectory, but I am unsure exactly how to implement this last configuration into the script to restart the optimization.

Any help will be much appreciated  :D

-Ethan

Title: Re: Restart device optimization with trajectory
Post by: Jess Wellendorff on March 8, 2016, 08:56
You simply replace the top part of the script that define the configuration with the two lines of code in the the post you refer to.
Code
# -------------------------------------------------------------
# Configuration from Trajectory
# -------------------------------------------------------------
trajectory = nlread('filename.nc', Trjaectory)[-1]
configuration = trajectory.lastImage()
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
.....
# -------------------------------------------------------------
# Optimize Geometry
# -------------------------------------------------------------
.....
Full example attached.
Title: Re: Restart device optimization with trajectory
Post by: ems032 on March 8, 2016, 19:13
Thanks for your help, Jess!
Title: Re: Restart device optimization with trajectory
Post by: Jess Wellendorff on March 9, 2016, 10:32
There is an error in the code given above: It should be
Code
trajectory = nlread('filename.nc', Trajectory)[-1]
instead of
Code
trajectory = nlread('filename.nc', Trjaectory)[-1]