2 * sic.c - investigation of the sic precipitation process of silicon carbide
4 * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
11 #include "math/math.h"
12 #include "init/init.h"
13 #include "visual/visual.h"
17 int main(int argc,char **argv) {
18 /* main moldyn structure */
21 /* potential parameters */
24 t_tersoff_mult_params tp;
29 /* testing location & velocity vector */
33 tau=1.0e-15; /* delta t = 1 fs */
35 /* initialize moldyn */
36 printf("[sic] moldyn init\n");
37 moldyn_init(&md,argc,argv);
39 /* choose integration algorithm */
40 printf("[sic] setting integration algorithm\n");
41 set_int_alg(&md,MOLDYN_INTEGRATE_VERLET);
43 /* choose potential */
44 printf("[sic] selecting potential\n");
45 set_potential1b(&md,tersoff_mult_1bp,&tp);
46 set_potential2b(&md,tersoff_mult_2bp,&tp);
47 set_potential2b_post(&md,tersoff_mult_post_2bp,&tp);
48 set_potential3b(&md,tersoff_mult_3bp,&tp);
49 //set_potential2b(&md,lennard_jones,&lj);
52 * potential parameters
56 lj.sigma6=LJ_SIGMA_SI*LJ_SIGMA_SI*LJ_SIGMA_SI;
58 lj.sigma12=lj.sigma6*lj.sigma6;
59 lj.epsilon4=4.0*LJ_EPSILON_SI;
61 /* harmonic oscillator */
62 ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI;
66 * tersoff mult potential parameters for SiC
72 tp.lambda[0]=TM_LAMBDA_SI;
74 tp.beta[0]=TM_BETA_SI;
84 tp.lambda[1]=TM_LAMBDA_C;
94 tersoff_mult_complete_params(&tp);
97 printf("[sic] setting cutoff radius\n");
98 set_cutoff(&md,TM_S_SI);
99 //set_cutoff(&md,2*LC_SI);
101 /* set (initial) dimensions of simulation volume */
102 printf("[sic] setting dimensions\n");
103 set_dim(&md,5*LC_SI,5*LC_SI,5*LC_SI,TRUE);
105 /* set periodic boundary conditions in all directions */
106 printf("[sic] setting periodic boundary conditions\n");
107 set_pbc(&md,TRUE,TRUE,TRUE);
109 /* create the lattice / place atoms */
110 //printf("[sic] creating atoms\n");
111 //create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
112 // ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
115 /* testing configuration */
119 add_atom(&md,SI,M_SI,0,ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,&r,&v);
123 add_atom(&md,SI,M_SI,0,ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,&r,&v);
125 /* setting a nearest neighbour distance for the moldyn checks */
126 set_nn_dist(&md,0.25*sqrt(3.0)*LC_SI); /* diamond ! */
128 /* set temperature */
129 printf("[sic] setting temperature\n");
130 //set_temperature(&md,273.0+450.0);
131 set_temperature(&md,0.0);
133 /* set p/t scaling */
134 printf("[sic] set p/t scaling\n");
135 set_pt_scale(&md,0,0,T_SCALE_BERENDSEN,100.0);
137 /* initial thermal fluctuations of particles (in equilibrium) */
138 printf("[sic] thermal init\n");
139 thermal_init(&md,TRUE);
141 /* create the simulation schedule */
142 printf("[sic] adding schedule\n");
143 moldyn_add_schedule(&md,1000,1.0);
145 /* activate logging */
146 printf("[sic] activate logging\n");
147 moldyn_set_log_dir(&md,"saves/test");
148 moldyn_set_log(&md,LOG_TOTAL_ENERGY,10);
149 moldyn_set_log(&md,VISUAL_STEP,10);
152 * let's do the actual md algorithm now
154 * integration of newtons equations
157 printf("[sic] integration start, go get a coffee ...\n");
158 moldyn_integrate(&md);
162 printf("[sic] shutdown\n");
163 moldyn_shutdown(&md);