about output handling in cp2k

Axel akoh... at gmail.com
Mon Jul 9 17:56:09 UTC 2007


On Jul 9, 1:06 pm, Teodoro Laino <teodor... at gmail.com> wrote:

> Regarding this one:
>
> At the moment we had no time to convert the RESTART of QS to a
> print_key..
> When  it will be a print_key you will be able to do it.. i.e. print
> every n-th step of MD..
> It's in our todo list.. but as you can imagine with a low priority...

ok. great.

> > finally, i noticed that .dcd files are missing the header part
> > when i am using &EXT_RESTART to continue a calculation but
> > rename the files for each run. the only workaround i found so far
> > is to set RESTART_COUNTERS to .false., but since my jobs can
> > have different length (due to dynamic backfill queueing they can
> > be allowed to run for anything between 2 and 12 hours) it would be
> > extremely nice to have my cake and eat it, i.e. .dcd files with
> > headers
> > and restarted counters. is there an alternative way to get the header
> > written?
>
> This was a bug but as far as I know Will fixed it.. are you using a
> recent version?

just updated the cvs and rechecked. yes, it still creates .dcd without
a header. to reproduce it try the following:
take the test/QS/H2O-md.inp file and change it:
[akohlmey at vitriol ak]$ diff -u ../H2O-md.inp H2O-md.inp
--- ../H2O-md.inp       2006-08-14 11:39:59.000000000 -0400
+++ H2O-md.inp  2007-07-09 13:44:26.000000000 -0400
@@ -65,4 +65,9 @@
       MTS 2
     &END NOSE
   &END MD
+  &PRINT
+    &TRAJECTORY
+      FORMAT DCD
+    &END
+  &END
 &END MOTION

run it and then i restart with a further modified file:
diff -u H2O-md.inp restart.inp
--- H2O-md.inp  2007-07-09 13:44:26.000000000 -0400
+++ restart.inp 2007-07-09 13:46:54.000000000 -0400
@@ -1,4 +1,9 @@
-
+&EXT_RESTART
+   RESTART_FILE_NAME H2O-md-1.restart
+   RESTART_COUNTERS  T
+   RESTART_POS  T
+   RESTART_VEL  T
+&END
 &FORCE_EVAL
   METHOD Quickstep
   &DFT
@@ -48,7 +53,7 @@
 &GLOBAL
   FFTLIB FFTSG

-  PROJECT H2O-md
+  PROJECT H2O-md-a
   RUN_TYPE MD
   PRINT_LEVEL LOW
 &END GLOBAL

and bingo:
[akohlmey at vitriol ak]$ strings H2O-md-pos-1.dcd | head -2
CORD
REMARK FILETYPE CORD DCD GENERATED BY
CP2K                                      REMARK Support new DCD
format with cell information
[akohlmey at vitriol ak]$ strings H2O-md-a-pos-1.dcd | head -2
[akohlmey at vitriol ak]$

...even if i am doing something wrong here, i think
the second .dcd file should have a header.

> > since cp2k already seems to append some sort of serial number to
> > outputs, the most desirable (to me) way of writing output would

btw. i forgot to ask: where do i set this number?
i would have expected that this is a flag somewhere
in &GLOBAL ...

> > actually
> > be to have a parameter that specifies how many steps would go into
> > a single file (e.g. 2000, derived from the time step number) and then
> > start a new file when that is reached and step up the serial number.
> > could that be implemented with reasonable effort?
>
> don't think so.. again Fawzi can comment on the print_keys better
> than I can do..
> (i.e. I like this way of numbering ;-) )

well, feel free to add it to the ever growing TODO list :-)

cheers,
   axel.

>
> Teo
>
> > thanks,
> >    axel.




More information about the CP2K-user mailing list