1.7. Structural relaxation

In this section, I demonstrate how to perform structural relaxation. Let’s begin by copying the following input file and saving it to a text file named si_relax.txt.

info.calculationType = 'relaxation'
info.savepath = 'results/si_relax';
atom.element = [1 1]
atom.xyz = 10.25*[0.0 0.0 0.0;0.22 0.25 0.25]
domain.latvec = 10.25*[0.0 0.5 0.5;0.5 0.0 0.5;0.5 0.5 0.0]
domain.lowres = 0.4
element.species = 'si'
element.path = './Si_TM_LDA.mat'
kpoint.gridn = [3,3,3]

Then pass it to RESCU and execute the program as follows

rescu -i si_relax.txt;

Note that the second atom has been displaced by 0.3 Bohr in the x-direction in the definition of atom.xyz. RESCU searches the ionic equilibrium position when info.calculationType is set to relaxation. By default RESCU relaxes all atoms except the first one in a periodic system. You can control which atom is moved with the keyword sr.moveableAtomList. For example, sr.moveableAtomList = [19,20] will relax the 19\(^\text{th}\) and 20\(^\text{th}\) atoms. RESCU automatically creates the file relaxationprocess.txt, which allows you to monitor the current trial ionic positions and residual forces. The final ionic positions are saved in relaxedstructure.xyz. With the default parameters, the equilibrium position of atom #2 is found to be [2.56250 2.56251 2.56251].