Skip to content

Commit c7d5c6a

Browse files
committed
update catch_properties
1 parent a2e83c1 commit c7d5c6a

File tree

3 files changed

+21
-8
lines changed

3 files changed

+21
-8
lines changed

tests/integrate/212_NO_KP_get_wf/INPUT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@ ecutwfc 25.0
1515
basis_type lcao
1616
scf_thr 1e-10
1717
read_file_dir ./
18+
19+
bx 2
20+
by 2
21+
bz 2

tests/integrate/312_NO_GO_get_wf/INPUT

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
INPUT_PARAMETERS
22
suffix autotest
3-
4-
#calculation scf
5-
#out_wfc_lcao 1
6-
73
calculation get_wf
84
bands_to_print 1 3*0
95
nbands 4
@@ -17,3 +13,14 @@ scf_thr 1e-7
1713
gamma_only 1
1814
nspin 2
1915
read_file_dir ./
16+
17+
bx 2
18+
by 2
19+
bz 2
20+
21+
#---------------------------------
22+
# this line if for generting wave
23+
# functions
24+
#---------------------------------
25+
#calculation scf
26+
#out_wfc_lcao 1

tests/integrate/tools/catch_properties.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,11 @@ get_input_key_value(){
3030
file=$1
3131
#echo $1
3232

33-
calculation=`grep calculation INPUT | awk '{print $2}' | sed s/[[:space:]]//g`
33+
# the command will ignore lines starting with #
34+
calculation=`grep calculation INPUT | grep -v '^#' | awk '{print $2}' | sed s/[[:space:]]//g`
35+
3436
running_path=`echo "OUT.autotest/running_$calculation"".log"`
37+
echo $running_path
3538
natom=`grep -En '(^|[[:space:]])TOTAL ATOM NUMBER($|[[:space:]])' $running_path | tail -1 | awk '{print $6}'`
3639
has_force=$(get_input_key_value "cal_force" "INPUT")
3740
has_stress=$(get_input_key_value "cal_stress" "INPUT")
@@ -68,7 +71,6 @@ out_chg=$(get_input_key_value "out_chg" "INPUT")
6871
has_ldos=$(get_input_key_value "out_ldos" "INPUT")
6972
esolver_type=$(get_input_key_value "esolver_type" "INPUT")
7073
rdmft=$(get_input_key_value "rdmft" "INPUT")
71-
#echo $running_path
7274
base=$(get_input_key_value "basis_type" "INPUT")
7375
word_total_time="atomic_world"
7476
symmetry=$(get_input_key_value "symmetry" "INPUT")
@@ -493,9 +495,9 @@ fi
493495
if [ $calculation == "get_wf" ]; then
494496
nfile=0
495497
cubefiles=`ls OUT.autotest/ | grep -E '.cube$'`
496-
echo "The cube file is $cubefiles"
498+
#echo "The cube file is $cubefiles"
497499
if test -z "$cubefiles"; then
498-
echo "Can't find BAND_CHG files"
500+
echo "Can't find $cubefiles files"
499501
exit 1
500502
else
501503
for cube in $cubefiles;

0 commit comments

Comments
 (0)