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.

댓글

이 블로그의 인기 게시물

미국 포닥, 한국으로 돌아가는 이유? (Why do postdoc go back to Korea?)

미국 포닥 - 비지팅 포닥 VS 풀펀딩 포닥 (Visiting Scholar VS Postdoctoral Fellow)

미국 포닥 직위, 타이틀, 명칭? - Visiting Scholar, Postdoctoral Fellow, Research Associate, Research Scientist, Research Professor