mirror of https://gitlab.com/QEF/q-e.git
added run_xml_example for QE examples
git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@7110 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
parent
8f876e08e5
commit
900a7549e0
|
@ -0,0 +1,559 @@
|
|||
#!/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 will calculate the final state contribution for a Rh011 slab"
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x initial_state.x"
|
||||
PSEUDO_LIST="Rh.pbe-rrkjus_lb.UPF Rhs.pbe-rrkjus_lb.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
IS_COMMAND="$PARA_PREFIX $BIN_DIR/initial_state.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running initial_state.x as: $IS_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
# In this run the atom with the core-excited PP is the bulk atom (bulk is
|
||||
# intended as the atom in the middle of the slab). This calculation will
|
||||
# define the energy_GS of the reference atom
|
||||
#
|
||||
cat > rh011bulk.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="Rh011bulk">
|
||||
|
||||
<cell type="matrix" sym="cubic">
|
||||
<matrix units="alat" alat="10.31510000">
|
||||
<real rank="2" n1="3" n2="3">
|
||||
1.00000000 0.00000000 0.00000000
|
||||
0.00000000 1.41421400 0.00000000
|
||||
0.00000000 0.00000000 2.50000000
|
||||
</real>
|
||||
</matrix>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Rh" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Rh.pbe-rrkjus_lb.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="Rhs" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Rhs.pbe-rrkjus_lb.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="5" >
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 0.50000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 0.25000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rhs">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 0.00000000
|
||||
</real>
|
||||
</position>
|
||||
<!-- ! Bulk atom core-exited -->
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 -0.25000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 -0.50000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.03
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="gamma">
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " running pw.x for Rh011_[bulk-exited] slab...\c"
|
||||
$PW_COMMAND -xmlinput rh011bulk.scf.xml > rh011bulk.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
# Now we run a calculation exciting everytime one single atom we want to study.
|
||||
# The first calculation is for the surface atom.
|
||||
#
|
||||
cat > rh011surf.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="Rh011surf">
|
||||
|
||||
<cell type="matrix" sym="cubic">
|
||||
<matrix units="alat" alat="10.31510000">
|
||||
<real rank="2" n1="3" n2="3">
|
||||
1.00000000 0.00000000 0.00000000
|
||||
0.00000000 1.41421400 0.00000000
|
||||
0.00000000 0.00000000 2.50000000
|
||||
</real>
|
||||
</matrix>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Rh" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Rh.pbe-rrkjus_lb.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="Rhs" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Rhs.pbe-rrkjus_lb.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="5" >
|
||||
<atom name="Rhs">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 0.50000000
|
||||
</real>
|
||||
</position>
|
||||
<!-- ! Surface atom core-exited -->
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 0.25000000
|
||||
</real>
|
||||
</position>
|
||||
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 0.00000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 -0.25000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 -0.50000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.03
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="gamma">
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " running pw.x for Rh011_[surface-exited] slab...\c"
|
||||
$PW_COMMAND -xmlinput rh011surf.scf.xml > rh011surf.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
# Now another simulation for the atom in the first layer under the surface.
|
||||
#
|
||||
cat > rh011layer1.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="Rh011lay1">
|
||||
|
||||
<cell type="matrix" sym="cubic">
|
||||
<matrix units="alat" alat="10.31510000">
|
||||
<real rank="2" n1="3" n2="3">
|
||||
1.00000000 0.00000000 0.00000000
|
||||
0.00000000 1.41421400 0.00000000
|
||||
0.00000000 0.00000000 2.50000000
|
||||
</real>
|
||||
</matrix>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Rh" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Rh.pbe-rrkjus_lb.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="Rhs" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Rhs.pbe-rrkjus_lb.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="5" >
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 0.50000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rhs">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 0.25000000
|
||||
</real>
|
||||
</position>
|
||||
<!-- ! Layer1 atom core-exited -->
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 0.00000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 -0.25000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 -0.50000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.03
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="gamma">
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " running pw.x for Rh011_[layer(-1)-exited] slab...\c"
|
||||
$PW_COMMAND -xmlinput rh011layer1.scf.xml > rh011layer1.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
# Extract data and write results
|
||||
#
|
||||
enbulk=`cat rh011bulk.scf.out | grep -e ! | egrep -o "([+-])?[0-9]+(\.[0-9]+)?"`
|
||||
ensurf=`cat rh011surf.scf.out | grep -e ! | egrep -o "([+-])?[0-9]+(\.[0-9]+)?"`
|
||||
enlayer1=`cat rh011layer1.scf.out | grep -e ! | egrep -o "([+-])?[0-9]+(\.[0-9]+)?"`
|
||||
|
||||
clssurfry=$(echo "scale=5; ($enbulk)-($ensurf)" | bc)
|
||||
clssurfev=$(echo "scale=5; (($enbulk)-($ensurf))*13.6" | bc)
|
||||
|
||||
clslay1ry=$(echo "scale=5; ($enbulk)-($enlayer1)" | bc)
|
||||
clslay1ev=$(echo "scale=5; (($enbulk)-($enlayer1))*13.6" | bc)
|
||||
|
||||
$ECHO "" > final-state.txt
|
||||
$ECHO "GS energy in the bulk configuration: $enbulk (Ry)" >> final-state.txt
|
||||
$ECHO "GS energy in the surface configuration: $ensurf (Ry)" >> final-state.txt
|
||||
$ECHO "GS energy in the layer(-1) configuration: $enlayer1 (Ry)" >> final-state.txt
|
||||
$ECHO "" >> final-state.txt
|
||||
$ECHO "------------------------------------------" >> final-state.txt
|
||||
$ECHO "FS shift for the surface atom: $clssurfev (eV)" >> final-state.txt
|
||||
$ECHO "FS shift for the layer(-1) atom: $clslay1ev (eV)" >> final-state.txt
|
||||
|
||||
$ECHO
|
||||
$ECHO " Results written in results/final-state.txt !"
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
||||
|
|
@ -0,0 +1,274 @@
|
|||
#!/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 will calculate the initial state contribution for a Rh011 slab"
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x initial_state.x"
|
||||
PSEUDO_LIST="Rh.pbe-rrkjus_lb.UPF Rhs.pbe-rrkjus_lb.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
IS_COMMAND="$PARA_PREFIX $BIN_DIR/initial_state.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running initial_state.x as: $IS_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
#
|
||||
# self-consistent calculation. Note the definitions in atomic_species and ntyp in &system
|
||||
#
|
||||
cat > rh011slab.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="Rh011">
|
||||
|
||||
<cell type="matrix" sym="cubic">
|
||||
<matrix units="alat" alat="10.31510000">
|
||||
<real rank="2" n1="3" n2="3">
|
||||
0.50000000 0.00000000 0.00000000
|
||||
0.00000000 0.70710678 0.00000000
|
||||
0.00000000 0.00000000 3.00000000
|
||||
</real>
|
||||
</matrix>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Rh" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Rh.pbe-rrkjus_lb.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="Rhs" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Rhs.pbe-rrkjus_lb.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="5" >
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 0.50000000
|
||||
</real>
|
||||
</position>
|
||||
<!-- ! Surface atom core-exited -->
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 0.25000000
|
||||
</real>
|
||||
</position>
|
||||
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 0.00000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 -0.25000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Rh">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25000000 0.35000000 -0.50000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.03
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="gamma">
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " running pw.x for Rh011 slab...\c"
|
||||
$PW_COMMAND -xmlinput rh011slab.scf.xml > rh011slab.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Initial state calculation as a post-processing tool
|
||||
#
|
||||
cat > rh011slab.istate.in << EOF
|
||||
&inputpp
|
||||
prefix='Rh011',
|
||||
outdir='$TMP_DIR'
|
||||
excite(1) = 2,
|
||||
/
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " running initial_state.x for RhUS->RhsUS ...\c"
|
||||
$IS_COMMAND < rh011slab.istate.in > rh011slab.istate.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
# Extract data and write results
|
||||
#
|
||||
enbulk=$(grep "atom 3 type 1" rh011slab.istate.out | head -n1 | cut -d" " -f 19)
|
||||
enlay1=$(grep "atom 2 type 1" rh011slab.istate.out | head -n1 | cut -d" " -f 19)
|
||||
ensurf=$(grep "atom 1 type 1" rh011slab.istate.out | head -n1 | cut -d" " -f 19)
|
||||
|
||||
|
||||
clssurfry=$(echo "scale=5; ($enbulk)-($ensurf)" | bc)
|
||||
clssurfev=$(echo "scale=5; (($enbulk)-($ensurf))*13.6" | bc)
|
||||
|
||||
clslay1ry=$(echo "scale=5; ($enbulk)-($enlay1)" | bc)
|
||||
clslay1ev=$(echo "scale=5; (($enbulk)-($enlay1))*13.6" | bc)
|
||||
|
||||
$ECHO "" > initial-state.txt
|
||||
$ECHO "IS contribution for the bulk atom: $enbulk (Ry)" >> initial-state.txt
|
||||
$ECHO "IS contribution for the surface atom: $ensurf (Ry)" >> initial-state.txt
|
||||
$ECHO "IS contribution for the layer(-1) atom: $enlay1 (Ry)" >> initial-state.txt
|
||||
$ECHO "" >> initial-state.txt
|
||||
$ECHO "------------------------------------------" >> initial-state.txt
|
||||
$ECHO "" >> initial-state.txt
|
||||
$ECHO "IS shift surface: $clssurfev (eV)" >> initial-state.txt
|
||||
$ECHO "IS shift layer(-1): $clslay1ev (eV)" >> initial-state.txt
|
||||
|
||||
$ECHO
|
||||
$ECHO " Results written in results/initial-state.txt !"
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -83,90 +83,92 @@ $ECHO " done"
|
|||
|
||||
# self-consistent calculation
|
||||
cat > si.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<INPUT calculation="scf" prefix="si">
|
||||
<input calculation="scf" prefix="si">
|
||||
|
||||
<CELL type="qecell">
|
||||
<QECELL ibrav="2" alat="10.20">
|
||||
<REAL rank="1" n1="5">
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.20">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</REAL>
|
||||
</QECELL>
|
||||
</CELL>
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<ATOMIC_SPECIES ntyp="1">
|
||||
<SPECIE name="Si" mass="28.086">
|
||||
<STRING>Si.pz-vbc.UPF</STRING>
|
||||
</SPECIE>
|
||||
</ATOMIC_SPECIES>
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<ATOMIC_LIST units="alat" nat="2" >
|
||||
<ATOM name="Si">
|
||||
<POSITION>
|
||||
<REAL rank="1" n1="3">
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</REAL>
|
||||
</POSITION>
|
||||
</ATOM>
|
||||
<ATOM name="Si">
|
||||
<POSITION>
|
||||
<REAL rank="1" n1="3">
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25 0.25 0.25
|
||||
</REAL>
|
||||
</POSITION>
|
||||
</ATOM>
|
||||
</ATOMIC_LIST>
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<FIELD name="InputOutput">
|
||||
<field name="InputOutput">
|
||||
|
||||
<PARAMETER name="restart_mode">
|
||||
<STRING>
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="pseudo_dir">
|
||||
<STRING>
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="outdir">
|
||||
<STRING>
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<FIELD name="Numerics">
|
||||
<field name="Numerics">
|
||||
|
||||
<PARAMETER name="ecutwfc">
|
||||
<REAL>
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
18.0
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="conv_thr">
|
||||
<REAL>
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="mixing_beta">
|
||||
<REAL>
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<K_POINTS type="tpiba">
|
||||
<MESH npoints="10">
|
||||
<REAL rank="2" n1="4" n2="10">
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="10">
|
||||
<real rank="2" n1="4" n2="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
|
||||
|
@ -177,10 +179,10 @@ cat > si.scf.xml << EOF
|
|||
0.1250000 0.6250000 0.6250000 3.00
|
||||
0.3750000 0.3750000 0.3750000 1.00
|
||||
0.3750000 0.3750000 0.6250000 3.00
|
||||
</REAL>
|
||||
</MESH>
|
||||
</K_POINTS>
|
||||
</INPUT>
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Si...\c"
|
||||
$PW_COMMAND -xmlinput si.scf.xml > si.scf.out
|
||||
|
@ -226,87 +228,89 @@ cat > si.scf.xml << EOF
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<INPUT calculation="scf" prefix="si">
|
||||
<input calculation="scf" prefix="si">
|
||||
|
||||
<CELL type="qecell">
|
||||
<QECELL ibrav="2" alat="10.20">
|
||||
<REAL rank="1" n1="5">
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.20">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</REAL>
|
||||
</QECELL>
|
||||
</CELL>
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<ATOMIC_SPECIES ntyp="1">
|
||||
<SPECIE name="Si" mass="28.086">
|
||||
<STRING>Si.pz-vbc.UPF</STRING>
|
||||
</SPECIE>
|
||||
</ATOMIC_SPECIES>
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<ATOMIC_LIST units="alat" nat="2" >
|
||||
<ATOM name="Si">
|
||||
<POSITION>
|
||||
<REAL rank="1" n1="3">
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</REAL>
|
||||
</POSITION>
|
||||
</ATOM>
|
||||
<ATOM name="Si">
|
||||
<POSITION>
|
||||
<REAL rank="1" n1="3">
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25 0.25 0.25
|
||||
</REAL>
|
||||
</POSITION>
|
||||
</ATOM>
|
||||
</ATOMIC_LIST>
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<FIELD name="InputOutput">
|
||||
<field name="InputOutput">
|
||||
|
||||
<PARAMETER name="restart_mode">
|
||||
<STRING>
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="pseudo_dir">
|
||||
<STRING>
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="outdir">
|
||||
<STRING>
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<FIELD name="Numerics">
|
||||
<field name="Numerics">
|
||||
|
||||
<PARAMETER name="ecutwfc">
|
||||
<REAL>
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
18.0
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="conv_thr">
|
||||
<REAL>
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="mixing_beta">
|
||||
<REAL>
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<K_POINTS type="tpiba">
|
||||
<MESH npoints="10">
|
||||
<REAL rank="2" n1="4" n2="10">
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="10">
|
||||
<real rank="2" n1="4" n2="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
|
||||
|
@ -317,10 +321,10 @@ cat > si.scf.xml << EOF
|
|||
0.1250000 0.6250000 0.6250000 3.00
|
||||
0.3750000 0.3750000 0.3750000 1.00
|
||||
0.3750000 0.3750000 0.6250000 3.00
|
||||
</REAL>
|
||||
</MESH>
|
||||
</K_POINTS>
|
||||
</INPUT>
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Si again...\c"
|
||||
$PW_COMMAND -xmlinput si.scf.xml > si.scf.out
|
||||
|
@ -350,119 +354,121 @@ $ECHO " done"
|
|||
|
||||
# self-consistent calculation for C with US-PP
|
||||
cat > c.scf.xml << EOF
|
||||
?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<INPUT calculation="scf" prefix="C">
|
||||
<input calculation="scf" prefix="C">
|
||||
|
||||
<CELL type="qecell">
|
||||
<QECELL ibrav="2" alat="6.74">
|
||||
<REAL rank="1" n1="5">
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="6.74">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</REAL>
|
||||
</QECELL>
|
||||
</CELL>
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<ATOMIC_SPECIES ntyp="1">
|
||||
<SPECIE name="C" mass="12.0107">
|
||||
<STRING>C.pz-rrkjus.UPF</STRING>
|
||||
</SPECIE>
|
||||
</ATOMIC_SPECIES>
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="C" mass="12.0107">
|
||||
<property name="pseudofile">
|
||||
<string>C.pz-rrkjus.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<ATOMIC_LIST units="alat" nat="2" >
|
||||
<ATOM name="C">
|
||||
<POSITION>
|
||||
<REAL rank="1" n1="3">
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</REAL>
|
||||
</POSITION>
|
||||
</ATOM>
|
||||
<ATOM name="C">
|
||||
<POSITION>
|
||||
<REAL rank="1" n1="3">
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25 0.25 0.25
|
||||
</REAL>
|
||||
</POSITION>
|
||||
</ATOM>
|
||||
</ATOMIC_LIST>
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<FIELD name="InputOutput">
|
||||
<field name="InputOutput">
|
||||
|
||||
<PARAMETER name="restart_mode">
|
||||
<STRING>
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="pseudo_dir">
|
||||
<STRING>
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="outdir">
|
||||
<STRING>
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<FIELD name="Numerics">
|
||||
<field name="Numerics">
|
||||
|
||||
<PARAMETER name="ecutwfc">
|
||||
<REAL>
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
27.0
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="ecutrho">
|
||||
<REAL>
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
300.0
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="conv_thr">
|
||||
<REAL>
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-9
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="nr1">
|
||||
<INTEGER>
|
||||
<parameter name="nr1">
|
||||
<integer>
|
||||
32
|
||||
</INTEGER>
|
||||
</PARAMETER>
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="nr2">
|
||||
<INTEGER>
|
||||
<parameter name="nr2">
|
||||
<integer>
|
||||
32
|
||||
</INTEGER>
|
||||
</PARAMETER>
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="nr3">
|
||||
<INTEGER>
|
||||
<parameter name="nr3">
|
||||
<integer>
|
||||
32
|
||||
</INTEGER>
|
||||
</PARAMETER>
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="mixing_beta">
|
||||
<REAL>
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<K_POINTS type="automatic">
|
||||
<MESH>
|
||||
<INTEGER rank="1" n1="6">
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</INTEGER>
|
||||
</MESH>
|
||||
</K_POINTS>
|
||||
</INPUT>
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for C...\c"
|
||||
$PW_COMMAND -xmlinput c.scf.xml > c.scf.out
|
||||
|
@ -493,135 +499,136 @@ cat > ni.scf.xml << EOF
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<INPUT calculation="scf" prefix="ni">
|
||||
<input calculation="scf" prefix="ni">
|
||||
|
||||
<CELL type="qecell">
|
||||
<QECELL ibrav="2" alat="6.65">
|
||||
<REAL rank="1" n1="5">
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="6.65">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</REAL>
|
||||
</QECELL>
|
||||
</CELL>
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<ATOMIC_SPECIES ntyp="1">
|
||||
<SPECIE name="Ni" mass="58.6934">
|
||||
<STRING>Ni.pbe-nd-rrkjus.UPF</STRING>
|
||||
</SPECIE>
|
||||
</ATOMIC_SPECIES>
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Ni" mass="58.6934">
|
||||
<property name="pseudofile">
|
||||
<string>Ni.pbe-nd-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>
|
||||
0.5
|
||||
</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<ATOMIC_LIST units="alat" nat="1" >
|
||||
<ATOM name="Ni">
|
||||
<POSITION>
|
||||
<REAL rank="1" n1="3">
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Ni">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</REAL>
|
||||
</POSITION>
|
||||
</ATOM>
|
||||
</ATOMIC_LIST>
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<FIELD name="InputOutput">
|
||||
<field name="InputOutput">
|
||||
|
||||
<PARAMETER name="restart_mode">
|
||||
<STRING>
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="pseudo_dir">
|
||||
<STRING>
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="outdir">
|
||||
<STRING>
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="tprnfor">
|
||||
<LOGICAL>
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</LOGICAL>
|
||||
</PARAMETER>
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<FIELD name="Numerics">
|
||||
<field name="Numerics">
|
||||
|
||||
<PARAMETER name="ecutwfc">
|
||||
<REAL>
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
27.0
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="ecutrho">
|
||||
<REAL>
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
300.0
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="conv_thr">
|
||||
<REAL>
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="mixing_beta">
|
||||
<REAL>
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<FIELD name="Options">
|
||||
<field name="Options">
|
||||
|
||||
<PARAMETER name="occupations">
|
||||
<STRING>
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="smearing">
|
||||
<STRING>
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</STRING>
|
||||
</PARAMETER>
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<PARAMETER name="degauss">
|
||||
<REAL>
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<FIELD name="Fields">
|
||||
<field name="Fields">
|
||||
|
||||
<PARAMETER name="starting_magnetization">
|
||||
<REAL rank="1" n1="1">
|
||||
0.5
|
||||
</REAL>
|
||||
</PARAMETER>
|
||||
|
||||
<PARAMETER name="nspin">
|
||||
<INTEGER>
|
||||
<parameter name="nspin">
|
||||
<integer>
|
||||
2
|
||||
</INTEGER>
|
||||
</PARAMETER>
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</FIELD>
|
||||
</field>
|
||||
|
||||
<K_POINTS type="automatic">
|
||||
<MESH>
|
||||
<INTEGER rank="1" n1="6">
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</INTEGER>
|
||||
</MESH>
|
||||
</K_POINTS>
|
||||
</INPUT>
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Ni...\c"
|
||||
$PW_COMMAND -xmlinput ni.scf.xml > ni.scf.out
|
||||
|
|
|
@ -0,0 +1,483 @@
|
|||
#!/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 to compute the equilibrium geometry"
|
||||
$ECHO "of a simple molecule, CO, and of an Al (001) slab."
|
||||
$ECHO "In the latter case the relaxation is performed in two ways:"
|
||||
$ECHO "1) using the quasi-Newton BFGS algorithm"
|
||||
$ECHO "2) using a damped dynamics algorithm."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x"
|
||||
PSEUDO_LIST=" O.pz-rrkjus.UPF C.pz-rrkjus.UPF Al.pz-vbc.UPF "
|
||||
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > co.rx.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="relax" prefix="CO">
|
||||
|
||||
<cell type="matrix" sym="cubic" units="angstrom">
|
||||
<matrix>
|
||||
<real rank="2" n1="3" n2="3">
|
||||
12.0 0.0 0.0
|
||||
0.0 12.0 0.0
|
||||
0.0 0.0 12.0
|
||||
</real>
|
||||
</matrix>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="O" mass="1.00">
|
||||
<property name="pseudofile">
|
||||
<string>O.pz-rrkjus.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="C" mass="1.00">
|
||||
<property name="pseudofile">
|
||||
<string>C.pz-rrkjus.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="bohr" nat="2" >
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
2.256 0.0 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="O">
|
||||
<position ifx="0" ify="0" ifz="0">
|
||||
<real rank="1" n1="3">
|
||||
0.000 0.0 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>$PSEUDO_DIR/</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>$TMP_DIR/</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>24.D0</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>144.D0</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>1.D-7</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>0.7D0</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="gamma">
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the geometry relaxation for CO...\c"
|
||||
$PW_COMMAND -xmlinput co.rx.xml > co.rx.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > al001.rx.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="relax">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="5.3033D0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 8.D0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Al" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="7" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5000000 0.5000000 -2.121320
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.0000000 -1.414213
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5000000 0.5000000 -0.707107
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.0000000 0.000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5000000 0.5000000 0.707107
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.0000000 1.414213
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5000000 0.5000000 2.121320
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>$PSEUDO_DIR</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>$TMP_DIR</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>12.D0</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>1.D-6</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>0.3D0</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>smearing</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>methfessel-paxton</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>0.05D0</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="RELAX">
|
||||
|
||||
<parameter name="bfgs_ndim">
|
||||
<integer>3</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="3">
|
||||
<real rank="2" n1="4" n2="3">
|
||||
0.125 0.125 0.0 1.0
|
||||
0.125 0.375 0.0 2.0
|
||||
0.375 0.375 0.0 1.0
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the geometry relaxation for Al (001) using BFGS...\c"
|
||||
$PW_COMMAND -xmlinput al001.rx.xml > al001.rx.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
rm -f e eal ave p avec tv
|
||||
cat > al001.mm.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="relax">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="5.3033D0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 8.D0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Al" mass="1.D0">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="7" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5000000 0.5000000 -2.121320
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.0000000 -1.414213
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5000000 0.5000000 -0.707107
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.0000000 0.000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5000000 0.5000000 0.707107
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.0000000 1.414213
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5000000 0.5000000 2.121320
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>$PSEUDO_DIR/</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>$TMP_DIR/</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>12.D0</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>1.D-7</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>0.3D0</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>smearing</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>methfessel-paxton</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>0.05D0</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="RELAX">
|
||||
|
||||
<parameter name="ion_dynamics">
|
||||
<string>damp</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="wfc_extrapolation">
|
||||
<string>second_order</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pot_extrapolation">
|
||||
<string>second_order</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="dt">
|
||||
<real>30.D0</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="3">
|
||||
<real rank="2" n1="4" n2="3">
|
||||
0.125 0.125 0.0 1.0
|
||||
0.125 0.375 0.0 2.0
|
||||
0.375 0.375 0.0 1.0
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the geometry relaxation for Al (001) using damped MD...\c"
|
||||
$PW_COMMAND -xmlinput al001.mm.xml > al001.mm.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,545 @@
|
|||
#!/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 to perform molecular dynamics for"
|
||||
$ECHO "2- and 8-atom cells of Si starting with compressed bonds along (111)."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x"
|
||||
PSEUDO_LIST="Si.pz-vbc.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# MD in a 2-atom cell
|
||||
cat > si.md2.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="md">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.18">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.123 -0.123 -0.123
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.123 0.123 0.123
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
<parameter name="disk_io">
|
||||
<string>
|
||||
high
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
8.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nosym">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="MD">
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
20.0
|
||||
</real>
|
||||
</parameter>
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
<parameter name="pot_extrapolation">
|
||||
<string>
|
||||
second-order
|
||||
</string>
|
||||
</parameter>
|
||||
<parameter name="wfc_extrapolation">
|
||||
<string>
|
||||
second-order
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
1 1 1 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the MD calculation for Si in a 2 atom cell. G-point...\c"
|
||||
$PW_COMMAND -xmlinput si.md2.xml > si.md2.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
awk '/Ekin/{ek=$3;et=$11; print it,time,ek,u,et}/Dynamics/{it=$5;time=$8}/^\!/{u=$5}' si.md2.out > MD2
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# MD in a 8-atom cell
|
||||
cat > si.md8.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="md">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="10.18">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="8" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.123 -0.123 -0.123
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.377 0.377 -0.123
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.377 -0.123 0.377
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.123 0.377 0.377
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.123 0.123 0.123
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.623 0.623 0.123
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.623 0.123 0.623
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.123 0.623 0.623
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
<parameter name="disk_io">
|
||||
<string>
|
||||
high
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
8.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nosym">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="MD">
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
20.0
|
||||
</real>
|
||||
</parameter>
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
<parameter name="pot_extrapolation">
|
||||
<string>
|
||||
second-order
|
||||
</string>
|
||||
</parameter>
|
||||
<parameter name="wfc_extrapolation">
|
||||
<string>
|
||||
second-order
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
1 1 1 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the MD calculation for Si in a 8 atom cell. G-point...\c"
|
||||
$PW_COMMAND -xmlinput si.md8.xml > si.md8.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
awk '/Ekin/{ek=$3;et=$11; print it,time,ek,u,et}/Dynamics/{it=$5;time=$8}/^\!/{u=$5}' si.md8.out > MD8
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# MD in a 2-atom cell. Gamma+3X
|
||||
cat > si.md2_G3X.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="md">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.18">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.123 -0.123 -0.123
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.123 0.123 0.123
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
<parameter name="disk_io">
|
||||
<string>
|
||||
high
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
8.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nosym">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="MD">
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
20.0
|
||||
</real>
|
||||
</parameter>
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
<parameter name="pot_extrapolation">
|
||||
<string>
|
||||
second-order
|
||||
</string>
|
||||
</parameter>
|
||||
<parameter name="wfc_extrapolation">
|
||||
<string>
|
||||
second-order
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="4">
|
||||
<real rank="2" n1="4" n2="4">
|
||||
0.0 0.0 0.0 1.0
|
||||
1.0 0.0 0.0 1.0
|
||||
0.0 1.0 0.0 1.0
|
||||
0.0 0.0 1.0 1.0
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the MD calculation for Si in a 2 atom cell. G3X-points...\c"
|
||||
$PW_COMMAND -xmlinput si.md2_G3X.xml > si.md2_G3X.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
awk '/Ekin/{ek=$3;et=$11; print it,time,ek,u,et} \
|
||||
/Dynamics/{it=$5;time=$8}/^\!/{u=$5}' si.md2_G3X.out > MD2_G3X
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,384 @@
|
|||
#!/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 postprocessing codes to make a"
|
||||
$ECHO "contour plot in the [110] plane of the charge density for Si, and to"
|
||||
$ECHO "plot the band structure of Si."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x pp.x plotrho.x bands.x plotband.x"
|
||||
PSEUDO_LIST="Si.pz-vbc.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PP_COMMAND="$PARA_PREFIX $BIN_DIR/pp.x $PARA_POSTFIX"
|
||||
PLOTRHO_COMMAND="$BIN_DIR/plotrho.x"
|
||||
BANDS_COMMAND="$PARA_PREFIX $BIN_DIR/bands.x $PARA_POSTFIX"
|
||||
PLOTBAND_COMMAND="$BIN_DIR/plotband.x"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running pp.x as: $PP_COMMAND"
|
||||
$ECHO " running plotrho.x as: $PLOTRHO_COMMAND"
|
||||
$ECHO " running bands.x as: $BANDS_COMMAND"
|
||||
$ECHO " running plotband.x as: $PLOTBAND_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > si.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="scf" prefix="si">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.20">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25 0.25 0.25
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
18.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="10">
|
||||
<real rank="2" n1="4" n2="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
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation...\c"
|
||||
$PW_COMMAND -xmlinput si.scf.xml > si.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# post-processing for charge density
|
||||
cat > si.pp_rho.in << EOF
|
||||
&inputpp
|
||||
prefix = 'si'
|
||||
outdir = '$TMP_DIR/'
|
||||
filplot = 'sicharge'
|
||||
plot_num= 0
|
||||
/
|
||||
&plot
|
||||
nfile = 1
|
||||
filepp(1) = 'sicharge'
|
||||
weight(1) = 1.0
|
||||
iflag = 2
|
||||
output_format = 2
|
||||
fileout = 'si.rho.dat'
|
||||
e1(1) =1.0, e1(2)=1.0, e1(3) = 0.0,
|
||||
e2(1) =0.0, e2(2)=0.0, e2(3) = 1.0,
|
||||
nx=56, ny=40
|
||||
/
|
||||
EOF
|
||||
$ECHO " running pp.x to do a 2-d plot of the charge density...\c"
|
||||
$PP_COMMAND < si.pp_rho.in > si.pp_rho.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# plotrho
|
||||
cat > si.plotrho.in << EOF
|
||||
si.rho.dat
|
||||
si.rho.ps
|
||||
n
|
||||
0 0.09 6
|
||||
EOF
|
||||
$ECHO " running plotrho.x to generate rho.ps...\c"
|
||||
$PLOTRHO_COMMAND < si.plotrho.in > si.plotrho.out
|
||||
$ECHO " done"
|
||||
|
||||
# band structure calculation along high-symmetry lines
|
||||
cat > si.band.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="bands" prefix="si">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.20">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25 0.25 0.25
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
18.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
8
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="36">
|
||||
<real rank="2" n1="4" n2="36">
|
||||
0.5 0.5 0.5 1
|
||||
0.4 0.4 0.4 2
|
||||
0.3 0.3 0.3 3
|
||||
0.2 0.2 0.2 4
|
||||
0.1 0.1 0.1 5
|
||||
0.0 0.0 0.0 6
|
||||
0.0 0.0 0.1 7
|
||||
0.0 0.0 0.2 8
|
||||
0.0 0.0 0.3 9
|
||||
0.0 0.0 0.4 10
|
||||
0.0 0.0 0.5 11
|
||||
0.0 0.0 0.6 12
|
||||
0.0 0.0 0.7 13
|
||||
0.0 0.0 0.8 14
|
||||
0.0 0.0 0.9 15
|
||||
0.0 0.0 1.0 16
|
||||
0.0 0.1 1.0 17
|
||||
0.0 0.2 1.0 18
|
||||
0.0 0.3 1.0 19
|
||||
0.0 0.4 1.0 20
|
||||
0.0 0.5 1.0 21
|
||||
0.0 0.6 1.0 22
|
||||
0.0 0.7 1.0 23
|
||||
0.0 0.8 1.0 24
|
||||
0.0 0.9 1.0 25
|
||||
0.0 1.0 1.0 26
|
||||
0.0 0.9 0.9 27
|
||||
0.0 0.8 0.8 28
|
||||
0.0 0.7 0.7 29
|
||||
0.0 0.6 0.6 30
|
||||
0.0 0.5 0.5 31
|
||||
0.0 0.4 0.4 32
|
||||
0.0 0.3 0.3 33
|
||||
0.0 0.2 0.2 34
|
||||
0.0 0.1 0.1 35
|
||||
0.0 0.0 0.0 36
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the band-structure calculation for Si...\c"
|
||||
$PW_COMMAND -xmlinput si.band.xml > si.band.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# post-processing for band structure
|
||||
cat > si.bands.in << EOF
|
||||
&inputpp
|
||||
prefix = 'si'
|
||||
outdir = '$TMP_DIR/'
|
||||
filband = 'sibands.dat'
|
||||
/
|
||||
EOF
|
||||
$ECHO " running the post-processing for band structure...\c"
|
||||
$BANDS_COMMAND < si.bands.in > si.bands.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# plotband.x
|
||||
cat > si.plotband.in << EOF
|
||||
sibands.dat
|
||||
-6.0 10
|
||||
sibands.xmgr
|
||||
sibands.ps
|
||||
6.255
|
||||
1.0 6.255
|
||||
EOF
|
||||
$ECHO " running plotband.x to generate sibands.ps...\c"
|
||||
$PLOTBAND_COMMAND < si.plotband.in > si.plotband.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,269 @@
|
|||
#!/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 calculate interatomic force constants in"
|
||||
$ECHO "real space for AlAs in zincblende structure."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x ph.x q2r.x matdyn.x"
|
||||
PSEUDO_LIST="Al.pz-vbc.UPF As.pz-bhs.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PH_COMMAND="$PARA_PREFIX $BIN_DIR/ph.x $PARA_POSTFIX"
|
||||
Q2R_COMMAND="$PARA_PREFIX $BIN_DIR/q2r.x $PARA_POSTFIX"
|
||||
MATDYN_COMMAND="$PARA_PREFIX $BIN_DIR/matdyn.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running ph.x as: $PH_COMMAND"
|
||||
$ECHO " running q2r.x as: $Q2R_COMMAND"
|
||||
$ECHO " running matdyn.x as: $MATDYN_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > alas.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="alas">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.50">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="As" mass="74.92">
|
||||
<property name="pseudofile">
|
||||
<string>As.pz-bhs.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25 0.25 0.25
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
16.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="2">
|
||||
<real rank="2" n1="4" n2="2">
|
||||
0.25 0.25 0.25 1.0
|
||||
0.25 0.25 0.75 3.0
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation...\c"
|
||||
$PW_COMMAND -xmlinput alas.scf.xml > alas.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# phonon calculation on a (444) uniform grid of q-points
|
||||
cat > alas.ph.in << EOF
|
||||
phonons of AlAs
|
||||
&inputph
|
||||
tr2_ph=1.0d-12,
|
||||
prefix='alas',
|
||||
ldisp=.true.,
|
||||
nq1=4, nq2=4, nq3=4
|
||||
amass(1)=26.98,
|
||||
amass(2)=74.92,
|
||||
outdir='$TMP_DIR/',
|
||||
fildyn='alas.dyn',
|
||||
/
|
||||
EOF
|
||||
$ECHO " running the phonon calculation ...\c"
|
||||
$PH_COMMAND < alas.ph.in > alas.ph.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > q2r.in <<EOF
|
||||
&input
|
||||
fildyn='alas.dyn', zasr='simple', flfrc='alas444.fc'
|
||||
/
|
||||
EOF
|
||||
|
||||
$ECHO " transforming C(q) => C(R)...\c"
|
||||
$Q2R_COMMAND < q2r.in > q2r.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > matdyn.in <<EOF
|
||||
&input
|
||||
asr='simple', amass(1)=26.98, amass(2)=74.922,
|
||||
flfrc='alas444.fc', flfrq='alas.freq'
|
||||
/
|
||||
9
|
||||
0.000 0.0 0.0 0.0
|
||||
0.125 0.0 0.0 0.0
|
||||
0.250 0.0 0.0 0.0
|
||||
0.375 0.0 0.0 0.0
|
||||
0.500 0.0 0.0 0.0
|
||||
0.625 0.0 0.0 0.0
|
||||
0.750 0.0 0.0 0.0
|
||||
0.875 0.0 0.0 0.0
|
||||
1.000 0.0 0.0 0.0
|
||||
EOF
|
||||
|
||||
$ECHO " recalculating omega(q) from C(R)...\c"
|
||||
$MATDYN_COMMAND < matdyn.in > matdyn.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > phdos.in <<EOF
|
||||
&input
|
||||
asr='simple', dos=.true. amass(1)=26.98, amass(2)=74.922,
|
||||
flfrc='alas444.fc', fldos='alas.phdos', nk1=6,nk2=6,nk3=6
|
||||
/
|
||||
EOF
|
||||
|
||||
$ECHO " calculating phonon DOS ...\c"
|
||||
$MATDYN_COMMAND < phdos.in > phdos.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,445 @@
|
|||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
##
|
||||
## HIGH VERBOSITY EXAMPLE
|
||||
##
|
||||
###############################################################################
|
||||
|
||||
# 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 calculate electron-phonon interaction"
|
||||
$ECHO "coefficients for fcc Al."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x ph.x q2r.x matdyn.x lambda.x"
|
||||
PSEUDO_LIST="Al.pz-vbc.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PH_COMMAND="$PARA_PREFIX $BIN_DIR/ph.x $PARA_POSTFIX"
|
||||
Q2R_COMMAND="$PARA_PREFIX $BIN_DIR/q2r.x $PARA_POSTFIX"
|
||||
MATDYN_COMMAND="$PARA_PREFIX $BIN_DIR/matdyn.x $PARA_POSTFIX"
|
||||
LAMBDA_COMMAND="$BIN_DIR/lambda.x "
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running ph.x as: $PH_COMMAND"
|
||||
$ECHO " running q2r.x as: $Q2R_COMMAND"
|
||||
$ECHO " running matdyn.x as: $MATDYN_COMMAND"
|
||||
$ECHO " running lambda.x as: $LAMBDA_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
# SCF at dense k-mesh, good enough for electronic DOS
|
||||
#
|
||||
cat > al.scf.fit.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="al">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="7.5">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="la2F">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
15.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.05
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
16 16 16 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation with dense k-point grid...\c"
|
||||
$PW_COMMAND -xmlinput al.scf.fit.xml > al.scf.fit.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
#
|
||||
# SCF at k-mesh good enough for phonons
|
||||
#
|
||||
cat > al.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="al">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="7.5">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
15.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.05
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
8 8 8 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation...\c"
|
||||
$PW_COMMAND -xmlinput al.scf.xml > al.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
#
|
||||
cat > al.elph.in << EOF
|
||||
Electron-phonon coefficients for Al
|
||||
&inputph
|
||||
tr2_ph=1.0d-10,
|
||||
prefix='al',
|
||||
fildvscf='aldv',
|
||||
amass(1)=26.98,
|
||||
outdir='$TMP_DIR/',
|
||||
fildyn='al.dyn',
|
||||
elph=.true.,
|
||||
trans=.true.,
|
||||
ldisp=.true.
|
||||
nq1=4, nq2=4, nq3=4
|
||||
/
|
||||
EOF
|
||||
$ECHO " running the el-ph calculation...\c"
|
||||
$PH_COMMAND < al.elph.in > al.elph.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
#
|
||||
# q2r and matdyn
|
||||
#
|
||||
cat > q2r.in << EOF
|
||||
&input
|
||||
zasr='simple', fildyn='al.dyn', flfrc='Al444.fc', la2F=.true.
|
||||
/
|
||||
EOF
|
||||
$ECHO " running q2r...\c"
|
||||
$Q2R_COMMAND < q2r.in > q2r.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
#
|
||||
#
|
||||
#
|
||||
cat > matdyn.in.freq << EOF
|
||||
&input
|
||||
asr='simple', amass(1)=26.98,
|
||||
flfrc='Al444.fc', flfrq='Al444.freq', la2F=.true., dos=.false.
|
||||
/
|
||||
19
|
||||
0.000 0.0 0.0 0.0
|
||||
0.125 0.0 0.0 0.0
|
||||
0.250 0.0 0.0 0.0
|
||||
0.375 0.0 0.0 0.0
|
||||
0.500 0.0 0.0 0.0
|
||||
0.750 0.0 0.0 0.0
|
||||
1.000 0.0 0.0 0.0
|
||||
0.825 0.125 0.125 0.0
|
||||
0.750 0.250 0.250 0.0
|
||||
0.625 0.375 0.375 0.0
|
||||
0.500 0.500 0.500 0.0
|
||||
0.325 0.325 0.325 0.0
|
||||
0.250 0.250 0.250 0.0
|
||||
0.125 0.125 0.125 0.0
|
||||
0.000 0.000 0.000 0.0
|
||||
0.125 0.125 0.000 0.0
|
||||
0.250 0.250 0.000 0.0
|
||||
0.325 0.325 0.000 0.0
|
||||
0.500 0.500 0.000 0.0
|
||||
EOF
|
||||
$ECHO " running matdyn for frequency calculation...\c"
|
||||
$MATDYN_COMMAND < matdyn.in.freq > matdyn.out.freq
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
#
|
||||
#
|
||||
#
|
||||
cat > matdyn.in.dos << EOF
|
||||
&input
|
||||
asr='simple', amass(1)=26.98,
|
||||
flfrc='Al444.fc', flfrq='Al444.freq', la2F=.true., dos=.true.
|
||||
fldos='phonon.dos', nk1=10, nk2=10, nk3=10, ndos=50
|
||||
/
|
||||
EOF
|
||||
$ECHO " running matdyn for a2F(omega) calculation...\c"
|
||||
$MATDYN_COMMAND < matdyn.in.dos > matdyn.out.dos
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
#
|
||||
#
|
||||
#
|
||||
cat > lambda.in << EOF
|
||||
10 0.12 1 ! emax (something more than highest phonon mode in THz), degauss, smearing method
|
||||
8 ! Number of q-points for which EPC is calculated,
|
||||
0.0000000 0.0000000 0.0000000 1.00 ! the first q-point, use kpoints.x program to calculate
|
||||
-0.2500000 -0.2500000 0.2500000 8.00 ! q-points and their weight
|
||||
-0.5000000 -0.5000000 0.5000000 4.00 !
|
||||
0.0000000 0.0000000 0.5000000 6.00 ! 4th q-point, qx,qy,qz
|
||||
-0.2500000 -0.2500000 0.7500000 24.00 !
|
||||
-0.5000000 -0.5000000 1.0000000 12.00 !
|
||||
0.0000000 0.0000000 1.0000000 3.00 !
|
||||
-0.5000000 0.0000000 1.0000000 6.00 ! the last q-point
|
||||
elph. 0.000000. 0.000000. 0.000000 ! elph output file names,
|
||||
elph.-0.250000. 0.250000.-0.250000 ! in the same order as the q-points before
|
||||
elph. 0.500000.-0.500000. 0.500000
|
||||
elph. 0.000000. 0.500000. 0.000000
|
||||
elph. 0.750000.-0.250000. 0.750000
|
||||
elph. 0.500000. 0.000000. 0.500000
|
||||
elph. 0.000000.-1.000000. 0.000000
|
||||
elph.-0.500000.-1.000000. 0.000000
|
||||
0.10 ! \mu the Coloumb coefficient in the modified
|
||||
! Allen-Dynes formula for T_c (via \omega_log)
|
||||
EOF
|
||||
$ECHO " running lambda.x for lambda calculation...\c"
|
||||
$LAMBDA_COMMAND < lambda.in > lambda.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,434 @@
|
|||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
##
|
||||
## HIGH VERBOSITY EXAMPLE
|
||||
##
|
||||
###############################################################################
|
||||
|
||||
# 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 phcg.x to calculate the normal"
|
||||
$ECHO "modes of a molecule (SiH4) at Gamma. It shows also the use of ph.x"
|
||||
$ECHO "for molecules (CH4) at Gamma."
|
||||
$ECHO
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
|
||||
BIN_LIST="pw.x phcg.x ph.x"
|
||||
PSEUDO_LIST="Si.pz-vbc.UPF H.pz-vbc.UPF C.pz-rrkjus.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PH_COMMAND="$PARA_PREFIX $BIN_DIR/ph.x $PARA_POSTFIX"
|
||||
PHCG_COMMAND="$PARA_PREFIX $BIN_DIR/phcg.x $PARA_POSTFIX"
|
||||
DYNMAT_COMMAND=" $BIN_DIR/dynmat.x"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running ph.x as: $PH_COMMAND"
|
||||
$ECHO " running phcg.x as: $PHCG_COMMAND"
|
||||
$ECHO " running dynmat.x as: $DYNMAT_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > sih4.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="sih4" title="Test Silane SiH4 gamma only">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="12.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="H" mass="1.008">
|
||||
<property name="pseudofile">
|
||||
<string>H.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="5" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 0.000000000 0.000000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.128530744 0.128530744 0.128530744
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.128530744 -0.128530744 0.128530744
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.128530744 0.128530744 -0.128530744
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.128530744 -0.128530744 -0.128530744
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
16.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_mode">
|
||||
<string>
|
||||
plain
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="gamma">
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for SiH4...\c"
|
||||
$PW_COMMAND -xmlinput sih4.scf.xml > sih4.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# normal mode calculation for SiH4
|
||||
cat > sih4.nm.in << EOF
|
||||
normal modes for sih4
|
||||
&inputph
|
||||
tr2_ph=1.0d-14,
|
||||
prefix='sih4',
|
||||
amass(1)=28.086,
|
||||
amass(2)=1.008,
|
||||
outdir='$TMP_DIR/',
|
||||
epsil=.true.,
|
||||
trans=.true., asr=.true.
|
||||
raman=.false.
|
||||
fildyn='sih4.dyn'
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running normal mode calculation for SiH4...\c"
|
||||
$PHCG_COMMAND < sih4.nm.in > sih4.nm.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# IR cross sections for SiH4
|
||||
cat > sih4.dyn.in << EOF
|
||||
&input fildyn='sih4.dyn', asr='zero-dim' /
|
||||
EOF
|
||||
|
||||
$ECHO " running IR cross section calculation for SiH4...\c"
|
||||
$DYNMAT_COMMAND < sih4.dyn.in > sih4.dyn.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Self consistent calculation for CH4
|
||||
cat > ch4.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- ch4
|
||||
ch4 molecule in a cubic box -->
|
||||
|
||||
<input calculation="scf" prefix="ch4">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="15.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="H" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>H.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="C" mass="12.0">
|
||||
<property name="pseudofile">
|
||||
<string>C.pz-rrkjus.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="5" >
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.080728893 0.080728893 0.080728893
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.080728893 -0.080728893 0.080728893
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.080728893 -0.080728893 -0.080728893
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.080728893 0.080728893 -0.080728893
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 0.000000000 0.000000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
100.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.5
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="1">
|
||||
<real rank="2" n1="4" n2="1">
|
||||
0.0 0.0 0.0 1.0
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for CH4...\c"
|
||||
$PW_COMMAND -xmlinput ch4.scf.xml > ch4.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# normal mode calculation for CH4
|
||||
cat > ch4.nm.in << EOF
|
||||
vibrations of ch4
|
||||
&inputph
|
||||
tr2_ph=4.0d-17,
|
||||
prefix='ch4',
|
||||
outdir='$TMP_DIR',
|
||||
amass(1)=1.d0,
|
||||
amass(2)=12.d0,
|
||||
asr=.true.,
|
||||
zue=.true.,
|
||||
epsil=.true.,
|
||||
trans=.true.,
|
||||
fildyn='ch4.dyn.xml',
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running normal mode calculation for CH4...\c"
|
||||
$PH_COMMAND < ch4.nm.in > ch4.nm.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
||||
|
||||
# IR cross sections for CH4
|
||||
cat > ch4.dyn.in << EOF
|
||||
&input fildyn='ch4.dyn.xml', asr='zero-dim' /
|
||||
EOF
|
||||
|
||||
$ECHO " running IR cross section calculation for CH4...\c"
|
||||
$DYNMAT_COMMAND < ch4.dyn.in > ch4.dyn.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,399 @@
|
|||
#!/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 calculate the polarization via Berry Phase"
|
||||
$ECHO "in PbTiO3 (contributed by the Vanderbilt Group in Rutgers University)."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x"
|
||||
PSEUDO_LIST="Pb.pz-d-van.UPF Ti.pz-sp-van_ak.UPF O.pz-van_ak.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > chg.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="scf">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="7.3699">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="3">
|
||||
<specie name="Pb" mass="207.2">
|
||||
<property name="pseudofile">
|
||||
<string>Pb.pz-d-van.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="Ti" mass="47.867">
|
||||
<property name="pseudofile">
|
||||
<string>Ti.pz-sp-van_ak.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="O" mass="15.9994">
|
||||
<property name="pseudofile">
|
||||
<string>O.pz-van_ak.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="5" >
|
||||
<atom name="Pb">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000 0.000 0.010
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Ti">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500 0.500 0.500
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000 0.500 0.500
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500 0.500 0.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500 0.000 0.500
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-12
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
fixed
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.00
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
25
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running self-consistent calculation in PbTiO3...\c"
|
||||
$PW_COMMAND -xmlinput chg.xml > chg.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Berry Phase calculation
|
||||
cat > BP.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="nscf">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="7.3699">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="3">
|
||||
<specie name="Pb" mass="207.2">
|
||||
<property name="pseudofile">
|
||||
<string>Pb.pz-d-van.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="Ti" mass="47.867">
|
||||
<property name="pseudofile">
|
||||
<string>Ti.pz-sp-van_ak.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="O" mass="15.9994">
|
||||
<property name="pseudofile">
|
||||
<string>O.pz-van_ak.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="5" >
|
||||
<atom name="Pb">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000 0.000 0.010
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Ti">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500 0.500 0.500
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000 0.500 0.500
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500 0.500 0.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500 0.000 0.500
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-5
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
fixed
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.00
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
22
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="lberry">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="gdir">
|
||||
<integer>
|
||||
3
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nppstr">
|
||||
<integer>
|
||||
7
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 7 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running Berry Phase calculation for PbTiO3...\c"
|
||||
$PW_COMMAND -xmlinput BP.xml > BP.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,476 @@
|
|||
#!/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 calculate the total energy of an isolated"
|
||||
$ECHO "atom in a supercell with fixed occupations."
|
||||
$ECHO "Two examples: LDA energy of Al and sigma-GGA energy of O."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x"
|
||||
PSEUDO_LIST=" Al.pz-vbc.UPF O.pbe-rrkjus.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation for isolated Al atom
|
||||
cat > al.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="20.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Al" mass="26.98154">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000000 0.0000000000 0.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
15.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.35
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0E-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nosym">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
from_input
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
6
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
1 1 1 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
<occupations>
|
||||
<real rank="1" n1="6">
|
||||
2.0 0.3333333333333 0.333333333333 0.3333333333333 0.0 0.0
|
||||
</real>
|
||||
</occupations>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running self-consistent calculation for Al atom...\c"
|
||||
$PW_COMMAND -xmlinput al.xml > al.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# self consistent calculation for the spin polarized O atom
|
||||
cat > O.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="14.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="O" mass="15.99994">
|
||||
<property name="pseudofile">
|
||||
<string>O.pbe-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.5d0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 0.000000000 0.000000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
27.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
216.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.25
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0E-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nosym">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
from_input
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
6
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="nspin">
|
||||
<integer>
|
||||
2
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
1 1 1 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
<occupations>
|
||||
<real rank="2" n1="6" n2="2">
|
||||
1.0 1.0 1.0 1.0 0.0 0.0
|
||||
1.0 0.33333333333 0.33333333333 0.33333333333 0.0 0.0
|
||||
</real>
|
||||
</occupations>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running calculation for O atom...\c"
|
||||
$PW_COMMAND -xmlinput O.xml > O.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
cat > O_gamma.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="scf">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="14.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="O" mass="15.99994">
|
||||
<property name="pseudofile">
|
||||
<string>O.pbe-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.5d0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 0.000000000 0.000000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
27.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
216.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.25
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0E-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nosym">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
from_input
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
6
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="nspin">
|
||||
<integer>
|
||||
2
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="gamma">
|
||||
</k_points>
|
||||
|
||||
<occupations>
|
||||
<real rank="2" n1="6" n2="2">
|
||||
1.0 1.0 1.0 1.0 0.0 0.0
|
||||
1.0 0.33333333333 0.33333333333 0.33333333333 0.0 0.0
|
||||
</real>
|
||||
</occupations>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running calculation for O atom, Gamma-only...\c"
|
||||
$PW_COMMAND -xmlinput O_gamma.xml > O_gamma.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,902 @@
|
|||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
##
|
||||
## HIGH VERBOSITY EXAMPLE
|
||||
##
|
||||
###############################################################################
|
||||
|
||||
# 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 pwcond.x to calculate the"
|
||||
$ECHO "complex bands and the transmission coefficient of an open quantum"
|
||||
$ECHO "system."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
|
||||
BIN_LIST="pw.x pwcond.x"
|
||||
PSEUDO_LIST="H.pz-vbc.UPF Al.pz-vbc.UPF Ni.pz-nd-rrkjus.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PWCOND_COMMAND="$PARA_PREFIX $BIN_DIR/pwcond.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running pwcond.x as: $PWCOND_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation for Al bulk along the 001 direction
|
||||
cat > al.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="al">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="5.3">
|
||||
<real rank="1" n1="5">
|
||||
0.0 1.414 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5 0.5 0.707
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
15.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.01
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Al...\c"
|
||||
$PW_COMMAND -xmlinput al.scf.xml > al.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# complex bands of Al along the 001 direction K_perp=0
|
||||
cat > al.cond.in << EOF
|
||||
&inputcond
|
||||
outdir='$TMP_DIR/'
|
||||
prefixl='al'
|
||||
band_file ='bands.al'
|
||||
ikind=0
|
||||
energy0=10.d0
|
||||
denergy=-0.4d0
|
||||
ewind=1.d0
|
||||
epsproj=1.d-3
|
||||
delgep = 1.d-12
|
||||
cutplot = 3.d0
|
||||
/
|
||||
1
|
||||
0.0 0.0 1.0
|
||||
60
|
||||
EOF
|
||||
$ECHO " running pwcond.x to calculate the complex bands of Al...\c"
|
||||
$PWCOND_COMMAND < al.cond.in > al.cond.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation for Al monatomic wire
|
||||
cat > alwire.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="alw">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="12.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.375 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 0.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
15.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.01
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="nspin">
|
||||
<integer>
|
||||
1
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
1 1 15 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Al monatomic wire...\c"
|
||||
$PW_COMMAND -xmlinput alwire.scf.xml > alwire.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# complex bands of the Al monatomic wire
|
||||
cat > alwire.cond.in << EOF
|
||||
&inputcond
|
||||
outdir='$TMP_DIR/'
|
||||
prefixl='alw'
|
||||
band_file='bands.alwire'
|
||||
ikind=0
|
||||
energy0=7.0d0
|
||||
denergy=-0.2d0
|
||||
ewind=1.d0
|
||||
epsproj=1.d-3
|
||||
nz1=3
|
||||
cutplot = 1.d0
|
||||
/
|
||||
1
|
||||
0. 0. 1.0
|
||||
71
|
||||
EOF
|
||||
$ECHO " running pwcond.x to calculate the complex bands of Al wire...\c"
|
||||
$PWCOND_COMMAND < alwire.cond.in > alwire.cond.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation for bulk Ni
|
||||
cat > ni.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="scf" prefix="ni">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="4.57">
|
||||
<real rank="1" n1="5">
|
||||
0.0 1.414 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Ni" mass="58.69">
|
||||
<property name="pseudofile">
|
||||
<string>Ni.pz-nd-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Ni">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Ni">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5 0.5 0.707
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
250.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.01
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="nspin">
|
||||
<integer>
|
||||
2
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 3 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Ni bulk...\c"
|
||||
$PW_COMMAND -xmlinput ni.scf.xml > ni.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# complex bands of Ni
|
||||
cat > ni.cond.in << EOF
|
||||
&inputcond
|
||||
outdir='$TMP_DIR/'
|
||||
prefixl='ni'
|
||||
band_file = 'bands.ni_down'
|
||||
ikind=0
|
||||
iofspin = 2
|
||||
energy0=1.d0
|
||||
denergy=-0.2d0
|
||||
ewind=3.d0
|
||||
epsproj=1.d-4
|
||||
nz1=3
|
||||
/
|
||||
1
|
||||
0.0 0.0 1.0
|
||||
30
|
||||
EOF
|
||||
$ECHO " running pwcond.x to calculate the complex bands of Ni...\c"
|
||||
$PWCOND_COMMAND < ni.cond.in > ni.cond.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation for Al monatomic wire
|
||||
cat > alwire1.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="alw">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="12.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.375 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 0.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
150.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.01
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="nspin">
|
||||
<integer>
|
||||
1
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
2 2 24 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Al monatomic wire...\c"
|
||||
$PW_COMMAND -xmlinput alwire1.scf.xml > alwire1.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation for Al-H-Al system
|
||||
cat > AlwireH.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="alh">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="12.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 1.875 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="H" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>H.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="6" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 0.0000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 0.375
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.02779870 0.00000000 .75537515
|
||||
</real>
|
||||
</position>
|
||||
</atom><atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.19269012 0.00000000 .93750000
|
||||
</real>
|
||||
</position>
|
||||
</atom><atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.02779870 0.00000000 1.11962485
|
||||
</real>
|
||||
</position>
|
||||
</atom><atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00000000 0.00000000 1.5
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
150.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.01
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
2 2 2 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Al wire with H impurity...\c"
|
||||
$PW_COMMAND -xmlinput AlwireH.scf.xml > AlwireH.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# transmission calculation for the perfect Al wire
|
||||
cat > AlwireAl.cond.in << EOF
|
||||
&inputcond
|
||||
outdir='$TMP_DIR/',
|
||||
prefixl='alw',
|
||||
prefixs='alw',
|
||||
tran_file='trans.alwire',
|
||||
ikind=1,
|
||||
energy0=2.95d0,
|
||||
denergy=-0.1d0,
|
||||
ewind=1.d0,
|
||||
epsproj=1.d-3,
|
||||
nz1 = 1
|
||||
/
|
||||
1
|
||||
0.0 0.0 1.0
|
||||
100
|
||||
EOF
|
||||
$ECHO " running pwcond.x to calculate transmission of a perfect Al wire ...\c"
|
||||
$PWCOND_COMMAND < AlwireAl.cond.in > AlwireAl.cond.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# transmission calculation for the Al-C-Al
|
||||
cat > AlwireH.cond.in << EOF
|
||||
&inputcond
|
||||
outdir='$TMP_DIR/',
|
||||
prefixl='alw',
|
||||
prefixs='alh',
|
||||
tran_file='trans.alwireh',
|
||||
ikind = 1,
|
||||
energy0=3.d0,
|
||||
denergy=0.d0,
|
||||
ewind=1.d0,
|
||||
epsproj=1.d-3,
|
||||
nz1 = 1,
|
||||
/
|
||||
1
|
||||
0.0 0.0 1.0
|
||||
18
|
||||
3.0
|
||||
2.7
|
||||
2.5
|
||||
1.6
|
||||
1.0
|
||||
0.9
|
||||
0.1
|
||||
-0.1
|
||||
-0.25
|
||||
-1.15
|
||||
-1.45
|
||||
-1.9
|
||||
-3.0
|
||||
-4.0
|
||||
-5.0
|
||||
-6.0
|
||||
-6.2
|
||||
-6.45
|
||||
EOF
|
||||
$ECHO " running pwcond.x to calculate transmission of an Al wire with H...\c"
|
||||
$PWCOND_COMMAND < AlwireH.cond.in > AlwireH.cond.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,280 @@
|
|||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
##
|
||||
## HIGH VERBOSITY EXAMPLE
|
||||
##
|
||||
###############################################################################
|
||||
|
||||
# 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, ph.x and d3.x to calculate the"
|
||||
$ECHO "third-order expansion coefficients of the total energy of Si."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
|
||||
BIN_LIST="pw.x ph.x d3.x"
|
||||
PSEUDO_LIST="Si.pz-vbc.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PH_COMMAND="$PARA_PREFIX $BIN_DIR/ph.x $PARA_POSTFIX"
|
||||
D3_COMMAND="$PARA_PREFIX $BIN_DIR/d3.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running ph.x as: $PH_COMMAND"
|
||||
$ECHO " running d3.x as: $D3_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > si.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="scf" prefix="si">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.20">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25 0.25 0.25
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
24.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Si...\c"
|
||||
$PW_COMMAND -xmlinput si.scf.xml > si.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# calculation of the dynamical matrix at Gamma
|
||||
cat > si.phG.in << EOF
|
||||
phonons of Si at Gamma
|
||||
&inputph
|
||||
tr2_ph=1.0d-12,
|
||||
prefix='si',
|
||||
epsil=.false.,
|
||||
trans=.true.,
|
||||
zue=.false.,
|
||||
amass(1)=28.0855,
|
||||
amass(2)=28.0855,
|
||||
outdir='$TMP_DIR/',
|
||||
fildyn='si.dyn_G',
|
||||
fildrho='si.drho_G',
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running the phonon calculation for Si at Gamma...\c"
|
||||
$PH_COMMAND < si.phG.in > si.phG.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# calculation of the anharmonic tensor at Gamma
|
||||
cat > si.d3G.in << EOF
|
||||
Anharm at Gamma
|
||||
&inputph
|
||||
prefix = 'si',
|
||||
fildrho = 'si.drho_G',
|
||||
fild0rho = 'si.drho_G',
|
||||
amass(1) = 28.0855,
|
||||
outdir = '$TMP_DIR/',
|
||||
fildyn = 'si.anh_G',
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running the calculation of D3(0,0,0)...\c"
|
||||
$D3_COMMAND < si.d3G.in > si.d3G.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# calculation of the dynamical matrix at the X-point
|
||||
cat > si.phX.in << EOF
|
||||
phonons of Si at the X-point
|
||||
&inputph
|
||||
tr2_ph=1.0d-12,
|
||||
prefix='si',
|
||||
trans=.true.,
|
||||
amass(1)=28.0855,
|
||||
amass(2)=28.0855,
|
||||
outdir='$TMP_DIR/',
|
||||
fildyn='si.dyn_X',
|
||||
fildrho='si.drho_X',
|
||||
/
|
||||
0.0 0.0 1.0
|
||||
EOF
|
||||
$ECHO " running the phonon calculation for Si at X...\c"
|
||||
$PH_COMMAND < si.phX.in > si.phX.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# calculation of the anharmonic tensor at X
|
||||
cat > si.d3X.in << EOF
|
||||
Anharm at the X-point
|
||||
&inputph
|
||||
prefix = 'si',
|
||||
fildrho = 'si.drho_X',
|
||||
fild0rho = 'si.drho_G',
|
||||
amass(1) = 28.0855,
|
||||
outdir = '$TMP_DIR/',
|
||||
fildyn = 'si.anh_X',
|
||||
/
|
||||
0.0 0.0 1.0
|
||||
EOF
|
||||
$ECHO " running the calculation of D3(0,X,-X)...\c"
|
||||
$D3_COMMAND < si.d3X.in > si.d3X.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,240 @@
|
|||
#!/bin/sh
|
||||
|
||||
###############################################################################
|
||||
##
|
||||
## HIGH VERBOSITY EXAMPLE
|
||||
##
|
||||
###############################################################################
|
||||
|
||||
# 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"
|
||||
$ECHO "the Raman tensor for AlAs."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x ph.x"
|
||||
PSEUDO_LIST="Al.pz-vbc.UPF As.pz-bhs.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PH_COMMAND="$PARA_PREFIX $BIN_DIR/ph.x $PARA_POSTFIX"
|
||||
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running ph.x as: $PH_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
# self-consistent calculation
|
||||
#
|
||||
cat > alas.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="alas">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="10.575">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="As" mass="74.92">
|
||||
<property name="pseudofile">
|
||||
<string>As.pz-bhs.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.25 0.25 0.25
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
10.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nosym">
|
||||
<logical>
|
||||
false
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
|
||||
$ECHO " running the scf calculation...\c"
|
||||
$PW_COMMAND -xmlinput alas.scf.xml > alas.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# response calculation
|
||||
|
||||
cat > alas.ph.in << EOF
|
||||
phonons of AlAs at Gamma
|
||||
&inputph
|
||||
tr2_ph=1.0d-12,
|
||||
prefix='alas',
|
||||
epsil=.true.,
|
||||
trans=.true.,
|
||||
lraman=.true.,
|
||||
elop=.true.,
|
||||
amass(1)=26.98,
|
||||
amass(2)=74.92,
|
||||
outdir='$TMP_DIR/',
|
||||
fildyn='alas.dynG',
|
||||
fildrho='alas.drho',
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
|
||||
$ECHO " running the response calculation...\c"
|
||||
$PH_COMMAND < alas.ph.in > alas.ph.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,692 @@
|
|||
#!/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 a calculation of STM maps."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x pp.x plotrho.x projwfc.x sumpdos.x"
|
||||
PSEUDO_LIST="Al.pz-vbc.UPF As.pz-bhs.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for gnuplot
|
||||
GP_COMMAND=`which gnuplot 2>/dev/null`
|
||||
if [ "$GP_COMMAND" = "" ]; then
|
||||
$ECHO
|
||||
$ECHO "gnuplot not in PATH"
|
||||
$ECHO "Results will not be plotted"
|
||||
fi
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PP_COMMAND="$PARA_PREFIX $BIN_DIR/pp.x $PARA_POSTFIX"
|
||||
PLOTRHO_COMMAND="$BIN_DIR/plotrho.x"
|
||||
PROJWFC_COMMAND="$PARA_PREFIX $BIN_DIR/projwfc.x $PARA_POSTFIX"
|
||||
SUMPDOS_COMMAND="$BIN_DIR/sumpdos.x"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running pp.x as: $PP_COMMAND"
|
||||
$ECHO " running plotrho.x as: $PLOTRHO_COMMAND"
|
||||
$ECHO " running projwfc.x as: $PROJWFC_COMMAND"
|
||||
$ECHO " running sumpdos.x as: $SUMPDOS_COMMAND"
|
||||
$ECHO " running gnuplot as: $GP_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > AlAs110re.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="AlAs110" title="AlAs 110 surface slab, relaxed (central plane fixed)">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="8" alat="7.424621202">
|
||||
<real rank="1" n1="5">
|
||||
1.414213576 6.00000 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="As" mass="74.92">
|
||||
<property name="pseudofile">
|
||||
<string>As.pz-bhs.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="14" >
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 -0.044777195 -0.058158722
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.251460333 0.113525468
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.712279009 0.504183885
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 1.067633546 0.480460620
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 -0.003937059 0.995826731
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.351400965 1.004220212
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 -0.003937059 2.004173269
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.351400965 1.995779788
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.712279009 2.495816115
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 1.067633546 2.519539380
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 -0.044777195 3.058158722
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.251460333 2.886474532
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.707106800 1.500000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 1.060660200 1.500000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
14.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_mode">
|
||||
<string>
|
||||
plain
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
6 2 1 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation...\c"
|
||||
$PW_COMMAND -xmlinput AlAs110re.scf.xml > AlAs110re.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > AlAs110re.nonscf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="nscf" prefix="AlAs110" title="AlAs 110 surface slab, relaxed (central plane fixed)">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="8" alat="7.424621202">
|
||||
<real rank="1" n1="5">
|
||||
1.414213576 6.00000 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="Al" mass="26.98">
|
||||
<property name="pseudofile">
|
||||
<string>Al.pz-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="As" mass="74.92">
|
||||
<property name="pseudofile">
|
||||
<string>As.pz-bhs.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="14" >
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 -0.044777195 -0.058158722
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.251460333 0.113525468
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.712279009 0.504183885
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 1.067633546 0.480460620
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 -0.003937059 0.995826731
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.351400965 1.004220212
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 -0.003937059 2.004173269
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.351400965 1.995779788
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.712279009 2.495816115
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 1.067633546 2.519539380
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 -0.044777195 3.058158722
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.251460333 2.886474532
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="As">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.500000000 0.707106800 1.500000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Al">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.000000000 1.060660200 1.500000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
14.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_mode">
|
||||
<string>
|
||||
plain
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
gaussian
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.01
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
34
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
12 4 1 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the non-scf calculation...\c"
|
||||
$PW_COMMAND -xmlinput AlAs110re.nonscf.xml > AlAs110re.nonscf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# post-processing for stm images (sample bias given in Ry!)
|
||||
cat > AlAs110.pp_stm-.in << EOF
|
||||
&inputpp
|
||||
prefix = 'AlAs110'
|
||||
outdir='$TMP_DIR/',
|
||||
filplot = 'AlAsresm-1.0'
|
||||
sample_bias=-0.0735d0,
|
||||
plot_num= 5
|
||||
/
|
||||
&plot
|
||||
nfile=1
|
||||
filepp(1)='AlAsresm-1.0'
|
||||
weight(1)=1.0
|
||||
iflag=2
|
||||
output_format=2
|
||||
e1(1)=7.0, e1(2)=0.0, e1(3)=0.0
|
||||
e2(1)=0.0, e2(2)=7.07107, e2(3)=0.0
|
||||
x0(1)=0.0, x0(2)=-0.18, x0(3)=3.25
|
||||
nx=36 ,ny=56
|
||||
fileout='AlAs110-1.0'
|
||||
/
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " running the post-processing phase, negative bias...\c"
|
||||
$PP_COMMAND < AlAs110.pp_stm-.in > AlAs110.pp_stm-.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# run plotrho to do the figure
|
||||
cat > AlAs110.plotrho-.in << EOF
|
||||
AlAs110-1.0
|
||||
AlAs110-1.0eV.ps
|
||||
n
|
||||
0.00005 0.0078 8
|
||||
EOF
|
||||
$ECHO " running plotrho on negative bias data...\c"
|
||||
$PLOTRHO_COMMAND < AlAs110.plotrho-.in > AlAs110.plotrho-.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# post-processing for stm images (as before, but positive bias)
|
||||
cat > AlAs110.pp_stm+.in << EOF
|
||||
&inputpp
|
||||
prefix = 'AlAs110'
|
||||
outdir='$TMP_DIR/',
|
||||
filplot = 'AlAsresm+1.0'
|
||||
sample_bias=0.0735d0,
|
||||
plot_num= 5
|
||||
/
|
||||
&plot
|
||||
nfile=1
|
||||
filepp(1)='AlAsresm+1.0'
|
||||
weight(1)=1.0
|
||||
iflag=2
|
||||
output_format=2
|
||||
e1(1)=7.0, e1(2)=0.0, e1(3)=0.0
|
||||
e2(1)=0.0, e2(2)=7.07107, e2(3)=0.0
|
||||
x0(1)=0.0, x0(2)=-0.18, x0(3)=3.25
|
||||
nx=36 ,ny=56
|
||||
fileout='AlAs110+1.0'
|
||||
/
|
||||
EOF
|
||||
$ECHO " running the post-processing phase, positive bias...\c"
|
||||
$PP_COMMAND < AlAs110.pp_stm+.in > AlAs110.pp_stm+.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# plotrho
|
||||
cat > AlAs110.plotrho+.in << EOF
|
||||
AlAs110+1.0
|
||||
AlAs110+1.0eV.ps
|
||||
n
|
||||
0.00002 0.0021 8
|
||||
EOF
|
||||
$ECHO " running plotrho on positive bias data...\c"
|
||||
$PLOTRHO_COMMAND < AlAs110.plotrho+.in > AlAs110.plotrho+.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Projection of the DOS on volumes (boxes)
|
||||
cat > AlAs110.box.projwfc.in << EOF
|
||||
&inputpp
|
||||
prefix = 'AlAs110'
|
||||
outdir='$TMP_DIR/',
|
||||
ngauss=0
|
||||
degauss=0.01
|
||||
DeltaE=0.02
|
||||
tdosinboxes=.true.
|
||||
plotboxes=.true.
|
||||
n_proj_boxes=8
|
||||
|
||||
!! Boxes centered on the first vacuum layer:
|
||||
!! 1) above the surface Al
|
||||
irmin(1,1)= 0, irmax(1,1)= 2, irmin(2,1)= 0, irmax(2,1)= 2, irmin(3,1)=63, irmax(3,1)=65,
|
||||
!! 2) above the surface As
|
||||
irmin(1,2)= 9, irmax(1,2)=11, irmin(2,2)= 5, irmax(2,2)= 7, irmin(3,2)=63, irmax(3,2)=65,
|
||||
!! 3) above the 2nd layer Al
|
||||
irmin(1,3)= 9, irmax(1,3)=11, irmin(2,3)=14, irmax(2,3)=16, irmin(3,3)=63, irmax(3,3)=65,
|
||||
!! 4) as large as the surface unit cell
|
||||
irmin(1,4)= 1, irmax(1,4)=18, irmin(2,4)= 1, irmax(2,4)=27, irmin(3,4)=63, irmax(3,4)=65,
|
||||
|
||||
!! Same as above, centered on the second vacuum layer:
|
||||
irmin(1,5)= 0, irmax(1,5)= 2, irmin(2,5)= 0, irmax(2,5)= 2, irmin(3,5)=72, irmax(3,5)=74,
|
||||
irmin(1,6)= 9, irmax(1,6)=11, irmin(2,6)= 5, irmax(2,6)= 7, irmin(3,6)=72, irmax(3,6)=74,
|
||||
irmin(1,7)= 9, irmax(1,7)=11, irmin(2,7)=14, irmax(2,7)=16, irmin(3,7)=72, irmax(3,7)=74,
|
||||
irmin(1,8)= 1, irmax(1,8)=18, irmin(2,8)= 1, irmax(2,8)=27, irmin(3,8)=72, irmax(3,8)=74,
|
||||
/
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " running local DOS calculation...\c"
|
||||
$PROJWFC_COMMAND < AlAs110.box.projwfc.in > AlAs110.box.projwfc.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Projection of the DOS on atomic wavefunctions
|
||||
cat > AlAs110.projwfc.in << EOF
|
||||
&inputpp
|
||||
prefix = 'AlAs110'
|
||||
outdir='$TMP_DIR/',
|
||||
ngauss=0
|
||||
degauss=0.01
|
||||
DeltaE=0.02
|
||||
tdosinboxes=.false.
|
||||
/
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " running projected DOS calculation...\c"
|
||||
$PROJWFC_COMMAND < AlAs110.projwfc.in > AlAs110.projwfc.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO " summing the atomic PDOS...\c"
|
||||
$SUMPDOS_COMMAND AlAs110.pdos_atm\#10\(Al\)_wfc* > "AlAs110.pdos_atm#10(Al)" 2> /dev/null
|
||||
$SUMPDOS_COMMAND AlAs110.pdos_atm\#11\(As\)_wfc* > "AlAs110.pdos_atm#11(As)" 2> /dev/null
|
||||
$ECHO " done"
|
||||
|
||||
#
|
||||
# if gnuplot was found, the results are plotted
|
||||
#
|
||||
if [ "$GP_COMMAND" = "" ]; then
|
||||
break
|
||||
else
|
||||
eFermi=`grep "Fermi" AlAs110re.nonscf.out | cut -d \ -f 14`
|
||||
cat > gnuplot.tmp <<EOF
|
||||
set term postscript enhanced color solid lw 3 24
|
||||
set output 'AlAs110.box.projwfc.ps'
|
||||
ef=$eFermi
|
||||
set xlabel "Energy - E_F (eV)"
|
||||
set ylabel "Local DOS (states/eV)"
|
||||
set style data lines
|
||||
set key top left Left reverse
|
||||
set border 31 lw 0.2
|
||||
set title "Projected DOS"
|
||||
plot \\
|
||||
'./AlAs110.pdos_atm#10(Al)' u (\$1-ef):2 t "Surface Al" ,\\
|
||||
'./AlAs110.pdos_atm#11(As)' u (\$1-ef):2 t "Surface As"
|
||||
set title "Local DOS centered in the first vacuum layer"
|
||||
plot \\
|
||||
'./AlAs110.ldos_boxes' u (\$1-ef):4 t "Above Al" ,\\
|
||||
'./AlAs110.ldos_boxes' u (\$1-ef):5 t "Above As" ,\\
|
||||
'./AlAs110.ldos_boxes' u (\$1-ef):(\$7/54) t "Surface average"
|
||||
set title "Local DOS centered in the second vacuum layer"
|
||||
plot \\
|
||||
'./AlAs110.ldos_boxes' u (\$1-ef):8 t "Above Al" ,\\
|
||||
'./AlAs110.ldos_boxes' u (\$1-ef):9 t "Above As" ,\\
|
||||
'./AlAs110.ldos_boxes' u (\$1-ef):(\$11/54) t "Surface average"
|
||||
EOF
|
||||
$ECHO
|
||||
$ECHO " plotting DOS results ...\c"
|
||||
$GP_COMMAND < gnuplot.tmp
|
||||
$ECHO " done"
|
||||
rm gnuplot.tmp
|
||||
fi
|
||||
|
||||
$ECHO
|
||||
$ECHO " To visualize a volume in which the DOS is integrated, execute:"
|
||||
$ECHO " xcrysden --xsf results/AlAs110.box#1.xsf"
|
||||
$ECHO " and plot the isosurface corresponding to isovalue 0.5"
|
||||
|
||||
$ECHO
|
||||
$ECHO " $EXAMPLE_DIR: done"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,930 @@
|
|||
#!/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 to calculate the total energy"
|
||||
$ECHO "and the band structure of fcc-Pt with a fully relativistic "
|
||||
$ECHO "pseudo-potential including spin-orbit coupling."
|
||||
$ECHO "pwcond.x is used to calculate the complex bands"
|
||||
$ECHO "including spin-orbit coupling."
|
||||
$ECHO "ph.x is used to calculate the phonons at X and Gamma of fcc-Pt"
|
||||
$ECHO "including spin-orbit coupling."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x pwcond.x bands.x"
|
||||
PSEUDO_LIST="Pt.rel-pz-n-rrkjus.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PH_COMMAND="$PARA_PREFIX $BIN_DIR/ph.x $PARA_POSTFIX"
|
||||
PWCOND_COMMAND="$PARA_PREFIX $BIN_DIR/pwcond.x $PARA_POSTFIX"
|
||||
BANDS_COMMAND="$PARA_PREFIX $BIN_DIR/bands.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running ph.x as: $PH_COMMAND"
|
||||
$ECHO " running bands.x as: $BANDS_COMMAND"
|
||||
$ECHO " running pwcond.x as: $PWCOND_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > pt.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="scf" prefix="Pt">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="7.42">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Pt" mass="0.0">
|
||||
<property name="pseudofile">
|
||||
<string>Pt.rel-pz-n-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.00000000 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
250.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="noncolin">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="lspinorb">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Pt with spin-orbit coupling...\c"
|
||||
$PW_COMMAND -xmlinput pt.scf.xml > pt.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# a non self-consistent calculation
|
||||
cat > pt.nscf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="nscf" prefix="Pt">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="7.42">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Pt" mass="0.0">
|
||||
<property name="pseudofile">
|
||||
<string>Pt.rel-pz-n-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.00000000 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
250.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="noncolin">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="lspinorb">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="tpiba">
|
||||
<mesh npoints="8">
|
||||
<real rank="2" n1="4" n2="8">
|
||||
0.0 0.0 0.0 1.0
|
||||
0.1 0.0 0.0 1.0
|
||||
1.0 0.0 0.0 1.0
|
||||
0.4 0.2 0.1 1.0
|
||||
0.4 0.4 0.0 1.0
|
||||
0.4 0.4 0.4 1.0
|
||||
0.5 0.5 0.5 1.0
|
||||
0.75 0.75 0.0 1.0
|
||||
</real>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the non-scf calculation for Pt with spin-orbit coupling...\c"
|
||||
$PW_COMMAND -xmlinput pt.nscf.xml > pt.nscf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > pt.bands.in << EOF
|
||||
&inputpp
|
||||
prefix='Pt',
|
||||
outdir='$TMP_DIR/'
|
||||
filband='pt.band'
|
||||
lsym=.true.,
|
||||
/
|
||||
EOF
|
||||
|
||||
$ECHO " running the symmetry analysis for Pt bands...\c"
|
||||
$BANDS_COMMAND < pt.bands.in > pt.bands.out
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation
|
||||
cat > pt.scf_ph.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- Pt
|
||||
Pt -->
|
||||
|
||||
<input calculation="scf" prefix="Pt">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="7.42">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Pt" mass="0.0">
|
||||
<property name="pseudofile">
|
||||
<string>Pt.rel-pz-n-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.00000000 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
250.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="noncolin">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="lspinorb">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
2 2 2 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Pt with spin-orbit coupling...\c"
|
||||
$PW_COMMAND -xmlinput pt.scf_ph.xml > pt.scf_ph.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > pt.ph.in << EOF
|
||||
phonons of Pt at Gamma
|
||||
&inputph
|
||||
|
||||
amass(1)=195.078,
|
||||
|
||||
prefix='Pt',
|
||||
outdir='$TMP_DIR'
|
||||
fildyn='ptdyn',
|
||||
tr2_ph=1.0d-16,
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running the phonon calculation for Pt with spin-orbit coupling...\c"
|
||||
$PH_COMMAND < pt.ph.in > pt.ph.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > pt.phX.in << EOF
|
||||
phonons of Pt at X
|
||||
&inputph
|
||||
amass(1)=195.078,
|
||||
prefix='Pt',
|
||||
outdir='$TMP_DIR'
|
||||
fildyn='ptdyn',
|
||||
tr2_ph=1.0d-16,
|
||||
/
|
||||
1.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running the phonon calculation at X for Pt with spin-orbit coupling...\c"
|
||||
$PH_COMMAND < pt.phX.in > pt.phX.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# a self-consistent calculation of Pt in a tetragonal cell
|
||||
cat > pt.tet.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="ptt">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="5.23">
|
||||
<real rank="1" n1="5">
|
||||
0.0 1.4142 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Pt" mass="0.0">
|
||||
<property name="pseudofile">
|
||||
<string>Pt.rel-pz-n-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="2" >
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5 0.5 0.7071
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
250.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="noncolin">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="lspinorb">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 3 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the scf calculation for Pt with tetragonal cell...\c"
|
||||
$PW_COMMAND -xmlinput pt.tet.xml > pt.tet.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Calculation of the complex bands of Pt
|
||||
cat > pt.cond.in << EOF
|
||||
&inputcond
|
||||
outdir='$TMP_DIR/'
|
||||
prefixl='ptt'
|
||||
band_file = 'bands.pt'
|
||||
ikind=0
|
||||
energy0=0.0d0
|
||||
denergy=-0.2d0
|
||||
ewind=4.d0
|
||||
epsproj=1.d-7
|
||||
/
|
||||
1
|
||||
0.0 0.0 1.0
|
||||
1
|
||||
EOF
|
||||
$ECHO " running the calculation of the complex bands of Pt...\c"
|
||||
$PWCOND_COMMAND < pt.cond.in > pt.cond.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > pt4.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="pt4">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="6" alat="5.23">
|
||||
<real rank="1" n1="5">
|
||||
0.0 2.8284 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Pt" mass="0.0">
|
||||
<property name="pseudofile">
|
||||
<string>Pt.rel-pz-n-rrkjus.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="4" >
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5 0.5 0.7071
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 1.4142
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.5 0.5 2.1213
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
150.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0e-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
methfessel-paxton
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="noncolin">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="lspinorb">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
2 2 1 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the self-consistent calculation of fcc-Pt with 4 atoms...\c"
|
||||
$PW_COMMAND -xmlinput pt4.xml > pt4.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Calculation of the transmission of Pt
|
||||
cat > pt.cond_t.in << EOF
|
||||
&inputcond
|
||||
outdir='$TMP_DIR/'
|
||||
prefixt='pt4'
|
||||
bdl=1.4142,
|
||||
ikind=1
|
||||
energy0=0.0d0
|
||||
denergy=-0.2d0
|
||||
ewind=4.d0
|
||||
epsproj=1.d-7
|
||||
/
|
||||
1
|
||||
0.0 0.0 1.0
|
||||
1
|
||||
EOF
|
||||
$ECHO " running the calculation of the transmission of fcc Pt...\c"
|
||||
$PWCOND_COMMAND < pt.cond_t.in > pt.cond_t.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,497 @@
|
|||
#!/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 cp.x to calculate Wannier functions and"
|
||||
$ECHO "to perform dynamics with an external electric field."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="cp.x"
|
||||
PSEUDO_LIST="H_US.van O_US.van"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
CP_COMMAND="$PARA_PREFIX $BIN_DIR/cp.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running cp.x as: $CP_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
cat > h2o.wannier.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="cp-wf" prefix="h2o_mol">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="20.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="O" mass="16.D0">
|
||||
<property name="pseudofile">
|
||||
<string>O_US.van</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="H" mass="2.D0">
|
||||
<property name="pseudofile">
|
||||
<string>H_US.van</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="bohr" nat="3" >
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
10.0000 10.0000 10.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
11.7325 9.6757 10.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
9.6757 11.7325 10.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="iprint">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="etot_conv_thr">
|
||||
<real>
|
||||
1.D-16
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="CP">
|
||||
|
||||
<!--nstep, dt e ion_dynamics esistono anche nel PW ma nn sapevo in che field metterli -->
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
4.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ion_dynamics">
|
||||
<string>
|
||||
none
|
||||
</string>
|
||||
</parameter>
|
||||
<!-- Da qui in poi esistono solo in CP-->
|
||||
<parameter name="isave">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr1b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr2b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr3b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="electron_dynamics">
|
||||
<string>
|
||||
damp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="electron_damping">
|
||||
<real>
|
||||
0.15
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass">
|
||||
<real>
|
||||
350.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass_cutoff">
|
||||
<real>
|
||||
3.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ortho_eps">
|
||||
<real>
|
||||
5.D-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ortho_max">
|
||||
<integer>
|
||||
250
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ekin_conv_thr">
|
||||
<real>
|
||||
1.D-16
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="adapt">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nsteps">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the Wannier functions calculation...\c"
|
||||
$CP_COMMAND -xmlinput h2o.wannier.xml > h2o.wannier.out
|
||||
check_failure $?
|
||||
$ECHO " Wannier functions spreads...\c">> h2o.wannier.out
|
||||
$ECHO "">> h2o.wannier.out
|
||||
tail -4 $TMP_DIR/h2o_mol.spr >> h2o.wannier.out
|
||||
$ECHO " Wannier functions centers...\c">> h2o.wannier.out
|
||||
$ECHO "">> h2o.wannier.out
|
||||
tail -4 $TMP_DIR/h2o_mol.wfc >> h2o.wannier.out
|
||||
$ECHO " done"
|
||||
|
||||
# calculation with an electric field
|
||||
cat > h2o.efield.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="cp-wf" prefix="h2o_mol">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="20.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="O" mass="16.D0">
|
||||
<property name="pseudofile">
|
||||
<string>O_US.van</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="H" mass="2.D0">
|
||||
<property name="pseudofile">
|
||||
<string>H_US.van</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="bohr" nat="3" >
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
10.0000 10.0000 10.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
11.7325 9.6757 10.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
9.6757 11.7325 10.000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
reset_counters
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="iprint">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
25.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="CP">
|
||||
|
||||
<!--nstep, dt e ion_dynamics esistono anche nel PW ma nn sapevo in che field metterli -->
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
200
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
6.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ion_dynamics">
|
||||
<string>
|
||||
verlet
|
||||
</string>
|
||||
</parameter>
|
||||
<!-- Da qui in poi esistono solo in CP-->
|
||||
<parameter name="isave">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr1b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr2b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr3b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="electron_dynamics">
|
||||
<string>
|
||||
verlet
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass">
|
||||
<real>
|
||||
350.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass_cutoff">
|
||||
<real>
|
||||
3.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
|
||||
<parameter name="ndw">
|
||||
<integer>
|
||||
51
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ortho_eps">
|
||||
<real>
|
||||
5.D-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ortho_max">
|
||||
<integer>
|
||||
250
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="wf_efield">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="wf_switch">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="sw_len">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="efz1">
|
||||
<real>
|
||||
0.5D-2
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the calculation with electric field...\c"
|
||||
$CP_COMMAND -xmlinput h2o.efield.xml > h2o.efield.out
|
||||
check_failure $?
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,627 @@
|
|||
#!/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 tests pw.x and ph.x in several cases that require "
|
||||
$ECHO "the noncollinear or the spin-orbit part of the code together "
|
||||
$ECHO "with the gga."
|
||||
$ECHO "ph.x is used to calculate the phonons at X and Gamma of fcc-Pt with gga,"
|
||||
$ECHO "and to calculate the phonons at X and Gamma of fcc-Ni to test"
|
||||
$ECHO "the magnetic case with gga with or without spin-orbit "
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x ph.x"
|
||||
PSEUDO_LIST="Pt.rel-pbe-n-rrkjus.UPF Ni.rel-pbe-nd-rrkjus.UPF Ni.pbe-nd-rrkjus.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
PH_COMMAND="$PARA_PREFIX $BIN_DIR/ph.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO " running ph.x as: $PH_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
|
||||
# self-consistent calculation. This example demonstrates the use of spin-orbit
|
||||
# together with gga-pbe in the nonmagnetic case
|
||||
cat > pt.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="Pt_pbe">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="7.55">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Pt" mass="0.0">
|
||||
<property name="pseudofile">
|
||||
<string>Pt.rel-pbe-n-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Pt">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.0000000 0.00000000 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
300.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-12
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="noncolin">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="lspinorb">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
2 2 2 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
|
||||
$ECHO " running scf pw.x for Pt with gga-pbe and spin-orbit coupling...\c"
|
||||
$PW_COMMAND -xmlinput pt.scf.xml > pt.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Phonon at gamma. This example demonstrates the use of spin-orbit
|
||||
# together with gga-pbe. Phonon at gamma.
|
||||
|
||||
cat > pt.phG.in << EOF
|
||||
phonons of Pt at Gamma
|
||||
&inputph
|
||||
prefix='Pt_pbe',
|
||||
outdir='$TMP_DIR'
|
||||
fildyn='ptdyn',
|
||||
tr2_ph=1.0d-16,
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running ph.x at Gamma for Pt with gga-pbe and spin-orbit coupling...\c"
|
||||
$PH_COMMAND < pt.phG.in > pt.phG.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Phonon at X. This example demonstrates the use of spin-orbit
|
||||
# together with gga-pbe.
|
||||
|
||||
cat > pt.phX.in << EOF
|
||||
phonons of Pt at X
|
||||
&inputph
|
||||
prefix='Pt_pbe',
|
||||
outdir='$TMP_DIR'
|
||||
fildyn='ptdyn',
|
||||
tr2_ph=1.0d-16,
|
||||
/
|
||||
1.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running ph.x at X for Pt with gga-pbe and spin-orbit coupling...\c"
|
||||
$PH_COMMAND < pt.phX.in > pt.phX.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
#
|
||||
# self-consistent calculation. This example demonstrates the use of the
|
||||
# noncollinear calculation together with gga-pbe in the spin-polarized case.
|
||||
#
|
||||
cat > ni.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="scf" prefix="ni">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="6.65">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Ni" mass="0.0">
|
||||
<property name="pseudofile">
|
||||
<string>Ni.pbe-nd-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.5</real>
|
||||
</property>
|
||||
<property name="angle1">
|
||||
<real>90.0</real>
|
||||
</property>
|
||||
<property name="angle2">
|
||||
<real>90.0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Ni">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
27.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
300.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-12
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="noncolin">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running scf pw.x for noncollinear Ni with gga-pbe...\c"
|
||||
$PW_COMMAND -xmlinput ni.scf.xml > ni.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# The phonon at gamma
|
||||
|
||||
cat > ni.phG.in << EOF
|
||||
phonons of Ni at Gamma
|
||||
&inputph
|
||||
tr2_ph=1.0d-16,
|
||||
prefix='ni',
|
||||
fildyn='niG.dyn',
|
||||
outdir='$TMP_DIR'
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running ph.x at Gamma for noncollinear Ni with gga-pbe...\c"
|
||||
$PH_COMMAND < ni.phG.in > ni.phG.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# Phonon at X
|
||||
|
||||
cat > ni.phX.in << EOF
|
||||
phonons of Ni at X
|
||||
&inputph
|
||||
tr2_ph=1.0d-16,
|
||||
prefix='ni',
|
||||
fildyn='nix.dyn',
|
||||
outdir='$TMP_DIR/'
|
||||
/
|
||||
0.0 0.0 1.0
|
||||
EOF
|
||||
|
||||
$ECHO " running ph.x at X for noncollinear Ni with gga-pbe...\c"
|
||||
$PH_COMMAND < ni.phX.in > ni.phX.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# self-consistent calculation. This example demonstrates the use of the
|
||||
# noncollinear calculations together with gga-pbe and spin-orbit
|
||||
# in the spin-polarized case.
|
||||
|
||||
cat > ni_so.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<input calculation="scf" prefix="ni_so">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="2" alat="6.65">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Ni" mass="0.0">
|
||||
<property name="pseudofile">
|
||||
<string>Ni.rel-pbe-nd-rrkjus.UPF</string>
|
||||
</property>
|
||||
<property name="starting_magnetization">
|
||||
<real>0.5</real>
|
||||
</property>
|
||||
<property name="angle1">
|
||||
<real>90.0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="1" >
|
||||
<atom name="Ni">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.00 0.00 0.00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
27.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
300.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.7
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-12
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
smearing
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
mp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="noncolin">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="lspinorb">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
4 4 4 1 1 1
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running scf pw.x for Ni with gga-pbe and spin-orbit...\c"
|
||||
$PW_COMMAND -xmlinput ni_so.scf.xml > ni_so.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# The phonon at gamma
|
||||
|
||||
cat > ni_so.phG.in << EOF
|
||||
phonons of Ni at Gamma
|
||||
&inputph
|
||||
tr2_ph=1.0d-16,
|
||||
prefix='ni_so',
|
||||
fildyn='niG.dyn',
|
||||
outdir='$TMP_DIR'
|
||||
/
|
||||
0.0 0.0 0.0
|
||||
EOF
|
||||
$ECHO " running ph.x at Gamma for Ni with gga-pbe and spin_orbit...\c"
|
||||
$PH_COMMAND < ni_so.phG.in > ni_so.phG.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
# The phonon at X
|
||||
|
||||
cat > ni_so.phX.in << EOF
|
||||
phonons of Ni at X
|
||||
&inputph
|
||||
tr2_ph=1.0d-14,
|
||||
prefix='ni_so',
|
||||
fildyn='nix.dyn',
|
||||
outdir='$TMP_DIR/'
|
||||
/
|
||||
0.0 0.0 1.0
|
||||
EOF
|
||||
|
||||
$ECHO " running ph.x at X for Ni with gga-pbe with spin-orbit...\c"
|
||||
$PH_COMMAND < ni_so.phX.in > ni_so.phX.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,568 @@
|
|||
#!/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 cp.x to calculate Wannier functions and"
|
||||
$ECHO "to perform dynamics with an external electric field."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="cp.x"
|
||||
PSEUDO_LIST="H.blyp-vbc.UPF O.blyp-mt.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
CP_COMMAND="$PARA_PREFIX $BIN_DIR/cp.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running cp.x as: $CP_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
cat > h2o.scf.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="h2o_mol">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="16.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="O" mass="8.0">
|
||||
<property name="pseudofile">
|
||||
<string>O.blyp-mt.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="H" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>H.blyp-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="bohr" nat="3" >
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
5.093750000000 5.093750000000 5.093750000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
3.648508572765 5.093750000000 3.967985471743
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
6.538991443058 5.093750000000 3.967985459417
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="iprint">
|
||||
<integer>
|
||||
1
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
FALSE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
70.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="etot_conv_thr">
|
||||
<real>
|
||||
1.0d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="forc_conv_thr">
|
||||
<real>
|
||||
1.0d-2
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
280.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
4
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="CP">
|
||||
|
||||
<!--nstep e dt esistono anche nel PW ma nn sapevo in che field metterli -->
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
1000
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
1.0d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<!-- Da qui in poi esistono solo in CP-->
|
||||
|
||||
<parameter name="saverho">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ndw">
|
||||
<integer>
|
||||
50
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass">
|
||||
<real>
|
||||
400.d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass_cutoff">
|
||||
<real>
|
||||
3.d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ekin_conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="orthogonalization">
|
||||
<string>
|
||||
Gram-Schmidt
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tcg">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="passop">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="maxiter">
|
||||
<integer>
|
||||
250
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
|
||||
$ECHO " running electronic minimization...\c"
|
||||
$CP_COMMAND -xmlinput h2o.scf.xml > h2o.scf.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > h2o.wannier.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="cp-wf" prefix="h2o_mol">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="16.0">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="O" mass="8.0">
|
||||
<property name="pseudofile">
|
||||
<string>O.blyp-mt.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="H" mass="1.0">
|
||||
<property name="pseudofile">
|
||||
<string>H.blyp-vbc.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="bohr" nat="3" >
|
||||
<atom name="O">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
5.093750000000 5.093750000000 5.093750000000
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
3.648508572765 5.093750000000 3.967985471743
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
6.538991443058 5.093750000000 3.967985459417
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
restart
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="iprint">
|
||||
<integer>
|
||||
1
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
FALSE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
70.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="etot_conv_thr">
|
||||
<real>
|
||||
1.0d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="forc_conv_thr">
|
||||
<real>
|
||||
1.0d-2
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
280.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
4
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="CP">
|
||||
|
||||
<!--nstep, dt e ion_dynamics esistono anche nel PW ma nn sapevo in che field metterli -->
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
1000
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
1.0d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ion_dynamics">
|
||||
<string>
|
||||
none
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<!-- Da qui in poi esistono solo in CP-->
|
||||
|
||||
<parameter name="saverho">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ndr">
|
||||
<integer>
|
||||
50
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ndw">
|
||||
<integer>
|
||||
51
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass">
|
||||
<real>
|
||||
400.d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass_cutoff">
|
||||
<real>
|
||||
3.d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ekin_conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nsteps">
|
||||
<integer>
|
||||
200
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="orthogonalization">
|
||||
<string>
|
||||
Gram-Schmidt
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tcg">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="passop">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="maxiter">
|
||||
<integer>
|
||||
250
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="wfsd">
|
||||
<integer>
|
||||
3
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="calwf">
|
||||
<integer>
|
||||
4
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nit">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nsd">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tolw">
|
||||
<real>
|
||||
1.0D-14
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
|
||||
$ECHO " running Wannier function calculation...\c"
|
||||
$CP_COMMAND -xmlinput h2o.wannier.xml > h2o.wannier.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO "">> h2o.wannier.out
|
||||
$ECHO " Wannier functions centers:">> h2o.wannier.out
|
||||
tail -4 $TMP_DIR/h2o_mol.wfc >> h2o.wannier.out
|
||||
tail -4 fort.24 >> h2o.wannier.out
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR: done"
|
|
@ -0,0 +1,480 @@
|
|||
#!/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 cp.x and pw.x to perform SCF"
|
||||
$ECHO "simulation of C4H6 with TPSS metaGGA Exc."
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="cp.x pw.x"
|
||||
PSEUDO_LIST="C.tpss-mt.UPF H.tpss-mt.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
CP_COMMAND="$PARA_PREFIX $BIN_DIR/cp.x $PARA_POSTFIX"
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running cp.x as: $CP_COMMAND"
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# molecular dynamics calculation
|
||||
cat > c4h6.cp.metaGGA.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="8.00">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="H" mass="1.007825035">
|
||||
<property name="pseudofile">
|
||||
<string>H.tpss-mt.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="C" mass="12.00">
|
||||
<property name="pseudofile">
|
||||
<string>C.tpss-mt.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="bohr" nat="10" >
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.271695E+01 -0.245822E+01 0.236174E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.291292E+01 0.249129E+01 0.952936E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.203629E+01 -0.270414E+01 -0.104887E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.310911E+01 -0.162987E+01 0.189331E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.244815E+01 0.263846E+01 0.332670E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.940835E+00 0.160187E+01 -0.258377E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.121505E+01 -0.130902E+01 0.131661E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.136126E+01 0.116614E+01 0.825189E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.154872E+01 -0.143358E+01 0.510627E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.109484E+01 0.137081E+01 -0.496954E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="iprint">
|
||||
<integer>
|
||||
100
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
11
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
|
||||
<field name="CP">
|
||||
|
||||
<!--nstep e dt esistono anche nel PW ma nn sapevo in che field metterli -->
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
500
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
4.0
|
||||
</real>
|
||||
</parameter>
|
||||
<!-- Da qui in poi esistono solo in CP-->
|
||||
<parameter name="isave">
|
||||
<integer>
|
||||
500
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr1b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr2b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr3b">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="electron_dynamics">
|
||||
<string>
|
||||
damp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="electron_damping">
|
||||
<real>
|
||||
0.15D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass">
|
||||
<real>
|
||||
350.D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass_cutoff">
|
||||
<real>
|
||||
2.5D0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the cp.x SCF calculation...\c"
|
||||
$CP_COMMAND -xmlinput c4h6.cp.metaGGA.xml > c4h6.cp.metaGGA.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > c4h6.pw.metaGGA.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="8.00">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="2">
|
||||
<specie name="H" mass="1.007825035">
|
||||
<property name="pseudofile">
|
||||
<string>H.tpss-mt.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
<specie name="C" mass="12.00">
|
||||
<property name="pseudofile">
|
||||
<string>C.tpss-mt.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="bohr" nat="10" >
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.271695E+01 -0.245822E+01 0.236174E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.291292E+01 0.249129E+01 0.952936E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.203629E+01 -0.270414E+01 -0.104887E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.310911E+01 -0.162987E+01 0.189331E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.244815E+01 0.263846E+01 0.332670E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="H">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.940835E+00 0.160187E+01 -0.258377E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.121505E+01 -0.130902E+01 0.131661E+01
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.136126E+01 0.116614E+01 0.825189E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom> <atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.154872E+01 -0.143358E+01 0.510627E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom> <atom name="C">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.109484E+01 0.137081E+01 -0.496954E+00
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
30.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
11
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="gamma">
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the pw.x SCF calculation...\c"
|
||||
$PW_COMMAND -xmlinput c4h6.pw.metaGGA.xml > c4h6.pw.metaGGA.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR : done"
|
|
@ -0,0 +1,366 @@
|
|||
#!/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 cp.x to perform"
|
||||
$ECHO "Born-Oppenheimer molecular dynamics using the"
|
||||
$ECHO "conjugate gradient minimization of the electronic"
|
||||
$ECHO "states. It shows also the use of ensemble-DFT"
|
||||
$ECHO "for metallic systems."
|
||||
$ECHO "The example shows a Si dimer"
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="cp.x"
|
||||
PSEUDO_LIST="Si.pbe-rrkj.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
# how to run executables
|
||||
CP_COMMAND="$PARA_PREFIX $BIN_DIR/cp.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running cp.x as: $CP_COMMAND"
|
||||
$ECHO
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
# molecular dynamics calculation
|
||||
cat > si2.ensemble-dyn.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="cp" prefix="Si_dimer">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="8" alat="10.0">
|
||||
<real rank="1" n1="5">
|
||||
1.0 1.5 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pbe-rrkj.UPF</string>
|
||||
</property>
|
||||
<property name="ion_radius">
|
||||
<real>0.8d0</real>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="bohr" nat="2" >
|
||||
<atom name="Si">
|
||||
<position ifx="1" ify="1" ifz="1">
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 0.0
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position ifx="1" ify="1" ifz="1">
|
||||
<real rank="1" n1="3">
|
||||
0.0 0.0 5.5
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="iprint">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tstress">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tprnfor">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="startingwfc">
|
||||
<string>
|
||||
random
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ion_positions">
|
||||
<string>
|
||||
from_input
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
15.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ecutrho">
|
||||
<real>
|
||||
60.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.d-6
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Options">
|
||||
|
||||
<parameter name="nbnd">
|
||||
<integer>
|
||||
8
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="occupations">
|
||||
<string>
|
||||
ensemble
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="smearing">
|
||||
<string>
|
||||
fd
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="degauss">
|
||||
<real>
|
||||
0.025
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="nspin">
|
||||
<integer>
|
||||
1
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="CP">
|
||||
|
||||
<!--nstep, dt, ion_dynamics e ion_temperature esistono anche nel PW
|
||||
ma nn sapevo in che field metterli -->
|
||||
<parameter name="nstep">
|
||||
<integer>
|
||||
5
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="dt">
|
||||
<real>
|
||||
10.0d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ion_dynamics">
|
||||
<string>
|
||||
damp
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ion_temperature">
|
||||
<string>
|
||||
not_controlled
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<!-- Da qui in poi esistono solo in CP-->
|
||||
|
||||
<parameter name="isave">
|
||||
<integer>
|
||||
10
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr1b">
|
||||
<integer>
|
||||
20
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr2b">
|
||||
<integer>
|
||||
20
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nr3b">
|
||||
<integer>
|
||||
20
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass">
|
||||
<real>
|
||||
1000.d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="emass_cutoff">
|
||||
<real>
|
||||
4.d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="orthogonalization">
|
||||
<string>
|
||||
Gram-Schmidt
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="ampre">
|
||||
<real>
|
||||
0.02
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="n_inner">
|
||||
<integer>
|
||||
8
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="tcg">
|
||||
<logical>
|
||||
TRUE
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="passop">
|
||||
<real>
|
||||
0.3
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="maxiter">
|
||||
<integer>
|
||||
250
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<!-- non esiste nel CP Help ion_damping -->
|
||||
<parameter name="ion_damping">
|
||||
<real>
|
||||
0.0
|
||||
</real>
|
||||
</parameter>
|
||||
<!-- -->
|
||||
|
||||
<parameter name="greasp">
|
||||
<real>
|
||||
1.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the calculation BO-MD for Si-dimer...\c"
|
||||
$CP_COMMAND -xmlinput si2.ensemble-dyn.xml > si2.ensemble-dyn.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR : done"
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,434 @@
|
|||
#!/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 to perform electronic structure"
|
||||
$ECHO "calculations in the presence of a finite homogeneous electric field "
|
||||
$ECHO "described through the modern theory of the polarization. The example"
|
||||
$ECHO "shows how to calculate high-frequency dielectric constant of bulk Silicon"
|
||||
|
||||
# set the needed environment variables
|
||||
. ../environment_variables
|
||||
|
||||
# required executables and pseudopotentials
|
||||
BIN_LIST="pw.x"
|
||||
PSEUDO_LIST="Si.pbe-rrkj.UPF"
|
||||
|
||||
$ECHO
|
||||
$ECHO " executables directory: $BIN_DIR"
|
||||
$ECHO " pseudo directory: $PSEUDO_DIR"
|
||||
$ECHO " temporary directory: $TMP_DIR"
|
||||
$ECHO " checking that needed directories and files exist...\c"
|
||||
|
||||
# check for directories
|
||||
for DIR in "$BIN_DIR" "$PSEUDO_DIR" ; do
|
||||
if test ! -d $DIR ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $DIR not existent or not a directory"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
for DIR in "$TMP_DIR" "$EXAMPLE_DIR/results" ; do
|
||||
if test ! -d $DIR ; then
|
||||
mkdir $DIR
|
||||
fi
|
||||
done
|
||||
cd $EXAMPLE_DIR/results
|
||||
|
||||
# check for executables
|
||||
for FILE in $BIN_LIST ; do
|
||||
if test ! -x $BIN_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $BIN_DIR/$FILE not existent or not executable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
||||
# check for pseudopotentials
|
||||
for FILE in $PSEUDO_LIST ; do
|
||||
if test ! -r $PSEUDO_DIR/$FILE ; then
|
||||
$ECHO
|
||||
$ECHO "ERROR: $PSEUDO_DIR/$FILE not existent or not readable"
|
||||
$ECHO "Aborting"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
$ECHO " done"
|
||||
|
||||
|
||||
# how to run executables
|
||||
PW_COMMAND="$PARA_PREFIX $BIN_DIR/pw.x $PARA_POSTFIX"
|
||||
$ECHO
|
||||
$ECHO " running pw.x as: $PW_COMMAND"
|
||||
$ECHO
|
||||
|
||||
|
||||
# clean TMP_DIR
|
||||
$ECHO " cleaning $TMP_DIR...\c"
|
||||
rm -rf $TMP_DIR/*
|
||||
$ECHO " done"
|
||||
|
||||
|
||||
cat > si.scf.efield.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="silicon">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="10.18">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pbe-rrkj.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="8" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.125 -0.125 -0.125
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.375 0.375 -0.125
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.375 -0.125 0.375
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.125 0.375 0.375
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.125 0.125 0.125
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.625 0.625 0.125
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.625 0.125 0.625
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.125 0.625 0.625
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="startingwfc">
|
||||
<string>
|
||||
random
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
20.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="diagonalization">
|
||||
<string>
|
||||
david
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.5
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="lelfield">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nberrycyc">
|
||||
<integer>
|
||||
1
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="efield_cart">
|
||||
<real rank="1" n1="3">
|
||||
0.d0 0.d0 0.d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
3 3 7 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the PW calculation for bulk Si E_field=0.0 a.u. ...\c"
|
||||
$PW_COMMAND -xmlinput si.scf.efield.xml > si.scf.efield.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
cat > si.scf.efield2.xml << EOF
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
|
||||
<input calculation="scf" prefix="silicon">
|
||||
|
||||
<cell type="qecell">
|
||||
<qecell ibrav="1" alat="10.18">
|
||||
<real rank="1" n1="5">
|
||||
0.0 0.0 0.0 0.0 0.0
|
||||
</real>
|
||||
</qecell>
|
||||
</cell>
|
||||
|
||||
<atomic_species ntyp="1">
|
||||
<specie name="Si" mass="28.086">
|
||||
<property name="pseudofile">
|
||||
<string>Si.pbe-rrkj.UPF</string>
|
||||
</property>
|
||||
</specie>
|
||||
</atomic_species>
|
||||
|
||||
<atomic_list units="alat" nat="8" >
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.125 -0.125 -0.125
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.375 0.375 -0.125
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.375 -0.125 0.375
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
-0.125 0.375 0.375
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.125 0.125 0.125
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.625 0.625 0.125
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.625 0.125 0.625
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
<atom name="Si">
|
||||
<position>
|
||||
<real rank="1" n1="3">
|
||||
0.125 0.625 0.625
|
||||
</real>
|
||||
</position>
|
||||
</atom>
|
||||
</atomic_list>
|
||||
|
||||
|
||||
<field name="InputOutput">
|
||||
|
||||
<parameter name="restart_mode">
|
||||
<string>
|
||||
from_scratch
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="pseudo_dir">
|
||||
<string>
|
||||
$PSEUDO_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="outdir">
|
||||
<string>
|
||||
$TMP_DIR/
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="startingwfc">
|
||||
<string>
|
||||
random
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Numerics">
|
||||
|
||||
<parameter name="ecutwfc">
|
||||
<real>
|
||||
20.0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="diagonalization">
|
||||
<string>
|
||||
david
|
||||
</string>
|
||||
</parameter>
|
||||
|
||||
<parameter name="mixing_beta">
|
||||
<real>
|
||||
0.5
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
<parameter name="conv_thr">
|
||||
<real>
|
||||
1.0d-8
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<field name="Fields">
|
||||
|
||||
<parameter name="lelfield">
|
||||
<logical>
|
||||
true
|
||||
</logical>
|
||||
</parameter>
|
||||
|
||||
<parameter name="nberrycyc">
|
||||
<integer>
|
||||
3
|
||||
</integer>
|
||||
</parameter>
|
||||
|
||||
<parameter name="efield_cart">
|
||||
<real rank="1" n1="3">
|
||||
0.d0 0.d0 0.001d0
|
||||
</real>
|
||||
</parameter>
|
||||
|
||||
</field>
|
||||
|
||||
<k_points type="automatic">
|
||||
<mesh>
|
||||
<integer rank="1" n1="6">
|
||||
3 3 7 0 0 0
|
||||
</integer>
|
||||
</mesh>
|
||||
</k_points>
|
||||
</input>
|
||||
EOF
|
||||
$ECHO " running the PW calculation for bulk Si E_field=0.001 a.u. ...\c"
|
||||
$PW_COMMAND -xmlinput si.scf.efield2.xml > si.scf.efield2.out
|
||||
check_failure $?
|
||||
$ECHO " done"
|
||||
|
||||
$ECHO
|
||||
$ECHO "$EXAMPLE_DIR : done"
|
Loading…
Reference in New Issue