Pipeline for Formation Energy (Ef) (defect_calculations/formation_energy.md)

1. Run vc-relax

Structure Optimization

Three calculations need to be performed for the structure optimization:

  1. Bulk Sb₂Te₃ (pristine system)
  2. Bulk Cr (reference state)
  3. Cr-doped Sb₂Te₃ with two configurations:
  4. Substitutional doping: Cr atom replacing an Sb site (Cr(_\text{Sb})).
  5. Interstitial doping: Cr atom occupying crystal voids (Cr(_\text{int})).

2. Formation Energy Calculation

Formation Energy of Defects in a Bulk Crystal

The formation energy of a defect in a bulk crystal describes the energy cost (or gain) to introduce a defect into the perfect lattice. This is crucial for understanding the thermodynamics, stability, and electronic properties of defects.

General Equation

For a defect ( D ) in a bulk crystal, the formation energy is given as:

[ E_\mathrm{form}(D,q) = E_\mathrm{tot}(D,q) - E_\mathrm{tot}(\mathrm{bulk}) - \sum_i n_i \mu_i + q(E_F + E_\mathrm{vbm}) + E_\mathrm{corr} ]

Term Definitions:

  1. ( E_\mathrm{tot} ): Total energy of the doped or pristine system.
  2. ( n_i ): Number of atoms of species ( i ) added or removed.
  3. ( \mu_i ): Chemical potential of species ( i ).
  4. ( E_F ): Fermi energy relative to the valence band maximum (( E_\mathrm{vbm} )).
  5. ( E_\mathrm{corr} ): Electrostatic correction for charged defects.

Specific Equations for Cr-Doped Sb₂Te₃

Substitutional Doping (( \text{Cr}_\text{Sb} ))

[ E_{\text{form}}(\text{Cr}\text{Sb}, q) = E{\text{tot}}(\text{Cr-Sb}2\text{Te}_3, q) - E{\text{tot}}(\text{Sb}2\text{Te}_3) + \mu\text{Sb} - \mu_\text{Cr} + q (E_F + E_{\text{vbm}}) + E_{\text{corr}} ]

Interstitial Doping (( \text{Cr}_\text{int} ))

[ E_{\text{form}}(\text{Cr}\text{int}, q) = E{\text{tot}}(\text{Cr-Sb}2\text{Te}_3, q) - E{\text{tot}}(\text{Sb}2\text{Te}_3) - \mu{\text{Cr}} + q(E_F + E_{\text{vbm}}) + E_{\text{corr}} ]


Steps to Compute Formation Energy

  1. Perform DFT Calculations:
  2. Calculate ( E_{\text{tot}} ) for the doped system.
  3. Calculate ( E_{\text{tot}} ) for the pristine bulk system.

  4. Determine Chemical Potentials:

  5. Extract ( \mu_{\text{Cr}} ) from bulk Cr or Cr-rich phases.
  6. Determine ( \mu_{\text{Sb}} ) from Sb₂Te₃ phase stability limits.

  7. Set Fermi Energy:

  8. Use the bandgap of Sb₂Te₃ and adjust for the defect charge state ( q ).

  9. Correct for Finite-Size Effects:

  10. Apply ( E_{\text{corr}} ) for charged defects.

Python Script for Formation Energy Calculation

Below is the Python script to calculate the formation energy based on input files:

Input Files:

  1. Total energy for Cr-Sb₂Te₃ system: FR+d3.csv
  2. Reference energies:
  3. Bulk Sb₂Te₃: 0-bulk_energy.csv
  4. Bulk Cr: 0-Cr_energy.csv
# Import required libraries
import pandas as pd

# Read input files
file_path = '2._vdw_corr_DFT-D3/FR+d3.csv'
df_d3 = pd.read_csv(file_path)

# Read reference energies
df_cr = pd.read_csv('0-Cr_energy.csv')
df_bulk = pd.read_csv('0-bulk_energy.csv')

# Extract reference energy values
Cr_energy_d3 = df_cr.loc[df_cr['Name'] == 'Cr_d3']['Energy'].iloc[0]
bulk_energy_d3 = df_bulk.loc[df_bulk['Name'] == 'bulk_d3']['Energy'].iloc[0]

# Calculate Formation Energy
df_d3_energy = df_d3[['File', 'Atoms', 'Energy (eV)']]
df_d3_energy['Formation Energy (eV)'] = df_d3_energy['Energy (eV)'] - bulk_energy_d3 - Cr_energy_d3 * (df_d3_energy['Atoms'] - 60)

# Display the results
print(df_d3_energy)

Notes:

  • If the defect is neutral (( q = 0 )), the equations simplify to:
  • Substitutional Defect: [ E_{\text{form}}(\text{Cr}\text{Sb}) = E{\text{tot}}(\text{Cr-Sb}2\text{Te}_3) - E{\text{tot}}(\text{Sb}2\text{Te}_3) + \mu\text{Sb} - \mu_\text{Cr} ]
  • Interstitial Defect: [ E_{\text{form}}(\text{Cr}\text{int}) = E{\text{tot}}(\text{Cr-Sb}2\text{Te}_3) - E{\text{tot}}(\text{Sb}2\text{Te}_3) - \mu\text{Cr} ]

  • Adjust ( E_F ) and ( \mu_i ) based on the defect charge state and stability conditions.


Output

The script computes and outputs the formation energy for the Cr-doped system:

File Atoms Energy (eV) Formation Energy (eV)
Example.xyz 61 -123.45 -0.56
... ... ... ...

Conclusion

This pipeline provides a systematic approach to calculate the formation energy of Cr defects (substitutional and interstitial) in Sb₂Te₃ using DFT data and a Python script.