@@ -179,43 +179,9 @@ def __init__(self, active_space_solver, state_weights_map, mo_space_info, ints,
179179 self .mo_space_info , self .ints , self .scf_info , inactive_mix , active_mix , semi_threshold
180180 )
181181
182- def write_to_fcidump (self ):
183- "Writes integrals to FCIDUMP in PYSCF format"
184-
185- if not os .path .exists ('INTDUMP' ):
186-
187- mos = self .mo_space_info .corr_absolute_mo ("CORRELATED" )
188- nmo = len (mos )
189- a = self .ints .oei_a_block (mos ,mos )
190- ab = self .ints .tei_ab_block (mos ,mos ,mos ,mos )
191- tol = 1.0e-15
192- fcidump_string = f"""&FCI NORB={ nmo } ,NELEC={ 12 } ,UHF=.FALSE.,ORBSYM={ "1," * (nmo )} MS2={ 0 } ,ISYM=1
193- &END
194- """
195- print ("...writing integrals to INTDUMP" )
196- #transform to chemist notation
197- for i in range (nmo ):
198- for j in range (0 , i + 1 ):
199- for k in range (0 , nmo ):
200- for l in range (0 , k + 1 ):
201- if abs (ab [i ][k ][j ][l ]) > tol :
202- fcidump_string += f"{ ab [i ][k ][j ][l ]:.20e} { i + 1 :4d} { j + 1 :4d} { k + 1 :4d} { l + 1 :4d} \n "
203- for i in range (0 , nmo ):
204- for j in range (0 , i + 1 ):
205- if abs (a [i ][j ]) > tol :
206- fcidump_string += f"{ a [i ][j ]:.20e} { i + 1 :4d} { j + 1 :4d} { 0 :4d} { 0 :4d} \n "
207- fcidump_string += f"{ self .ints .nuclear_repulsion_energy () + self .ints .frozen_core_energy ()} { 0 :4d} { 0 :4d} { 0 :4d} { 0 :4d} "
208-
209- with open ("INTDUMP" , "w" ) as f :
210- f .write (fcidump_string )
211-
212- raise psi4 .p4util .PsiException ("Written integrals to INTDUMP" )
213-
214182 def make_dsrg_solver (self ):
215183 args = (self .rdms , self .scf_info , self .options , self .ints , self .mo_space_info )
216184
217- self .write_to_fcidump ()
218-
219185 if self .solver_type in ["MRDSRG" , "DSRG-MRPT2" , "DSRG-MRPT3" , "THREE-DSRG-MRPT2" ]:
220186 self .dsrg_solver = forte .make_dsrg_method (* args )
221187 self .dsrg_solver .set_state_weights_map (self .state_weights_map )
0 commit comments