Restarting cell/geo opt project

108 views
Skip to first unread message

kazimieras tamoliunas

unread,
Jun 7, 2019, 10:53:07 AM6/7/19
to cp2k
Hello,
I'm having some trouble restarting cell/geo optimization. Whenever i stop calculation with "mkdir EXIT" and i restart with the last wavefunction, the calculation starts from the first geometry as specified in the input. If i try and manually change cell vectors to the ones from last optimization, then i don't get the same Volume value, i presumably add errors doing that. Does anyone know how to go about this??
Maybe external cell file, but if that's an option what should be the extension.
I appreciate any comments or possible options!
Kazimieras

Patrick Gono

unread,
Jun 12, 2019, 5:03:46 AM6/12/19
to cp...@googlegroups.com
Dear Kazimieras,

Make sure that the printing of the .restart file is switched on by including the section &MOTION &PRINT &RESTART. The resulting file PROJECT_NAME-1.restart is an input file that is to be used when you want to restart a calculation, i.e. it contains all the information (atom coordinates, velocities, temperature, cell parameters, ...) as it was at the last step of your GEO_OPT, CELL_OPT, MD, ... calculation.

I hope this resolves your issue. If I misunderstood your problem, let me know.
Yours sincerely,
Patrick Gono

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To post to this group, send email to cp...@googlegroups.com.
Visit this group at https://groups.google.com/group/cp2k.
To view this discussion on the web visit https://groups.google.com/d/msgid/cp2k/f4a288b0-2f4a-42d8-ab91-c3d5a16bced9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

kazimieras tamoliunas

unread,
Jun 12, 2019, 5:57:16 AM6/12/19
to cp2k
Thank you! That's certainly a big part of my problem, but now i have a few other questions:
1. How do I restart the calculation with both the .restart file and with restart.wfn file? Or do you say the former file ( the one including atom coordinates, velocities, cell parameters, etc ) will be sufficient and i will obtain the same wavefunction without an increase in computational cost?
2. I don't need to change initial cell parameters specified in the input file?

Regards,
 Kazimieras

Patrick Gono

unread,
Jun 12, 2019, 8:52:44 AM6/12/19
to cp...@googlegroups.com
Dear Kazimieras,

The file printed in the &MOTION section, the one with the .restart extension is, technically, just a regular CP2K input file. It is printed for you to be able to restart a calculation that involves any technique specified in the &MOTION section (be it MD, GEO_OPT, CELL_OPT, NEB, etc.)
. It is an input file with all the parameters set to values that have been reached in the last simulation step.

On the other hand, you have the wave function restart file (extension RESTART.wfn) , which is not a CP2K input but rather a binary file that holds the information about the wave function. The printing of this file is specified in the &FORCE_EVAL section. It allows you to restart the SCF loop (the solution of the Kohn-Sham equations) without having to recalculate the wave functions from scratch.

In your input file, in the &FORCE_EVAL section, you can specify the name of the wave function restart file. If you run a, say, GEO_OPT calculation, and it finished at step 69, and a .restart file is written, the same wave function restart file will be specified as it was in your original input. Hence, if you submit a CP2K calculation starting from the .restart file, it will look for the wave function file in the chosen directory. If there is one present, it will start the solution of the KS equations from it. This can usually save you a few minutes in most scenarios.

I include a sample input file for cell optimization, and a .restart file that was generated at some point during the optimization procedure. Look at both files and verify that they specify the same simulation with the only differences being that the .restart file also holds the position of the atoms from the last step, the cell parameters from the last step, and that the current step (STEP_START_VAL) in the .restart file is set 12 instead of the default 1. If I wanted to start the whole cell optimization from scratch, I would run a job with test.inp as the input file. If I wanted to restart the cell optimization from the 12th step onward, I would run a job with test-1.restart as the input file. In both input files, you will see the same test-RESTART.wfn wave function restart file is specified. Both calculation would therefore look for this file and, if present, use it as an initial guess for the KS solution in the next CELL_OPT step.

Yours sincerely,
Patrick Gono

--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+uns...@googlegroups.com.
To post to this group, send email to cp...@googlegroups.com.
Visit this group at https://groups.google.com/group/cp2k.
test.inp
test-1.restart
Reply all
Reply to author
Forward
0 new messages