File: esm_data.sh

package info (click to toggle)
espresso 5.1%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 146,004 kB
  • ctags: 17,245
  • sloc: f90: 253,041; sh: 51,271; ansic: 27,494; tcl: 15,570; xml: 14,508; makefile: 2,958; perl: 2,035; fortran: 1,924; python: 337; cpp: 200; awk: 57
file content (12 lines) | stat: -rwxr-xr-x 509 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh
# Prints the ESM summary data (charge and potentials) to stdout
# Usage: esm_data.sh {pw output filename}
#
# Original version by Brandon Wood and Minoru Otani
#

echo '#   z (A)   Tot chg (e)   Avg v_hartree        Avg v_local  Avg v_hart+v_loc'
echo '#                                  (eV)               (eV)              (eV)'
ngrid=`grep 'Dense  grid:' $1 | awk -F ',' '{print $3}' | sed 's/)//'`
let ngrid="$ngrid+5"
grep -A${ngrid} 'ESM Charge and Potential' $1 | tail -n${ngrid} | tail -n+6