X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=mdrun.c;h=af8a352cf88601347d9a191bbf6c4e33416b59ad;hb=c2697c8b6f808b7edef2f9e2ceded0aa65374168;hp=31943efc65bd39680dc8dec02fec465ce39c7e90;hpb=67df6b3a722a44e36fd56f3f040c3c9726b3fc3f;p=physik%2Fposic.git diff --git a/mdrun.c b/mdrun.c index 31943ef..af8a352 100644 --- a/mdrun.c +++ b/mdrun.c @@ -459,7 +459,8 @@ int mdrun_parse_config(t_mdrun *mdrun) { imp.amount2=atoi(word[5]); imp.brand1=atoi(word[6]); imp.brand2=atoi(word[7]); - imp.cr=atof(word[8]); + imp.crmin=atof(word[8]); + imp.crmax=atof(word[9]); /* do this later ... for(i=0;icr*imp->cr; + cmin=imp->crmin*imp->crmin; + cmax=imp->crmax*imp->crmax; while(imp->amount1|imp->amount2) { if(imp->amount1) { @@ -745,20 +747,22 @@ int insert_mixed_atoms(t_moldyn *moldyn,t_mdrun *mdrun) { v3_sub(&dist,&(atom->r),&r); check_per_bound(moldyn,&dist); d=v3_absolute_square(&dist); - if(dcmax) + retry=1; } add_atom(moldyn,imp->element1,pse_mass[imp->element1], imp->brand1,imp->attr1,&r,&v); printf("%s (mixed) atom inserted (%d): %f %f %f\n", ME,imp->amount1,r.x,r.y,r.z); - printf(" -> d2 = %f/%f\n",dmin,c); + printf(" -> d2 = %f/%f/%f\n",dmin,cmin,cmax); imp->amount1-=1; } if(imp->amount2) { @@ -777,20 +781,22 @@ int insert_mixed_atoms(t_moldyn *moldyn,t_mdrun *mdrun) { v3_sub(&dist,&(atom->r),&r); check_per_bound(moldyn,&dist); d=v3_absolute_square(&dist); - if(dcmax) + retry=1; } add_atom(moldyn,imp->element2,pse_mass[imp->element2], imp->brand2,imp->attr2,&r,&v); printf("%s (mixed) atom inserted (%d): %f %f %f\n", ME,imp->amount2,r.x,r.y,r.z); - printf(" -> d2 = %f/%f\n",dmin,c); + printf(" -> d2 = %f/%f/%f\n",dmin,cmin,cmax); imp->amount2-=1; } } @@ -830,6 +836,7 @@ int chaatr(t_moldyn *moldyn,t_mdrun *mdrun) { } atom->attr=cap->attr; } + printf(" atom attributes: %02x\n\n",cap->attr); return 0; } @@ -950,6 +957,7 @@ int mdrun_hook(void *ptr1,void *ptr2) { stage_print(" -> insert mixed atoms\n\n"); imp=stage->params; insert_mixed_atoms(moldyn,mdrun); + change_stage=TRUE; break; @@ -1120,6 +1128,7 @@ int main(int argc,char **argv) { mdrun.ly,mdrun.lz,&o); break; case NONE: + set_nn_dist(&moldyn,mdrun.nnd); break; default: printf("%s unknown lattice type: %02x\n",