@@ -367,14 +367,14 @@ def get_ed_mode(self):
367367
368368
369369# set phonons displacement and coupling
370- def set_phonon_coefficients (self ,disp = None ,coupling = None ):
370+ def set_phonon_coefficients (self , displacement = None , coupling = None ):
371371 """
372372
373373 This function sets new values for the phonon displacement field
374374 and the electron-phonon coupling matrix
375375
376- :type disp : float
377- :param disp : phonon displacement field
376+ :type displacement : float
377+ :param displacement : phonon displacement field
378378
379379 :type coupling: np.array(float)
380380 :param coupling: electron-phonon coupling matrix of shape ( :code:`Norb` ) or ( :code:`Norb`, :code:`Norb` )
@@ -385,21 +385,23 @@ def set_phonon_coefficients(self,disp=None,coupling=None):
385385 set_a_ph .argtypes = [np .ctypeslib .ndpointer (dtype = float , ndim = 1 , flags = "F_CONTIGUOUS" )]
386386 set_a_ph .restype = None
387387
388- set_g_ph = self .library .ed_setG_ph
388+ set_g_ph = self .library .ed_set_G_ph
389389 set_g_ph .argtypes = [np .ctypeslib .ndpointer (dtype = float , ndim = 2 , flags = "F_CONTIGUOUS" )]
390390 set_g_ph .restype = None
391391
392392 aux_norb = ct .c_int .in_dll (self .library , "Norb" ).value
393393
394- if disp == None and coupling == None :
394+ if displacement == None and coupling == None :
395395 raise RuntimeError ("set_phonon_coefficients: provide at least either disp or coupling" )
396396
397- if disp != None :
398- set_a_ph (np .array ([disp ]))
397+ if displacement != None :
398+ set_a_ph (np .array ([displacement ],order = "F" ))
399+
399400 if coupling != None :
400401 if np .shape (copuling ) == (aux_norb ,):
401402 coupling = np .array (np .diag (coupling ),order = "F" )
402403 elif np .shape (copuling ) != (aux_norb ,aux_norb ):
403404 raise ValueError ("set_phonon_coefficients: coupling shape is (Norb) or (Norb,Norb)" )
404405 set_g_ph (coupling )
405-
406+
407+ return
0 commit comments