2 * sic.c - investigation of the sic precipitation process of silicon carbide
4 * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
14 int main(int argc,char **argv) {
18 printf("[sic] usage: %s <logdir> <temperatur>\n",argv[0]);
22 /* main moldyn structure */
25 /* potential parameters */
28 t_tersoff_mult_params tp;
33 /* testing location & velocity vector */
37 tau=1.0e-15; /* delta t = 1 fs */
39 /* initialize moldyn */
40 printf("[sic] moldyn init\n");
41 moldyn_init(&md,argc,argv);
43 /* choose integration algorithm */
44 printf("[sic] setting integration algorithm\n");
45 set_int_alg(&md,MOLDYN_INTEGRATE_VERLET);
47 /* choose potential */
48 printf("[sic] selecting potential\n");
49 set_potential1b(&md,tersoff_mult_1bp,&tp);
50 set_potential2b(&md,tersoff_mult_2bp,&tp);
51 set_potential2b_post(&md,tersoff_mult_post_2bp,&tp);
52 set_potential3b(&md,tersoff_mult_3bp,&tp);
53 //set_potential2b(&md,lennard_jones,&lj);
56 * potential parameters
60 lj.sigma6=LJ_SIGMA_SI*LJ_SIGMA_SI*LJ_SIGMA_SI;
62 lj.sigma12=lj.sigma6*lj.sigma6;
63 lj.epsilon4=4.0*LJ_EPSILON_SI;
65 /* harmonic oscillator */
66 ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI;
70 * tersoff mult potential parameters for SiC
76 tp.lambda[0]=TM_LAMBDA_SI;
78 tp.beta[0]=TM_BETA_SI;
88 tp.lambda[1]=TM_LAMBDA_C;
98 tersoff_mult_complete_params(&tp);
101 printf("[sic] setting cutoff radius\n");
102 set_cutoff(&md,TM_S_SI);
103 //set_cutoff(&md,2*LC_SI);
105 /* set (initial) dimensions of simulation volume */
106 printf("[sic] setting dimensions\n");
107 set_dim(&md,5*LC_SI,5*LC_SI,5*LC_SI,TRUE);
109 /* set periodic boundary conditions in all directions */
110 printf("[sic] setting periodic boundary conditions\n");
111 set_pbc(&md,TRUE,TRUE,TRUE);
113 /* create the lattice / place atoms */
114 printf("[sic] creating atoms\n");
115 //create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
116 // ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
118 //moldyn_bc_check(&md);
120 /* testing configuration */
124 add_atom(&md,SI,M_SI,0,
125 ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP,//|ATOM_ATTR_HB,
131 add_atom(&md,SI,M_SI,0,
132 ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP,//|ATOM_ATTR_HB,
136 /* setting a nearest neighbour distance for the moldyn checks */
137 set_nn_dist(&md,0.25*sqrt(3.0)*LC_SI); /* diamond ! */
139 /* set temperature */
140 printf("[sic] setting temperature -> %f\n",273+atof(argv[2]));
141 //set_temperature(&md,273.0+1410.0);
142 //set_temperature(&md,273.0+450.0);
143 //set_temperature(&md,273.0);
144 //set_temperature(&md,1.0);
145 //set_temperature(&md,0.0);
146 set_temperature(&md,atof(argv[2])+273.0);
149 printf("[sic] setting pressure\n");
150 set_pressure(&md,ATM);
152 /* set p/t scaling */
153 printf("[sic] set p/t scaling\n");
154 //set_pt_scale(&md,P_SCALE_BERENDSEN,100.0,
155 // T_SCALE_BERENDSEN,100.0);
156 //set_pt_scale(&md,0,0,T_SCALE_BERENDSEN,100.0);
158 /* initial thermal fluctuations of particles (in equilibrium) */
159 printf("[sic] thermal init\n");
160 //thermal_init(&md,TRUE);
162 /* create the simulation schedule */
163 printf("[sic] adding schedule\n");
164 moldyn_add_schedule(&md,10000,.1);
166 /* activate logging */
167 printf("[sic] activate logging\n");
168 moldyn_set_log_dir(&md,argv[1]);
169 moldyn_set_log(&md,LOG_TOTAL_ENERGY,1);
170 moldyn_set_log(&md,VISUAL_STEP,20);
173 * let's do the actual md algorithm now
175 * integration of newtons equations
178 printf("[sic] integration start, go get a coffee ...\n");
179 moldyn_integrate(&md);
183 printf("[sic] shutdown\n");
184 moldyn_shutdown(&md);