#!/bin/csh set wrapfilename="vasp.wrap" set maxdepth=5 while ( $#argv != 0 ) switch ("$1") case "-h": cat - < 0) set wrapfile="../$wrapfile" @ maxdepth--; end if (! -e $wrapfile) then echo You need a $wrapfilename file in one of the directories ., .. , ../.. , etc. echo NOTE: runstruct_vasp needs to be run within the numbered subdirectory. exit 1 endif cat $wrapfile >! vasp.in echo "" >>! vasp.in echo "[POSCAR]" >>! vasp.in echo "title" >>! vasp.in echo 1. >>! vasp.in cat $strout | cellcvrt -c -sig=9 | tail -n +4 | head -3 >>! vasp.in echo Cartesian >>! vasp.in cat $strout | cellcvrt -c -sig=9 | tail -n +7 >>! vasp.in endif if ( $?lookup ) then foreach file ( ../WAVECAR ../CHGCAR ) if ( -e $file ) then cp -f $file . endif end endif set notrunvaspswitch="" if ( $?notrunvasp ) then set notrunvaspswitch="-n" endif if ( $#argv == 0 ) then #single machine mode if no argument ezvasp $notrunvaspswitch vasp.in else #multiple machine mode if argument is remote command ezvasp $notrunvaspswitch -p "$* $VASPCMD" vasp.in endif endif if ( ! $?notrunvasp ) then extract_vasp if ( $?lookup ) then foreach file ( WAVECAR CHGCAR ) if ( ! -e ../$file ) then cp -f $file ../$file endif end endif if ( ! $?extractonly ) then if ( ( ! $?preservefiles ) && -e OUTCAR.static ) then cleanvasp -v endif if ( -e OUTCAR.static || -e OUTCAR.relax ) then gzip -f `ls -1 OUTCAR.* | grep -v '.gz$'` >& /dev/null endif checkerr_vasp -e endif endif