@@ -76,48 +76,42 @@ def test_integral(basis, atsyms, atcoords, coord_type, integral):
7676
7777 basis_dict = parse_nwchem (find_datafile (basis ))
7878
79- atsyms = ["H" , "He" ]
80-
81- atcoords = np .array ([[0. , 0. , 0. ], [0.8 , 0. , 0. ]]) / 0.5291772083
82-
83- gbasis = make_contractions (basis_dict , atsyms , atcoords )
84- gbasis_olp = overlap_integral (gbasis , coord_type = "cartesian" )
85- py_basis = make_contractions (basis_dict , atsyms , atcoords )
79+ py_basis = make_contractions (basis_dict , atsyms , atcoords , coord_types = coord_type )
8680
8781 lc_basis = CBasis (py_basis , atsyms , atcoords , coord_type = coord_type )
8882
8983 if integral == "overlap" :
90- py_int = overlap_integral (py_basis , coord_type = coord_type )
84+ py_int = overlap_integral (py_basis )
9185 npt .assert_array_equal (py_int .shape , (lc_basis .nbfn , lc_basis .nbfn ))
9286 lc_int = lc_basis .overlap ()
9387 npt .assert_array_equal (lc_int .shape , (lc_basis .nbfn , lc_basis .nbfn ))
9488
9589 elif integral == "kinetic_energy" :
96- py_int = kinetic_energy_integral (py_basis , coord_type = coord_type )
90+ py_int = kinetic_energy_integral (py_basis )
9791 npt .assert_array_equal (py_int .shape , (lc_basis .nbfn , lc_basis .nbfn ))
9892 lc_int = lc_basis .kinetic_energy ()
9993 npt .assert_array_equal (lc_int .shape , (lc_basis .nbfn , lc_basis .nbfn ))
10094
10195 elif integral == "nuclear_attraction" :
102- py_int = nuclear_electron_attraction_integral (py_basis , atcoords , atnums , coord_type = coord_type )
96+ py_int = nuclear_electron_attraction_integral (py_basis , atcoords , atnums )
10397 npt .assert_array_equal (py_int .shape , (lc_basis .nbfn , lc_basis .nbfn ))
10498 lc_int = lc_basis .nuclear_attraction ()
10599 npt .assert_array_equal (lc_int .shape , (lc_basis .nbfn , lc_basis .nbfn ))
106100
107101 elif integral == "angular_momentum" :
108- py_int = angular_momentum_integral (py_basis , coord_type = coord_type )
102+ py_int = angular_momentum_integral (py_basis )
109103 npt .assert_array_equal (py_int .shape , (lc_basis .nbfn , lc_basis .nbfn , 3 ))
110104 lc_int = lc_basis .angular_momentum (origin = np .zeros (3 ))
111105 npt .assert_array_equal (lc_int .shape , (lc_basis .nbfn , lc_basis .nbfn , 3 ))
112106
113107 elif integral == "momentum" :
114- py_int = momentum_integral (py_basis , coord_type = coord_type )
108+ py_int = momentum_integral (py_basis )
115109 npt .assert_array_equal (py_int .shape , (lc_basis .nbfn , lc_basis .nbfn , 3 ))
116110 lc_int = lc_basis .momentum (origin = np .zeros (3 ))
117111 npt .assert_array_equal (lc_int .shape , (lc_basis .nbfn , lc_basis .nbfn , 3 ))
118112
119113 elif integral == "electron_repulsion" :
120- py_int = electron_repulsion_integral (py_basis , coord_type = coord_type )
114+ py_int = electron_repulsion_integral (py_basis )
121115 npt .assert_array_equal (py_int .shape , (lc_basis .nbfn , lc_basis .nbfn , lc_basis .nbfn , lc_basis .nbfn ))
122116 lc_int = lc_basis .electron_repulsion ()
123117 npt .assert_array_equal (lc_int .shape , (lc_basis .nbfn , lc_basis .nbfn , lc_basis .nbfn , lc_basis .nbfn ))
@@ -126,7 +120,7 @@ def test_integral(basis, atsyms, atcoords, coord_type, integral):
126120 charge_coords = np .asarray ([[2. , 2. , 2. ], [- 3. , - 3. , - 3. ], [- 1. , 2. , - 3. ]])
127121 charges = np .asarray ([1. , 0.666 , - 3.1415926 ])
128122 for i in range (1 , len (charges ) + 1 ):
129- py_int = point_charge_integral (py_basis , charge_coords [:i ], charges [:i ], coord_type = coord_type )
123+ py_int = point_charge_integral (py_basis , charge_coords [:i ], charges [:i ])
130124 npt .assert_array_equal (py_int .shape , (lc_basis .nbfn , lc_basis .nbfn , i ))
131125 lc_int = lc_basis .point_charge (charge_coords [:i ], charges [:i ])
132126 npt .assert_array_equal (lc_int .shape , (lc_basis .nbfn , lc_basis .nbfn , i ))
@@ -143,7 +137,7 @@ def test_integral(basis, atsyms, atcoords, coord_type, integral):
143137 [1 , 1 , 0 ],
144138 [1 , 0 , 1 ],
145139 [0 , 1 , 1 ]])
146- py_int = moment_integral (py_basis , origin , orders , coord_type = coord_type )
140+ py_int = moment_integral (py_basis , origin , orders )
147141 npt .assert_array_equal (py_int .shape , (lc_basis .nbfn , lc_basis .nbfn , len (orders )))
148142 lc_int = lc_basis .moment (orders , origin = origin )
149143 npt .assert_array_equal (lc_int .shape , (lc_basis .nbfn , lc_basis .nbfn , len (orders )))
0 commit comments