Commit db78b579 authored by giannozz's avatar giannozz

More careful removal of scratch files in examples: only files starting with

"pwscf" or "cp" are removed when the scratch directory is cleaned. May still
need some tweaking in some cases, though, because not all files start with
the value of "prefix" variable


git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@10437 c92efa57-630b-4861-b058-cf58834340f0
parent a57d8586
......@@ -77,7 +77,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
# molecular dynamics calculation
......
......@@ -76,7 +76,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
# molecular dynamics calculation
......
......@@ -76,7 +76,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
# molecular dynamics calculation
......
......@@ -76,7 +76,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
# molecular dynamics calculation
......
......@@ -82,7 +82,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
# molecular dynamics calculation
......
......@@ -77,7 +77,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
cat > h2o.wannier.in << EOF
......
......@@ -77,7 +77,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
cat > h2o.scf.in << EOF
......
......@@ -76,7 +76,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
# molecular dynamics calculation
......
......@@ -80,7 +80,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
# molecular dynamics calculation
......
......@@ -85,7 +85,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/cp*
$ECHO " done"
# molecular dynamics calculation
......
......@@ -90,7 +90,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation at Gamma
......@@ -200,7 +200,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......
......@@ -80,7 +80,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# NEB calculation. Automatic choice of the climbing image.
......@@ -152,7 +152,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# NEB calculation. Climbing image is not used
......@@ -223,7 +223,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# the name of the restart file is changed in order to conform to the
......@@ -304,7 +304,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
$ECHO "$EXAMPLE_DIR: done"
......@@ -93,7 +93,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
PREFIX='alas'
......
......@@ -93,7 +93,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
PREFIX='alas'
......
......@@ -90,7 +90,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -88,7 +88,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# Self consistent calculation for CH4
......@@ -172,7 +172,7 @@ check_failure $?
$ECHO " done"
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO " running the scf calculation for CH4...\c"
......
......@@ -78,7 +78,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......@@ -365,7 +365,7 @@ check_failure $?
$ECHO " done"
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......
......@@ -80,7 +80,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -215,7 +215,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation for C with US-PP
......@@ -326,7 +326,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......
......@@ -93,7 +93,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -90,7 +90,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
#
......
......@@ -87,7 +87,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# Self consistent calculation for CH4
......
......@@ -85,7 +85,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
#
......
......@@ -79,7 +79,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -83,7 +83,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
......
......@@ -86,7 +86,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation for C with PAW-PP
......
......@@ -79,7 +79,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
......
......@@ -81,7 +81,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
#
# self-consistent calculation. This example demonstrates the use of spin-orbit
......
......@@ -86,7 +86,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation for Au with PAW-PP
......
......@@ -87,7 +87,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -86,7 +86,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -98,7 +98,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
#
# SCF at k-mesh good enough for phonons
......
......@@ -76,7 +76,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
#
......
......@@ -78,7 +78,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
#
# self-consistent calculation. Note the definitions in ATOMIC_SPECIES and ntyp in &system
......
......@@ -96,7 +96,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......@@ -353,7 +353,7 @@ $ECHO " done"
# clean TMP_DIR
#$ECHO " cleaning $TMP_DIR...\c"
#rm -rf $TMP_DIR/*
#rm -rf $TMP_DIR/pwscf*
#$ECHO " done"
# run Wannier90 to obtain MLWFs
......@@ -392,7 +392,7 @@ EOF
#clean TMP_DIR
$ECHO
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......
......@@ -78,7 +78,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -197,7 +197,7 @@ EOF
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
......
......@@ -106,7 +106,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR ...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation for Al(100)
......@@ -315,7 +315,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR ...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......
......@@ -91,7 +91,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
#
......
......@@ -93,7 +93,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -92,7 +92,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -92,7 +92,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -80,7 +80,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -83,7 +83,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation with standard LDA
......
......@@ -96,7 +96,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation for bcc-Fe with fully relativistic PAW-PP
......
......@@ -83,7 +83,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# scf calculation for H2O with no ESM
......@@ -156,7 +156,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# scf calculation for Al(111) with ESM bc2 (metal-slab-metal), no field
......
......@@ -83,7 +83,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......
......@@ -78,7 +78,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# VCS-MD calculation
......
......@@ -95,7 +95,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -132,7 +132,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
grep -e bands --after=3 n.out-$a| grep -e " -"| tail -2| awk -v a=$a '{print a, $0}' >> n.eigenvalues
......@@ -182,7 +182,7 @@ grep -e bands --after=3 nh4+.out-$a| grep -e " -"| tail -1| awk -v a=$a '{print
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
cat > h2o.in << EOF
......@@ -225,7 +225,7 @@ grep -e bands --after=3 h2o.out-$a| grep -e " -"| tail -1| awk -v a=$a '{print a
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
$ECHO
......
......@@ -78,7 +78,7 @@ for diago in david cg ; do
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -183,7 +183,7 @@ EOF
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -334,7 +334,7 @@ EOF
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -427,7 +427,7 @@ EOF
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -80,7 +80,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -123,7 +123,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -174,7 +174,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -76,7 +76,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# MD in a 2-atom cell
......@@ -119,7 +119,7 @@ awk '/Ekin/{ek=$3;et=$11; print it,time,ek,u,et}/Dynamics/{it=$5;time=$8}/^\!/{u
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# MD in a 8-atom cell
......@@ -168,7 +168,7 @@ awk '/Ekin/{ek=$3;et=$11; print it,time,ek,u,et}/Dynamics/{it=$5;time=$8}/^\!/{u
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# MD in a 2-atom cell. Gamma+3X
......
......@@ -76,7 +76,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......
......@@ -78,7 +78,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation for isolated Al atom
......
......@@ -78,7 +78,7 @@ $ECHO
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation
......@@ -194,7 +194,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# self-consistent calculation with penalty functional
......@@ -295,7 +295,7 @@ $ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
rm -rf $TMP_DIR/pwscf*
$ECHO " done"
# scf calculation with penalty functional (total magnetization constrained)
......@@ -340,7 +340,7 @@ $ECHO " done"
# clean TMP_DIR