X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=sic.c;h=b10c6816a33a7ac60c085970f9b76cb02450e8c4;hb=a9fbc66448c52bc4138176739b33d17ba86b7eae;hp=2cd32eb04853a4c14518561999f9d6a429d9e5a1;hpb=dece53fc37f9ebb52b33c9743333c213be2d6f26;p=physik%2Fposic.git diff --git a/sic.c b/sic.c index 2cd32eb..b10c681 100644 --- a/sic.c +++ b/sic.c @@ -15,7 +15,6 @@ #include "posic.h" int main(int argc,char **argv) { -printf("%d\n",sizeof(t_atom)); /* main moldyn structure */ t_moldyn md; @@ -24,6 +23,12 @@ printf("%d\n",sizeof(t_atom)); t_ho_params ho; t_tersoff_mult_params tp; + /* misc parameters */ + double tau; + + /* values */ + tau=1.0e-15; /* delta t = 1 fs */ + /* initialize moldyn */ printf("[sic] moldyn init\n"); moldyn_init(&md,argc,argv); @@ -98,7 +103,8 @@ printf("%d\n",sizeof(t_atom)); /* create the lattice / place atoms */ printf("[sic] creating atoms\n"); create_lattice(&md,DIAMOND,LC_SI,SI,M_SI, - ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP, + ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB, + //ATOM_ATTR_2BP|ATOM_ATTR_HB, 0,4,4,4); /* setting a nearest neighbour distance for the moldyn checks */ @@ -106,20 +112,24 @@ printf("%d\n",sizeof(t_atom)); /* set temperature */ printf("[sic] setting temperature\n"); - set_temperature(&md,273.0+450.0); + set_temperature(&md,0.0); + + /* set p/t scaling */ + printf("[sic] set p/t scaling\n"); + set_pt_scale(&md,0,0,T_SCALE_BERENDSEN,100*tau); - /* initial thermal fluctuations of particles */ + /* initial thermal fluctuations of particles (in equilibrium) */ printf("[sic] thermal init\n"); - thermal_init(&md); + thermal_init(&md,TRUE); /* create the simulation schedule */ printf("[sic] adding schedule\n"); - moldyn_add_schedule(&md,10000,1.0e-15); + moldyn_add_schedule(&md,100,1.0e-15); /* activate logging */ printf("[sic] activate logging\n"); - moldyn_set_log(&md,LOG_TOTAL_ENERGY,"saves/test-energy",100); - moldyn_set_log(&md,VISUAL_STEP,"saves/test-visual",100); + moldyn_set_log(&md,LOG_TOTAL_ENERGY,"saves/test-energy",1); + moldyn_set_log(&md,VISUAL_STEP,"saves/test-visual",1); /* * let's do the actual md algorithm now