1 #include <unittest++/UnitTest++.h>
18 TEST(GaussianOverlapIntegralTest) {
26 integrator.
set(posA, posB, primitiveA, primitiveB);
28 CHECK_CLOSE(integrator.
overlapIntegral(0,0,0,0,0,0), 0.119172363580852, 0.00001);
29 CHECK_CLOSE(integrator.
overlapIntegral(0,0,0,0,0,1), 0.276479883507577, 0.00001);
30 CHECK_CLOSE(integrator.
overlapIntegral(0,0,0,0,0,2), 0.760605693318432, 0.00001);
31 CHECK_CLOSE(integrator.
overlapIntegral(0,0,0,0,1,0), 0.0429020508891068, 0.00001);
32 CHECK_CLOSE(integrator.
overlapIntegral(0,0,0,0,1,1), 0.0995327580627279, 0.00001);
44 integrator.
set(posA, posB, primitiveA, primitiveB);
46 CHECK_CLOSE(2.979309089521e-01, integrator.
overlapIntegral(2,0,0,2,0,0), 1e-7);
47 CHECK_CLOSE(1.072551272228e-02, integrator.
overlapIntegral(2,0,0,1,1,0), 1e-7);
48 CHECK_CLOSE(6.911997087690e-02, integrator.
overlapIntegral(2,0,0,1,0,1), 1e-7);
60 integrator.
set(posA, posB, primitiveA, primitiveB);
62 CHECK_CLOSE(-3.468392469657e-01, integrator.
kineticIntegral(2,0,0,2,0,0), 1e-7);
63 CHECK_CLOSE(-3.562586305833e-03, integrator.
kineticIntegral(2,0,0,1,1,0), 1e-7);
64 CHECK_CLOSE(-2.295888952647e-02, integrator.
kineticIntegral(2,0,0,1,0,1), 1e-7);
65 CHECK_CLOSE(2.514020826620e-01, integrator.
kineticIntegral(0,0,1,0,0,1), 1e-7);
77 integrator.
set(posA, posB, primitiveA, primitiveB);
79 CHECK_CLOSE(-3.468392469657e-01, integrator.
kineticIntegral(2,0,0,2,0,0), 1e-7);
82 TEST(GaussianKineticIntegralTest) {
91 integrator.
set(posA, posB, primitiveA, primitiveB);
93 CHECK_CLOSE(-0.0967870268058250, integrator.
kineticIntegral(0,0,0,0,0,0), 0.00001);
94 CHECK_CLOSE(-0.158190730147696, integrator.
kineticIntegral(0,0,0,0,0,1), 0.00001);
95 CHECK_CLOSE(-0.0245468374367114, integrator.
kineticIntegral(0,0,0,0,1,0), 0.00001);
96 CHECK_CLOSE(-0.0330608009181156, integrator.
kineticIntegral(0,0,0,0,1,1), 0.00001);
97 CHECK_CLOSE(-0.0681856595464203, integrator.
kineticIntegral(0,0,0,1,0,0), 0.00001);
98 CHECK_CLOSE(-0.0918355581058773, integrator.
kineticIntegral(0,0,0,1,0,1), 0.00001);
99 CHECK_CLOSE(-0.0142503452233260, integrator.
kineticIntegral(0,0,0,1,1,0), 0.00001);
100 CHECK_CLOSE(-0.00917293898306074, integrator.
kineticIntegral(0,0,0,1,1,1), 0.00001);
101 CHECK_CLOSE(0.251402082662018, integrator.
kineticIntegral(0,0,1,0,0,1), 0.00001);
102 CHECK_CLOSE(0.0495912013771734, integrator.
kineticIntegral(0,0,1,0,1,0), 0.00001);
103 CHECK_CLOSE(0.0176714824377215, integrator.
kineticIntegral(0,0,1,0,1,1), 0.00001);
104 CHECK_CLOSE(0.137753337158815, integrator.
kineticIntegral(0,0,1,1,0,0), 0.00001);
105 CHECK_CLOSE(0.0490874512158928, integrator.
kineticIntegral(0,0,1,1,0,1), 0.00001);
106 CHECK_CLOSE(0.0137594084745900, integrator.
kineticIntegral(0,0,1,1,1,0), 0.00001);
107 CHECK_CLOSE(-0.0551617848828804, integrator.
kineticIntegral(0,0,1,1,1,1), 0.00001);
108 CHECK_CLOSE(-0.0604904731258242, integrator.
kineticIntegral(0,1,0,0,1,0), 0.00001);
109 CHECK_CLOSE(-0.0868821710550227, integrator.
kineticIntegral(0,1,0,0,1,1), 0.00001);
110 CHECK_CLOSE(0.0213755178349884, integrator.
kineticIntegral(0,1,0,1,0,0), 0.00001);
111 CHECK_CLOSE(0.0137594084745909, integrator.
kineticIntegral(0,1,0,1,0,1), 0.00001);
112 CHECK_CLOSE(-0.0374492116616455, integrator.
kineticIntegral(0,1,0,1,1,0), 0.00001);
113 CHECK_CLOSE(-0.0334264444581330, integrator.
kineticIntegral(0,1,0,1,1,1), 0.00001);
114 CHECK_CLOSE(0.0788748150526478, integrator.
kineticIntegral(0,1,1,0,1,1), 0.00001);
115 CHECK_CLOSE(-0.0206391127118871, integrator.
kineticIntegral(0,1,1,1,0,0), 0.00001);
116 CHECK_CLOSE(0.0827426773243232, integrator.
kineticIntegral(0,1,1,1,0,1), 0.00001);
119 TEST(GaussianColoumbAttractionIntegralTest) {
121 Vector3 posB = {-1.3,1.4,-2.4};
122 Vector3 posC = {2.3, 0.9, 3.2};
129 integrator.
set(posA, posB, posC, primitiveA, primitiveB);
232 TEST(GaussianElectronInteractionIntegralTest1) {
248 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);
250 CHECK_CLOSE(0.0071666040410096028615, integrator.
electronInteractionIntegral(primitiveA, primitiveB, primitiveC, primitiveD), 1e-9);
253 TEST(GaussianElectronInteractionIntegralTest2) {
269 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);
271 CHECK_CLOSE(0.022124581472837051566, integrator.
electronInteractionIntegral(primitiveA, primitiveB, primitiveC, primitiveD), 1e-9);
274 TEST(GaussianElectronInteractionIntegralTest3) {
290 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);
295 TEST(GaussianElectronInteractionIntegralTest4) {
311 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);
313 CHECK_CLOSE(-6.8145328932903484228e-08, integrator.
electronInteractionIntegral(primitiveA, primitiveB, primitiveC, primitiveD), 1e-9);
317 TEST(GaussianElectronInteractionIntegralTest5)
321 Vector3 posB = {-1.3,1.4,-2.4};
332 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);
338 TEST(GaussianElectronInteractionIntegralTest6)
342 Vector3 posB = {-1.3,1.4,-2.4};
353 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);
359 TEST(GaussianElectronInteractionIntegralTest7)
363 Vector3 posB = {-1.3,1.4,-2.4};
374 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);
380 TEST(GaussianElectronInteractionIntegralTest8)
384 Vector3 posB = {-1.3,1.4,-2.4};
395 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);
401 TEST(GaussianElectronInteractionIntegralTest9)
405 Vector3 posB = {-1.3,1.4,-2.4};
416 integrator.
set(posA, posB, posC, posD, primitiveA, primitiveB, primitiveC, primitiveD);