surfinpy.bulk_mu_vs_mu

surfinpy.bulk_mu_vs_mu.calculate(data, bulk, deltaX, deltaY, x_energy, y_energy)[source]

Initialise the free energy calculation.

Parameters
  • data (list) – List of surfinpy.data.DataSet object for each phase

  • bulk (surfinpy.data.ReferenceDataSet) – Reference dataset

  • deltaX (dict) – Range of chemical potential/label for species X

  • DeltaY (dict) – Range of chemical potential/label for species Y

  • x_energy (float) – DFT energy of adsorbing species

  • y_energy (float) – DFT energy of adsorbing species

Returns

system – Plotting object

Return type

surfinpy.plotting.ChemicalPotentialPlot

surfinpy.bulk_mu_vs_mu.calculate_bulk_energy(deltamux, deltamuy, x_energy, y_energy, phase, normalised_bulk)[source]

Calculates the free energy of a given phase (DFT calculation) as a function of chemical potential of x and y.

Parameters
  • deltamux (array_like) – Chemical potential of species x

  • deltamuy (array_like) – Chemical potential of species y

  • x_energy (float) – DFT energy or temperature corrected DFT energy

  • y_energy (float) – DFT energy or temperature corrected DFT energy

  • phase (surfinpy.data.DataSet) – DFT calculation

  • normalised_bulk (float) – Bulk energy normalised to the bulk value.

Returns

2D array of free energies as a function of chemical potential of x and y

Return type

array_like

surfinpy.bulk_mu_vs_mu.evaluate_phases(data, bulk, x, y, nphases, x_energy, y_energy)[source]

Calculates the free energies of each phase as a function of chemical potential of x and y. Then uses this data to evaluate which phase is most stable at that x/y chemical potential cross section.

Parameters
  • data (list) – List of surfinpy.data.DataSet objects

  • bulk (surfinpy.data.ReferenceDataSet object) – Reference dataset

  • x (dict) – X axis chemical potential values

  • y (dict) – Y axis chemical potential values

  • nphases (int) – Number of phases

  • x_energy (float) – DFT 0 K energy for species x

  • y_energy (float) – DFT 0 K energy for species y

Returns

phase_data – array of ints, with each int corresponding to a phase.

Return type

array_like

surfinpy.bulk_mu_vs_mu.normalise_phase_energy(phase, bulk)[source]

Converts normalises each phase to be consistent with the bulk. DFT calculations may have differing numbers of formula units compared to the bulk and this must be accounted for. Furthermore, the vibrational entropy and zero point energy are accounted for (if required).

Parameters
Returns

Normalised phase energy

Return type

float