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;
30 tau=1.0e-15; /* delta t = 1 fs */
32 /* initialize moldyn */
33 printf("[sic] moldyn init\n");
34 moldyn_init(&md,argc,argv);
36 /* choose integration algorithm */
37 printf("[sic] setting integration algorithm\n");
38 set_int_alg(&md,MOLDYN_INTEGRATE_VERLET);
40 /* choose potential */
41 printf("[sic] selecting potential\n");
42 set_potential1b(&md,tersoff_mult_1bp,&tp);
43 set_potential2b(&md,tersoff_mult_2bp,&tp);
44 set_potential2b_post(&md,tersoff_mult_post_2bp,&tp);
45 set_potential3b(&md,tersoff_mult_3bp,&tp);
46 //set_potential2b(&md,lennard_jones,&lj);
49 * potential parameters
53 lj.sigma6=LJ_SIGMA_SI*LJ_SIGMA_SI*LJ_SIGMA_SI;
55 lj.sigma12=lj.sigma6*lj.sigma6;
56 lj.epsilon4=4.0*LJ_EPSILON_SI;
58 /* harmonic oscillator */
59 ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI;
63 * tersoff mult potential parameters for SiC
69 tp.lambda[0]=TM_LAMBDA_SI;
71 tp.beta[0]=TM_BETA_SI;
81 tp.lambda[1]=TM_LAMBDA_C;
91 tersoff_mult_complete_params(&tp);
94 printf("[sic] setting cutoff radius\n");
95 set_cutoff(&md,TM_S_SI);
97 /* set (initial) dimensions of simulation volume */
98 printf("[sic] setting dimensions\n");
99 set_dim(&md,3*LC_SI,3*LC_SI,3*LC_SI,TRUE);
101 /* set periodic boundary conditions in all directions */
102 printf("[sic] setting periodic boundary conditions\n");
103 set_pbc(&md,TRUE,TRUE,TRUE);
105 /* create the lattice / place atoms */
106 printf("[sic] creating atoms\n");
107 create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
108 ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
109 //ATOM_ATTR_2BP|ATOM_ATTR_HB,
112 /* setting a nearest neighbour distance for the moldyn checks */
113 set_nn_dist(&md,sqrt(3.0)*LC_SI/4.0); /* diamond ! */
115 /* set temperature */
116 printf("[sic] setting temperature\n");
117 set_temperature(&md,0.0);
119 /* set p/t scaling */
120 printf("[sic] set p/t scaling\n");
121 set_pt_scale(&md,0,0,T_SCALE_BERENDSEN,100*tau);
123 /* initial thermal fluctuations of particles (in equilibrium) */
124 printf("[sic] thermal init\n");
125 thermal_init(&md,TRUE);
127 /* create the simulation schedule */
128 printf("[sic] adding schedule\n");
129 moldyn_add_schedule(&md,100,1.0e-15);
131 /* activate logging */
132 printf("[sic] activate logging\n");
133 moldyn_set_log(&md,LOG_TOTAL_ENERGY,"saves/test-energy",1);
134 moldyn_set_log(&md,VISUAL_STEP,"saves/test-visual",1);
137 * let's do the actual md algorithm now
139 * integration of newtons equations
142 printf("[sic] integration start, go get a coffee ...\n");
143 moldyn_integrate(&md);
147 printf("[sic] shutdown\n");
148 moldyn_shutdown(&md);