Skip to content

Calculate the Formation Energy of a Neutral Defect

1. Introduction

Calculate the formation energy of a neutral defect from a defective and a pristine supercell. Only the defective supercell is calculated here: the total energies of the pristine supercell and of the elemental reference materials come from earlier runs of the Total Energy notebook. The result is the formation energy of the whole defective cell.

2. Open the notebook

In JupyterLite, the notebook is made/workflows/defect_formation_energy.ipynb, entry 6.5.1 "Defect formation energy" of made/workflows/Introduction.ipynb.

3. Set the parameters

Cell 1.2 holds the materials, workflow and compute parameters:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from datetime import datetime
from mat3ra.ide.compute import QueueName

# 2. Auth and organization parameters
ORGANIZATION_NAME = None

# 3. Material parameters
FOLDER = "../uploads"
DEFECTIVE_NAME = "Si"  # defective supercell: name in uploads or on the platform
PRISTINE_NAME = "Si"  # defect-free version of the SAME supercell

# 4. Workflow parameters
WORKFLOW_SEARCH_TERM = "defect_formation_energy.json"
APPLICATION_NAME = "espresso"
MY_WORKFLOW_NAME = "Defect Formation Energy"

# 5. Compute parameters
CLUSTER_NAME = None  # specify full or partial name i.e. "cluster-001" to select
QUEUE_NAME = QueueName.D
PPN = 1

# 6. Job parameters
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M")
POLL_INTERVAL = 30  # seconds

DEFECTIVE_NAME and PRISTINE_NAME are looked up with load_material. The pristine supercell is the defect-free version of the same supercell; the create_point_defect.ipynb structure notebook builds both.

The overview explains the account, FOLDER, workflow, compute and job parameters.

Cell 1.3 holds the k-grid and the chemical potentials:

1
2
SCF_KGRID = None  # e.g. [4, 4, 4]; None takes the pristine reference job's grid
CHEMICAL_POTENTIALS = {}  # Δμ per element, eV/atom, e.g. {"O": -0.12}

SCF_KGRID is the k-grid of both supercells, on which the pristine total energy job has to have run. CHEMICAL_POTENTIALS holds the changes of the chemical potentials Δμ per element, in eV/atom, for example from Formation Energies and Convex Hull; the notebook then also reports and plots the formation energy at these values.

4. Run and read the result

Run the notebook with Run > Run All and log in when it asks, as in Authentication in JupyterLite.

After the job finishes, section 7 shows the defect formation energy and prints the elemental reference energies per atom used by the job.

5. Interactive JupyterLite notebook

The interactive JupyterLite notebook for calculating the defect formation energy can be accessed below.

Calculate Defect Formation Energy runs the defect formation energy workflow from the web interface.