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> <lc> [marked atom]\n\n",
28 int main(int argc,char **argv) {
56 memset(&moldyn,0,sizeof(t_moldyn));
58 printf("[visual atoms] reading save file ...\n");
59 ret=moldyn_read_save_file(&moldyn,argv[1]);
61 printf("[visual atoms] exit!\n");
67 link_cell_init(&moldyn,VERBOSE);
71 itom=&(moldyn.atom[ca]);
72 link_cell_neighbour_index(&moldyn,
73 (itom->r.x+moldyn.dim.x/2)/lc->x,
74 (itom->r.y+moldyn.dim.y/2)/lc->y,
75 (itom->r.z+moldyn.dim.z/2)/lc->z,
82 while((itom->r.x+ox)<(-lac/2.0))
86 while((itom->r.x+ox)>(lac/2.0))
92 while((itom->r.y+oy)<(-lac/2.0))
96 while((itom->r.y+oy)>(lac/2.0))
102 while((itom->r.z+oz)<(-lac/2.0))
106 while((itom->r.z+oz)>(lac/2.0))
111 printf("%s %f %f %f %s %f\n",
112 pse_name[itom->element],itom->r.x+ox,itom->r.y+oy,itom->r.z+oz,
119 if(this->start==NULL)
124 jtom=this->current->data;
129 v3_sub(&dist,&(itom->r),&(jtom->r));
130 check_per_bound(&moldyn,&dist);
134 printf("%s %f %f %f %s %f\n",
135 pse_name[jtom->element],
136 jtom->r.x+ox,jtom->r.y+oy,jtom->r.z+oz,
137 (jtom->tag==ma)?"Red":pse_col[jtom->element],
141 } while(list_next_f(this)!=L_NO_NEXT_ELEMENT);
144 link_cell_shutdown(&moldyn);
146 moldyn_free_save_file(&moldyn);