Escolar Documentos
Profissional Documentos
Cultura Documentos
/bin/sh
# run from directory where this script is
cd `echo $0 | sed 's/\(.*\)\/.*/\1/'` # extract pathname
EXAMPLE_DIR=`pwd`
# check whether ECHO has the -e option
if test "`echo -e`" = "-e" ; then ECHO=echo ; else ECHO="echo -e" ; fi
# function to test the exit status of a job
. ../check_failure.sh
$ECHO
$ECHO "$EXAMPLE_DIR : starting"
$ECHO
$ECHO "This example shows how to use pw.x and ph.x to calculate phonon"
$ECHO "frequencies at Gamma and X for InSb"
# set the needed environment variables
. ../environment_variables
# required executables and pseudopotentials
BIN_LIST="pw.x ph.x"
PSEUDO_LIST="In.pbe-hgh.UPF Sb.pbe-hgh.UPF"
$ECHO
$ECHO
$ECHO
$ECHO
$ECHO
$ECHO
ATOMIC_POSITIONS
In 0.00 0.00 0.00
Sb 0.25 0.25 0.25
K_POINTS
10
0.1250000 0.1250000 0.1250000 1.00
0.1250000 0.1250000 0.3750000 3.00
0.1250000 0.1250000 0.6250000 3.00
0.1250000 0.1250000 0.8750000 3.00
0.1250000 0.3750000 0.3750000 3.00
0.1250000 0.3750000 0.6250000 6.00
0.1250000 0.3750000 0.8750000 6.00
0.1250000 0.6250000 0.6250000 3.00
0.3750000 0.3750000 0.3750000 1.00
0.3750000 0.3750000 0.6250000 3.00
EOF
$ECHO " running the scf calculation for InSb again...\c"
$PW_COMMAND < insb.scf.in > insb.scf.out
check_failure $?
$ECHO " done"
# single mode phonon calculation at X
cat > insb.phXsingle.in << EOF
phonons of insb at X, single mode
&inputph
tr2_ph=1.0d-14,
prefix='insb',
amass(1)=114.82,
amass(2)=121.75,
outdir='$TMP_DIR/'
modenum=3
/
1.0 0.0 0.0
EOF
$ECHO " running the phonon calculation for InSb at X for a single mode...\c"
$PH_COMMAND < insb.phXsingle.in > insb.phXsingle.out
check_failure $?
$ECHO " done"
# clean TMP_DIR
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
$ECHO " done"
$ECHO " cleaning $TMP_DIR...\c"
rm -rf $TMP_DIR/*
$ECHO " done"
$ECHO
$ECHO "$EXAMPLE_DIR: done"