FIRE¶
- class FIRE(maximum_timestep=PhysicalQuantity(2.0, fs), scf_initial_guess=None)¶
Constructor for the FIRE optimizer method.
- Parameters:
maximum_timestep (PhysicalQuantity of type time) – The maximum timestep. Default: 2.0*femtosecond
scf_initial_guess (
UsePreviousConfiguration
|DIISExtrapolation
) –Determines how the state of the system at each MD step is used as an initial guess for the next MD step, in the case when a self-consistent calculation is performed at each step.
UsePreviousConfiguration
means that the density matrix (or valence density/wave functions in a plane-wave calculation) of the previous configuration will be used as an initial guess for the next SCF calculation. For LCAO and semi-empirical calculations, it is possible and recommended to useDIISExtrapolation
, which calculates an improved initial guess using the DIIS extrapolation method for the previous density matrices.This parameter has no effect when the calculator attached to
configuration
is a force-field calculator. Default:UsePreviousConfiguration
forPlaneWaveCalculator
,DIISExtrapolation(4)
forLCAOCalculator
andSemiEmpiricalCalculator
.
- scfInitialGuess()¶
- Returns:
The SCF initial guess used for the optimizer.
- Return type:
DIISExtrapolation
|UsePreviousConfiguration
| None
- uniqueString()¶
Return a unique string representing the state of the object.
Usage Examples¶
Optimize the geometry of a water molecule using the FIRE algorithm.
# Define elements
elements = [Oxygen, Hydrogen, Hydrogen]
# Define coordinates
cartesian_coordinates = [[ 0.0, -1.70000000e-05, 1.20198000e-01],
[ 0.0, 7.59572000e-01, -4.86714000e-01],
[ 0.0, -7.59606000e-01, -4.86721000e-01]]*Angstrom
# Set up configuration
molecule_configuration = MoleculeConfiguration(
elements=elements,
cartesian_coordinates=cartesian_coordinates
)
# Define a calculator
molecule_configuration.setCalculator(LCAOCalculator())
# Perform optimization using the FIRE algorithm.
OptimizeGeometry(molecule_configuration, optimizer_method=FIRE())
Notes¶
The Fast Inertial Relaxation Engine (FIRE) is an optimization algorithm which is based on molecular dynamics with additional modifications on the velocity and an adaptive timestep. Details about this algorithm can be found in [1].