simulated annealing using CP2K

1,490 views
Skip to first unread message

Geng Sun

unread,
Jul 14, 2015, 4:28:37 AM7/14/15
to cp...@googlegroups.com
Hello CP2K users 

      Could anyone give me some hints that how to do fix cell simulated annealing to find the stable structures in CP2K ?


Thanks in advance !

Samuel Andermatt

unread,
Jul 15, 2015, 4:41:57 AM7/15/15
to cp...@googlegroups.com
I don't think you can change the temperature over the course of a simulation, you will have to do multiple runs, one for each temperature. Fixed cell you have by choosing the NVT ensamble.

Matt W

unread,
Jul 15, 2015, 4:46:33 AM7/15/15
to cp...@googlegroups.com
There is an ANNEALING variable in the MD section. My understanding is that at each step velocities would be rescaled by this factor (I've never used it).

Matt

Marcella Iannuzzi

unread,
Jul 15, 2015, 4:56:21 AM7/15/15
to cp...@googlegroups.com

Yes ANNEALING works like this. Use a value smaller than 1 to decrease and larger than 1 to increase the temperature.
Be careful with the choice of the value, because the scaling factor is applied at each MD step to all velocities.

regards
Marcella

janos...@gmail.com

unread,
Jul 23, 2015, 3:57:38 AM7/23/15
to cp2k, sungen...@gmail.com
Dear Geng,

It can be done by using the EXT_RESTART option and some simple input files.

template: simple input file with EXT_RESTART from projectname-1.restart, restarting everything, and annealing parameter:
ANNEALING ${PAR}

Then, you can also use the SET and INCLUDE commands in three different inputs:

heating.inp:
@SET PAR 1.000001 #check the number for your needs
@INCLUDE ./template

const.inp
@SET PAR 1.000000
@INCLUDE ./template

cooling.inp:
@SET PAR 0.999999 #check the number for your needs
@INCLUDE ./template

then you simply write a script:
#! /usr/bin/bash

for i in {1..99999}; do  #again adjust to your needs
  cp2k.popt const.inp >>out
  cp2k.popt heating.inp >>out
  cp2k.popt const.inp >>out
  cp2k.popt cooling.inp >>out
done

You can set different simulation times by the SET command as well...
If you want, you can set different project names for different temperatures as well, so you can have the different temperature structures in different xyz files. And it is also a good idea to set the temperature by @SET for the input files.

HTH,

Janos

Geng Sun

unread,
Jul 27, 2015, 8:53:32 PM7/27/15
to janos...@gmail.com, cp2k
Janos,

    Thanks ! that's very helpful. I will give it a try.

Geng Sun

jing...@outlook.com

unread,
Aug 20, 2016, 4:23:18 PM8/20/16
to cp2k, janos...@gmail.com
Hi, Janos. Recently, I am learning simulated annealing to search the global minimum of small molecule. I saw your nice suggestion, but I have some questions,
For annealing, how to set the temperature? I tested my input file, when I use the keywords temperature and annealing, the error implied thermostat is needed. 
But thermostat and annealing are against, so I wonder how to set the temperature? And  in every input files(heating and cooling), should I do NVE simulations or
just do the optimization? 
      Thanks.
       
       Jing

在 2015年7月27日星期一 UTC-7下午5:53:32,Geng Sun写道:

jing...@outlook.com

unread,
Aug 20, 2016, 4:28:08 PM8/20/16
to cp2k, sungen...@gmail.com
Hi, Geng. How do you use the simulated annealing? Could you send me some input files. THANKS!

      Jing

在 2015年7月23日星期四 UTC-7上午12:57:38,Janos...@googlemail.com写道:
Reply all
Reply to author
Forward
0 new messages