- printf("placing silicon atoms ... ");
- count=create_lattice(DIAMOND,SI,M_SI,LC_SI,a,b,c,&si);
- printf("(%d) ok!\n",count);
-
- /* testing purpose
- count=2;
- si=malloc(2*sizeof(t_atom));
- si[0].r.x=0.16e-9;
- si[0].r.y=0;
- si[0].r.z=0;
- si[0].element=SI;
- si[0].mass=M_SI;
- si[1].r.x=-0.16e-9;
- si[1].r.y=0;
- si[1].r.z=0;
- si[1].element=SI;
- si[1].mass=M_SI;
- */
-
- printf("setting thermal fluctuations\n");
- thermal_init(si,&random,count,t);
- //v3_zero(&(si[0].v));
- //v3_zero(&(si[1].v));
-
- /* check kinetic energy */
-
- e=get_e_kin(si,count);
- printf("kinetic energy: %.40f [J]\n",e);
- printf("3/2 N k T = %.40f [J]\n",1.5*count*K_BOLTZMANN*t);