4 * author: frank.zirkelbach@physik.uni-augsburg.de
13 //#include <sys/types.h>
14 //#include <sys/stat.h>
26 int usage(char *prog) {
29 printf(" %s <file> <centre atom> <radius> <lc> [marked atom]\n\n",
35 int main(int argc,char **argv) {
63 memset(&moldyn,0,sizeof(t_moldyn));
65 printf("[visual atoms] reading save file ...\n");
66 ret=moldyn_read_save_file(&moldyn,argv[1]);
68 printf("[visual atoms] exit!\n");
74 link_cell_init(&moldyn,VERBOSE);
78 itom=&(moldyn.atom[ca]);
79 link_cell_neighbour_index(&moldyn,
80 (itom->r.x+moldyn.dim.x/2)/lc->x,
81 (itom->r.y+moldyn.dim.y/2)/lc->y,
82 (itom->r.z+moldyn.dim.z/2)/lc->z,
89 while((itom->r.x+ox)<(-lac/2.0))
93 while((itom->r.x+ox)>(lac/2.0))
99 while((itom->r.y+oy)<(-lac/2.0))
103 while((itom->r.y+oy)>(lac/2.0))
109 while((itom->r.z+oz)<(-lac/2.0))
113 while((itom->r.z+oz)>(lac/2.0))
118 printf("%s %f %f %f %s %f\n",
119 pse_name[itom->element],itom->r.x+ox,itom->r.y+oy,itom->r.z+oz,
126 if(this->start==NULL)
131 jtom=this->current->data;
136 v3_sub(&dist,&(itom->r),&(jtom->r));
137 check_per_bound(&moldyn,&dist);
141 printf("%s %f %f %f %s %f\n",
142 pse_name[jtom->element],
143 jtom->r.x+ox,jtom->r.y+oy,jtom->r.z+oz,
144 (jtom->tag==ma)?"Red":pse_col[jtom->element],
148 } while(list_next_f(this)!=L_NO_NEXT_ELEMENT);
151 link_cell_shutdown(&moldyn);
153 moldyn_free_save_file(&moldyn);