This is a very simple approach to perform energy minimization of the system. The module uses a steepest descent method. The position of particles is updated following the equation:

\[p_{i+1} = p_i + min(\gamma F_i, d_{max})\]

where \(p_{i+}\) is a new position, \(p_i\) is a position at current step with corresponding force \(F_i\). The parameters \(\gamma\) and \(d_{max}\) are set by user and control the relaxation of the energy and the maximum update of the coordinates per step.

Additionaly, a variable \(\gamma\) step is also implemented. In this case, the position of particles is updated following the equation:

\[p_{i+1} = p_i + d_{max}/f_{max} F_i\]

where \(f_{max}\) is a maximum force in a single step of steepest descent method. \(\gamma=d_{max}/f_{max}\) is automatically adjusted to a force magnitude.

In both cases, the routine runs until the maximum force is bigger than \(f_{max}\) or for at most n steps.

Please note This module does not support any integrator extensions.


>>> em = espressopp.integrator.MinimizeEnergy(system, gamma=0.001, ftol=0.01, max_displacement=0.0001)


>>> em = espressopp.integrator.MinimizeEnergy(system, gamma=0.01, ftol=0.01, max_displacement=0.01, variable_step_flag=True)


espressopp.integrator.MinimizeEnergy(system, gamma, ftol, max_displacement, variable_step_flag)
  • system (espressopp.System) – The espressopp system object.
  • gamma (float) – The gamma value.
  • ftol (float) – The force tolerance
  • max_displacement (float) – The maximum displacement.
  • variable_step_flag (bool) – The flag of adjusting gamma to the force strength., verbose)
  • max_steps (int) – The maximum number of steps to run.
  • verbose (bool) – If set to True then display information about maximum force during the iterations.

The true if the maximum force in the system is lower than ftol otherwise false.

Return type:



The maximum force in the system.


The maximum displacement used during the run of MinimizeEnergy


The current iteration step.