Merge branch 'leadoff'
[physik/posic.git] / potentials / albe_orig.h
1 /*
2  * albe_orig.h - albe potential header file
3  *
4  * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
5  *
6  */
7
8 #ifndef ALBE_ORIG_H
9 #define ALBE_ORIG_H
10
11 /* albe constants */
12 #include "albe.h"
13
14 #define ALBE_ORIG_MAXN  16*27
15
16 /* albe exchange type */
17 typedef struct s_albe_orig_exchange {
18
19         t_3dvec dist_ij;
20         double d_ij2;
21         double d_ij;
22
23         t_3dvec dist_ik[ALBE_ORIG_MAXN];
24         double d_ik2[ALBE_ORIG_MAXN];
25         double d_ik[ALBE_ORIG_MAXN];
26
27         double f_c_ik[ALBE_ORIG_MAXN];
28         double df_c_ik[ALBE_ORIG_MAXN];
29
30         double g[ALBE_ORIG_MAXN];
31         double dg[ALBE_ORIG_MAXN];
32         double cos_theta[ALBE_ORIG_MAXN];
33
34         double *gamma_i;
35         double *c_i;
36         double *d_i;
37         double *h_i;
38
39         double *ci2;
40         double *di2;
41         double *ci2di2;
42
43         double zeta_ij;
44         double pre_dzeta;
45
46         int kcount;
47 } t_albe_orig_exchange;
48
49 /* albe mult (2!) potential parameters */
50 typedef struct s_albe_orig_mult_params {
51         double S[2];            /* albe cutoff radii */
52         double S2[2];           /* albe cutoff radii squared */
53         double R[2];            /* albe cutoff radii */
54         double Smixed;          /* mixed S radius */
55         double S2mixed;         /* mixed S radius squared */
56         double Rmixed;          /* mixed R radius */
57         double A[2];            /* factor of albe attractive part */
58         double B[2];            /* factor of albe repulsive part */
59         double r0[2];           /* r_0 */
60         double Amixed;          /* mixed A factor */
61         double Bmixed;          /* mixed B factor */
62         double r0_mixed;        /* mixed r_0 */
63         double lambda[2];       /* albe lambda */
64         double lambda_m;        /* mixed lambda */
65         double mu[2];           /* albe mu */
66         double mu_m;            /* mixed mu */
67
68         double gamma[2];
69         double gamma_m;
70         double c[2];
71         double c2[2];
72         double c_mixed;
73         double c2_m;
74         double d[2];
75         double d2[2];
76         double d_mixed;
77         double d2_m;
78         double h[2];
79         double h_mixed;
80         double c2d2[2];
81         double c2d2_m;
82
83         t_albe_orig_exchange exchange;  /* exchange between 2bp and 3bp calc */
84 } t_albe_orig_mult_params;
85
86 /* function prototypes */
87 int albe_orig_mult_set_params(t_moldyn *moldyn,int element1,int elemnt2);
88 int albe_orig_mult_3bp_j1(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
89 int albe_orig_mult_3bp_k1(t_moldyn *moldyn,
90                           t_atom *ai,t_atom *aj,t_atom *ak,u8 bc);
91 int albe_orig_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
92 int albe_orig_mult_3bp_k2(t_moldyn *moldyn,
93                           t_atom *ai,t_atom *aj,t_atom *ak,u8 bc);
94 int albe_orig_mult_check_2b_bond(t_moldyn *moldyn,
95                                  t_atom *itom,t_atom *jtom,u8 bc);
96
97 /* albe potential parameter defines */
98 // -> albe.h
99
100 #endif