2 * code to display atom data
4 * author: frank.zirkelbach@physik.uni-augsburg.de
13 //#include <sys/types.h>
14 //#include <sys/stat.h>
18 #include "potentials/albe.h"
20 int usage(char *prog) {
23 printf(" %s <save file> <nr1> <nr2> ... \n\n",prog);
28 int main(int argc,char **argv) {
43 memset(&moldyn,0,sizeof(t_moldyn));
45 printf("[search bonds] reading save file ...\n");
46 ret=moldyn_read_save_file(&moldyn,argv[1]);
48 printf("[search bonds] exit!\n");
52 /* todo: guessing offset/lc */
59 atom=&(moldyn.atom[nr]);
60 printf("\n## atom %d ##\n",nr);
62 printf("r0-o dr r-o [lc]\n");
63 printf(" -----------------------------");
64 printf("------------------------------\n");
65 printf(" x: %f %f | %f %f | %f | %f\n",
66 atom->r.x,atom->r_0.x,atom->r.x-off,atom->r_0.x-off,
67 atom->r.x-atom->r_0.x,(atom->r.x-off)/lc);
68 printf(" y: %f %f | %f %f | %f | %f\n",
69 atom->r.y,atom->r_0.y,atom->r.y-off,atom->r_0.y-off,
70 atom->r.y-atom->r_0.y,(atom->r.y-off)/lc);
71 printf(" z: %f %f | %f %f | %f | %f\n",
72 atom->r.z,atom->r_0.z,atom->r.z-off,atom->r_0.z-off,
73 atom->r.z-atom->r_0.z,(atom->r.z-off)/lc);
77 moldyn_free_save_file(&moldyn);