Monday, August 31, 2009

Lammps: Min::linemin_quadratic()

Some observations on linemin_quadratic():

1) 'dir' -- passed as argument by the CG routine isn't a unit vector. In the 1-D instance it's the force. There is a check for: f.s > 0 ('f' is force and 's' search direction), the linemin() immediately exits with error if this isn't satisfied.

2) normflag = 0, hence 'fdotdirall /= atom->natoms' doesn't have any effect. Further, nextra seems to be 0 too as fdotdirall += fextra[i]*hextra[i] doesn't have any effect. The only non zero component of the 9-component global force is vector is f[3] (this is the x-component of atom 2's force).

3) initAlpha = min(1.0,(dmax/hmax) ; dmax is a supplied parameter & is = 0.3 in my case ; hmax = biggest component of search direction in absolute terms.
lammps checks -- if (hmax==0): linemin() exits with error
So for the 1-D case, initAlpha is always 1.0

4) At the start of each linemin(), the calling CG routine passes the current config, current energy & forces. Assume that these initial quantities' consistency isn't suspect.

5) All steps in linemin() are made ONLY with respect to the initial configuration, ie. x_new = x_init + alpha_currrent*dir;

6) In my file (linemin) I'm dumping: count,f.s,f[3],energy,x[3],x[6],alpha
f[3],x[3] - are force and x-position of particle 2, x[6] is x-position of particle 3
In some cases a last string field is there to indicate where in the code is the dump coming from.

Friday, August 28, 2009