File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 1- etotref -31.72917767963926
1+ etotref -31.72917767963902
22etotperatomref -15.8645888398
3- SPIN1_DM 35.835365
4- totaltimeref 0.46677
3+ SPIN1_DM 2.788330
4+ totaltimeref 2.7990
Original file line number Diff line number Diff line change @@ -217,14 +217,16 @@ if ! test -z "$out_dm" && [ $out_dm -eq 1 ]; then
217217 echo " Irregular DM file found"
218218 exit 1
219219 else
220- sed -i " 1,$ s/[a-d]//g" OUT.autotest/$dm
221- sed -i " 1,$ s/[f-z]//g" OUT.autotest/$dm
222- sed -i " 1,$ s/[A-D]//g" OUT.autotest/$dm
223- sed -i " 1,$ s/[F-Z]//g" OUT.autotest/$dm
224- sed -i " 1,$ s/)//g" OUT.autotest/$dm
225- sed -i " 1,$ s/(//g" OUT.autotest/$dm
226- total_dm=` sum_file OUT.autotest/$dm `
227- echo " $dm $total_dm " >> $1
220+ total_dm=$( awk ' BEGIN {sum=0.0;startline=999}
221+ {
222+ if(NR==7){startline=$1+14;}
223+ else if(NR>=startline)
224+ {
225+ for(i=1;i<=NF;i++){sum+=sqrt($i*$i)}
226+ }
227+ }
228+ END {printf"%.6f",sum}' OUT.autotest/$dm )
229+ echo " $dm $total_dm " >> $1
228230 fi
229231 done
230232 fi
You can’t perform that action at this time.
0 commit comments