标签:
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