[Pw_forum] Re: a question about example06

Yi Kong yi.kong at gmail.com
Thu Nov 4 15:44:28 CET 2004


Dear Isaevl and others, 
     Thanks for your helpful suggesion. The following is my input
file, please help me to find the problem.
     Thanks a lot for your attention!

sincelely

Yi Kong

ps:

# self-consistent calculation
cat > AlFe.scf.in << EOF
 &control
    calculation='scf'
    restart_mode='from_scratch',
    tstress = .true.
    tprnfor = .true.
    prefix='AlFe',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
 /
 &system    
    ibrav=  1, celldm(1) =5.480, NAT=  2, ntyp= 2,
    ecutwfc =40.0
    ecutrho =400
    occupations= 'smearing'
    degauss=0.02
    smearing='mazari-vanderbilt'
 /
 &electrons
    conv_thr =  1.0d-8
    mixing_beta = 0.7
    mixing_mode='local-TF'
    diagonalization='cg'
 /
ATOMIC_SPECIES
 Al  26.98  Al.pbe-n-van.UPF
 Fe  55.845 Fe.pbe-sp-van_mit.UPF
ATOMIC_POSITIONS
 Al 0.00 0.00 0.00 
 Fe 0.50 0.50 0.50
K_POINTS AUTOMATIC
 4 4 4 0 0 0 
EOF
$ECHO "  running the scf calculation...\c"
$PW_COMMAND < AlFe.scf.in > AlFe.scf.out
$ECHO " done"

# phonons
cat > AlFe.phG.in << EOF
phonons of AlFe at Gamma
 &inputph
  tr2_ph=1.0d-12,
  prefix='AlFe',
  amass(1)=26.98,
  amass(2)=55.845,
  outdir='$TMP_DIR/',
  fildyn='AlFe.dynG',
 /
0.0 0.0 0.0
EOF
$ECHO "  running the phonon calculation at Gamma...\c"
$PH_COMMAND < AlFe.phG.in > AlFe.phG.out
$ECHO " done"

# These are k-points of a (444) uniform grid in the irreducible
# Brillouin Zone of the bcc lattice (Gamma is treated separately)
/bin/rm AlFe.nscf.out AlFe.ph.out


qpoints="0.00,0.00,0.25\
         0.00,0.00,-0.50\
         0.00,0.25,0.25\
         0.00,0.25,-0.50\
         0.00,-0.50,-0.50\
         0.25,0.25,0.25\
         0.25,0.25,-0.50\
         0.25,-0.50,-0.50\
        -0.50,-0.50,-0.50"

for qpoint in $qpoints ; do

# non self-consistent calculation 
qx=`$ECHO $qpoint | cut -d, -f1`
qy=`$ECHO $qpoint | cut -d, -f2`
qz=`$ECHO $qpoint | cut -d, -f3`
cat > AlFe.nscf.in << EOF
 &control
    calculation='phonon'
    restart_mode='from_scratch',
    prefix='AlFe',
    pseudo_dir = '$PSEUDO_DIR/',
    outdir='$TMP_DIR/'
 /
 &system    
    ibrav=  1, celldm(1) =5.480,nat=2, ntyp= 2,
    ecutwfc =40.0
    ecutrho =400
    occupations='smearing'
    degauss=0.02
    smearing='marzari-vanderbilt'
 /
 &electrons
    conv_thr =  1.0d-8
    mixing_mode='local-TF'
    diagonalization='cg'
 /
 &phonon
    xqq(1) = $qx, xqq(2) = $qy, xqq(3) = $qz
 /
ATOMIC_SPECIES
 Al  26.98  Al.pbe-n-van.UPF
 Fe  55.845 Fe.pbe-sp-van_mit.UPF
ATOMIC_POSITIONS
 Al 0.00 0.00 0.00 
 Fe 0.50 0.50 0.50
#K_POINTS AUTOMATIC
# 4 4 4 0 0 0
K_POINTS 
 2
 0.00  0.00  0.25  1.00
 0.00  0.25  0.25  2.00
EOF

$ECHO "  running the nscf calculation at q=$qpoint...\c"
$PW_COMMAND < AlFe.nscf.in >> AlFe.nscf.out
$ECHO " done"

# the following line prevents the appearence of a bug with PGI compiler
if test -f $TMP_DIR/AlFe.bar ; then /bin/rm $TMP_DIR/AlFe.bar ; fi

# phonon calculation
cat > AlFe.ph.in << EOF
phonons of AlFe at $qpoint
 &inputph
  tr2_ph=1.0d-12,
  prefix='AlFe',
  amass(1)=26.98,
  amass(2)=55.845,
  outdir='$TMP_DIR/',
  fildyn='dyn.$qpoint'
 /
$qpoint
EOF
$ECHO "  running the phonon calculation at q=$qpoint...\c"
$PH_COMMAND < AlFe.ph.in >> AlFe.ph.out
$ECHO " done"

done

cat >q2r.in <<EOF
&input
  nr1=4,nr2=4, nr3=4,zasr=.true.,fild='AlFe444.fc'
/
10
AlFe.dynG
dyn.0.00,0.00,0.25
dyn.0.00,0.00,-0.50
dyn.0.00,0.25,0.25
dyn.0.00,0.25,-0.50
dyn.0.00,-0.50,-0.50
dyn.0.25,0.25,0.25
dyn.0.25,0.25,-0.50
dyn.0.25,-0.50,-0.50
dyn.-0.50,-0.50,-0.50
EOF

$ECHO "transforming C(q)=>C(R)...\c"
$Q2R_COMMAND < q2r.in > q2r.out
$ECHO "done"

cat > matdyn.in << EOF
&input
   asr=.true., amass(1)=26.98, amass(2)=55.845,
   flfrc='AlFe444.fc', flfrq='AlFe.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
$ECHO "done"

cat >phdos.in <<EOF
&input
  asr=.true., dos =.true., amass(1)=26.98,amass(2)=55.845,
  flfrc='AlFe444.fc',fldos='AlFe.phdos',nk1=6,nk2=6,nk3=6
/
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 " calculating phonon DOS...\c"
$MATDYN_COMMAND < phdos.in > phdos.out
$ECHO " done "

$ECHO
$ECHO "$EXAMPLE_DIR: done"

-- 
=============================
Yi Kong
Department of MSE
Tsinghua University
PR China, 100084
=============================



More information about the users mailing list