Skip to content

Relax a Material

1. Introduction

Relax the geometry of a material in Quantum ESPRESSO, at fixed cell or at variable cell, and save the relaxed structure to the account for use in other notebooks.

2. Open the notebook

In JupyterLite, the notebook is made/workflows/relaxation.ipynb, entry 3.1.1 "Fixed-Cell / Variable-Cell Relaxation (QE, VASP)" of made/workflows/Introduction.ipynb.

3. Set the parameters

Cell 1.2 holds the material, 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
25
26
27
28
29
30
from datetime import datetime
from mat3ra.ide.compute import QueueName

# 2. Auth and organization parameters
ORGANIZATION_NAME = None

# 3. Material parameters
FOLDER = "../uploads"
MATERIAL_NAME = "Silicon"

# 4. Workflow parameters
# Options: "fixed_cell" (atoms only) / "variable_cell" (atoms + cell shape/volume)
RELAXATION_TYPE = "fixed_cell"

APPLICATION_NAME = "espresso"

WORKFLOW_SEARCH_TERM = f"{RELAXATION_TYPE}_relaxation.json"
MY_WORKFLOW_NAME = RELAXATION_TYPE.replace("_", " ").title() + " Relaxation"

# Model parameters
MODEL_SUBTYPE = "gga"  # or "lda"

# 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

RELAXATION_TYPE is "fixed_cell" (atomic positions only) or "variable_cell" (atomic positions, cell shape and volume); it selects the Standata workflow <RELAXATION_TYPE>_relaxation.json.

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

Cell 1.3 holds the method parameters:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
# Method parameters
PSEUDOPOTENTIAL_TYPE = "us"  # "us" (ultrasoft), "nc" (norm-conserving), "paw"
FUNCTIONAL = "pbe"  # for gga: "pbe", "pbesol"; for lda: "pz"

# K-grid for the relax step (if not set, KPPRA default is used)
KGRID = None  # e.g. [4, 4, 4]

# Additional parameters to set in the QE input
ADDITIONAL_PARAMETERS = None  # for example {"system": {"vdw_corr": "d3_grimme"}}

# Energy cutoffs
ECUTWFC = 40
ECUTRHO = 200

KGRID is the k-grid of the relaxation.

The overview explains the model, k-point and cutoff and engine input 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.

After the job finishes, section 8 shows the properties of the job and the relaxed structure, names the relaxed material <material name> fixed-cell relaxed or <material name> variable-cell relaxed, and prints its material ID.

5. Interactive JupyterLite notebook

The interactive JupyterLite notebook for relaxing a structure can be accessed below.

Perform Structural Relaxation runs the relaxation from the web interface.