File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -117,12 +117,12 @@ if ! test -z "$has_wfc_r" && [ $has_wfc_r -eq 1 ]; then
117117 echo " Can't find file OUT.autotest/running_scf.log"
118118 exit 1
119119 fi
120- nband=` grep NBANDS OUT.autotest/running_scf.log| awk ' {print $3}' `
121- nbxx= ` grep nbxx OUT.autotest/running_scf.log| awk ' {print $3} ' `
120+ nband=$( grep NBANDS OUT.autotest/running_scf.log| awk ' {print $3}' )
121+ allgrid= $( grep " fft grid for wave functions " OUT.autotest/running_scf.log| awk -F " [=,] " ' {print $2*$3*$4} ' )
122122 for(( band= 0 ;band< $nband ;band++ )) ; do
123123 if [[ -f " OUT.autotest/wfc_realspace/wfc_realspace_0_$band " ]]; then
124124 variance_wfc_r=` sed -n " 13,$" p OUT.autotest/wfc_realspace/wfc_realspace_0_$band | \
125- awk -v all=$nbxx ' BEGIN {sumall=0} {for(i=1;i<=NF;i++) {sumall+=($i-1)*($i-1)}}\
125+ awk -v all=$allgrid ' BEGIN {sumall=0} {for(i=1;i<=NF;i++) {sumall+=($i-1)*($i-1)}}\
126126 END {printf"%.5f",(sumall/all)}' `
127127 echo " variance_wfc_r_0_$band $variance_wfc_r " >> $1
128128 else
You can’t perform that action at this time.
0 commit comments