Skip to content

Enforcing Symmetry for Relaxations

Spacegroup Symmetries

FHI-aims does not assume any symmetry by default for relaxation. In general, this is the safer choice since it lets FHI-aims explore the full potential energy surface of the system during the relaxation. However, if one wishes to analyze structural and electronic properties of a system of known or constrained symmetry, it is helpful to restrict the degrees of freedom to only the parameters allowed by that symmetry.

As an example, we will relax Si-diamond. The for this structure should look like this:

lattice_vector 0.00000 2.71500 2.71500
lattice_vector 2.71500 0.00000 2.71500
lattice_vector 2.71500 2.71500 0.00000

atom_frac 0.00000 0.00000 0.00000 Si
atom_frac 0.25000 0.25000 0.25000 Si

In FHI-aims, there are different ways to incorporate symmetry in your relaxation. Here, we focus on the one activated by the keyword rlsy_symmetry.

One can constrain a system to keep its initial symmetry by setting the keyword rlsy_symmetry in the file:

xc              pbe
relativistic    atomic_zora scalar
k_grid          8 8 8
relax_geometry  bfgs 5e-3
relax_unit_cell shape
rlsy_symmetry   all

[attached light species defaults for Si]

rlsy_symmetry + relax_unit_cell

If you specify rlsy_symmetry and wish to relax the unit cell, the relax_unit_cell shape option is required.

The symmetry is determined from the input structure defined in the file. Therefore, you should make sure your input structure has the desired symmetry. You can use GIMS's structure builder to find the spacegroup number of your geometry and confirm validity of the symmetry of your system. The algorithms behind rlsy_symmetry reduce the number of real-space grid points by using the symmetry operations which are found from the given structure in

Start the calculation, so we can look at the final geometry with enforced symmetry.

# This is the geometry file that corresponds to the current relaxation step.
# If you do not want this file to be written, set the "write_restart_geometry" flag to .false.
#  aims_uuid : 326C96F5-E704-470F-A7CA-D69C926D5F92                                
lattice_vector     -0.00000000      2.73820297      2.73820297
lattice_vector      2.73820297     -0.00000000      2.73820297
lattice_vector      2.73820297      2.73820297      0.00000000
atom_frac      -0.00000000      0.00000000      0.00000000 Si
atom_frac       0.25000000      0.25000000      0.25000000 Si
# What follows is the current estimated Hessian matrix constructed by the BFGS algorithm.
# This is NOT the true Hessian matrix of the system.
# If you do not want this information here, switch it off using the "hessian_to_restart_geometry" keyword.
trust_radius             0.2000000030

As desired, the final converged structure retains the perfect symmetry of the diamond structure. Moreover, the overall computation time has been significantly reduced. This is the result of reducing the number of real-space grid points by symmetry. The grid points have been roughly reduced by the number of symmetry operations. Thus, grid-based operations, such as integration or updates, take less time.

Parametrically-constrained Relaxations

FHI-aims also accepts parametric constraints which, as an alternative to rlsy_symmetry, offer another way for performing symmetry constrained relaxation. The corresponding workflow (more complex but also more powerful) is as follows:

  1. Identify the Bravais lattice and figure out its prototype. Transform the lattice vectors into symbolic expressions using the degrees of freedom as parameters.
  2. Identify the occupied Wyckoff positions. Transform the fractional coordinates of the atoms in your system and the lattice vectors into symbolic expressions.

As an example, using the Si-diamond structure, the for a parametrically-constrained relaxations should look like this:

# FHI-aims file:
# Created using the Atomic Simulation Environment (ASE)
# Fri Jul  2 10:02:10 2021
lattice_vector 0.0000000000000000 2.7423423566666667 2.7423423566666667
lattice_vector 2.7423423566666667 0.0000000000000000 2.7423423566666667
lattice_vector 2.7423423566666667 2.7423423566666667 0.0000000000000000
atom_frac 0.0000000000000000 0.0000000000000000 0.0000000000000000 Si
atom_frac 0.2500000000000000 0.2500000000000000 0.2500000000000000 Si
# Parametric constraints
symmetry_n_params 1 1 0
symmetry_params a
symmetry_lv 0, 0.5*a, 0.5*a
symmetry_lv 0.5*a, 0, 0.5*a
symmetry_lv 0.5*a, 0.5*a, 0
symmetry_frac 0, 0, 0
symmetry_frac 0.25, 0.25, 0.25

The first part is the standard definition of the input structure. The second part (everything after # Parametric constraints), defines the structure in symbolic expressions. The keyword have the following meaning:

  • symmetry_n_params: The number of total, lattice, and atomic parameters, respectively.
  • symmetry_params: The symbols for the parameters
  • symmetry_lv: the lattice vectors in symbolic expressions
  • symmetry_frac: the symbolic expression for the fractional atomic coordinates.

Note that the order of lattice vectors and atomic positions in the symbolic expression part must follow the same order as in the standard definition part further above.