"LAMMPS WWW Site"_lws - "LAMMPS Documentation"_ld - "LAMMPS Commands"_lc :c :link(lws,http://lammps.sandia.gov) :link(ld,Manual.html) :link(lc,Section_commands.html#comm) :line minimize command :h3 [Syntax:] minimize tolerance maxiter maxeval :pre tolerance = stopping tolerance maxiter = max iterations of minimizer maxeval = max number of total force/energy evaluations :ul [Examples:] minimize 1.0e-4 100 1000 :pre [Description:] Perform an energy minimization of the system, by adjusting each atom's atomic coordinates. The algorithm used is set by the "min_style"_min_style.html command. Minimize commands can be interspersed with "run"_run.html commands to alternate between relaxation and dynamics. The minimizers are implemented in a robust fashion that should allow for systems with highly overlapped atoms (large energies and forces) to still be minimized by pushing the atoms off of each other. Alternate means of relaxing a system are to run dynamics with a small or "limited timestep"_fix_nve_limit.html. Or dynamics can be run using "fix viscous"_fix_viscous.html to impose a damping force that slowly drains all kinetic energy from the system. The "pair_style soft"_pair_soft.html potential can be used to un-overlap atoms while running dynamics. Following the minimization a statistical summary is printed that includes the energy change and convergence criteria information. A minimization involves an outer iteration loop which sets the search direction along which coordinates are changed. An inner iteration is then performed using a line search algorithm. The line search typically evaluates forces and energies several times to set new coordinates. The minimization stops if any of several criteria are met: the change in energy between outer iterations is less than the tolerance the number of outer iterations exceeds maxiter the number of force evaluations exceeds maxeval the 3N dimensional force vector goes (nearly) to zero :ul For the first criterion, the specified tolerance is unitless; it is met when the ratio of the energy delta to the energy magnitude is equal to the tolerance (e.g. one part in 10^4 in the example above). During a minimization, the outer iteration count is treated as a timestep. Output is triggered by this timestep, e.g. thermodynamic output or dump and restart files. For optimal convergence, a "pair style"_pair_style.html that goes smoothly to 0.0 at the cutoff distance for both energy and force should typically be used though this is not required. Examples include {pair/lj/charmm/coul/charmm} and {pair/lj/charmm/coul/long}. If a {soft} potential is used the Astop value is used for the prefactor (no time dependence). Only some fixes (typically those that apply force constraints) are invoked during minimization. See the doc pages for individual "fix"_fix.html commands to see which ones are relevant. IMPORTANT NOTE: Some fixes which are invoked during minimization have an associated potential energy. For that energy to be included in the total potential energy of the system (the quantity being minimized), you MUST enable the "fix_modify"_fix_modify.html {energy} option for that fix. The doc pages for individual "fix"_fix.html commands specify if this should be done. [Restrictions:] Features that are not yet implemented are listed here, in case someone knows how they could be coded: It is an error to use "fix shake"_fix_shake.html with minimization because it turns off bonds that should be included in the potential energy of the system. The effect of a fix shake can be approximated during a minimization by using stiff spring constants for the bonds and/or angles that would normally be constrained by the SHAKE algorithm. "Fix rigid"_fix_rigid.html is also not supported by minimization. It is not an error to have it defined, but the energy minimization will not keep the defined body(s) rigid during the minimization. Note that if bonds, angles, etc internal to a rigid body have been turned off (e.g. via "neigh_modify exclude"_neigh_modify.html), they will not contribute to the potential energy which is probably not what is desired. The volume of the simulation domain is not allowed to change during a minimization. Ideally we would allow a fix such as {npt} to impose an external pressure that would be included in the minimization (i.e. allow the box dimensions to change), but this has not yet been implemented. Pair potentials that produce torque on a particle (e.g. "granular potentials"_pair_gran.html or the "GayBerne potential"_pair_gayberne.html for ellipsoidal particles) are not relaxed by a minimization. More specifically, radial relaxations are induced, but no rotations are induced by a minimization, so such a system will not fully relax. [Related commands:] "min_modify"_min_modify.html, "min_style"_min_style.html, "run_style"_run_style.html [Default:] none