@@ -241,17 +241,23 @@ def build(
241241 occupied_indices = [* range (0 , self .n_frozen_core )]
242242 else :
243243 occupied_indices = []
244-
245- active_indices = [* range (one_body_integrals .shape [0 ])]
244+ logger . debug ( f" { occupied_indices = } " )
245+ active_indices = [* range (one_body_integrals .shape [- 1 ])]
246246 if self .n_frozen_virt != 0 :
247247 active_indices = active_indices [: - self .n_frozen_virt ]
248+ logger .debug (f"{ active_indices = } " )
248249
250+ logger .debug (f"{ one_body_integrals .shape = } " )
251+ logger .debug (f"{ two_body_integrals .shape = } " )
249252 core_const , one_body_integrals , two_body_integrals = get_active_space_integrals (
250253 one_body_integrals ,
251254 two_body_integrals ,
252255 occupied_indices = occupied_indices ,
253256 active_indices = active_indices ,
254257 )
258+ logger .debug (f"{ one_body_integrals .shape = } " )
259+ logger .debug (f"{ two_body_integrals .shape = } " )
260+
255261 self .constant_e_shift += core_const
256262
257263 one_body_coefficients , two_body_coefficients = self ._spinorb_from_spatial (
@@ -356,8 +362,14 @@ def get_active_space_integrals(
356362 # Restrict integral ranges and change M appropriately
357363 return (
358364 core_constant ,
359- one_body_integrals_new [np .ix_ (active_indices , active_indices )],
365+ one_body_integrals_new [np .ix_ ([ 0 , 1 ], active_indices , active_indices )],
360366 two_body_integrals [
361- np .ix_ (active_indices , active_indices , active_indices , active_indices )
367+ np .ix_ (
368+ [0 , 1 , 2 , 3 ],
369+ active_indices ,
370+ active_indices ,
371+ active_indices ,
372+ active_indices ,
373+ )
362374 ],
363375 )
0 commit comments