#!/bin/csh # fullrun needs only "template.cfg" file to calculate the # cohesive energy versus characteristic length curve. # "template.cfg" can be checked by AtomEye set LatticeConstantRef = 4.311 sed -e 's/A = .* Angstrom/A = '$LatticeConstantRef' Angstrom/' \ template.cfg > run.cfg rm KPOINTS INCAR cfg2vasp run.cfg High 0.1 cp INCAR INCAR.ref cp KPOINTS KPOINTS.ref cat <> INCAR.ref ENCUT = 358.2 ENAUG = 550.0 EOF set strain_max = 0.2 set strain_min = -$strain_max set strain_mesh = 32 set strain_del = \ `echo "scale=30; ($strain_max-($strain_min))/$strain_mesh" | bc -l` set strain_start = \ `echo "scale=30; $strain_min+($strain_del)/2" | bc -l` set i = 0 while ( $i != $strain_mesh ) set strain = \ `echo "scale=30; $strain_start+$i*$strain_del" | bc -l` set LatticeConstant = \ `echo "scale=30; $LatticeConstantRef*($strain+1)" | bc -l` sed -e 's/A = .* Angstrom/A = '$LatticeConstant' Angstrom/' \ template.cfg > run.cfg cfg2vasp run.cfg High 0.1 cp INCAR.ref INCAR cp KPOINTS.ref KPOINTS vasp_4.6_serial_p4 @ i = $i + 1 set dir = `echo $i | awk '{printf "calc%03d\n", $1}'` vasp2out $dir cd $dir vasp2dos cd .. grep " energy without entropy=" OUTCAR > energy.out set energy = ( `take energy.out 7` ) echo $LatticeConstant $energy[$#energy] >> coh.out end