24小时热门版块排行榜    

查看: 1033  |  回复: 5
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

linda19918

银虫 (小有名气)

[求助] 第一次用VASP,学了几天了,怎么用脚本来找合适的ENCUT,按照说明说总是出错已有2人参与

#!/bin/sh
rm WAVECAR
for i in 150 200 250 300 350 400
do
cat > INCAR <<!
SYSTEM = Si-Diamond
ENCUT = $i
ISTART = 0 ; ICHARG = 2
ISMEAR = -5
PREC = Accurate
!
echo "ENCUT = $i eV" ; time vasp
E='grep "TOTEN" OUTCAR | tail -1 | awk '{printf "%12.6f \n", $5 }''
echo $i   $E >>comment
done

然后运行该脚本,该脚本的名字为new,输入的sh new过后出现一下提示:
: No such file or directory
rm: cannot remove `WAVECAR\r': No such file or directory
'ew: line 4: syntax error near unexpected token `do
'ew: line 4: `do
我该怎么去修改或者我的操作是错误的,
PS:INCAR,POSCAR,POTCAR,KPONTS都有
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

甲斐之虎

银虫 (正式写手)

【答案】应助回帖

★ ★
感谢参与,应助指数 +1
franch: 金币+2, 谢谢回帖交流。。。 2014-04-07 21:59:56
注意,那里是`,而不是'
'grep "TOTEN" OUTCAR | tail -1 | awk '{printf "%12.6f \n", $5 }''
楼上给的那个是对的
别人笑我太疯颠,我笑他人看不穿。不见五陵豪杰墓,无花无酒锄作田。
3楼2014-03-28 09:14:43
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 6 个回答

490105179

木虫 (正式写手)

【答案】应助回帖

★ ★
感谢参与,应助指数 +1
franch: 金币+2, 谢谢回帖交流。。。 2014-04-07 21:59:49
我的脚本,希望对你有用。
#!/bin/sh
APP_NAME=intelg_mid
NP=12
NP_PER_NODE=12
RUN="RAW"
CURDIR=$PWD

VASP=~/bin/vasp.5.2.11-mp
source /home-gg/compiler/intel/composer_xe_2011_sp1/bin/compilervars.sh intel64
source /home-gg/compiler/mpi/openmpi-1.4.4-intel.sh

cd $CURDIR
#start creating .nodelist
rm -rf $CURDIR/nodelist >& /dev/null
for i in `echo $LSB_HOSTS`
do
    echo "$i" >> $CURDIR/nodelist
done
nodelist=$(cat $CURDIR/nodelist | uniq | awk '{print $1}' | tr '\n' ',')

rm WAVECAR
for i in 400 450 500 550 600

do
cat > INCAR <<!                             
SYSTEM=SiC
ENCUT=$i
ISTART=0;ICHARG=2
ISMEAR=-5
PREC=high
!
echo "ENCUT= $i eV"
mpirun -np $NP -machinefile $PBS_NODEFILE vasp
E=`grep "TOTEN" OUTCAR | tail -1 | awk '{printf "%12.6f \n", $5}'`
KP=`grep "irreducible" OUTCAR | tail -1 | awk '{printf"%12.4f \n", $5}'`
echo $i $E >> comment
#
#
echo -n "start time  " > time
date >> time
mpirun -np $NP -machinefile $CURDIR/nodelist $VASP  &> vasp.out
echo -n "end   time  " >> time ; date >> time
cat time >> vasp.out
done
#
#
exit
2楼2014-03-27 16:51:47
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

linda19918

银虫 (小有名气)

引用回帖:
2楼: Originally posted by 490105179 at 2014-03-27 16:51:47
我的脚本,希望对你有用。
#!/bin/sh
APP_NAME=intelg_mid
NP=12
NP_PER_NODE=12
RUN="RAW"
CURDIR=$PWD

VASP=~/bin/vasp.5.2.11-mp
source /home-gg/compiler/intel/composer_xe_2011_sp1/bin ...

这个脚本要怎么运行呢??
4楼2014-04-06 19:19:28
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

linda19918

银虫 (小有名气)

引用回帖:
3楼: Originally posted by 甲斐之虎 at 2014-03-28 09:14:43
注意,那里是`,而不是'
'grep "TOTEN" OUTCAR | tail -1 | awk '{printf "%12.6f \n", $5 }''
楼上给的那个是对的

我都改过来了,但是必须要用楼上那种脚本才能运行么?我那种不对么,还有我用的SSH连接到大型计算机上,不知道怎么运行脚本,今天又试着用了一下脚本还是不断出错
5楼2014-04-06 19:21:12
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
信息提示
请填处理意见