- /* set for 'bounding atoms' */
- vis.dim.x=a*LC_SI;
- vis.dim.y=b*LC_SI;
- vis.dim.z=c*LC_SI;
-
- /* init lattice */
- 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.23*sqrt(3.0)*LC_SI/2.0;
- si[0].r.y=0;
- si[0].r.z=0;
- si[0].element=SI;
- si[0].mass=M_SI;
- si[1].r.x=-si[0].r.x;
- si[1].r.y=0;
- si[1].r.z=0;
- si[1].element=SI;
- si[1].mass=M_SI;
- */
-
- /* moldyn init (now si is a valid address) */
- md.count=count;
- md.atom=si;
- md.potential=potential_lennard_jones;
- md.force=force_lennard_jones;
- //md.potential=potential_harmonic_oscillator;
- //md.force=force_harmonic_oscillator;
- md.cutoff=R_CUTOFF;
- md.cutoff_square=(R_CUTOFF*R_CUTOFF);
- md.pot_params=&lj;
- //md.pot_params=&ho;
- md.integrate=velocity_verlet;
- //md.time_steps=RUNS;
- //md.tau=TAU;
- md.status=0;
- md.visual=&vis;