- improve ins_m_atoms (merge to general ins_atoms function maybe)
- clean up mdrun
+ - config sanity checks
- introduce/improve fill command (multiple fills)
- check virial calc, where does the - come from?
- angular distribution
- - structfactoranalyze (see nordlund paper)
+ - structurfactoranalyze (see nordlund paper)
- filled atoms need atom attrib?!?!? or aattr pre prerun
- bond_analyze to dump xyz file of atoms
+ - improve diff calc
+
- make it parallel! (mpi/openmp) <- email to ralfu (asap)
* openmp: doch auf verlet listen (pointer problem!)
- cryst simulations: reasonable pctrl?
- even higher temperatures
- tctrl only in outer regions
-- cryst of molten area with cryst area next to it
- only 1 atom per timestep
- EXTENDED C-C cutoff
- different sized SiC prec in Si (4:5! diff temperatures)
-- more interstitial combinations
- melting exps (both, anneal + interface method)
-- characterize interstitials by PCF, then inc temperature
+- interstitials:
+ - more interstitial combinations
+ - characterize interstitials by PCF, then inc temperature
learn
*****
#undef PSE_NAME
#undef PSE_COL
+typedef struct s_data {
+ int ca;
+ double radius;
+ double lc;
+ int ma;
+ double ox,oy,oz;
+} t_data;
+
int usage(char *prog) {
printf("\nusage:\n");
return -1;
}
+int process(t_moldyn *moldyn,t_atom *itom,t_atom *jtom,void *ptr,u8 bc) {
+
+ t_3dvec dist;
+ double d;
+ t_data *data;
+
+ data=ptr;
+
+ v3_sub(&dist,&(itom->r),&(jtom->r));
+ if(bc) check_per_bound(moldyn,&dist);
+ d=v3_norm(&dist);
+
+ if(d<=data->radius) {
+ printf("%s %f %f %f %s %f\n",
+ pse_name[jtom->element],
+ jtom->r.x+data->ox,jtom->r.y+data->oy,jtom->r.z+data->oz,
+ (jtom->tag==data->ma)?"Red":pse_col[jtom->element],
+ jtom->ekin);
+ }
+
+ return 0;
+}
+
int main(int argc,char **argv) {
t_moldyn moldyn;
- t_atom *itom,*jtom;
- int j;
+ t_data data;
int ret;
- t_list n[27];
- t_list *this;
- t_linkcell *lc;
- t_3dvec dist;
- double d,radius;
- double ox,oy,oz;
- int ma,ca;
- double lac;
+ t_atom *atom;
if(argc<4) {
usage(argv[0]);
return -1;
}
-
- ca=atoi(argv[2]);
- radius=atof(argv[3]);
- lac=atof(argv[4]);
-
- ma=-1;
+
+ data.ca=atoi(argv[2]);
+ data.radius=atof(argv[3]);
+ data.lc=atof(argv[4]);
+ data.ma=-1;
if(argc==6)
- ma=atoi(argv[5]);
+ data.ma=atoi(argv[5]);
memset(&moldyn,0,sizeof(t_moldyn));
}
/* link cell init */
- moldyn.cutoff=radius;
+ moldyn.cutoff=data.radius;
link_cell_init(&moldyn,VERBOSE);
- lc=&(moldyn.lc);
-
- /* serach atoms */
- itom=&(moldyn.atom[ca]);
- link_cell_neighbour_index(&moldyn,
- (itom->r.x+moldyn.dim.x/2)/lc->x,
- (itom->r.y+moldyn.dim.y/2)/lc->y,
- (itom->r.z+moldyn.dim.z/2)/lc->z,
- n);
+ atom=&(moldyn.atom[data.ca]);
/* prepare offset */
- ox=0.0;
- if(itom->r.x<0) {
- while((itom->r.x+ox)<(-lac/2.0))
- ox+=lac;
+ data.ox=0.0;
+ if(atom->r.x<0) {
+ while((atom->r.x+data.ox)<(-data.lc/2.0))
+ data.ox+=data.lc;
}
else {
- while((itom->r.x+ox)>(lac/2.0))
- ox-=lac;
+ while((atom->r.x+data.ox)>(data.lc/2.0))
+ data.ox-=data.lc;
}
- oy=0.0;
- if(itom->r.y<0) {
- while((itom->r.y+oy)<(-lac/2.0))
- oy+=lac;
+ data.oy=0.0;
+ if(atom->r.y<0) {
+ while((atom->r.y+data.oy)<(-data.lc/2.0))
+ data.oy+=data.lc;
}
else {
- while((itom->r.y+oy)>(lac/2.0))
- oy-=lac;
+ while((atom->r.y+data.oy)>(data.lc/2.0))
+ data.oy-=data.lc;
}
- oz=0.0;
- if(itom->r.z<0) {
- while((itom->r.z+oz)<(-lac/2.0))
- oz+=lac;
+ data.oz=0.0;
+ if(atom->r.z<0) {
+ while((atom->r.z+data.oz)<(-data.lc/2.0))
+ data.oz+=data.lc;
}
else {
- while((itom->r.z+oz)>(lac/2.0))
- oz-=lac;
+ while((atom->r.z+data.oz)>(data.lc/2.0))
+ data.oz-=data.lc;
}
-
+ /* print the centered atom */
printf("%s %f %f %f %s %f\n",
- pse_name[itom->element],itom->r.x+ox,itom->r.y+oy,itom->r.z+oz,
- "Green",itom->ekin);
-
- for(j=0;j<27;j++) {
- this=&(n[j]);
- list_reset_f(this);
-
- if(this->start==NULL)
- continue;
-
- do {
-
- jtom=this->current->data;
-
- if(jtom==itom)
- continue;
-
- v3_sub(&dist,&(itom->r),&(jtom->r));
- check_per_bound(&moldyn,&dist);
- d=v3_norm(&dist);
-
- if(d<=radius) {
- printf("%s %f %f %f %s %f\n",
- pse_name[jtom->element],
- jtom->r.x+ox,jtom->r.y+oy,jtom->r.z+oz,
- (jtom->tag==ma)?"Red":pse_col[jtom->element],
- jtom->ekin);
- }
-
- } while(list_next_f(this)!=L_NO_NEXT_ELEMENT);
- }
+ pse_name[atom->element],atom->r.x+data.ox,atom->r.y+data.oy,
+ atom->r.z+data.oz,"Green",atom->ekin);
+ process_neighbours(&moldyn,&data,atom,process);
+
link_cell_shutdown(&moldyn);
-
moldyn_free_save_file(&moldyn);
return 0;
}
+