24小时热门版块排行榜    

查看: 409  |  回复: 2
当前主题已经存档。

gleerat

木虫 (正式写手)

[交流] 【求助】用split_dos,提示OUTCAR不存在 已有2人参与

PROCAR和OUTCAR明明存在呢,可是用Split_dos时却提示不存在,还有提示split_dos和vp找不到。
是不是这个split_dos和vp有问题呢?!运行它只能得到一个DOS0和两个tmp.dat。这个split_dos和vp是从网上下载的。
CODE:
gleerat@gleerat-desktop:~/vasp/Si$ sh split_dos
[: 84: -a: unexpected operator
The OUTCAR does not exist, we set the Fermi level to 0
assume an unpolarized calculation, and RWIGS not set
split_dos: 96: split_dos/vp: not found
7 307
0 7 307

这是split_dos:
CODE:
#!/bin/ksh
# Script to break the VASP DOSCAR file into segments for
# each atomic site.
# JMS NRL 5/0/02
# Modified to also align the Fermi level from the ground state
# to E=0.0 # JMS NRL 6/19/02
# Executables reside here
#BIN=~/bin
# GH: replace this so that it looks for vp in the same directory as this script
EXE=$0 BIN=${EXE%/*}
  if [ $# -ne 0 ]; then
        echo "Usage: split_dos"
        exit 2
fi
# Script to split the DOSCAR file into the atomic
# projections labeled by atom number
dosfile=DOSCAR
outfile=OUTCAR
infile=INCAR
# Token for splitting the files
token=$(sed -n '6 p' $dosfile | awk '{print $1}')
# Number of points
nl=$(sed -n '6 p' $dosfile | awk '{print $3}')
# Number of atoms
natom=$(sed -n '1 p' $dosfile | awk '{print $1}')
# Get the Fermi level if the OUTCAR file is present,
# else we set it to zero.
if [ -a $outfile ]; then     
echo "The" $outfile "exists, we use it to get the Fermi level,"
     echo "the RWIGS tag and the number of spins."
     efermi=$(grep "E-fermi" $outfile | tail -1 | awk '{print $3}')
     echo "Fermi level:" $efermi
     nspin=$(grep "ISPIN" $outfile | tail -1 | awk '{print $3}')
     if [ $nspin -eq 2 ]; then
        echo "Spin polarized calculation"
    else
        echo "Unpolarized calculation"
     fi
# 2.a
#JMS 2/3/03 Modified to accept specification by LORBIT token.
#lorbit=$(grep "LORBIT" $outfile | tail -1 | awk '{print $3}')
     if [ $lorbit -ge 10 ]; then
         echo "LORBIT > 10"
         echo "WARNING: not completely test for vasp.4.*"
        echo "Use at your own risk. Please check results for consistency."
        form=1
     else
# 2.a
        rwigs=$(grep "RWIGS" $outfile | tail -1 | awk '{print $3}' | sed 's/\.//g')
        if [ $rwigs -eq -100 ]; then
            echo "RWIGS token not set"
            form=0
        else
            echo "RWIGS token set"
            form=1
        fi
# 2.a
     fi
# 2.a
  else
     echo "The" $outfile "does not exist, we set the Fermi level to 0"
     echo "assume an unpolarized calculation, and RWIGS not set"
     form=0
     nspin=1
     efermi=0.0
fi
# If the outcar file is not present and you wish to set something by hand
# you should do it here. Uncomment the tokens below and set them by hand.
#efermi=2.255
#form=
#nspin=   
# Get the atomic coordinates
$BIN/vp >| tmp.dat
tail -$natom tmp.dat | awk '{printf "%s %12.8f %12.8f %12.8f \n", "#", $2, $3, $4}' >| tmp.dat2
# Total is first DOS
if [ $form -eq 0 ]; then i=0
else i=0
fi
   start=7
end=$((start+nl-1))
echo $start $end
#exit 0
rm -f DOS0
if [ $form -eq 1 ]; then
      while [ $i -le $natom ]; do
              echo $i $start $end
          if [ $i -gt 0 ]; then
            sed -n ''$i' p' tmp.dat2 >| DOS$i
        fi
          if [ $i -gt 0 ]; then
# Atomic projected DOS
            if [ $nspin -eq 2 ]; then
                sed -n ''$start','$end' p' $dosfile | awk '{printf "%12.8f %12.8f %12.8f %12.8f %12.8f %12.8f %12.8f \n", $1+(-1)*'$efermi', $2, -1*$3, $4, -1*$5, $6, -1*$7}' >> DOS$i
            else
                sed -n ''$start','$end' p' $dosfile | awk '{printf "%12.8f %12.8f %12.8f %12.8f \n", $1+(-1)*'$efermi', $2, $3, $4 }' >> DOS$i
            fi
                          else
  # Total DOS
            if [ $nspin -eq 2 ]; then
                sed -n ''$start','$end' p' $dosfile | awk '{printf "%12.8f %12.8f %12.8f %12.8f %12.8f \n", $1+(-1)*'$efermi', $2, -1*$3, $4, -1*$5 }' >> DOS$i
            else
                sed -n ''$start','$end' p' $dosfile | awk '{printf "%12.8f %12.8f %12.8f \n", $1+(-1)*'$efermi', $2, $3 }' >> DOS$i
            fi
          fi
          start=$((end+2))
        end=$((start+nl-1))
        i=$((i+1))
     done
  else
      while [ $i -le 0 ]; do
              echo $i $start $end
          if [ $i -gt 0 ]; then
            sed -n ''$i' p' tmp.dat2 >| DOS$i
        fi
          if [ $i -gt 0 ]; then
# Atomic projected DOS
            if [ $nspin -eq 2 ]; then
                sed -n ''$start','$end' p' $dosfile | awk '{printf "%12.8f %12.8f %12.8f %12.8f %12.8f %12.8f %12.8f \n", $1+(-1)*'$efermi', $2, -1*$3, $4, -1*$5, $6, -1*$7}' >> DOS$i
            else
                sed -n ''$start','$end' p' $dosfile | awk '{printf "%12.8f %12.8f %12.8f %12.8f \n", $1+(-1)*'$efermi', $2, $3, $4 }' >> DOS$i
            fi
                          else
# Total DOS
            if [ $nspin -eq 2 ]; then
                sed -n ''$start','$end' p' $dosfile | awk '{printf "%12.8f %12.8f %12.8f %12.8f %12.8f \n", $1+(-1)*'$efermi', $2, -1*$3, $4, -1*$5 }' >> DOS$i
            else
                sed -n ''$start','$end' p' $dosfile | awk '{printf "%12.8f %12.8f %12.8f \n", $1+(-1)*'$efermi', $2, $3 }' >> DOS$i
            fi
          fi         
start=$((end+2))
        end=$((start+nl-1))
        i=$((i+1))
     done
  fi
  exit 0

[ Last edited by gleerat on 2010-4-11 at 22:21 ]
回复此楼
明察、慎思、笃行
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

锐利的碎片

木虫 (正式写手)

star watcher

★ ★
qasd(金币+2):谢谢 2010-04-12 21:56
gleerat(金币+1): 2010-04-21 16:25
把这两个下完放到用户主文件夹下的bin目录里,改成可执行属性。再到你的数据目录下运行。
2楼2010-04-12 10:51:29
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

mingyan988

金虫 (小有名气)

★ ★
xiaohunhun(金币+2):谢谢 2010-04-13 19:39
gleerat(金币+2): 2010-04-21 16:25
你从你的bin文件里将split_dos和vp拷贝到你要算的体系文件里,并将其激活为课执行文件(chmod +x ),如果还算不行,就重新计算,有时候vasp会不正常,多试几次。
岁月轻狂
3楼2010-04-13 10:47:42
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 gleerat 的主题更新
普通表情 高级回复 (可上传附件)
最具人气热帖推荐 [查看全部] 作者 回/看 最后发表
[考研] 290求调剂 +6 @将就将就看 2026-03-10 11/550 2026-03-17 10:22 by @将就将就看
[考研] 梁成伟老师课题组欢迎你的加入 +8 一鸭鸭哟 2026-03-14 9/450 2026-03-16 17:35 by 沐霖12138
[考研] 304求调剂 +4 ahbd 2026-03-14 4/200 2026-03-16 16:48 by 我的船我的海
[考研] 085600材料与化工 求调剂 +13 enenenhui 2026-03-13 14/700 2026-03-16 15:19 by 了了了了。。
[考研] 材料与化工求调剂 +3 为学666 2026-03-16 3/150 2026-03-16 15:09 by 加号+
[考研] 277材料科学与工程080500求调剂 +3 自由煎饼果子 2026-03-16 3/150 2026-03-16 14:10 by 运气yunqi
[考研] 326求调剂 +3 mlpqaz03 2026-03-15 3/150 2026-03-16 07:33 by Iveryant
[考研] 一志愿哈工大材料324分求调剂 +5 闫旭东 2026-03-14 5/250 2026-03-14 14:53 by 木瓜膏
[考研] 2026考研调剂+本科延边大学+山东大学+生物化学与分子生物学+有项目经验 +3 ccdsscjy 2026-03-10 3/150 2026-03-14 00:12 by JourneyLucky
[考研] 材料371求调剂 +9 鳄鱼? 2026-03-11 11/550 2026-03-13 22:53 by JourneyLucky
[考研] 0703化学调剂 +4 快乐的香蕉 2026-03-11 4/200 2026-03-13 22:41 by JourneyLucky
[考研] 304求调剂 +6 Mochaaaa 2026-03-12 7/350 2026-03-13 22:18 by 星空星月
[考研] 304求调剂 +7 7712b 2026-03-13 7/350 2026-03-13 21:42 by peike
[考研] 一志愿山大07化学 332分 四六级已过 本科山东双非 求调剂! +3 不想理你 2026-03-12 3/150 2026-03-13 14:18 by JourneyLucky
[考研] 277求调剂 +4 anchor17 2026-03-12 4/200 2026-03-13 11:15 by 白夜悠长
[考研] 08食品或轻工求调剂,本科发表3篇sci一区top论文,一志愿南师大食品科学与工程 +3 我是一个兵, 2026-03-10 3/150 2026-03-13 10:21 by Yuyi.
[考研] 290求调剂 +3 ADT 2026-03-13 3/150 2026-03-13 10:19 by peike
[考研] 化工学硕306求调剂 +9 42838695 2026-03-12 9/450 2026-03-13 10:16 by houyaoxu
[考博] 26申博求助 +3 跳跃饼干 2026-03-10 4/200 2026-03-10 21:15 by Tntcnn
[考研] 求调剂材料专硕293 +6 段_(:з」∠)_ 2026-03-10 6/300 2026-03-10 18:22 by ms629
信息提示
请填处理意见