2 echo "specify a directory for logging and save files"
6 if [ ! -f ./config ]; then
7 echo "no config file found"
11 [ ! -d $1 ] && mkdir -p $1
15 cp -v config $1/config
18 logfile=logs/run_`basename $1`.log
19 time ./mdrun -c ./config -s $1 | tee $logfile
21 if [ "$?" == "0" ]; then
24 # whole simulation cell
25 #./visualize -w 640 -h 480 -d $1
29 check=`grep crt\ init $logfile`
30 if [ "$check" = " crt init" ]; then
31 grep crt\ energy $logfile | \
32 awk -F: '{ print $2 }' | \
33 awk -F\ -\ '{ print $1 " " $2 }' > \
35 for i in $1/s-crt_*.save; do
36 nr=`basename $i | awk -F_ '{ print $2 }' | \
37 awk -F. '{ print $1 }'`
38 ./s2xyz $i > $1/crt/atomic_conf_${nr}.xyz
40 ./visualize -w 640 -h 480 -d $1/crt \
41 -nll -0.56 -0.56 -0.76 -fur 0.56 0.56 0.56 \
42 -b -0.5 -0.5 -0.5 0.5 0.5 0.5 \
43 -c -0.2 -2.0 0.6 -L 0 0 -0.1 \
47 ./visualize -w 640 -h 480 -d $1 \
48 -nll -0.56 -0.56 -0.76 -fur 0.56 0.56 0.56 \
49 -b -0.5 -0.5 -0.5 0.5 0.5 0.5 \
50 -c -0.2 -2.0 0.6 -L 0 0 -0.1 \
54 #rasmol -32 -nodisplay < $1/visualize.scr > /dev/null 2>&1