コード例 #1
0
 def test_del_operate_on_gaussian_returns_s_orbital_2(self):
     primitive_gaussian = PrimitiveBasis(0.15432897, 3.42525091,
                                         (0, 0, 0.7316), (0, 0, 0))
     array = del_operator(primitive_gaussian)
     testing.assert_approx_equal(array[1].contraction, -23.46468759, 7)
     self.assertEquals(array[1].exponent, 3.42525091)
     self.assertEquals(array[1].integral_exponents, (2, 0, 0))
     self.assertEquals(array[1].coordinates, (0, 0, 0.7316))
コード例 #2
0
 def calculate(self, i, j):
     t_ij = 0
     primitives_i = self.basis_set_array[i].primitive_gaussian_array
     primitives_j = self.basis_set_array[j].primitive_gaussian_array
     for primitive_a, primitive_b in itertools.product(primitives_i, primitives_j):
         c_1 = primitive_a.contraction
         c_2 = primitive_b.contraction
         n_1 = primitive_a.normalisation
         n_2 = primitive_b.normalisation
         primitives_k = del_operator(primitive_b)
         s_ij = 0
         for primitive_c in primitives_k:
             c_3 = primitive_c.contraction
             s_ij += n_1 * n_2 * c_1 * c_2 * c_3 * orbital_overlap(primitive_a, primitive_c)
         t_ij += s_ij
     return t_ij
コード例 #3
0
 def test_del_operate_on_s_gaussian_returns_four_gaussians(self):
     primitive_gaussian = PrimitiveBasis(0.15432897, 3.42525091,
                                         (0, 0, 0.7316), (0, 0, 0))
     array = del_operator(primitive_gaussian)
     self.assertEquals(len(array), 4)