# md.minimize¶

Overview

 FIRE Energy Minimizer (FIRE).

Details

Energy minimizer for molecular dynamics.

class hoomd.md.minimize.FIRE(dt, force_tol, angmom_tol, energy_tol, integrate_rotational_dof=False, forces=None, constraints=None, methods=None, rigid=None, min_steps_adapt=5, finc_dt=1.1, fdec_dt=0.5, alpha_start=0.1, fdec_alpha=0.99, min_steps_conv=10)

Energy Minimizer (FIRE).

Parameters:
• dt (float) – This is the maximum step size the minimizer is permitted to use $$[\mathrm{time}]$$. Consider the stability of the system when setting.

• integrate_rotational_dof (bool) – When True, integrate rotational degrees of freedom.

• forces (Sequence[hoomd.md.force.Force]) – Sequence of forces applied to the particles in the system. All the forces are summed together. The default value of None initializes an empty list.

• methods (Sequence[hoomd.md.methods.Method]) – Sequence of integration methods. Each integration method can be applied to only a specific subset of particles. The intersection of the subsets must be null. The default value of None initializes an empty list.

• constraints (Sequence[hoomd.md.constrain.Constraint]) – Sequence of constraint forces applied to the particles in the system. The default value of None initializes an empty list. Rigid body objects (i.e. hoomd.md.constrain.Rigid) are not allowed in the list.

• rigid (hoomd.md.constrain.Rigid) – A rigid bodies object defining the rigid bodies in the simulation.

• min_steps_adapt (int) – Number of steps energy change is negative before allowing $$\alpha$$ and $$\delta t$$ to adapt.

• finc_dt (float) – Factor to increase $$\delta t$$ by $$[\mathrm{dimensionless}]$$.

• fdec_dt (float) – Factor to decrease $$\delta t$$ by $$[\mathrm{dimensionless}]$$.

• alpha_start (float) – Initial (and maximum) $$\alpha [\mathrm{dimensionless}]$$.

• fdec_alpha (float) – Factor to decrease $$\alpha t$$ by $$[\mathrm{dimensionless}]$$.

• force_tol (float) – Force convergence criteria $$[\mathrm{force} / \mathrm{mass}]$$.

• angmom_tol (float) – Angular momentum convergence criteria $$[\mathrm{energy} * \mathrm{time}]$$.

• energy_tol (float) – Energy convergence criteria $$[\mathrm{energy}]$$.

• min_steps_conv (int) – A minimum number of attempts before convergence criteria are considered.

FIRE is a hoomd.md.Integrator that uses the Fast Inertial Relaxation Engine (FIRE) algorithm to minimize the potential energy for a group of particles while keeping all other particles fixed. This method is published in Bitzek, et. al., PRL, 2006. HOOMD-blue’s implementation extends the original formulation to include rotational degrees of freedom.

At each time step, $$\delta t$$, the algorithm uses the supplied integration methods to generate $$\vec{r}$$, $$\vec{v}$$, and $$\vec{F}$$, and then adjusts $$\vec{v}$$ according to

$\vec{v} = (1-\alpha)\vec{v} + \alpha \hat{F}|\vec{v}|$

where $$\alpha$$ and $$\delta t$$ are dynamically adaptive quantities. While a current search has been lowering the energy of system for more than $$N_{min}$$ steps, $$\alpha$$ is decreased by $$\alpha \rightarrow \alpha \cdot \mathrm{fdec}_{\alpha}$$ and $$\delta t$$ is increased by $$\delta t \rightarrow \max(\delta t \cdot \mathrm{finc}_{dt}, \ \delta t_{max})$$. If the energy of the system increases (or stays the same), the velocity of the particles is set to 0, $$\alpha \rightarrow \ \alpha_{start}$$ and $$\delta t \rightarrow \delta t \cdot \mathrm{fdec}_{\alpha}$$. The method converges when the force per particle is below force_tol, the angular momentum is below angmom_tol and the change in potential energy from one step to the next is below energy_tol:

$\frac{\sum |F|}{N*\sqrt{N_{dof}}} < \mathrm{\text{force_tol}} \;\;, \;\ \Delta \frac{\sum|E|}{N} < \mathrm{\text{energy_tol}} \;\;, and \;\ \frac{\sum|L|}{N} < \mathrm{\text{angmom_tol}}$

where $$N_{\mathrm{dof}}$$ is the number of degrees of freedom the minimization is acting over. Any of the criterion can be effectively disabled by setting the tolerance to a large number.

If the minimization acts on a subset of all the particles in the system, the other particles will be kept frozen but will still interact with the particles being moved.

Examples:

fire = md.minimize.FIRE(dt=0.05,
force_tol=1e-2,
angmom_tol=1e-2,
energy_tol=1e-7)
fire.methods.append(md.methods.ConstantVolume(hoomd.filter.All()))
sim.operations.integrator = fire
while not(fire.converged):
sim.run(100)

fire = md.minimize.FIRE(dt=0.05)
fire.methods.append(md.methods.ConstantPressure(
hoomd.filter.All(), S=1, tauS=1, couple='none'))
sim.operations.integrator = fire
while not(fire.converged):
sim.run(100)


Note

To use FIRE, set it as the simulation’s integrator in place of the typical hoomd.md.Integrator.

Note

The algorithm requires an integration method to update the particle position and velocities. This should either be either hoomd.md.methods.ConstantVolume (to minimize energy) or hoomd.md.methods.ConstantPressure (to minimize energy and relax the box), without setting any thermostat. The quantity minimized is in any case the potential energy (not the enthalpy or any other quantity).

Note

In practice, the default parameters prevents the simulation from making too aggressive a first step, but also from quitting before having found a good search direction. Adjust the parameters as needed for your simulations.

dt

This is the maximum step size the minimizer is permitted to use $$[\mathrm{time}]$$. Consider the stability of the system when setting.

Type:

float

force_tol

Force convergence criteria $$[\mathrm{force} / \mathrm{mass}]$$.

Type:

float

angmom_tol

Angular momentum convergence criteria $$[\mathrm{energy} * \mathrm{time}]$$.

Type:

float

energy_tol

Energy convergence criteria $$[\mathrm{energy}]$$.

Type:

float

integrate_rotational_dof

When True, integrate rotational degrees of freedom.

Type:

bool

forces

Sequence of forces applied to the particles in the system. All the forces are summed together. The default value of None initializes an empty list.

Type:

Sequence[hoomd.md.force.Force]

methods

Sequence of integration methods. Each integration method can be applied to only a specific subset of particles. The intersection of the subsets must be null. The default value of None initializes an empty list.

Type:

Sequence[hoomd.md.methods.Method]

constraints

Sequence of constraint forces applied to the particles in the system. The default value of None initializes an empty list. Rigid body objects (i.e. hoomd.md.constrain.Rigid) are not allowed in the list.

Type:

Sequence[hoomd.md.constrain.Constraint]

rigid

A rigid bodies object defining the rigid bodies in the simulation.

Type:

hoomd.md.constrain.Rigid

Number of steps energy change is negative before allowing $$\alpha$$ and $$\delta t$$ to adapt.

Type:

int

finc_dt

Factor to increase $$\delta t$$ by $$[\mathrm{dimensionless}]$$.

Type:

float

fdec_dt

Factor to decrease $$\delta t$$ by $$[\mathrm{dimensionless}]$$.

Type:

float

alpha_start

Initial (and maximum) $$\alpha [\mathrm{dimensionless}]$$.

Type:

float

fdec_alpha

Factor to decrease $$\alpha t$$ by $$[\mathrm{dimensionless}]$$.

Type:

float

min_steps_conv

A minimum number of attempts before convergence criteria are considered.

Type:

int

property converged

True when the minimizer has converged, else False.

(Loggable: category=”scalar”, default=False)

Type:

bool

property energy

Get the energy after the last iteration of the minimizer.

(Loggable: category=”scalar”)

Type:

float

reset()

Reset the minimizer to its initial state.