地域密着型エリア広告配信リクルートの地域密着型広告ドコイク?アドネットワーク Ads by ドコイク?[無料でホームページを作成] [通報・削除依頼]
[無料でホームページを作成] [通報・削除依頼]

Akai-KKR (sequential search)

------------------------------------------------------------------------------
・in フォルダの中で新しいファイルを作り、その中で下記のようなテンプレートファイルを作り、下記にあるcshのスクリプトを動作させると原子番号3から86番までXXの部分を元素置換した計算がなされます。
(cshのファイルは実行ファイルのチェックを入れるか、chmod +x のコマンドを用いてください)
・YYはk点数に対応しています。goでは4、dosでは8にしています。
(Siの場合はdosでのYYを22以上にしてください。その他、sdftypでasaを入れ、原子番号0のVc1 and Vc2でmxl 2とすることが必要です)

■ template (*.temp)
c----------------------SnSe----------------------------------
     go   data/snse_XX
c------------------------------------------------------------
c   brvtyp     a        c/a   b/a   alpha   beta   gamma
     so     21.883 , 0.380 , 0.365     ,      ,       ,      ,
c------------------------------------------------------------
c   edelt    ewidth    reltyp   sdftyp   magtyp   record
    0.001     1.5       sra      pbe       mag     ZZZZ
c------------------------------------------------------------
c   outtyp    bzqlty   maxitr   pmix
    update     YY       400    0.035
c------------------------------------------------------------
c    ntyp
      2
c------------------------------------------------------------
c   type    ncmp    rmt    field   mxl  anclr   conc
     Se      2       1      0.0     2    34     90
                                         XX     10
     Sn      1       1      0.0     2    50    100
c------------------------------------------------------------
c   natm
     8
c------------------------------------------------------------
c   atmicx                        atmtyp
     0.85550000a    0.25000000b    0.48280000c  Se
     0.14450000a    0.75000000b    0.51720000c  Se
     0.35550000a    0.25000000b    0.01720000c  Se
     0.64450000a    0.75000000b    0.98280000c  Se
     0.12040000a    0.25000000b    0.08650000c  Sn
     0.87960000a    0.75000000b    0.91350000c  Sn
     0.62040000a    0.25000000b    0.41350000c  Sn
     0.37960000a    0.75000000b    0.58650000c  Sn
c------------------------------------------------------------



■ csh (search, main program)
--------------------
#! /bin/csh -f
#date
#
set address = `pwd`
echo "$address"
set DATE = `date`
echo "start: "$DATE > $address/data.txt
#
set file = `pwd`
set file = $file:t
echo "$file" >> $address/data.txt
#
set tempfile_origin = *.temp
set tempfile = `echo $tempfile_origin | sed -e "s/.temp//g"`
echo "$tempfile" >> $address/data.txt
date >> $address/data.txt

mkdir ../../out/$file
echo "make ../../out/"$file >> $address/data.txt

chmod +x gplot
cp gplot ../../out/$file/gplot
echo "copy gplot ../../out/$file/gplot" >> $address/data.txt

# Akai-KKR input file (filename need to include .temp at last)
# XX is atomic number
# YY is bzqlty
# ZZZZ is record

set No = 3
while ( $No <= 86 )
    echo "--------------------" >> $address/data.txt
    echo "# "$No >> $address/data.txt
    set DATE = `date`
    echo "scf: "$DATE >> $address/data.txt
    echo "Z"${No}"; scf calculation; "$DATE
#    echo "$file"
#    echo "$tempfile""_"${No}
#
    cd $address
    pwd
#    cp $tempfile temp
    sed 's/XX/'${No}'/g' $tempfile_origin > temp1
    sed 's/YY/4/g' temp1 > temp2
    sed 's/ZZZZ/init/g' temp2 > $tempfile"_"${No}
    rm -f -r temp1
    rm -f -r temp2
#
    cd $HOME/cpa*
    pwd
    specx < in/$file/$tempfile"_"${No}
#    grep "total energy=" $tempfile"_"${No} | awk '{print ${No}": " ($3*13.606) "eV"}' > total_enegy
#
    set DATE = `date`
    echo "dos: "$DATE >> $address/data.txt
    echo "Z"${No}"; dos calculation; "$DATE
    cd $address
    sed 's/go/dos/g' $tempfile_origin > temp0
    sed 's/XX/'${No}'/g' temp0 > temp1
    sed 's/YY/8/g' temp1 > temp2
    sed 's/ZZZZ/2nd/g' temp2 > $tempfile"_"${No}
    rm -f -r temp0
    rm -f -r temp1
    rm -f -r temp2
#
    cd $HOME/cpa*
    pwd
    specx < in/$file/$tempfile"_"${No} > out/$file/$tempfile"_"${No}"_dos"
#
#   dos plot data
    cd out/$file
    set DATE = `date`
    echo "dos plot: "$DATE >> $address/data.txt
    echo "Z"${No}"dos plot: "$DATE
    set up_start_line = `grep -e "TDOS_up" -n $tempfile"_"${No}"_dos" |  sed -e 's/:.*//g'`
#    echo $up_start_line
    set up_end_line = `grep -e "IDOS_up" -n $tempfile"_"${No}"_dos" |  sed -e 's/:.*//g'`
#    echo $up_end_line
    @ up_start_line += 1
    @ up_end_line -= 1
    sed -n ${up_start_line},${up_end_line}p $tempfile"_"${No}"_dos" > dos_up
#
    set down_start_line = `grep -e "TDOS_dn" -n $tempfile"_"${No}"_dos" |  sed -e 's/:.*//g'`
#    echo $down_start_line
    set down_end_line = `grep -e "IDOS_dn" -n $tempfile"_"${No}"_dos" |  sed -e 's/:.*//g'`
#    echo $down_end_line
    @ down_start_line += 1
    @ down_end_line -= 1
    sed -n ${down_start_line},${down_end_line}p $tempfile"_"${No}"_dos" > dos_down
#
    join -j1 1 -j2 1 -o 1.1 1.2 2.2 dos_up dos_down > dos_temp0
    awk '{print $1*13.606,$2/13.606, $3/13.606}' dos_temp0 > dos_temp1
    sed '/0 0/d' dos_temp1 > dos_updn"_"${No}
    sed '/0 0/d' dos_temp1 > dos_updn
    awk '{print $1*13.606,($2+$3)/13.606}' dos_temp0 > dos_temp2
    sed '/0 0/d' dos_temp2 > tdos"_"${No}
    sed '/0 0/d' dos_temp2 > tdos
    rm -f dos_up
    rm -f dos_down
    rm -f dos_temp0
    rm -f dos_temp1
    rm -f dos_temp2
    echo $tempfile > now_cycle
    echo ${No} >> now_cycle
# gnuplot (Now out/file address)------------
    gplot
# --------------------
    rm -f dos_updn
    rm -f tdos
#
    @ No = $No + 1
end

echo "--------------------" >> $address/data.txt

#set list=( 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 )
#echo $#list

#foreach No ( ${list} )
#    echo "--------------------" >> $address/data.txt
#    echo "# "$No >> $address/data.txt
#    set DATE = `date`
#    echo "scf: "$DATE >> $address/data.txt
#    echo "$file"
#    echo "$tempfile""_"${No}
#
#    cd $address
#    pwd
#    cp $tempfile temp
#    sed 's/XX/'${No}'/g' $tempfile_origin > temp1
#    sed 's/YY/4/g' temp1 > temp2
#    sed 's/ZZZZ/init/g' temp2 > $tempfile"_"${No}
#    rm -f -r temp1
#    rm -f -r temp2
#
#    cd $HOME/cpa*
#    pwd
#    specx < in/$file/$tempfile"_"${No}
#    grep "total energy=" $tempfile"_"${No} | awk '{print ${No}": " ($3*13.606) "eV"}' > total_enegy
#
#    set DATE = `date`
#    echo "dos: "$DATE >> $address/data.txt
#    cd $address
#    sed 's/go/dos/g' $tempfile_origin > temp0
#    sed 's/XX/'${No}'/g' temp0 > temp1
#    sed 's/YY/8/g' temp1 > temp2
#    sed 's/ZZZZ/2nd/g' temp2 > $tempfile"_"${No}
#    rm -f -r temp0
#    rm -f -r temp1
#    rm -f -r temp2
#
#    cd $HOME/cpa*
#    pwd
#    specx < in/$file/$tempfile"_"${No} > out/$file/$tempfile"_"${No}"_dos"
#end

#foreach No ( ${list} )
#echo ${No}
#  grep "Total Energy" "$tempfile_${No}" | awk '{print $1}'
#end
-------------------



■ csh (gplot, gnuplot program)
--------------------
#!/bin/csh -f

set tempfile = `sed -n 1p now_cycle`
set No = `sed -n 2p now_cycle`
set filename  = $tempfile"+Z"${No}
set psformat  = $filename".ps"
set epsformat = $filename".eps"

gnuplot -persist << EOF

set title "$filename"
set size 0.7,1.0
set xr[-12.0:6.0]
set xl "{/=30 Energy  / eV}"
set yr[0.0:*]
set yl "{/=30 Density of States / eV}"

set yzeroaxis lt 2 lw 2 lc rgb "black"

# linetype=lt, linecolor=lc, linewidth=lw, pointtype=pt, pointsize=ps
# with=w, line=l, color setting=lc rgb "",
set key box center top

# dos_updn
#plot "dos_updn" using 1:2 w l lt 1 lw 2 lc rgb "black" title "{/=30 up spin}", "dos_updn" using 1:3 w l lt 1 lw 2 lc rgb "black" title "{/=30 down spin}"

# tdos
plot "tdos" using 1:2 w l lt 1 lw 2 lc rgb "black" title "{/=30 total}"

unset key
#set key left top

set size 1.0,1.0
set terminal postscript color enhanced "Arial" 30
set out "$psformat"
replot

#set size 1.5,2.1
#set terminal postscript eps color enhanced "Arial" 30
#set out "$epsformat"
#replot

set terminal x11

EOF
--------------------
------------------------------------------------------------------------------
QRコード
携帯用QRコード
アクセス数
ページビュー数