projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
decreased output + parse all OUTCAR* files
[physik/posic.git]
/
vasp_tools
/
outcar2moldyn
diff --git
a/vasp_tools/outcar2moldyn
b/vasp_tools/outcar2moldyn
index
780dd93
..
197f28c
100755
(executable)
--- a/
vasp_tools/outcar2moldyn
+++ b/
vasp_tools/outcar2moldyn
@@
-1,14
+1,18
@@
#!/bin/bash
#!/bin/bash
-rm -rf video
-mkdir -p video
+for i in OUTCAR*; do
+ app=`echo $i | awk -F. '{ print $2 }'`
+ [ ! -z $app ] && app=".$app"
-sicnt=`grep 'ions per' OUTCAR | awk '{ print $5 }'`
-ccnt=`grep 'ions per' OUTCAR | awk '{ print $6 }'`
+rm -rf video$app
+mkdir -p video$app
+
+sicnt=`grep 'ions per' $i | awk '{ print $5 }'`
+ccnt=`grep 'ions per' $i | awk '{ print $6 }'`
((total=sicnt+ccnt))
((total=sicnt+ccnt))
-echo "parsing
OUTCAR file
..."
+echo "parsing
file $PWD/$i
..."
echo " Si: $sicnt, C: $ccnt, total: $total"
cnt=0
echo " Si: $sicnt, C: $ccnt, total: $total"
cnt=0
@@
-18,15
+22,15
@@
cx=1.0
cy=1.0
cz=0.8
cy=1.0
cz=0.8
-sed -n -e '/POSITION/,/total/p'
OUTCAR
| \
+sed -n -e '/POSITION/,/total/p'
$i
| \
grep -v POS | grep -v total | grep -v -- ^\ - | \
while read x y z fx fy fz; do
time=`printf "%05d" $tcnt`
grep -v POS | grep -v total | grep -v -- ^\ - | \
while read x y z fx fy fz; do
time=`printf "%05d" $tcnt`
- echo -en "$tcnt/$cnt "
+
#
echo -en "$tcnt/$cnt "
[ "$cnt" = "0" ] && \
echo "# P $total $time <$cx,$cy,$cz>" > \
[ "$cnt" = "0" ] && \
echo "# P $total $time <$cx,$cy,$cz>" > \
- video/atomic_conf_$time.xyz
+ video
$app
/atomic_conf_$time.xyz
type="Si"
color="Yellow"
type="Si"
color="Yellow"
@@
-36,15
+40,17
@@
sed -n -e '/POSITION/,/total/p' OUTCAR | \
color="Gray"
fi
echo "$type $x $y $z $color $force" >> \
color="Gray"
fi
echo "$type $x $y $z $color $force" >> \
- video/atomic_conf_$time.xyz
+ video
$app
/atomic_conf_$time.xyz
((cnt+=1))
if [ $cnt -eq $total ]; then
cnt=0
((tcnt+=1))
((cnt+=1))
if [ $cnt -eq $total ]; then
cnt=0
((tcnt+=1))
- echo
+ echo
-en "$tcnt "
fi
done
echo
fi
done
echo
+done
+