OptimizeBulkFreeEnergy

OptimizeBulkFreeEnergy(configuration, temperature=None, pressure=None, max_steps=None, opt_tolerance=None, bounding_factor=None, optimize_geometry_parameters=None, dynamical_matrix_parameters=None, qpoint_density=None, preserve_bravais_lattice=None, optimize_volume=None, trajectory_filename=None, trajectory_object_id=None)

Optimize the free energy of a bulk configuration. The vibrational free energy is calculated used a quasi-harmonic approach. The result of the optimization is returned as a Table class. Its columns contain the optimized REVIEW: This sentence is missing something configuration, the component and total energies and whether the optimization converged.

Parameters:
  • configuration (BulkConfiguration) – The configuration to be optimized.

  • temperature (PhysicalQuantity of type temperature.) – The temperature the configuration is optimized at.
    Default: 300 Kelvin

  • pressure (PhysicalQuantity of type pressure.) – The pressure that the configuration is optimized at. Specifying a pressure of zero corresponds to optimizing the Helmholtz free energy. A non-negative value will result in optimizing the Gibbs free energy.
    Default: 1 bar

  • max_steps (int) – The total number of cell optimization steps. This is independent of the number of atom relation steps.
    Default: 200

  • opt_tolerance (float) – Sets the convergence criteria of the optimization. This corresponds roughly to the maximum change in the cell parameters being optimized when expressed in either Angstroms or Radians.
    Default: 0.01

  • bounding_factor (float) – The range of the parameters to search in. Optimized parameters are sought within a range of +/- the bounds times the original value
    Default: 0.1

  • optimize_geometry_parameters (OptimizeGeometryParameters) – The optimization parameters used to define how the atom positions are optimized in each cycle. This optimization does not support optimizing the cell, and so all options relating optimizing the cell are ignored.

  • dynamical_matrix_parameters (DynamicalMatrixParameters) – The dynamical matrix parameters used to define how the vibrational free energy is calculated at each step. As the configuration is a bulk configuration all options that do not apply to bulk configurations are ignored.

  • qpoint_density – The density of q-points for which the phonon density of states should be calculated. A value of None uses the Monkhorst-Pack grid for the self-consistent calculation.
    Default: Monkhorst-Pack grid

  • preserve_bravais_lattice (bool) – Whether to optimize the existing Bravais lattice of the input configuration or to perform the optimization on a triclinic configuration, allowing all cell parameters to be optimized.
    Default: True

  • optimize_volume (bool) – Optimize the total cell volume rather than the individual unit cell parameters.
    Default: False

  • trajectory_filename (str) – The filename used to store the trajectory. If the value is None then no trajectory file will be written.
    Default: Trajectory is not written to file

  • trajectory_object_id (str | None) – The object id to use when saving to HDF5. If the object-id already exists in the given file, it will be overwritten.
    Default: None

Returns:

The optimized configuration, energies, and success status of the optimization.

Return type:

Table

Usage Examples

In this example, free energy optimization is used to model the phase change between the HCP and FCC phases of cobalt. The bulk free energy is computed in a range of 300 to 1000 Kelvin, and the resulting energies are plotted as a function of temperature. This shows a transition from HCP to FCC at around 650 Kelvin.

A workflow for he calculation can be downloaded here with a corresponding python script Cobalt_FCC_HCP_Example.py.

Notes

This method minimizes the free energy of a bulk configuration by including vibrational free energy in the total energy optimized. At each step of the optimization the atom positions are first optimized to determine the total electronic energy. The vibrational free energy is then calculated through a DynamicalMatrix calculation. Finally an additional energy is added for the compression work at the given pressure. These terms then combine together to define the free energy that is optimized.

Cell parameters can be optimized individually. By default, the Bravais lattice type is preserved during the optimization. If it is not preserved then the existing Bravais lattice is replaced with a triclinic Bravais lattice, which is then optimized. It is also possible to select to optimize just the cell volume. In this case the total volume is uniformly scaled to give different cell sizes.

When performing this optimization it is recommended to first fully optimize the configuration using the chosen calculator to get the minimum configuration at absolute zero temperature. The dynamical matrix calculation can produce negative vibrational modes if the configuration is too far from the minimum.

The optimization returns a Table with a single row containing the optimized configuration, the three components of the free energy, the total free energy and a boolean flag which indicates if the optimization converged.