Submit File for Iterative Calculation in Density Functional Theory (VASP) using Bash Shell
Many times we run into the situation which we should calculate iterative.
In this case, this bash shell script can be used very helpfully.
Here is example script.
This script is that we can calculate iteratively changing the value of ISIF in INCAR file.
sed "s/ISIF=${prei}/ISIF=${i}/" INCAR > temp
means that find the lines with ISIF=value of prei (initial value is defined 1) and change it to ISIF=value of i ( i is changed from 1 to 7 ).
So, this bash shell makes it possible to simulate with various kinds of relax conditions.
$mpi_cmd -np $num_proc -hostfile $PBS_NODEFILE $lmp_cmd > vasp.log 2>&1
This command is excution command. (This is different according to your cluster environment)
if [ "${prei}" -eq 7 ]; then
mkdir calculatenum_${i}
cp * calculatenum_${i}
else
prei=${i}
cp CONTCAR POSCAR
fi
Here are the if loop that determines wheter calculated files save or not.
Last calculation will be saved. The others is not saved, just reflect result of before calculation by copying structure informations.
In this case, this bash shell script can be used very helpfully.
Here is example script.
This script is that we can calculate iteratively changing the value of ISIF in INCAR file.
sed "s/ISIF=${prei}/ISIF=${i}/" INCAR > temp
means that find the lines with ISIF=value of prei (initial value is defined 1) and change it to ISIF=value of i ( i is changed from 1 to 7 ).
So, this bash shell makes it possible to simulate with various kinds of relax conditions.
$mpi_cmd -np $num_proc -hostfile $PBS_NODEFILE $lmp_cmd > vasp.log 2>&1
This command is excution command. (This is different according to your cluster environment)
if [ "${prei}" -eq 7 ]; then
mkdir calculatenum_${i}
cp * calculatenum_${i}
else
prei=${i}
cp CONTCAR POSCAR
fi
Here are the if loop that determines wheter calculated files save or not.
Last calculation will be saved. The others is not saved, just reflect result of before calculation by copying structure informations.
댓글
댓글 쓰기