# [Wien] Minimization stops by error

Peter Blaha pblaha at zeus.theochem.tuwien.ac.at
Wed Sep 17 09:27:08 CEST 2003

> I have used Wien2K to minimize the bond length of CO in a big box. The
> minimization scheme I used was BFGS and the command for the calculation
> was " min -j 'run_lapw' -I -fc 1.0 -i 40". However, after 18  steps of
> minimization , the program stoped by 'ERROR: ifnc>ipos'. Just before the
> calculation stoped, I have modified the delta parameters (from 0.3 to
> 0.05 and then to 0.1) according to the changes of the forces. Is the
> error related to the modification? What do 'ifnc' and 'ipos' mean?  And,
> how to avoid this problem? Any answer will be greatly appreciated.

I know that both, the documentation in the UG (I will try to change this
a little bit), as well as the usage of min_lapw is "non-trivial" for a
beginner.
I'll give here part of the new intended docu for min_lapw, which
hopefully makes it clear how one should proceed:

We recommend using NEWT (BFGS works only in "harmonic" cases).
In addition one must set proper "DELTAs" for each atom. Unfortunately,
these
DELTAs determine crucially how the minimization performs. Too small values
lead to many (unnecessary) "geometry steps", while too large DELTAs can
even
lead to divergence (and finally to a crash). Thus you \file{MUST} control
how
the minimization performs. We recommend the following sequence after
2-3 geometry steps:
\begin{verbatim}
grep :ENE *mini
:ENE  : ********** TOTAL ENERGY IN Ry =        -2994.809124
:ENE  : ********** TOTAL ENERGY IN Ry =        -2994.813852
:ENE  : ********** TOTAL ENERGY IN Ry =        -2994.818538
\end{verbatim}
Good, since the total energy is decreasing.
\begin{verbatim}
grep :FGL001 *mini
:FGL001:  1.ATOM                       0.000          0.000       18.219
:FGL001:  1.ATOM                       0.000          0.000       12.375
:FGL001:  1.ATOM                       0.000          0.000        7.876
:\end{verbatim}
Good, since the force (only a force along z is present here) is decreasing
reasonably towards zero.
When you detect large oszillations or too small changes of
the forces during geometry optimization, you will have to
decrease/increase
the DELTAs in \file{case.inM} and restart using the -I switch (or rm
case.tmpM). You must check this for every atom in your structure.

The last iteration of each geometry step is appended to
\file{case.scf\_mini},
so that this file contains the complete history of the minimization.

Regards
P.Blaha
--------------------------------------------------------------------------
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-15671             FAX: +43-1-58801-15698
Email: blaha at theochem.tuwien.ac.at    WWW: http://info.tuwien.ac.at/theochem/
--------------------------------------------------------------------------