From: hackbard Date: Wed, 13 Feb 2008 11:52:18 +0000 (+0100) Subject: added insertion type controled by config.h X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f939e7a6413390ca309302bb145434d68daeca10;p=physik%2Fposic.git added insertion type controled by config.h --- diff --git a/config.h b/config.h index f43f006..c46bca1 100644 --- a/config.h +++ b/config.h @@ -16,7 +16,7 @@ // insertrun -#define INS_RUNS 620 +#define INS_RUNS 600 #define INS_ATOMS 10 #define INS_CARBON /* comment for silicon */ @@ -31,12 +31,21 @@ #define INS_BRAND 0 #endif -//#define INS_LENX (1*ALBE_LC_SIC) -//#define INS_LENY (1*ALBE_LC_SIC) -//#define INS_LENZ (1*ALBE_LC_SIC) -#define INS_LENX (31*ALBE_LC_SI) -#define INS_LENY (31*ALBE_LC_SI) -#define INS_LENZ (31*ALBE_LC_SI) +#define INS_RAND 0 +//#define INS_HEXA 1 +//#define INS_TETRA 2 +//#define INS_110DB 3 + +#define INS_ATTR ATOM_ATTR_HB // heat bath +//#define INS_ATTR ATOM_ATTR_HB|ATOM_ATTR_VB // + vis bonds +//#define INS_ATTR ATOM_ATTR_HB|ATOM_ATTR_VB|ATOM_ATTR_FP // + fixed pos + +//#define INS_LENX (12*ALBE_LC_SIC) +//#define INS_LENY (12*ALBE_LC_SIC) +//#define INS_LENZ (12*ALBE_LC_SIC) +#define INS_LENX (9*ALBE_LC_SI) +#define INS_LENY (9*ALBE_LC_SI) +#define INS_LENZ (9*ALBE_LC_SI) #define INS_OFFSET (ALBE_LC_SI/8.0) #define INS_R_C 1.5 @@ -49,7 +58,7 @@ #define POST_RUNS 430 #define POST_DELTA_TC 1.0 #define POST_DT 1.0 -#define POST_RELAX 50 +#define POST_RELAX 100 #define POST_TAU 1.0 // log diff --git a/sic.c b/sic.c index fb20a56..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); @@ -164,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;