--- /dev/null
+/*
+ * calcultae pair correlation function
+ *
+ * author: frank.zirkelbach@physik.uni-augsburg.de
+ *
+ */
+
+#define _GNU_SOURCE
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "moldyn.h"
+
+#define ME "[s2xyz]"
+
+int main(int argc,char **argv) {
+
+ t_moldyn moldyn;
+ int i,ret;
+ char color[2][64];
+ char type[2][8];
+
+ memset(&moldyn,0,sizeof(t_moldyn));
+
+ strcpy(color[0],"Yellow");
+ strcpy(type[0],"Si");
+ strcpy(color[1],"Gray");
+ strcpy(type[1],"C");
+
+ ret=moldyn_read_save_file(&moldyn,argv[1]);
+ if(ret) {
+ printf("%s exit!\n",ME);
+ return ret;
+ }
+
+
+ printf("# [P] %d 0 <0,0,0>\n",moldyn.count);
+
+ for(i=0;i<moldyn.count;i++)
+ printf("%s %f %f %f %s %f\n",
+ type[moldyn.atom[i].brand],
+ moldyn.atom[i].r.x,
+ moldyn.atom[i].r.y,
+ moldyn.atom[i].r.z,
+ color[moldyn.atom[i].brand],
+ moldyn.atom[i].ekin/EV);
+
+ return 0;
+}
+
--- /dev/null
+#!/bin/bash
+
+DIR="$1"
+
+for i in $1/s-*.save; do
+ FILE="`basename $i`"
+ NUM="`echo $FILE | awk -F- '{ print $2 }' | awk -F. '{ print $1 }'`"
+ TRG="$DIR/atomic_conf_${NUM}.xyz"
+ echo "converting $i -> $TRG"
+ ./s2xyz $i > $TRG
+done
+
+
+