[gpaw-users] Restarting a calculation

Troels Kofoed Jacobsen tkjacobsen at gmail.com
Tue Mar 2 07:13:07 CET 2010


On Mon, Mar 01, 2010 at 04:12:25PM -0600, Daniel Torres wrote:
> Guys!
> how can I restart a calculation from a trajectory file?
> Best regards
> Dani
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users

Hi Daniel

You can not get the density and wave functions from a trajectory file,
but you can get the atomic positions along with the cell and any
constraints. E.g.

"""
from ase import read
from gpaw import GPAW

atoms = read('relax.traj')      # Use the last image in the trajectory
atoms.set_calculator(GPAW())    # Initialize a NEW calculator from
                                #scratch
atoms.get_potential_energy()
"""

The read() function takes an optional extra argument, index, you can use
to get other images than the last. E.g. if you want the second image
use (remember counting from 0):
atoms = read('relax.traj', 2)

You can also read a series of images, as used in a NEB calculations. For
more information, consult the wiki or write again.

Best regards
Troels Kofoed Jacobsen


More information about the gpaw-users mailing list