Variable cell optimization

1,303 views
Skip to first unread message

Rad

unread,
Oct 17, 2007, 3:51:56 PM10/17/07
to cp2k
Hi everybody,

Is it possible to do variable cell optimization using CP2K? Can
somebody provide me with a sample input section for that?

Thanks

Rad

Teodoro Laino

unread,
Oct 17, 2007, 3:56:33 PM10/17/07
to cp...@googlegroups.com
no.. it is not yet possible.
In the meantime you can do that externally with a script (perl/
python, there are many on the web) using
cp2k to compute energies and stress tensor.

Teo

Teodoro Laino

unread,
Mar 20, 2008, 8:50:08 PM3/20/08
to cp...@googlegroups.com
Hi Rad,

just a follow up about this message.
Me and Paolo Raiteri implemented the cell optimization algorithm in
cp2k both at 0K (optimizing the atomic positions) and at finite
temperature (averaging the stress tensor over an MD run). There are a
couple of regtest added in Fist/regtest-12/argon* showing how to use
the cell optimization algorithm. At the moment the only scheme
available is the CG with a 2PNT line search (quite efficient in the
systems
I tested).
Comments and suggestion are, as usual, welcome.

Ciao
Teo

On 17 Oct 2007, at 21:51, Rad wrote:

Rad

unread,
Mar 25, 2008, 9:03:07 AM3/25/08
to cp2k
Thanks Teo,

I just got back from my vacation and it is a great news. I will get to
it immediately as I am working on several systems for which this
method would be ideal.


Rad
> > Rad- Hide quoted text -
>
> - Show quoted text -

Rad

unread,
Mar 26, 2008, 4:20:51 PM3/26/08
to cp2k
Teo,

Couple of feedback: the volume is printed in Angstrom in some places
and bohr in other places. Is it possible to sick to one unit (just
bohr) so that post processing scripts people set up can stay as they
are?

The output produces a bunch of restart files for wavefunction and
Restart*restart. (this is for the case of GEO_OPT option). When I
restart the calculation which one I should use?

As usual convergence is always a tricky one. I am trying small systems
and having issues with pressure fluctuating wildly, starting with few
bars and reaching 50 kbars withing few steps. I will do few more runs
(QS, GPW) and get back to you on this. The second item is the one I
need a response before restarting my calculations.

Thanks a lot for this most anticipated module for our team.

Rad
> > - Show quoted text -- Hide quoted text -

Teodoro Laino

unread,
Mar 26, 2008, 4:36:25 PM3/26/08
to cp...@googlegroups.com
Rad,

On 26 Mar 2008, at 21:20, Rad wrote:

>
> Teo,
>
> Couple of feedback: the volume is printed in Angstrom in some places
> and bohr in other places. Is it possible to sick to one unit (just
> bohr) so that post processing scripts people set up can stay as they
> are?

the .cell file is always in ANGSTROM. the output on the screen is
according the unit that you
specified in your input file (if you use angstrom you will get
angstrom, if you use bohr you will get bohr)..
Use the .cell file for post-processing if you don't like the idea
that the output depends on the unit that
you decide to use.

> The output produces a bunch of restart files for wavefunction and
> Restart*restart. (this is for the case of GEO_OPT option). When I
> restart the calculation which one I should use?

The files generated during the geometry optimization are tagged *-
GEO_OPT-*..
you should also have a normal restart file without the -GEO_OPT-..
use that one!
In case you do MD instead of GEO_OPT you will find MD.

> As usual convergence is always a tricky one. I am trying small systems
> and having issues with pressure fluctuating wildly, starting with few
> bars and reaching 50 kbars withing few steps. I will do few more runs
> (QS, GPW) and get back to you on this. The second item is the one I
> need a response before restarting my calculations.

Rad, for material that are quite hard of course small variations of
the cell have large fluctuations in the pressure.
You can play with the bunch of parameters of the CELL_OPT section
(specifically with the LS 2PNT for reducing
the max_allowed_step) to get a safer optimization..

Teo

Nichols A. Romero

unread,
Mar 26, 2008, 5:16:27 PM3/26/08
to cp...@googlegroups.com
Rad,

For a material like diamond, a fluctuation of 50 kbar should be expected (even larger). That's only 5 GPa.

My experience with DFT is that converging the pressure to less than 1 kbar is unrealistic. So worrying about
bars is a waste of time. The story is probably different for interatomic potential-based calculations. I cannot
comment on those.
--
Nichols A. Romero, Ph.D.
DoD User Productivity Enhancement and Technology Transfer (PET) Group
High Performance Technologies, Inc.
Reston, VA
443-567-8328 (C)
410-278-2692 (O)

Rad

unread,
Mar 27, 2008, 9:07:07 AM3/27/08
to cp2k
Nick,

I have done cp2k calculations with pressure fluctuation of few bars
(well after 4000 steps in an NPT ensemble). All my diamond
calculations had a fluctuation of few kbars. This one I am trying is a
molecular system and I am hoping
to have fluctuations within few kbars. If not I will have to relax my
convergence criteria. The volume of the cell also fluctuates and I am
not sure it is because of the fluctuation in the pressure or due to
other factors such as not taking
into account dispersion in molecular crystals. I am hoping that the
molcular dynamics based cell optimization will give better resulsts
and my calculations are waiting in the queue.

Rad

On Mar 26, 5:16 pm, "Nichols A. Romero" <narom...@gmail.com> wrote:
> Rad,
>
> For a material like diamond, a fluctuation of 50 kbar should be expected
> (even larger). That's only 5 GPa.
>
> My experience with DFT is that converging the pressure to less than 1 kbar
> is unrealistic. So worrying about
> bars is a waste of time. The story is probably different for interatomic
> potential-based calculations. I cannot
> comment on those.
>
> On Wed, Mar 26, 2008 at 4:36 PM, Teodoro Laino <teodoro.la...@gmail.com>
> 410-278-2692 (O)- Hide quoted text -

Nichols A. Romero

unread,
Mar 27, 2008, 9:36:42 AM3/27/08
to cp...@googlegroups.com
Rad,

If you are planning to wait for the fluctuations to go away or to reach some steady state you are always going to have to wait a while. In my opinion, the only thing that matters is the mean pressure and the error in the mean. That
having been said, you need to look at
1. mean pressure, make sure it is not drifting significantly
2. calculate the error in the mean taking into the autocorrelation

BTW, the pressure is only well-defined for an extended system in CP2K (as far as I know).
Reply all
Reply to author
Forward
0 new messages