]> hackdaworld.org Git - physik/posic.git/blob - potentials/tersoff.h
virial calc define + default amount threads -> 2
[physik/posic.git] / potentials / tersoff.h
1 /*
2  * tersoff.h - tersoff potential header file
3  *
4  * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
5  *
6  */
7
8 #ifndef TERSOFF_H
9 #define TERSOFF_H
10
11 #define TERSOFF_MAXN    16*27
12
13 /* tersoff exchange type */
14 typedef struct s_tersoff_echange {
15
16         t_3dvec dist_ij;
17         double d_ij2;
18         double d_ij;
19
20         t_3dvec dist_ik[TERSOFF_MAXN];
21         double d_ik2[TERSOFF_MAXN];
22         double d_ik[TERSOFF_MAXN];
23
24         double f_c_ik[TERSOFF_MAXN];
25         double df_c_ik[TERSOFF_MAXN];
26
27         double g[TERSOFF_MAXN];
28         double dg[TERSOFF_MAXN];
29         double cos_theta[TERSOFF_MAXN];
30
31         double *beta_i;
32         double *n_i;
33         double *c_i;
34         double *d_i;
35         double *h_i;
36
37         double ci2;
38         double di2;
39         double ci2di2;
40         double betaini;
41
42         double zeta_ij;
43         double pre_dzeta;
44
45         int kcount;
46 } t_tersoff_exchange;
47
48 /* tersoff mult (2!) potential parameters */
49 typedef struct s_tersoff_mult_params {
50         double S[2];            /* tersoff cutoff radii */
51         double S2[2];           /* tersoff cutoff radii squared */
52         double R[2];            /* tersoff cutoff radii */
53         double Smixed;          /* mixed S radius */
54         double S2mixed;         /* mixed S radius squared */
55         double Rmixed;          /* mixed R radius */
56         double A[2];            /* factor of tersoff attractive part */
57         double B[2];            /* factor of tersoff repulsive part */
58         double Amixed;          /* mixed A factor */
59         double Bmixed;          /* mixed B factor */
60         double lambda[2];       /* tersoff lambda */
61         double lambda_m;        /* mixed lambda */
62         double mu[2];           /* tersoff mu */
63         double mu_m;            /* mixed mu */
64
65         double chi;
66
67         double beta[2];
68         double n[2];
69         double c[2];
70         double d[2];
71         double h[2];
72
73         t_tersoff_exchange exchange;    /* exchange between 2bp and 3bp calc */
74 } t_tersoff_mult_params;
75
76 /* function prototypes */
77 int tersoff_mult_set_params(t_moldyn *moldyn,int element1,int element2);
78 int tersoff_mult_1bp(t_moldyn *moldyn,t_atom *ai);
79 int tersoff_mult_2bp(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
80 int tersoff_mult_3bp_j1(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
81 int tersoff_mult_3bp_k1(t_moldyn *moldyn,
82                         t_atom *ai,t_atom *aj,t_atom *ak,u8 bc);
83 int tersoff_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
84 int tersoff_mult_3bp_k2(t_moldyn *moldyn,
85                         t_atom *ai,t_atom *aj,t_atom *ak,u8 bc);
86 int tersoff_mult_check_2b_bond(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
87
88 /* tersoff potential paramter defines */
89
90 // silicon
91 #define TM_R_SI                 2.7                             /* A */
92 #define TM_S_SI                 3.0                             /* A */
93 #define TM_A_SI                 (1830.8*EV)                     /* NA */
94 #define TM_B_SI                 (471.18*EV)                     /* NA */
95 #define TM_LAMBDA_SI            2.4799                          /* 1/A */
96 #define TM_MU_SI                1.7322                          /* 1/A */
97 #define TM_BETA_SI              1.1000e-6
98 #define TM_N_SI                 0.78734
99 #define TM_C_SI                 1.0039e5
100 #define TM_D_SI                 16.217
101 #define TM_H_SI                 -0.59825
102
103 // carbon
104 #define TM_R_C                  1.8                             /* A */
105 #define TM_S_C                  2.1                             /* A */
106 #define TM_A_C                  (1393.6*EV)                     /* NA */
107 #define TM_B_C                  (346.7*EV)                      /* NA */
108 #define TM_LAMBDA_C             3.4879                          /* 1/A */
109 #define TM_MU_C                 2.2119                          /* 1/A */
110 #define TM_BETA_C               1.5724e-7
111 #define TM_N_C                  0.72751
112 #define TM_C_C                  3.8049e4
113 #define TM_D_C                  4.384
114 #define TM_H_C                  -0.57058
115
116 // mixed: silicon carbide
117 #define TM_CHI_SIC              0.9776
118 #define TM_LC_SIC               4.32                            /* A */
119
120 #endif