X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=vasp_tools%2Fpc_script;h=2e2b5f01ecc7d4f69dcda25c1c6f314570560d04;hb=393085e082fb39a3b0f7cd90b66c69d13c27c981;hp=59bd85fdb3aa11271358a14e2488cbee566f2bdd;hpb=0303d9fd61646d0e0c208fd2199e662694289989;p=physik%2Fposic.git diff --git a/vasp_tools/pc_script b/vasp_tools/pc_script index 59bd85f..2e2b5f0 100755 --- a/vasp_tools/pc_script +++ b/vasp_tools/pc_script @@ -5,12 +5,17 @@ if [ ! -d $1 ]; then exit fi -if [ ! -f $1/OUTCAR ]; then +app="" +if [ ! -z $2 ]; then + app=".${2}" +fi + +if [ ! -f $1/OUTCAR${app} ]; then echo "no vasp data found in $1 ..." exit fi -if [ ! -d $1/video ]; then +if [ ! -d $1/video${app} ]; then echo "no video directory found ..." echo "forgot to run outcar2moldyn?" exit @@ -22,18 +27,24 @@ echo "-> reading in sx sy and sz is not correct ..." echo "WARNING !!!!" echo -line=`sed -n -e '/length of/,/FORCES/p' $1/OUTCAR | grep ^\ \ \ | tail -1` +line=`sed -n -e '/length of/,/FORCES/p' $1/OUTCAR${app} | \ + grep ^\ \ \ | tail -1` sx=`echo $line | awk '{ print $1 }'` sy=`echo $line | awk '{ print $2 }'` sz=`echo $line | awk '{ print $3 }'` -file=`ls $1/video/atomic_conf*.xyz | tail -1` +if [ -z $2 ] ; then + files=`ls $1/video/atomic_conf*.xyz | tail -1` +else + files=`ls $1/video${app}/atomic_conf*.xyz` +fi -echo "running on $file using $sx $sy $sz ..." +echo "running on $files using $sx $sy $sz ..." -./pc_calc $file $sx $sy $sz | grep ^pc | \ - awk '{ print $2 " " $3 " " $4 " "$5 }' > pc.txt +#./pc_calc $sx $sy $sz $files +./pc_calc $sx $sy $sz $files | grep ^pc | \ + awk '{ print $2 " " $3 " " $4 " "$5 }' > $1/pc${app}.txt echo "done"