[Pw_forum] question about el-ph

Malgorzata Wierzbowska wierzbom at ts.infn.it
Fri Feb 9 12:04:08 CET 2007


On Fri, 9 Feb 2007, wang yanchao wrote:

   Hi, what is your name?

> Dear users:
>      When I use the pwscf(3.2) to caculate the el-ph ,it stop during
> caculating.I want to restart, but I can not  do this. I want to know what I
> should do?
>

     Where it stops? Please send us more details.

>     In addtion,if I want to do each q-point instead of all q-points
> once,what I should do?
>

    Some time ago I got a script for Li from Yingli Niu.
    Have a look below, you only need to set environment, paths...
    This is an example which calculates some chosen phonon.
    If you want to have also el-ph, please set nscf2=1 and elph=1.

    Gosia

--------------------------------------------------------

#exec
fit=1
scf=0
nscf1=1
phonon=1
nscf2=0
elph=0
#exec

for ecut in 80
do
rm -rf $TMP_DIR/*
if [ $fit -eq "1" ]; then
cat > li.scf.fit.in_ecut_$ecut << EOF
  &control
     calculation  = 'scf'
     restart_mode = 'from_scratch'
     prefix       = 'li'
     pseudo_dir   = '$PSEUDO_DIR/'
     outdir       = '$TMP_DIR/'
  /
  &system
     ibrav       = 3
     celldm(1)   = 6.632941
     nat         = 1
     ntyp        = 1
     ecutwfc     = $ecut
     occupations = 'smearing'
     smearing    = 'methfessel-paxton'
     degauss     = 0.05
     la2F        = .true.
  /
  &electrons
     conv_thr    =  1.0d-9
     mixing_beta = 0.7
  /
ATOMIC_SPECIES
  Li  6.941 Li.cpi.UPF
ATOMIC_POSITIONS
  Li 0.00 0.00 0.00
K_POINTS {automatic}
  32 32 32 0 0 0
EOF
$ECHO "  running the scf calculation with dense k-point grid...\c"
$PW_COMMAND  < li.scf.fit.in_ecut_$ecut > li.scf.fit.out_ecut_$ecut
$ECHO "  done"
fi

if [ $scf -eq "1" ]; then
#
#  SCF at k-mesh good enough for phonons
#
cat > li.scf.in_ecut_$ecut << EOF
  &control
     calculation  = 'scf'
     restart_mode = 'from_scratch',
     prefix       = 'li',
     pseudo_dir   = '$PSEUDO_DIR/',
     outdir       = '$TMP_DIR/'
  /
  &system
     ibrav       = 3
     celldm(1)   = 6.632941
     nat         = 1
     ntyp        = 1
     ecutwfc     = $ecut
     occupations = 'smearing'
     smearing    = 'methfessel-paxton'
     degauss     = 0.05
  /
  &electrons
     conv_thr    = 1.0d-9
     mixing_beta = 0.7
  /
ATOMIC_SPECIES
  Li  6.941 Li.cpi.UPF
ATOMIC_POSITIONS
  Li 0.00 0.00 0.00
K_POINTS {automatic}
  16 16 16 0 0 0
EOF
$ECHO "  running the scf calculation...\c"
$PW_COMMAND < li.scf.in_ecut_$ecut > li.scf.out_ecut_$ecut
$ECHO "  done"
#
fi

if [ $nscf1 -eq "1" ]; then
#
#  SCF at k-mesh good enough for phonons
#
cat > li.nscf1.in_ecut_$ecut << EOF
  &control
     calculation  = 'phonon'
     restart_mode = 'from_scratch',
     prefix       = 'li',
     pseudo_dir   = '$PSEUDO_DIR/',
     outdir       = '$TMP_DIR/'
  /
  &system
     ibrav       = 3
     celldm(1)   = 6.632941
     nat         = 1
     ntyp        = 1
     ecutwfc     = $ecut
     occupations = 'smearing'
     smearing    = 'methfessel-paxton'
     degauss     = 0.05
  /
  &electrons
     conv_thr    = 1.0d-9
     mixing_beta = 0.7
  /
  &phonon
      xqq(1) = 0.00, xqq(2) = -0.25, xqq(3) = 0.25
/
ATOMIC_SPECIES
  Li  6.941 Li.cpi.UPF
ATOMIC_POSITIONS
  Li 0.00 0.00 0.00
K_POINTS {automatic}
  16 16 16 0 0 0
EOF
$ECHO "  running the nscf1 calculation...\c"
$PW_COMMAND < li.nscf1.in_ecut_$ecut > li.nscf1.out_ecut_$ecut
$ECHO "  done"
#
fi

if [ $phonon -eq "1" ]; then
cat > li.ph.in_ecut_$ecut << EOF
phonon of Li except Gamma
  &inputph
   reduce_io = .true.
   tr2_ph    = 1.0d-16,
   prefix    = 'li',
   amass(1)  = 6.941
   outdir    = '$TMP_DIR/',
   fildyn    = 'li.dyn',
   fildvscf  = 'dv'
   trans     = .true.
   elph      = .true.
   ldisp     = .false.
   lnscf     = .false.
  /
  0.00 -0.25 0.25
EOF
$ECHO "  running the phonon calculation...\c"
$PARA_PREFIX $PW_ROOT/ph.x $PARA_POSTFIX < li.ph.in_ecut_$ecut > 
li.ph.out_ecut_$ecut
$ECHO "  done"
fi

if [ $nscf2 -eq "1" ]; then
#
#  SCF at k-mesh good enough for phonons
#
cat > li.nscf2.in_ecut_$ecut << EOF
  &control
     calculation  = 'phonon'
     restart_mode = 'from_scratch',
     prefix       = 'li',
     pseudo_dir   = '$PSEUDO_DIR/',
     outdir       = '$TMP_DIR/'
  /
  &system
     ibrav       = 3
     celldm(1)   = 6.632941
     nat         = 1
     ntyp        = 1
     ecutwfc     = $ecut
     occupations = 'smearing'
     smearing    = 'methfessel-paxton'
     degauss     = 0.05
  /
  &electrons
     conv_thr    = 1.0d-7
     mixing_beta = 0.7
  /
  &phonon
      xqq(1) = 0.00, xqq(2) = -0.25, xqq(3) = 0.25
/
ATOMIC_SPECIES
  Li  6.941 Li.cpi.UPF
ATOMIC_POSITIONS
  Li 0.00 0.00 0.00
K_POINTS {automatic}
  4 4 4 0 0 0
EOF
$ECHO "  running the scf calculation...\c"
$PW_COMMAND < li.nscf2.in_ecut_$ecut > li.nscf2.out_ecut_$ecut
$ECHO "  done"
#
fi

if [ $elph -eq "1" ]; then
cat > li.elph.in_ecut_$ecut << EOF
phonon of Li except Gamma
  &inputph
   reduce_io = .true.
   tr2_ph    = 1.0d-08,
   prefix    = 'li',
   amass(1)  = 6.941
   outdir    = '$TMP_DIR/',
   fildyn    = 'li.dyn',
   fildvscf  = 'dv'
   trans     = .flase.
   elph      = .true.
   ldisp     = .false.
   lnscf     = .false.
  /
  0.00 -0.25 0.25
EOF
$ECHO "  running the elph calculation...\c"
$PARA_PREFIX $PW_ROOT/ph.x $PARA_POSTFIX < li.elph.in_ecut_$ecut > 
li.elph.out_ecut_$ecut
$ECHO "  done"
fi
done

=================================================================================



More information about the users mailing list