[gpaw-users] checkpoint at ever relaxation step

Nichols A. Romero naromero at alcf.anl.gov
Fri Oct 7 22:05:18 CEST 2011


If someone creates a blank page, I will post to it. Would this go on the ASE or GPAW website?
I don't think I have write permission to the ASE SVN.

Nichols A. Romero, Ph.D.
Argonne Leadership Computing Facility
Argonne National Laboratory
Building 240 Room 2-127
9700 South Cass Avenue
Argonne, IL 60490
(630) 252-3441


----- Original Message -----
From: "Jens Jørgen Mortensen" <jensj at fysik.dtu.dk>
To: "Jakob Schiøtz" <schiotz at fysik.dtu.dk>
Cc: "Nichols A. Romero" <naromero at alcf.anl.gov>, "GPAW users" <gpaw-users at listserv.fysik.dtu.dk>
Sent: Wednesday, September 21, 2011 4:00:14 AM
Subject: Re: [gpaw-users] checkpoint at ever relaxation step

tir, 20 09 2011 kl. 20:52 +0200, skrev Jakob Schiøtz:
> On 20 Sep, 2011, at 8:56, Jens Jørgen Mortensen wrote:
> 
> > man, 19 09 2011 kl. 22:31 +0200, skrev Nichols A. Romero:
> >> This is what I came up with and it seems to work:
> >> http://en.pastebin.ca/2081412
> >> 
> >> But there should be a smarter way to do this. The atoms object
> >> is an arguement to the trajectory constructor; the atoms object is also 
> >> an arguement to the observer constructor which is eventually 
> >> attached to the trajectory. Seems redundant.
> > 
> > Instead of using traj.post_write_attach(), which I have never heard of,
> 
> traj.post_write_attach and pre_write_attach are hooks for doing on-the-fly data analysis just before saving a frame to a trajectory, and for cleaning up afterwords.  The rationale being that if you attach both the analysis and the trajectory to the dynamics, you cannot guarantee that the analysis is run before the writing.

Shouldn't relax call the attached functions in the order they are
attached?

> > you should use relax.attach():
> 
> Agreed
> 
> > 
> > relax.attach(lambda: calc.write('foobar.%d.hdf5' % relax.nsteps))
> 
> If you dislike lambda constructs, it is easy to make a small observer class (or a function) doing the same.
> 
> > 
> > Someone should document this on the ASE web-page …
> 
> Agreed.  Do we need a "common tricks" page?

Good idea.  Any volunteers?

Jens Jørgen

> > Jens Jørgen
> > 
> >> Nichols A. Romero, Ph.D.
> >> Argonne Leadership Computing Facility
> >> Argonne National Laboratory
> >> Building 240 Room 2-127
> >> 9700 South Cass Avenue
> >> Argonne, IL 60490
> >> (630) 252-3441
> >> 
> >> 
> >> ----- Original Message -----
> >> From: "Nichols A. Romero" <naromero at alcf.anl.gov>
> >> To: "Ask Hjorth Larsen" <askhl at fysik.dtu.dk>
> >> Cc: "GPAW users" <gpaw-users at listserv.fysik.dtu.dk>
> >> Sent: Wednesday, September 14, 2011 12:51:52 PM
> >> Subject: Re: [gpaw-users] checkpoint at ever relaxation step
> >> 
> >> I meant the latter. I want to write the density out to an hdf5 file at the
> >> end of each geometry optimization step.
> >> 
> >> Nichols A. Romero, Ph.D.
> >> Argonne Leadership Computing Facility
> >> Argonne National Laboratory
> >> Building 240 Room 2-127
> >> 9700 South Cass Avenue
> >> Argonne, IL 60490
> >> (630) 252-3441
> >> 
> >> 
> >> ----- Original Message -----
> >> From: "Ask Hjorth Larsen" <askhl at fysik.dtu.dk>
> >> To: "Nichols A. Romero" <naromero at alcf.anl.gov>
> >> Cc: "GPAW users" <gpaw-users at listserv.fysik.dtu.dk>
> >> Sent: Wednesday, September 14, 2011 11:55:35 AM
> >> Subject: Re: [gpaw-users] checkpoint at ever relaxation step
> >> 
> >> Hi
> >> 
> >> On Wed, 14 Sep 2011, Nichols A. Romero wrote:
> >> 
> >>> Hi,
> >>> 
> >>> Could someone send me an example of how to write a checkpoint file 
> >>> (.hdf,.gpw)
> >>> once per relaxation step?
> >> 
> >> I realize that you probably mean geometry optimization step.
> >> 
> >> In that case see the ASE documentation:
> >> 
> >>   https://wiki.fysik.dtu.dk/ase/ase/optimize.html
> >> 
> >> Regards
> >> Ask
> >> _______________________________________________
> >> gpaw-users mailing list
> >> gpaw-users at listserv.fysik.dtu.dk
> >> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
> >> _______________________________________________
> >> gpaw-users mailing list
> >> gpaw-users at listserv.fysik.dtu.dk
> >> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
> > 
> > 
> > 
> > _______________________________________________
> > gpaw-users mailing list
> > gpaw-users at listserv.fysik.dtu.dk
> > https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users
> 
> --
> Jakob Schiøtz, Ph.D.
> Associate professor (lektor)
> Program coordinator, M.Sc. in Physics and Nanotechnology
> (kandidatstudieleder, Fysik og Nanoteknologi)
> CINF, Department of Physics
> Technical University of Denmark
> DK-2800 Kongens Lyngby, Denmark
> http://www.cinf.dtu.dk/~schiotz/
> 





More information about the gpaw-users mailing list