fire: fast inertial relaxation engine for optimization on all...

23
FIRE FIRE: Fast Inertial Relaxation Engine for Optimization on All Scales P. Koskinen E. Bitzek, F. Gähler, M. Moseler, and P. Gumbsch Funding: Academy of Finland Fraunhofer MAVO for Multiscale Materials Modeling Fraunhofer Institut Werksoffmechanik P. Koskinen 19. September 2006 Multiscale Materials Modeling

Upload: others

Post on 25-Jun-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

FIREFIRE: Fast Inertial Relaxation Enginefor Optimization on All Scales 

P. KoskinenE. Bitzek, F. Gähler, M. Moseler, and P. Gumbsch

Funding: Academy of Finland Fraunhofer MAVO for Multiscale Materials Modeling

Fraunhofer Institut

Werksoffmechanik

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Page 2: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Optimization

Local optimization:●structure optimization●constrained optimization●transition state (barrier) calculations●stability analysis●etc...

Global minimization●often uses local minimization methods

Page 3: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Optimization

Local optimization:●structure optimization●constrained optimization●transition state (barrier) calculations●stability analysis●etc... Steepest Descent (SD)

Conjugate Gradient (CG)Molecular Dynamics (MD) ('quenching')Quasi-Newton (QN) (BFGS, L-BFGS)Truncated Newton (TN)etc...

Toolbox:

Page 4: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Choose your weapon

Page 5: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Choose your weapon

Page 6: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Choose your weapon

– computational cost● function calls● computational overhead

– memory requirements ~ N↔N2

– robustness – easy to use? (parameters, implementation)– convergence criteria (E, F, max(F), r,...)

Page 7: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Choose your weapon

– computational cost● function calls● computational overhead

– memory requirements ~ N↔N2

– robustness – easy to use? (parameters, implementation)– convergence criteria (E, F, max(F), r,...)

Molecular Dynamics (MD) ('quenching')

Page 8: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Clever skier

start here

minimum

Page 9: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Clever (blind) skier

start here

minimum?

Page 10: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Snapshot at t=ti

Page 11: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Snapshot at t=ti

Page 12: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Considerations

●if we go uphill ⇒ stop●use MD with discrete t: optimize t in a stable manner: right direction? ⇒increase t where to go? ⇒decrease t t should have max limit no hasty decisions●steer in the beginning, then let it go too heavy steering ⇒ SD let inertia decide the direction

All dimensions should be comparablevectors are 3N-dimensional

Fast Inertial Relaxation Engine (FIRE)

Page 13: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

The algorithm

MD: calculate x, F = − ∇E(x), and v using any common MD integrator; check for convergence F1: calculate P = F · v F2: set v → (1 − α) · v + α · F/|F| · |v| F3: if P > 0 and the number of steps since P was negative is larger than N

min, increase the time step

∆t → min(∆t · finc

, ∆tmax

) and decrease α → α · fα

F4: if P ≤ 0, decrease time step ∆t → ∆t · fdec

, freeze

the system v → 0 and set α back to αstart

F5: return to MD E. Bizek, P. Koskinen, F. Gähler, M. Moseler, P. Gumbch, PRL (to appear)

Page 14: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Sample code (!)

subroutine FIRE(it,dt,n,v[n],F[n],done) if( max(F) < crit ) done

P = V*F V = (1-a)*V + a*F*norm(V)/norm(F)

if( P<0 ) V = 0 cut = it dt = dt * f_dec a = a_start else if( P>=0 and it-cut>N_min ) dt = min( dt*f_inc, dt_max ) a = a * f_dec

Page 15: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Results

Fenretinide (N=62)

FIRE

CG

Page 16: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Results

function calls

Small convergence criteria: Na71

-

FIRE

CG

Page 17: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Results

Convergence criteria: FRMS

or Fmax

<10-3 eV/Å (10-6 eV/Å)

Page 18: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Summary

FIRE competes with sophisticated methods!

Page 19: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Summary

FIRE competes with sophisticated methods!

Furthermore:●robust relaxation for all N●memory usage small●small computational overhead●gradient-based: stability analysis●gradient based: small convergence criteria●non-harmonic energy landscapes●stable against errors in E(x) and F(x)●constrained minimization easy●intuitive, easy adaption to new problems●application to non-atomistic problems

Page 20: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

FIRE code

subroutine FIRE(it,dt,n,v[n],F[n],done) if( max(F) < crit ) done

P = V*F V = (1-a)*V + a*F*norm(V)/norm(F)

if( P<0 ) V = 0 cut = it dt = dt * f_dec a = a_start else if( P>=0 and it-cut>N_min ) dt = min( dt*f_inc, dt_max ) a = a * f_dec

Have fun!

Have fun!

Page 21: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Do not click, clicking is not allowed.

Page 22: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

Spiral

Page 23: FIRE: Fast Inertial Relaxation Engine for Optimization on All Scalesusers.jyu.fi/~pekkosk/resources/pdf/FIRE.pdf · 2013-01-17 · FIRE: Fast Inertial Relaxation Engine for Optimization

P. Koskinen 19. September 2006 Multiscale Materials Modeling

FIRE, CG and L-BFGS