Skip to content

Perform Structural Relaxation

This tutorial explains how to run a structural relaxation using Density Functional Theory (DFT). Variable-cell relaxation simultaneously minimizes inter-atomic forces while optimizing the lattice geometry by minimizing its potential energy and stress tensor components.

Relaxation can be run either as a stand-alone workflow or prepended as a Workflow Add-on to another property calculation.

The example system is crystalline silicon distorted from its equilibrium cubic-diamond crystal structure, using VASP as the simulation engine for a Total Energy computation. Relaxation prior to a property calculation is a critical step for ensuring accurate final results.

General applicability

Despite referencing VASP, the instructions here apply to all modeling engines supported on the platform.

VASP version

This tutorial applies to VASP versions 5.3.5, 5.4.4, and later.

1. Create the job

Silicon in its cubic-diamond crystal structure is the default material loaded on new job creation, unless the default was changed after account creation.

2. Select the workflow and add the relaxation add-on

Workflows for the Total Energy calculation can be imported from the Workflows Bank into the account-owned collection. The workflow can then be selected and added to the job being created.

In order to add structural relaxation as an Add-on, click the appropriate button within the Header Menu of Workflow Designer and select "Relaxation".

After insertion, an additional "Variable-cell Relaxation" Subworkflow is prepended to the computation order flowchart on the left side of the Workflow Designer.

3. Examine the unit input files

Open the main "vc-relax" Execution Unit within the "Variable-cell Relaxation" Subworkflow by clicking it. The input files can be inspected towards the bottom of the unit editor.

The relaxation type is variable-cell by default, including both atomic positions and unit cell shape and size.

The second total energy subworkflow reads the structural information output by the preliminary relaxation, rather than the parameters in its own input.

VASP-specific behavior

The POSCAR file in the ensuing Total Energy subworkflow is a placeholder that is overwritten during execution by the CONTCAR file from the relaxation results. This behavior is triggered by the "prepare_restart" post-processor.

4. Submit the job

Before submitting the job, review the Compute tab of Job Designer to verify the compute parameters. Silicon is a small structure, so 4 CPUs and 1 minute of runtime are sufficient.

5. Examine the results

Once the job completes, the Results tab of Job Viewer displays the optimized total energy and additional information about each execution unit.

6. Inspect the optimized structure

The output and input files are available under the Files tab of Job Viewer. The POSCAR file can be downloaded and inspected to determine the relaxed geometry.

The structural data can also be visualized graphically in the Materials Viewer within the Results tab.

7. Video walkthrough

The animation below demonstrates the creation and execution of a structural relaxation study on a Total Energy workflow using Quantum ESPRESSO. The starting point is a silicon crystal slightly distorted from its equilibrium lattice parameters and atomic positions.

As expected, the force and stress tensor components shown at the end of the relaxation approach zero, indicating successful geometry optimization.