albe force calc bug fixed, sic mods, mean virial
[physik/posic.git] / potentials / albe.h
1 /*
2  * albe.h - albe potential header file
3  *
4  * author: Frank Zirkelbach <frank.zirkelbach@physik.uni-augsburg.de>
5  *
6  */
7
8 #ifndef ALBE_H
9 #define ALBE_H
10
11 #define ALBE_MAXN       16*27
12
13 /* albe exchange type */
14 typedef struct s_albe_exchange {
15
16         t_3dvec dist_ij;
17         double d_ij2;
18         double d_ij;
19
20         t_3dvec dist_ik[ALBE_MAXN];
21         double d_ik2[ALBE_MAXN];
22         double d_ik[ALBE_MAXN];
23
24         double f_c_ik[ALBE_MAXN];
25         double df_c_ik[ALBE_MAXN];
26
27         double g[ALBE_MAXN];
28         double dg[ALBE_MAXN];
29         double cos_theta[ALBE_MAXN];
30
31         double *gamma_i;
32         double *c_i;
33         double *d_i;
34         double *h_i;
35
36         double ci2;
37         double di2;
38         double ci2di2;
39
40         double zeta_ij;
41         double pre_dzeta;
42
43         int kcount;
44 } t_albe_exchange;
45
46 /* albe mult (2!) potential parameters */
47 typedef struct s_albe_mult_params {
48         double S[2];            /* albe cutoff radii */
49         double S2[2];           /* albe cutoff radii squared */
50         double R[2];            /* albe cutoff radii */
51         double Smixed;          /* mixed S radius */
52         double S2mixed;         /* mixed S radius squared */
53         double Rmixed;          /* mixed R radius */
54         double A[2];            /* factor of albe attractive part */
55         double B[2];            /* factor of albe repulsive part */
56         double r0[2];           /* r_0 */
57         double Amixed;          /* mixed A factor */
58         double Bmixed;          /* mixed B factor */
59         double r0_mixed;        /* mixed r_0 */
60         double lambda[2];       /* albe lambda */
61         double lambda_m;        /* mixed lambda */
62         double mu[2];           /* albe mu */
63         double mu_m;            /* mixed mu */
64
65         double gamma[2];
66         double gamma_m;
67         double c[2];
68         double c_mixed;
69         double d[2];
70         double d_mixed;
71         double h[2];
72         double h_mixed;
73
74         t_albe_exchange exchange;       /* exchange between 2bp and 3bp calc */
75 } t_albe_mult_params;
76
77 /* function prototypes */
78 int albe_mult_complete_params(t_albe_mult_params *p);
79 int albe_mult_3bp_j1(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
80 int albe_mult_3bp_k1(t_moldyn *moldyn,
81                         t_atom *ai,t_atom *aj,t_atom *ak,u8 bc);
82 int albe_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
83 int albe_mult_3bp_k2(t_moldyn *moldyn,
84                         t_atom *ai,t_atom *aj,t_atom *ak,u8 bc);
85
86 #endif