From: hackbard Date: Mon, 12 Oct 2009 17:44:07 +0000 (+0200) Subject: added display of partialy occupied levels in a different color X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=d49dce7629396f444ae919cbcc2c0ec96a38b9f2;p=physik%2Fposic.git added display of partialy occupied levels in a different color --- diff --git a/vasp_tools/get_ks_levels b/vasp_tools/get_ks_levels index 220c7c9..922955a 100755 --- a/vasp_tools/get_ks_levels +++ b/vasp_tools/get_ks_levels @@ -27,10 +27,12 @@ startline=`grep -n spin\ component\ 1 $file | tail -1 | awk -F: '{ print $1 }'` echo -en "spin component 1 ($startline)... " sed -n "$startline,/spin component 2/p" $file | grep ^' '*[0-9] | \ while read number energy occu; do - if [ "$occu" != "0.00000" ]; then + if [ "$occu" = "1.00000" ]; then echo "0.18 $energy 0.1" >> $1/ks_levels_o - else + elif [ "$occu" = "0.00000" ]; then echo "0.18 $energy 0.1" >> $1/ks_levels_u + else + echo "0.18 $energy 0.1" >> $1/ks_levels_p fi done echo "done" @@ -40,15 +42,17 @@ startline=`grep -n spin\ component\ 2 $file | tail -1 | awk -F: '{ print $1 }'` echo -en "spin component 2 ($startline) ... " sed -n "$startline,/---/p" $file | grep ^' '*[0-9] | \ while read number energy occu; do - if [ "$occu" != "0.00000" ]; then + if [ "$occu" = "1.00000" ]; then echo "0.42 $energy 0.1" >> $1/ks_levels_o - else + elif [ "$occu" = "0.00000" ]; then if [ "$center" = "0" ]; then echo -en "setting mid value -> $energy ... " center=$energy echo "$energy" > $1/temp_e fi echo "0.42 $energy 0.1" >> $1/ks_levels_u + else + echo "0.42 $energy 0.1" >> $1/ks_levels_p fi done echo "done" @@ -58,7 +62,7 @@ yl=`echo $center $WDOWN | awk '{ print $1-$2 }'` yh=`echo $center $WUP | awk '{ print $1+$2 }'` echo "generating gnuplot file ($center, $yl, $yh, $ly) ..." cat > $1/ksl_plot.gpi <