X-Git-Url: https://hackdaworld.org/gitweb/?a=blobdiff_plain;f=sic.c;h=cea4c3934c823a4b6d1003c1de3cb1d04a956512;hb=f939e7a6413390ca309302bb145434d68daeca10;hp=a7613e2c84e08ae0a1a0eba64eccc81513e29ff6;hpb=6a467846e1bd9212bcfd4c5ac29f8954305aaff5;p=physik%2Fposic.git diff --git a/sic.c b/sic.c index a7613e2..cea4c39 100644 --- a/sic.c +++ b/sic.c @@ -51,32 +51,32 @@ int insert_atoms(t_moldyn *moldyn) { for(j=0;jatom[4372].r.x=(-0.5+0.125+0.125)*ALBE_LC_SI; md->atom[4372].r.y=(-0.5+0.125+0.125)*ALBE_LC_SI; - */ +#endif +#ifdef INS_RAND // random - // r.x=(rand_get_double(&(moldyn->random))-0.5)*INS_LENX; r.y=(rand_get_double(&(moldyn->random))-0.5)*INS_LENY; r.z=(rand_get_double(&(moldyn->random))-0.5)*INS_LENZ; - // +#endif // offset r.x+=INS_OFFSET; r.y+=INS_OFFSET; @@ -101,8 +101,7 @@ int insert_atoms(t_moldyn *moldyn) { } add_atom(moldyn,INS_TYPE,INS_MASS,INS_BRAND, ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|\ - //ATOM_ATTR_HB|ATOM_ATTR_VB, - ATOM_ATTR_HB, + INS_ATTR, &r,&v); printf(" %02d: atom %d | %f %f %f | %f\n", j,moldyn->count-1,r.x,r.y,r.z,dmin); @@ -122,6 +121,9 @@ int sic_hook(void *moldyn,void *hook_params) { hp=hook_params; md=moldyn; + tau=1.0; + steps=0; + /* switch on t scaling */ if(md->schedule.count==0) set_pt_scale(md,0,0,T_SCALE_BERENDSEN,100.0); @@ -161,7 +163,7 @@ int sic_hook(void *moldyn,void *hook_params) { dt=md->t_avg-md->t_ref; if(dt<0) dt=-dt; - if(dt>INS_DELTA_TC) + if(dt>POST_DELTA_TC) break; /* decrease temperature */ hp->postrun_count+=1; @@ -438,6 +440,9 @@ int main(int argc,char **argv) { moldyn_set_log(&md,SAVE_STEP,LOG_S); moldyn_set_log(&md,CREATE_REPORT,0); + /* next neighbour distance for critical checking */ + set_nn_dist(&md,0.25*ALBE_LC_SI*sqrt(3.0)); + /* * let's do the actual md algorithm now *