surfinpy.bulk_mu_vs_t

surfinpy.bulk_mu_vs_t.calculate(data, bulk, deltaX, deltaY, x_energy, y_energy, mu_z, exp_x, exp_y)[source]

Initialise the free energy calculation.

Parameters
  • data (list) – List containing the surfinpy.data.DataSet objects for each phase

  • bulk (surfinpy.data.ReferenceDataSet) – 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 0K energy for species x

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

  • mu_z (float) – Set chemical potential for species y

  • exp_x (float) – Experimental correction for species x

  • exp_y (float) – Experimental correction for species y

Returns

system – Plotting object

Return type

surfinpy.plotting.MuTPlot

surfinpy.bulk_mu_vs_t.calculate_bulk_energy(deltamux, ynew, x_energy, z_energy, deltamuy, phase, bulk, normalised_bulk, exp_xnew, exp_znew, new_bulk_svib, new_data_svib)[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

  • ynew (array_like) – description needed

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

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

  • deltamuy (array_like) – Chemical potential of species y

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

  • bulk (surfinpy.data.ReferenceDataSet) – DFT calculation

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

  • exp_xnew (array_like) – Experimental correction for species x

  • exp_znew (array_like) – Experimental correction for species y

  • new_bulk_svib (float) – Vibrational entopy for the bulk reference cell calculated at the temperature range provided

  • new_data_svib (float) – Vibrational entopy for the phase calculated at the temperature range provided

Returns

Free energy

Return type

array_like

surfinpy.bulk_mu_vs_t.evaluate_phases(data, bulk, x, y, nphases, x_energy, y_energy, mu_z, exp_x, exp_z)[source]

Calculates the surface 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 containing the surfinpy.data.DataSet objects for each phase

  • bulk (surfinpy.data.ReferenceDataSet) – 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 0K energy for species x

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

  • mu_z (float) – Set chemical potential for species y

  • exp_x (float) – Experimental correction for species x

  • exp_z (float) – Experimental correction for species y

Returns

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

Return type

array_like

surfinpy.bulk_mu_vs_t.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

Constant normalising the slab energy to the bulk energy.

Return type

float