@@ -2309,7 +2309,7 @@ def get_free_energy(self, return_error = False):
23092309 return free_energy
23102310
23112311
2312- def get_free_energy_interpolating (self , target_supercell , support_dyn_coarse = None , support_dyn_fine = None , error_on_imaginary_frequency = True , return_error = False ):
2312+ def get_free_energy_interpolating (self , target_supercell , support_dyn_coarse = None , support_dyn_fine = None , error_on_imaginary_frequency = True , return_error = False , use_lo_to_splitting = False ):
23132313 """
23142314 GET THE FREE ENERGY IN A BIGGER CELL
23152315 ====================================
@@ -2337,6 +2337,7 @@ def get_free_energy_interpolating(self, target_supercell, support_dyn_coarse = N
23372337 return_error : bool
23382338 As the normal get_free_energy, if this flag is True, the stochastic error is returned.
23392339
2340+
23402341 Returns
23412342 -------
23422343 free_energy : float
@@ -2354,17 +2355,17 @@ def get_free_energy_interpolating(self, target_supercell, support_dyn_coarse = N
23542355
23552356
23562357 # Interpolate the dynamical matrix
2357- if support_dyn_fine is not None :
2358- new_dyn = self .current_dyn .Interpolate ( self .current_dyn .GetSupercell (),
2359- target_supercell ,
2360- support_dyn_coarse ,
2361- support_dyn_fine )
2358+ if not use_lo_to_splitting :
2359+ if support_dyn_fine is not None :
2360+ new_dyn = self .current_dyn .Interpolate ( self .current_dyn .GetSupercell (),
2361+ target_supercell ,
2362+ support_dyn_coarse ,
2363+ support_dyn_fine )
2364+ else :
2365+ new_dyn = self .current_dyn .Interpolate ( self .current_dyn .GetSupercell (),
2366+ target_supercell )
23622367 else :
2363- new_dyn = self .current_dyn .Interpolate ( self .current_dyn .GetSupercell (),
2364- target_supercell )
2365-
2366- #else:
2367- # new_dyn = self.current_dyn.InterpolateMesh(target_supercell, lo_to_splitting = True)
2368+ new_dyn = self .current_dyn .InterpolateMesh (target_supercell , lo_to_splitting = True )
23682369
23692370 #print("dyn after interpolation:", new_dyn.GetSupercell())
23702371
0 commit comments