Skip to content

Commit

Permalink
Stop bzcat producing avoidable error messages (--quiet)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serguei Patchkovskii authored and Serguei Patchkovskii committed Feb 28, 2023
1 parent c3dbd7b commit 6826c20
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,6 @@

# Pre-processed Fortran sources
preprocess/*.f90

# Dependencies file
makefile.dep
16 changes: 8 additions & 8 deletions overlap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ fi
function header () {
local file="$1" ;
# Extract C1 geometry section from the .dat file
bzcat --force ${file}.dat* | awk -f ${sd_loc}/extract_dat.awk -
bzcat --force ${file}.inp* | awk '/^ \$ECP/,/^ \$END/'
bzcat --force --quiet ${file}.dat* | awk -f ${sd_loc}/extract_dat.awk -
bzcat --force --quiet ${file}.inp* | awk '/^ \$ECP/,/^ \$END/'
}
#
function orbitals () {
local file="$1" ;

header "${file}" ;
if bzcat --force ${file}.dat* | grep -sq 'ALPHA MOS: Orbitals at the entry to CI calculation' > /dev/null ; then
bzcat --force ${file}.dat* | awk '/ALPHA MOS: Orbitals at the entry to CI calculation/,/^ \$END/'
if bzcat --force --quiet ${file}.dat* | grep -sq 'ALPHA MOS: Orbitals at the entry to CI calculation' > /dev/null ; then
bzcat --force --quiet ${file}.dat* | awk '/ALPHA MOS: Orbitals at the entry to CI calculation/,/^ \$END/'
else
echo "WARNING: CI MOs not found, extracting \$VEC section" > /dev/stderr
bzcat --force ${file}.dat* | awk '/^ \$VEC/,/^ \$END/'
bzcat --force --quiet ${file}.dat* | awk '/^ \$VEC/,/^ \$END/'
fi
}
#
Expand All @@ -63,12 +63,12 @@ function determinants () {
local state="$2" ;
# If state is longer than 3 characters, treat it as a determinant list
if [ "$(echo "$state" | wc -c)" -gt 4 ] ; then
bzcat --force ${state}*
bzcat --force --quiet ${state}*
else
bzcat --force ${file}* | ${sd_loc}/det_conv.awk state="${state}"
bzcat --force --quiet ${file}* | ${sd_loc}/det_conv.awk state="${state}"
fi
# Delete the 1s core orbitals from the comparison - we do not care about those
# bzcat --force ${file}* | ~/superdyson/det_conv.awk state="${state}" | sed -e 's/ 2 2 / 0 0 /'
# bzcat --force --quiet ${file}* | ~/superdyson/det_conv.awk state="${state}" | sed -e 's/ 2 2 / 0 0 /'
}
#
orbitals "${ls}" > "${tmpdir}/ls_orbs.dat"
Expand Down

0 comments on commit 6826c20

Please sign in to comment.