4 * author: frank.zirkelbach@physik.uni-augsburg.de
13 //#include <sys/types.h>
14 //#include <sys/stat.h>
19 int usage(char *prog) {
22 printf(" %s <file> <centre atom> <radius> [marked atom]\n\n",prog);
27 int main(int argc,char **argv) {
52 memset(&moldyn,0,sizeof(t_moldyn));
54 printf("[visual atoms] reading save file ...\n");
55 ret=moldyn_read_save_file(&moldyn,argv[1]);
57 printf("[visual atoms] exit!\n");
63 link_cell_init(&moldyn,VERBOSE);
67 itom=&(moldyn.atom[ca]);
68 link_cell_neighbour_index(&moldyn,
69 (itom->r.x+moldyn.dim.x/2)/lc->x,
70 (itom->r.y+moldyn.dim.y/2)/lc->y,
71 (itom->r.z+moldyn.dim.z/2)/lc->z,
75 printf("%s %f %f %f %s %f\n",
76 pse_name[itom->element],itom->r.x,itom->r.y,itom->r.z,
88 jtom=this->current->data;
93 v3_sub(&dist,&(itom->r),&(jtom->r));
94 check_per_bound(&moldyn,&dist);
98 printf("%s %f %f %f %s %f\n",
99 pse_name[jtom->element],
100 jtom->r.x,jtom->r.y,jtom->r.z,
101 (jtom->tag==ma)?"Red":pse_col[jtom->element],
105 } while(list_next_f(this)!=L_NO_NEXT_ELEMENT);
108 link_cell_shutdown(&moldyn);
110 moldyn_free_save_file(&moldyn);