[lammps-users] help with fix box/relax

  1. It is not clear to me how to use the fix box/relax command to minimize energy while allowing the box size to change. When I use the lines given below, nothing happens. That is, everything in the thermodynamic output remains same.

….

….

lattice fcc 4.05 orient x 1 0 0 orient y 0 1 0 orient z 0 0 1

……

velocity all create 300.0 5812775

fix 2 all box/relax aniso 0.0 0.0 4000.0

minimize 1.0e-7 0.001 10000 100000

unfix 2

minimize 1.0e-7 0.001 10000 100000

#2

fix 2 all box/relax aniso 0.0 0.0 2000.0

minimize 1.0e-7 0.001 10000 100000

unfix 2

minimize 1.0e-7 0.001 10000 100000

But when I change the orientation by the command:

lattice fcc 4.05 orient x 1 1 1 orient y 1 1 -2 orient z -1 1 0

(i.e. z = face diagonal or close packed direction), energy decreases with time step and the pressure in z direction approaches the value in fix box/relax. However, with the minimize command after the ‘unfix 2’, minimization goes on for a few more time steps (without change in box dimensions) changing both the pressure and the energy. It seems then, that the minimization done with ‘fix box/relax’ did not really give a configuration with the lowest energy for the final volume.

Why is this so?

Why should orientation of the lattice affect the minimization?

Furthermore, when I did not use a standalone minimization command (i.e. after unfix 2 box/relax) and with the orientation #2, minimization stopped after a few repetitions of the above sequence with different z pressures. That is, the minimization did not try to attain the specified pressure.

  1. I am also getting the message “Resetting reneighboring criterion during minimization’.

Is it something that I should be concerned about?

Thanks

Rohit

I'll let Aidan respond to your Qs about fix box/relax. I'll just say
that in general, when you use this fix, it is not simply minimizing the energy
of the system. Instead it is trying to minimize the energy while meeting
the applied pressure constraint. If the energy has to go up to get closer
to matching the constraint, then that may happen. You also should
read the doc page on fix box/relax about various minimizer settings
and strategies that will help.

You don't need to worry about the "resetting neighbor" message. That's
just to inform you what LAMMPS is doing.

Steve

Rohit,

I suggest you first make this scheme work for the hydrostatic case e.g.

fix 2 all box/relax aniso 1000.0 1000.0 1000.0

In this case, the calculation does correspond to a true minimization, and so
it should converge well. I note that your force tolerance is 0.001, which is
rather large. I like to use 0.0 :-). Pay attention to the convergence
information reported at the end of the minimization. It will tell you how
good the final state is.

From there, you can try applying non-hydrostatic set pressures:

fix 2 all box/relax aniso 0.0 0.0 4000.0

As Steve said, this latter case does not correspond to a true minimization.
It may be that you need to reach the target pressure in a series of stages,
intermediate between the hydrostatic case and your goal. There are also
quite a few knobs that you can twiddle that will help convergence. See the
man page for more info.

Aidan