码迷,mamicode.com
首页 > 其他好文 > 详细

Calculate total energies on various inter-atomic distances and Run batch DFT and DFTB jobs

时间:2015-05-25 16:12:45      阅读:97      评论:0      收藏:0      [点我收藏+]

标签:

Change interatomic distance and Run DFT (Density Functional Theory, deMon2k code):

#! /bin/bash

for n in `head -n 1 ../distances`
do
molecule=${1%.inp}
echo $1".$n"
sed "s/rAB/$n/g" $1 > $1".$n"
mkdir $1".$n.dft"
mv $1".$n" $1".$n.dft"/$1
cd $1".$n.dft"
deMon2k_pbs -x 1 -p 8 -n 1 $1
cd ..
done

Change interatomic distance and Run DFTB (Density Functional Tight-Binding, deMonNano code):

#! /bin/bash

for n in `head -n 1 ../distances`
do
molecule=${1%.inp}
echo $1".$n"
sed "s/rAB/$n/g" $1 > $1".$n"
mkdir $1".$n.dftb"
mv $1".$n" $1".$n.dftb"/$1
cd $1".$n.dftb"
cp /home/sliu48/Fit/Electronic_part_slako/SLAKO .
deMonNano $1
cd ..
done

Retrive DFT data:

#! /bin/bash

for n in `head -n 1 ../distances`
do
molecule=${1%.inp}
# echo $molecule
cd $1".$n.dft"
echo "Reading Folder" $1".$n.dft"
j=$(grep -r "TOTAL ENERGY" *.out | awk ‘{print $4}‘)
# echo ‘j=‘ $j
echo $n " " $j >> ../Eref.dat
echo $n
echo -n $n " " >> ../DFT_CONV
grep -r "CONVERGED" *.out >> ../DFT_CONV
grep -r "TOTAL ENERGY" *.out >> ../DFT_CONV
echo ‘---------------------‘ >> ../DFT_CONV
echo ‘---------------------‘
cd ..
done
cp Eref.dat ../

Retrive DFTB total energy:

#! /bin/bash

for n in `head -n 1 ../distances`
do
molecule=${1%.inp}
# echo $molecule
cd $1".$n.dftb"
echo "Reading Folder" $1".$n.dftb"
j=$(grep -r "DFTB total energy" *.out | awk ‘{print $6}‘)
# echo ‘j=‘ $j
echo $n " " $j >> ../Ebd.dat
echo $n
echo ‘---------------------‘
cd ..
done
cp Ebd.dat ../

Calculate total energies on various inter-atomic distances and Run batch DFT and DFTB jobs

标签:

原文地址:http://www.cnblogs.com/Ticraft/p/4527739.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!