4. Chemical potential tutorial

4.1. Introduction

In this tutorial, you will see how to compute the chemical potential of carbon in the diamond phase. In DFT, this is simple the total energy per atom. In general, the chemical potential depends on thermodynamic variables likes pressure and temperature. Here we’ll simply get the chemical potential of the zero temperature ground state. We thus use the equilibrium lattice constant which may be found using an equation of states fit (see Equation of states tutorial). We simply perform the calculation defined in scf.input as follows

mpiexec -n 16 rescu --smi -i scf.input

Then load the results and get the total energy per atom.

HA2EV = 27.21138602;
mrc = load('results/scf.mat');
etot = mrc.energy.Etot * HA2EV;
etot = etot / numel(mrc.atom.element);
fprintf('mu = %f eV\n', etot)

The last line will print

mu = -163.887300 eV