[lammps-users] about box relaxation

Hi,
I am using lammps-31Aug10 version and box relaxation. I just notice that the cg minimization takes around 10000 steps to complete(EAM of LJ potential). Is that too much?
I think for other relaxation program only hundreds steps are needed. Is it a lammps problem or I set something wrong? Thanks all.

Doing it with box relaxation probably adds to the cost/iterations.
There are various parameters to play with in the min and min_modify
commands. See the doc page for details and discussion. If you
post what you are using for params, Aidan may be able to comment.
He has done a lot with box relaxations.

Steve

Also, I would definitely try the most current version. There have
been upgrades to the minimizer since last Aug.

Steve

I have tried the 2011 version and it’s the same. Here is my input file. I tried sd/cg. They both need ~10000 steps.

units metal
boundary p p p

atom_style atomic
atom_modify map array

read_data data.in

pair_style lj/cut 5.3
min_style sd

neighbor 1.0 bin
neigh_modify every 1 delay 5 check yes

fix 1 all box/relax tri 0.0

pair_coeff 1 1 3.31283e-08 6.29276
pair_coeff 1 2 2.25632e-07 4.82213
pair_coeff 2 2 3.5382e-07 5.74671

minimize 0 1.0e-3 200000 200000

I'll let Aidan comment. How many steps does it take
when you don't do a fix box/relax? How much is the
box changing?

Steve

10,000 is indeed a lot of steps to get the forces below 1e-03.

That said, the "time to complete" will depend a lot on the convergence
criteria that you use, and it is not a very good way to compare two
calculations. Instead, I would plot a graph of p, or
[pxx,pyy,pzz,pxy,pxz,pyz] versus step count.

Also, the rate at which this graph decays to zero will depend on things like
dmax, vmax and the linesearch method. You should experiment with those
things.

Finally, I note that your potentials have a large discontinuities at the
cut-off, which can cause problems with convergence.

Aidan

Finally, I note that your potentials have a large discontinuities at the
cut-off, which can cause problems with convergence.

I'll say it more strongly - this is fatal to trying to get good, rapid
convergence,
esp when doing a box/relax.

You need to offset your lj/cut to 0.0 (via pair_modify). The minimize
doc page discusses this.

Steve

So you mean the cutoff is crucial to get quick convergence? Actually most of EAM potentials have small cutoff.
I have similar convergence problem with both EAM and LJ.

You are going to have to experiment. Try using the "pair_modify shift yes"
command, as Steve suggested. Also try my suggestions.

Aidan

EAM potentials go to zero at the cutoff. Lj/cut does not,
unless you use pair_modify shift yes.

Steve

Here is my input and one example initial structure. I tried both LJ and EAM potential(come with lammps package).
For me it takes 18257 steps for LJ and 16477 steps for EAM to converge the CG minimization. The structure is randomly generated.
Thank you for your time!

Try following some of the tips I gave you on Feb 16.

Aidan

10,000 is indeed a lot of steps to get the forces below 1e-03.
I tried 1e-02 and the steps number is similar. I think at metal unit this should be 1e-02 eV/A. It should ok, right?

That said, the “time to complete” will depend a lot on the convergence
criteria that you use, and it is not a very good way to compare two
calculations. Instead, I would plot a graph of p, or
[pxx,pyy,pzz,pxy,pxz,pyz] versus step count.

In previous example, p decay to around zero after 10000 steps.

Also, the rate at which this graph decays to zero will depend on things like
dmax, vmax and the linesearch method. You should experiment with those
things.

I tried different dmax(2.0,0.2,0.02) and the steps are the same. For smaller value
even more steps are required(it’s obvious,right?). the ‘line’ option still doesn’t help much.
In my experience, in some other code like quantum-espresso,VASP, CG minimization
only needs few hundred steps to converge even from random initialization and indeed
no input parameter is needed to adjust much. For some empirical potential code, our
experience is the same.

Hi
I have tried vmax in fix. It will be faster if I change it to 0.001(default 0.0001?). But it still
takes about thousands of steps. If it goes to 0.01, the pressure will not converge sometimes.
Could it be better? Hundreds might be reasonable. Anyway, it’s faster now. Thank you.

Hi,
It’s better now. But I think thousands of steps is still too much. I cannot increase vmax too much, otherwise it will
not converge to the desired pressure. Any comment on this? Thanks.