What is the procedure to do lattice optimization, encut optimization and kpoint optimization in VASP?
Thank you in advance.
Matter Modeling Stack Exchange is a question and answer site for materials modelers and data scientists. It only takes a minute to sign up.
Sign up to join this communityYou can start with this bash script for Aluminum to begin
Note: Make sure to fix two quantities while changing third one among INCAR
,KPOINTS
,POSCAR
Lattice optimization
for i in `seq -w 4.01 0.01 4.05` # change the range needed
do
cat <<EOF >POSCAR
Al bulk FCC
$i
0 0.5 0.5
0.5 0 0.5
0.5 0.5 0
1
direct
0.0 0.0 0.0
EOF
mkdir $i
cp INCAR $i/
cp POSCAR $i/
cp POTCAR $i/
cp KPOINTS $i/
cd $i
/apps/VASP/vasp.6.2.0/original/bin/vasp_std # This is vasp run command add mpi if needed
# post process
E=`grep 'F' OSZICAR|tail -n 1 | awk '{ print $5}'`;
echo $i $E >>../pos-conv.txt
cd ..
done
Encut optimization
for i in `seq -w 300 50 500` # change the range needed
do
cat <<EOF >INCAR
SYSTEM = Al :fcc
ISTART=0 # start new job
ICHARG=2 # 2 for atom
INIWAV=1 # initial wave function
ENCUT= $i eV # Energy cut-off for calculation
PREC = Normal # Normal Precision
LREAL= .FALSE # real space projection .FALSE.
LCHARGE= .FALSE # no charge file output
LWAVE= .FALSE # no wavefile output
NCORE=4 # NCORE specifies how many cores store one orbital
ISMEAR = 1; # smearing
SIGMA = 0.2 # smearing value
ISIF = 2; # 2- scf CALCULATION/IONIC MOVEMENT # 3 for volume relax
IBRION=2 # cg
NELM=30 # Maximum number of iteration
NELMIN=3 # Minimum number of iteration
NSW=30 # number of step for ionic update
EDIFF=1E-5 # stopping criteria for electronic update
EDIFFG=-0.01 # force convergence
EOF
mkdir $i
cp INCAR $i/
cp POSCAR $i/
cp POTCAR $i/
cp KPOINTS $i/
cd $i
/apps/VASP/vasp.6.2.0/original/bin/vasp_std # This is vasp run command add mpi if needed
# post process
E=`grep 'F' OSZICAR|tail -n 1 | awk '{ print $5}'`;
echo $i $E >>../incar-conv.txt
cd ..
done
KPOINTS optimization
for i in `seq 1 1 5` # change the range needed
do
cat <<EOF >KPOINTS
MONK #header file
0
M
$i $i $i
0 0 0
EOF
mkdir $i
cp INCAR $i/
cp POSCAR $i/
cp POTCAR $i/
cp KPOINTS $i/
cd $i
/apps/VASP/vasp.6.2.0/original/bin/vasp_std # This is vasp run command add mpi if needed
# post process
E=`grep 'F' OSZICAR|tail -n 1 | awk '{ print $5}'`;
echo $i $E >>../kconv.txt
cd ..
done