<HTML><HEAD><TITLE>Force minimization </TITLE><STYLE><!--P{font-size : medium;} --></STYLE></HEAD><BODY bgcolor="#cccccc">
<H1><B><FONT size="+1">Relaxing the nuclear positions</FONT></B></H1>

The HF and HK functionals are energy functionals of the density
<I>n</I> and nuclear coordinates {<B>R</B><sub>i</sub>}.  However,
there is a self-consistency condition that uniquely specifies the
density, which means that the energy <I>E</I> is a unique function of
the {<B>R</B><sub>i</sub>}.

The force is just the first derivative of <I>E</I> with respect to a a
particular {<B>R</B><sub>i</sub>}.  Thus in molecular statics
calculations, (or any time the Born Oppenheimer approximation is
assumed) and is also uniquely determined, since
{<B>R</B><sub>i</sub>}, changes adiabatically and
<I>n</I> is deterined from the instantaneous {<B>R</B><sub>i</sub>}.

<P>

In molecular statics calculations, <B>lmf</B> will iterate at a fixed
set of positions until it meets the self-consistency criteria
(specified by tokens <tt>MIX CONV=</tt> and <tt>MIX CONVC=</tt>), or until the
maximum number of iterations is reached in the self-consistency cycle
(<tt>START NIT=</tt>).

<B>lmf</B> will move the atoms using the forces it has using a
conjugate-gradients, Fletcher-Powell, or Broyden technique.  This
cycle is repeated until the forces and/or displacements are converged
to the specified tolerance, or when it reaches the maximum number of
allowed relaxation steps (specified by <tt>DYN NIT=</tt>).

After it moves the atoms, <B>lmf</B> will make an estimate for an
appropriate starting density at the new positions.  It starts with the
density it had at the previous positions, adds and subtracts a local
density at each site.  What it adds and subtracts depends on the
technique you specify to correct the Helman-Feynman forces; this is
done using <B><A href="fp.html#HAM"><tt>HAM FORCE=</tt></A></B>, which
see.

<P>

Even with the correction the forces can be rather slow to converge,
especially in large or heterogeneous systems, or when local orbitals
are added to include shallow core states.

An efficient approximate scheme to relax systems is as follows.

In general the HF energy functional applies to any any density, not
just the self-consistent one.  Now, <I>E</I> depends on BOTH the
choice of density and the nuclear positions {<B>R</B><sub>i</sub>}.

Because <B>lmf</B> adds a correction to the Helman-Feynman forces,
often the forces from the Mattheis construction (superposition of free
atom densities) are pretty good.  You can obtain an efficient, but
approximate relaxation scheme by using the forces from this density.


<P>

To tell <B>lmf</B> to always start with a Mattheis construction for
the density after each relaxation step, use the command-line switch
<tt>--rs=3</tt>.  <B>lmf</B> re-overlap the free-atom densities after
the atoms have been moved, instead of using the density created by the
last iteration as described above.

<BR>

To tell
<B>lmf</B> not to attempt self consistency (just go to the relaxation
step after a single band pass), use <tt>START NIT=1</tt>.

<BR>


These options can be used independently, but for scheme discussed above
use them both together.

<P>
Some other points:

<OL>
<LI> This construction avoids problems with self-consistency, and is very efficient, since
     only one iteration is needed for each step.

<P>

<LI> The forces <B>lmf</B> computes for the Mattheis construction are
     not exact derivatives of the Harris functional for this
     construction, though it would be possible to do in principle.  In
     practice using <tt>FORCES=1</tt> comes pretty close to the
     derivative of the Harris functional in the Mattheis construction.

<P>

<LI> You can tell <B>lmf</B> to write the atom positions with the
     command-line switch <tt>--wpos=filename</tt>.  Also <B>lmf</B> can 
     also read atom positions using <tt>--rpos=filename</tt>.  What
     atom positions <B>lmf</B> ultimately uses is described
     <B><A href="positions.html#HAM"><tt>here</tt></A></B>.

<P>

<LI> Once the forces are minimized in this construction you can then
     find the proper, self-consistent density at these positions by
     turning off the relaxations and driving the system to
     self-consistency.  Of course, the forces will for the proper
     density will change; you can see how much of an error the
     approximate construction makes this way.  And of course you can
     always relax the nuclear starting from these positions in the
     conventional way.

</OL>
