Hey everyone.
I have created a script for calculating the approximative stress on the unitcell for bulk crystal. I have combined this
with the relaxation module that comes with ATK, and tries to use the same interface as the one official included.
Given a bulk configuration and method to be used, it will first optimized the internal structure of the unitcell according to
the forces on the atoms, and then it will calculate the approximative stress on the unitcell, and scale the unitcell according to
the stress. It will then calculate the optimized internal geometry again, and calculate the stress again and repeat this cycle until
all the forces and stress are below a certain threshold.
Normally the fastest way to calculate the optimized geometry for bulk configuration in ATK is using the equation of state,
however for more complex systems like wurtzite ZnO, it requires alot of calculations! In these cases I think this script is
superior, however for simple systems like Si(FCC) the equation of states is properly better.
However when the goal is to determine the effect of pressure and strain on the unitcell on the band gap etc, it is important that the unitcell
is in equilibrium, and therefore I find this script quite usefull.
The usage is pretty straight forward - download this script and use it in the following way:
from stress_optimizers import *
....
optimized_conf = calculateOptimizedBulkConfiguration(configuration,
method,
runtime_parameters,
geometric_optimization_parameters,
stress_tolerance = 5.0e-3*Units.eV/Units.Ang**3,
maximum_iterations = 100)
- The configuration is the bulk configuration to be optimized.
- The method is the KohnShamMethod to be used for this optimization.
- The runtime parameters for control the verbosity and checkpoint file.
- The geometric_optimization_parameters is the ATK geometric optimization parameters for the forces.
- The stress tolerance thresshold for the optimization - default 5.0e-3 ev/Ang**3
- Maximum iterations is the maximum number of iterations of the unitcell optimization.
Feel free to use.
Updated 1: Updated the script to correctly support cells where the conventional cell and the primitive cell is not identical.Updated 2: Updated with version that are MPI safe and allows the user to constrain atoms.