From a12c7b840670420a026186c1408189625f961b5f Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 2 Feb 2009 15:53:22 +0100 Subject: [PATCH] added parcas to moldyn conversion tool (md.movie -> xyz format) --- parcasconv | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 parcasconv diff --git a/parcasconv b/parcasconv new file mode 100755 index 0000000..9f23771 --- /dev/null +++ b/parcasconv @@ -0,0 +1,31 @@ +#!/bin/sh + +# +# convert parcas output to moldyn output +# frank.zirkelbach@physik.uni-augsburg.de +# + +if [ ! -f $1 ]; then + echo "no valid file" + exit 1 +fi + +if [ ! -d $2 ]; then + echo "no valid directory" + exit 1 +fi + +cat $1 | while read amount; do + read a b step time c d vol1 vol2 vol3 + trgname="$2/atomic_conf_`printf "%07d" $step`.xyz" + echo "# [P] $amount $time <2.443050,2.443050,-78.177600>" > $trgname + ((cnt=0)) + while read sort x y z type n; do + color="Yellow" + [ "$sort" = "C" ] && color="Gray" + echo "$sort $x $y $z $color 0.0" >> $trgname + ((cnt+=1)) + [ "$cnt" = "$amount" ] && break + done +done + -- 2.39.2