This repository hosts a custom tool designed to enhance the functionality of VASP (Vienna Ab initio Simulation Package) by enabling structure relaxation towards a predefined stress tensor, a feature not originally provided by standard VASP. The tool is capable of automatically modifying the POSCAR file and invoking VASP in a loop until the stress reaches the desired convergence criteria. It utilizes isotropic linear elastic theory for POSCAR adjustments. While suitable for many materials, performance may vary with highly anisotropic substances.
The tool has been successfully benchmarked on materials such as Tungsten (W), Molybdenum (Mo), Chromium (Cr), and alpha-Iron (α-Fe). However, caution is advised when dealing with highly anisotropic materials as convergence issues may arise. Implementing a full stiffness tensor (Cijkl) is a recommended solution for such cases.
- Insert the desired stress tensor values into the script.
- Enter the estimated elastic modulus into the script.
- In your VASP
INCAR
file, ensure thatISIF=2
. - Duplicate your initial
POSCAR
file and rename the copy toposcar.0
. - Edit the script to configure the
mpiexec
commands as per your VASP installation and job management system. - Navigate (
cd
) to your job directory. - Submit your job using the command
qsub fixpressure.py
(assuming the utilization of a PBS job system).
- Opt for a higher plane-wave cutoff energy (
ECUT
) and a dense k-point mesh for better convergence of forces and elastic constants, which tend to converge slowly with respect to k-points in VASP. - Set
LREAL=.FALSE.
to avoid unrealistic forces that sometimes result from real space calculations. - For large systems where reciprocal space calculations are computationally demanding, consider using
LREAL=Auto
coupled withPREC=Accurate
andADDGRID=.TRUE.
to balance efficiency and accuracy.
- Employ
LWAVE=.TRUE.
along with the default settings forISTART
andICHARG
to enable VASP to reuse theWAVECAR
file from the previous iteration, reducing the need to restart calculations from scratch.
- Execute VASP with
ISIF=2
to determine the current stress tensor. - Apply generalized Hooke's law using the provided elastic modulus to calculate the necessary modifications to
POSCAR
for achieving the target pressure. - Repeat steps 1 and 2 until the discrepancy between the current and target pressure falls within the predefined convergence threshold.