]> hackdaworld.org Git - physik/posic.git/blobdiff - pair_correlation_calc.c
enhanced visualize script to create single images
[physik/posic.git] / pair_correlation_calc.c
index f6a256fc32eff3fdfae609c5c559a52ee3d50a8f..b3386c737f99b8cc687143f4aa9ac4c7967a1367 100644 (file)
@@ -65,27 +65,14 @@ int main(int argc,char **argv) {
 
        calculate_pair_correlation(&moldyn,dr,stat);
 
 
        calculate_pair_correlation(&moldyn,dr,stat);
 
-       fd=open("pair_corr_func_ab.txt",
+       fd=open("pair_corr_func.txt",
                O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR);
                O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR);
-       dprintf(fd,"# type a - type b bonds\n");
+       dprintf(fd,"#r #ab #aa #bb\n");
        for(i=0;i<slots;i++)
        for(i=0;i<slots;i++)
-               dprintf(fd,"%f %f\n",i*dr,stat[i]);
+               dprintf(fd,"%f %f %f %f\n",
+                       i*dr,stat[i],stat[slots+i],stat[2*slots+i]);
        close(fd);
        close(fd);
-               
-       fd=open("pair_corr_func_aa.txt",
-               O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR);
-       dprintf(fd,"# type a - type a bonds\n");
-       for(i=0;i<slots;i++)
-               dprintf(fd,"%f %f\n",i*dr,stat[slots+i]);
-       close(fd);
-               
-       fd=open("pair_corr_func_bb.txt",
-               O_WRONLY|O_CREAT|O_TRUNC,S_IRUSR|S_IWUSR);
-       dprintf(fd,"# type a - type b bonds\n");
-       for(i=0;i<slots;i++)
-               dprintf(fd,"%f %f\n",i*dr,stat[2*slots+i]);
-       close(fd);
-               
+
        free(stat);
 
        return 0;
        free(stat);
 
        return 0;