Skip to content

Calculate the Equation of State

1. Introduction

Calculate the equation of state (EOS) of a material: the total energy of isotropically scaled copies of the material against their volume, fitted as E(V) with the Atomic Simulation Environment (ASE). The scaled materials and their jobs are grouped in a materials set and a jobs set.

2. Open the notebook

In JupyterLite, the notebook is made/workflows/equation_of_state.ipynb, entry 6.1.1 "Equation of State" of made/workflows/Introduction.ipynb.

3. Set the parameters

Cell 1.2 holds the material, workflow, compute and set 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
25
26
27
28
29
30
31
32
33
34
35
36
37
from datetime import datetime
from mat3ra.ide.compute import QueueName

# 2. Auth and organization parameters
# Set organization name to use it as the owner, otherwise your personal account is used
ORGANIZATION_NAME = None

# 3. Material parameters
FOLDER = "../uploads"
MATERIAL_NAME = "Silicon"  # Name of the material to load from local file or Standata
# Step of 2% around the equilibrium volume + 1 at it:
SCALE_FACTORS = [1.0 + 0.02 * i for i in range(-5, 6)]
VISUALIZATION_REPETITIONS = [1, 1, 1]

# 4. Workflow parameters
WORKFLOW_SEARCH_TERM = "total_energy.json"  # Search term for Workflows Standata
APPLICATION_NAME = "espresso"  # Can be switched to another supported application
# Optional and mainly relevant for workflow/application combinations that expose a relaxation subworkflow.
ADD_RELAXATION = False

# Optional and mainly relevant for periodic plane-wave workflows such as Quantum ESPRESSO.
RELAXATION_KGRID = None  # e.g., [4, 4, 4]
SCF_KGRID = None  # e.g., [4, 4, 4]

MY_WORKFLOW_NAME = "Equation of State - Total Energy" + (" (relax)" if ADD_RELAXATION else "")

# 5. Compute parameters
CLUSTER_NAME = None  # Specify full or partial hostname, e.g. "cluster-001"
QUEUE_NAME = QueueName.D
PPN = 1

# 6. Job and set parameters
MATERIALS_SET_PREFIX = "Equation of State Materials"
JOBS_SET_PREFIX = "Equation of State Jobs"
EOS_JOB_PREFIX = "Equation of State"
timestamp = datetime.now().strftime("%Y-%m-%d %H:%M")
POLL_INTERVAL = 30  # seconds

SCALE_FACTORS are the scale factors of the copies, one job each; the default is eleven factors from 0.90 to 1.10. MATERIALS_SET_PREFIX, JOBS_SET_PREFIX and EOS_JOB_PREFIX start the names of the materials set, the jobs set and the jobs.

The overview explains the account, material, workflow, k-point, compute and job parameters.

4. Run and read the result

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

Section 3 saves the scaled materials to a new materials set, and section 6 creates the jobs in a jobs set. After the jobs finish, section 8 tabulates the total energies and plots them against the volume. Section 9 fits the Birch-Murnaghan equation of state, plots the derivative dE/dV of the fit, and prints the equilibrium volume, the minimum energy and the bulk modulus in GPa; the fit needs at least four finished jobs with different volumes.

5. Interactive JupyterLite notebook

The interactive JupyterLite notebook for the equation of state can be accessed below.