QNANO
Slater_Koster.h
1 #ifndef QNANO_NEW_SLATERKOSTER_DEFINED_H_
2 #define QNANO_NEW_SLATERKOSTER_DEFINED_H_
3 
4 #include <cmath>
5 
6 
8 public:
9  inline static double s_s(double L, double M, double N, double t_ss){
10  return t_ss;
11  }
12  inline static double s_px(double L, double M, double N, double t_sp){
13  return L*t_sp;
14  }
15  inline static double s_py(double L, double M, double N, double t_sp){
16  return M*t_sp;
17  }
18  inline static double s_pz(double L, double M, double N, double t_sp){
19  return N*t_sp;
20  }
21  inline static double px_s(double L, double M, double N, double t_ps){
22  return -L*t_ps;
23  }
24  inline static double py_s(double L, double M, double N, double t_ps){
25  return -M*t_ps;
26  }
27  inline static double pz_s(double L, double M, double N, double t_ps){
28  return -N*t_ps;
29  }
30  inline static double px_px(double L, double M, double N, double sigma, double pi){
31  return L*L*sigma+(1.-L*L)*pi;
32  }
33  inline static double py_py(double L, double M, double N, double sigma, double pi){
34  return M*M*sigma+(1.-M*M)*pi;
35  }
36  inline static double pz_pz(double L, double M, double N, double sigma, double pi){
37  return N*N*sigma+(1.-N*N)*pi;
38  }
39  inline static double px_py(double L, double M, double N, double sigma, double pi){
40  return L*M*(sigma-pi);
41  }
42  inline static double py_px(double L, double M, double N, double sigma, double pi){
43  return L*M*(sigma-pi);
44  }
45  inline static double px_pz(double L, double M, double N, double sigma, double pi){
46  return L*N*(sigma-pi);
47  }
48  inline static double pz_px(double L, double M, double N, double sigma, double pi){
49  return L*N*(sigma-pi);
50  }
51  inline static double py_pz(double L, double M, double N, double sigma, double pi){
52  return M*N*(sigma-pi);
53  }
54  inline static double pz_py(double L, double M, double N, double sigma, double pi){
55  return M*N*(sigma-pi);
56  }
57  inline static double sstar_sstar(double L, double M, double N, double sigma){
58  return sigma;
59  }
60  inline static double s_sstar(double L, double M, double N, double sigma){
61  return sigma;
62  }
63  inline static double sstar_s(double L, double M, double N, double sigma){
64  return sigma;
65  }
66  inline static double sstar_px(double L, double M, double N, double sigma){
67  return L*sigma;
68  }
69  inline static double sstar_py(double L, double M, double N, double sigma){
70  return M*sigma;
71  }
72  inline static double sstar_pz(double L, double M, double N, double sigma){
73  return N*sigma;
74  }
75  inline static double px_sstar(double L, double M, double N, double sigma){
76  return -L*sigma;
77  }
78  inline static double py_sstar(double L, double M, double N, double sigma){
79  return -M*sigma;
80  }
81  inline static double pz_sstar(double L, double M, double N, double sigma){
82  return -N*sigma;
83  }
84 
85  inline static double s_dxy(double L, double M, double N, double sigma){
86  return sqrt(3.)*L*M*sigma;
87  }
88  inline static double dxy_s(double L, double M, double N, double sigma){
89  return sqrt(3.)*L*M*sigma;
90  }
91  inline static double s_dyz(double L, double M, double N, double sigma){
92  return sqrt(3.)*N*M*sigma;
93  }
94  inline static double dyz_s(double L, double M, double N, double sigma){
95  return sqrt(3.)*N*M*sigma;
96  }
97  inline static double s_dxz(double L, double M, double N, double sigma){
98  return sqrt(3.)*N*L*sigma;
99  }
100  inline static double dxz_s(double L, double M, double N, double sigma){
101  return sqrt(3.)*N*L*sigma;
102  }
103  inline static double s_dx2y2(double L, double M, double N, double sigma){
104  return sqrt(3.)/2.*(L*L-M*M)*sigma;
105  }
106  inline static double dx2y2_s(double L, double M, double N, double sigma){
107  return sqrt(3.)/2.*(L*L-M*M)*sigma;
108  }
109  inline static double s_dz2(double L, double M, double N, double sigma){
110  return 0.5*(3.*N*N-1.)*sigma;
111  }
112  inline static double dz2_s(double L, double M, double N, double sigma){
113  return 0.5*(3.*N*N-1.)*sigma;
114  }
115 
116  inline static double sstar_dxy(double L, double M, double N, double sigma){
117  return sqrt(3.)*L*M*sigma;
118  }
119  inline static double dxy_sstar(double L, double M, double N, double sigma){
120  return sqrt(3.)*L*M*sigma;
121  }
122  inline static double sstar_dyz(double L, double M, double N, double sigma){
123  return sqrt(3.)*N*M*sigma;
124  }
125  inline static double dyz_sstar(double L, double M, double N, double sigma){
126  return sqrt(3.)*N*M*sigma;
127  }
128  inline static double sstar_dxz(double L, double M, double N, double sigma){
129  return sqrt(3.)*N*L*sigma;
130  }
131  inline static double dxz_sstar(double L, double M, double N, double sigma){
132  return sqrt(3.)*N*L*sigma;
133  }
134  inline static double sstar_dx2y2(double L, double M, double N, double sigma){
135  return sqrt(3.)/2.*(L*L-M*M)*sigma;
136  }
137  inline static double dx2y2_sstar(double L, double M, double N, double sigma){
138  return sqrt(3.)/2.*(L*L-M*M)*sigma;
139  }
140  inline static double sstar_dz2(double L, double M, double N, double sigma){
141  return 0.5*(3.*N*N-1.)*sigma;
142  }
143  inline static double dz2_sstar(double L, double M, double N, double sigma){
144  return 0.5*(3.*N*N-1.)*sigma;
145  }
146 
147  inline static double px_dxy(double L, double M, double N, double sigma, double pi){
148  return M*(L*L*(sqrt(3.)*sigma-2.*pi) + pi);
149  }
150  inline static double dxy_px(double L, double M, double N, double sigma, double pi){
151  return -M*(L*L*(sqrt(3.)*sigma-2.*pi) + pi);
152  }
153  inline static double px_dyz(double L, double M, double N, double sigma, double pi){
154  return L*M*N*(sqrt(3.)*sigma-2.*pi);
155  }
156  inline static double dyz_px(double L, double M, double N, double sigma, double pi){
157  return -L*M*N*(sqrt(3.)*sigma-2.*pi);
158  }
159  inline static double px_dxz(double L, double M, double N, double sigma, double pi){
160  return N*(L*L*(sqrt(3.)*sigma-2.*pi) + pi);
161  }
162  inline static double dxz_px(double L, double M, double N, double sigma, double pi){
163  return -N*(L*L*(sqrt(3.)*sigma-2.*pi) + pi);
164  }
165  inline static double px_dx2y2(double L, double M, double N, double sigma, double pi){
166  return 0.5*L*(sqrt(3.)*(L*L-M*M)*sigma+2.*(2.*M*M+N*N)*pi);
167  }
168  inline static double dx2y2_px(double L, double M, double N, double sigma, double pi){
169  return -0.5*L*(sqrt(3.)*(L*L-M*M)*sigma+2.*(2.*M*M+N*N)*pi);
170  }
171  inline static double px_dz2(double L, double M, double N, double sigma, double pi){
172  return 0.5*L*( (3.*N*N-1.)*sigma-2.*sqrt(3.)*N*N*pi);
173  }
174  inline static double dz2_px(double L, double M, double N, double sigma, double pi){
175  return -0.5*L*( (3.*N*N-1.)*sigma-2.*sqrt(3.)*N*N*pi);
176  }
177 
178 
179  inline static double py_dxy(double L, double M, double N, double sigma, double pi){
180  return L*(M*M*(sqrt(3.)*sigma-2.*pi) + pi);
181  }
182  inline static double dxy_py(double L, double M, double N, double sigma, double pi){
183  return -L*(M*M*(sqrt(3.)*sigma-2.*pi) + pi);
184  }
185  inline static double py_dyz(double L, double M, double N, double sigma, double pi){
186  return N*(M*M*(sqrt(3.)*sigma-2.*pi) + pi);
187  }
188  inline static double dyz_py(double L, double M, double N, double sigma, double pi){
189  return -N*(M*M*(sqrt(3.)*sigma-2.*pi) + pi);
190  }
191  inline static double py_dxz(double L, double M, double N, double sigma, double pi){
192  return L*M*N*(sqrt(3.)*sigma-2.*pi);
193  }
194  inline static double dxz_py(double L, double M, double N, double sigma, double pi){
195  return -L*M*N*(sqrt(3.)*sigma-2.*pi);
196  }
197  inline static double py_dx2y2(double L, double M, double N, double sigma, double pi){
198 // return 0.5*M*(sqrt(3.)*(L*L-M*M)*sigma+2.*(2.*L*L+N*N)*pi);
199  return 0.5*M*(sqrt(3.)*(L*L-M*M)*sigma-2.*(2.*L*L+N*N)*pi);
200  }
201  inline static double dx2y2_py(double L, double M, double N, double sigma, double pi){
202 // return -0.5*M*(sqrt(3.)*(L*L-M*M)*sigma+2.*(2.*L*L+N*N)*pi);
203  return -0.5*M*(sqrt(3.)*(L*L-M*M)*sigma-2.*(2.*L*L+N*N)*pi);
204  }
205  inline static double py_dz2(double L, double M, double N, double sigma, double pi){
206  return 0.5*M*( (3.*N*N-1.)*sigma-2.*sqrt(3.)*N*N*pi);
207  }
208  inline static double dz2_py(double L, double M, double N, double sigma, double pi){
209  return -0.5*M*( (3.*N*N-1.)*sigma-2.*sqrt(3.)*N*N*pi);
210  }
211 
212  inline static double pz_dxy(double L, double M, double N, double sigma, double pi){
213  return L*M*N*(sqrt(3.)*sigma-2.*pi);
214  }
215  inline static double dxy_pz(double L, double M, double N, double sigma, double pi){
216  return -L*M*N*(sqrt(3.)*sigma-2.*pi);
217  }
218  inline static double pz_dyz(double L, double M, double N, double sigma, double pi){
219  return M*(N*N*(sqrt(3.)*sigma-2.*pi)+pi);
220  }
221  inline static double dyz_pz(double L, double M, double N, double sigma, double pi){
222  return -M*(N*N*(sqrt(3.)*sigma-2.*pi)+pi);
223  }
224  inline static double pz_dxz(double L, double M, double N, double sigma, double pi){
225  return L*(N*N*(sqrt(3.)*sigma-2.*pi)+pi);
226  }
227  inline static double dxz_pz(double L, double M, double N, double sigma, double pi){
228  return -L*(N*N*(sqrt(3.)*sigma-2.*pi)+pi);
229  }
230  inline static double pz_dx2y2(double L, double M, double N, double sigma, double pi){
231  return 0.5*N*(L*L-M*M)*(sqrt(3.)*sigma-2.*pi);
232  }
233  inline static double dx2y2_pz(double L, double M, double N, double sigma, double pi){
234  return -0.5*N*(L*L-M*M)*(sqrt(3.)*sigma-2.*pi);
235  }
236  inline static double pz_dz2(double L, double M, double N, double sigma, double pi){
237  return 0.5*N*( (3.*N*N-1.)*sigma-2.*sqrt(3.)*(N*N-1.)*pi);
238  }
239  inline static double dz2_pz(double L, double M, double N, double sigma, double pi){
240  return -0.5*N*( (3.*N*N-1.)*sigma-2.*sqrt(3.)*(N*N-1.)*pi);
241  }
242 
243 
244  inline static double dxy_dxy(double L, double M, double N, double sigma, double pi, double delta){
245  return 3.*L*L*M*M*sigma+(L*L+M*M-4*L*L*M*M)*pi+(N*N+L*L*M*M)*delta;
246  }
247  inline static double dyz_dyz(double L, double M, double N, double sigma, double pi, double delta){
248  return 3.*N*N*M*M*sigma+(N*N+M*M-4.*N*N*M*M)*pi+(L*L+N*N*M*M)*delta;
249  }
250  inline static double dxz_dxz(double L, double M, double N, double sigma, double pi, double delta){
251  return 3.*N*N*L*L*sigma+(N*N+L*L-4.*N*N*L*L)*pi+(M*M+N*N*L*L)*delta;
252  }
253  inline static double dx2y2_dx2y2(double L, double M, double N, double sigma, double pi, double delta){
254  return 0.75*(L*L-M*M)*(L*L-M*M)*sigma+(L*L+M*M-(L*L-M*M)*(L*L-M*M))*pi+(0.25*(L*L-M*M)*(L*L-M*M)+N*N)*delta;
255  }
256  inline static double dz2_dz2(double L, double M, double N, double sigma, double pi, double delta){
257  return (0.5*L*L+0.5*M*M-N*N)*(0.5*L*L+0.5*M*M-N*N)*sigma+3.*N*N*(1.-N*N)*pi+0.75*(N*N-1)*(N*N-1)*delta;
258  }
259 
260 
261  inline static double dxy_dyz(double L, double M, double N, double sigma, double pi, double delta){
262  return L*N*( 3.*M*M*sigma+(1.-4.*M*M)*pi+(M*M-1.)*delta);
263  }
264  inline static double dyz_dxy(double L, double M, double N, double sigma, double pi, double delta){
265  return L*N*( 3.*M*M*sigma+(1.-4.*M*M)*pi+(M*M-1.)*delta);
266  }
267  inline static double dxy_dz2(double L, double M, double N, double sigma, double pi, double delta){
268  return sqrt(3.)/2.*L*M*( (3.*N*N-1.)*sigma-4.*N*N*pi+(1+N*N)*delta);
269  }
270  inline static double dz2_dxy(double L, double M, double N, double sigma, double pi, double delta){
271  return sqrt(3.)/2.*L*M*( (3.*N*N-1.)*sigma-4.*N*N*pi+(1+N*N)*delta);
272  }
273  inline static double dxy_dxz(double L, double M, double N, double sigma, double pi, double delta){
274  return M*N*(3.*L*L*sigma+(1.-4.*L*L)*pi+(L*L-1.)*delta);
275  }
276  inline static double dxz_dxy(double L, double M, double N, double sigma, double pi, double delta){
277  return M*N*(3.*L*L*sigma+(1.-4.*L*L)*pi+(L*L-1.)*delta);
278  }
279  inline static double dxy_dx2y2(double L, double M, double N, double sigma, double pi, double delta){
280  return 0.5*L*M*(L*L-M*M)*(3.*sigma-4.*pi+delta);
281  }
282  inline static double dx2y2_dxy(double L, double M, double N, double sigma, double pi, double delta){
283  return 0.5*L*M*(L*L-M*M)*(3.*sigma-4.*pi+delta);
284  }
285 
286  inline static double dyz_dz2(double L, double M, double N, double sigma, double pi, double delta){
287  return sqrt(3.)/2.*M*N*( (3.*N*N-1.)*sigma+(2.-4.*N*N)*pi+(N*N-1.)*delta);
288  }
289  inline static double dz2_dyz(double L, double M, double N, double sigma, double pi, double delta){
290  return sqrt(3.)/2.*M*N*( (3.*N*N-1.)*sigma+(2.-4.*N*N)*pi+(N*N-1.)*delta);
291  }
292  inline static double dyz_dxz(double L, double M, double N, double sigma, double pi, double delta){
293  return L*M*(3.*N*N*sigma+(1.-4.*N*N)*pi+(N*N-1.)*delta);
294  }
295  inline static double dxz_dyz(double L, double M, double N, double sigma, double pi, double delta){
296  return L*M*(3.*N*N*sigma+(1.-4.*N*N)*pi+(N*N-1.)*delta);
297  }
298  inline static double dyz_dx2y2(double L, double M, double N, double sigma, double pi, double delta){
299  return M*N/2.*(3.*(L*L-M*M)*sigma-(4.*(L*L-M*M)+2.)*pi+(L*L-M*M+2)*delta);
300  }
301  inline static double dx2y2_dyz(double L, double M, double N, double sigma, double pi, double delta){
302  return M*N/2.*(3.*(L*L-M*M)*sigma-(4.*(L*L-M*M)+2.)*pi+(L*L-M*M+2)*delta);
303  }
304  inline static double dz2_dxz(double L, double M, double N, double sigma, double pi, double delta){
305  return sqrt(3.)/2.*L*N*( (3.*N*N-1.)*sigma+(2.-4.*N*N)*pi+(N*N-1.)*delta);
306  }
307  inline static double dxz_dz2(double L, double M, double N, double sigma, double pi, double delta){
308  return sqrt(3.)/2.*L*N*( (3.*N*N-1.)*sigma+(2.-4.*N*N)*pi+(N*N-1.)*delta);
309  }
310  inline static double dz2_dx2y2(double L, double M, double N, double sigma, double pi, double delta){
311  return sqrt(3.)/4.*(L*L-M*M)*( (3.*N*N-1.)*sigma-4.*N*N*pi+(1.+N*N)*delta);
312  }
313  inline static double dx2y2_dz2(double L, double M, double N, double sigma, double pi, double delta){
314  return sqrt(3.)/4.*(L*L-M*M)*( (3.*N*N-1.)*sigma-4.*N*N*pi+(1.+N*N)*delta);
315  }
316  inline static double dxz_dx2y2(double L, double M, double N, double sigma, double pi, double delta){
317  return L*N/2.*(3.*(L*L-M*M)*sigma+(2.-4.*(L*L-M*M))*pi+(L*L-M*M-2.)*delta);
318  }
319  inline static double dx2y2_dxz(double L, double M, double N, double sigma, double pi, double delta){
320  return L*N/2.*(3.*(L*L-M*M)*sigma+(2.-4.*(L*L-M*M))*pi+(L*L-M*M-2.)*delta);
321  }
322 };
323 
324 
325 #endif
Definition: Slater_Koster.h:7