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 thesurfinpy.data.DataSet
objects for each phasebulk (
surfinpy.data.ReferenceDataSet
) – Reference datasetx (
dict
) – X axis chemical potential valuesy (
dict
) – Y axis chemical potential valuesnphases (
int
) – Number of phasesx_energy (
float
) – DFT 0K energy for species xy_energy (
float
) – DFT 0K energy for species ymu_z (
float
) – Set chemical potential for species yexp_x (
float
) – Experimental correction for species xexp_y (
float
) – Experimental correction for species y
- Returns
system – Plotting object
- Return type
- 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 xynew (
array_like
) – description neededx_energy (
float
) – DFT energy or temperature corrected DFT energyy_energy (
float
) – DFT energy or temperature corrected DFT energydeltamuy (
array_like
) – Chemical potential of species yphase (
surfinpy.data.DataSet
) – DFT calculationbulk (
surfinpy.data.ReferenceDataSet
) – DFT calculationnormalised_bulk (
float
) – Bulk energy normalised to the bulk value.exp_xnew (
array_like
) – Experimental correction for species xexp_znew (
array_like
) – Experimental correction for species ynew_bulk_svib (
float
) – Vibrational entopy for the bulk reference cell calculated at the temperature range providednew_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 thesurfinpy.data.DataSet
objects for each phasebulk (
surfinpy.data.ReferenceDataSet
) – Reference datasetx (
dict
) – X axis chemical potential valuesy (
dict
) – Y axis chemical potential valuesnphases (
int
) – Number of phasesx_energy (
float
) – DFT 0K energy for species xy_energy (
float
) – DFT 0K energy for species ymu_z (
float
) – Set chemical potential for species yexp_x (
float
) – Experimental correction for species xexp_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
phase (
surfinpy.data.DataSet
) – surfinpy dataset object.bulk (
surfinpy.data.ReferenceDataSet
) – surfinpy ReferenceDataSet object.
- Returns
Constant normalising the slab energy to the bulk energy.
- Return type
float