Auxiliary procedures
- edipy2.global_env.check_convergence(func, threshold=None, N1=None, N2=None)[source]
This function checks the relative variation of a given quantity (Weiss field, Delta, …) against the one for the previous step. It is used to determine whether the DMFT loop has converged. If a maximum number of loops is exceeded, returns
True
with a warning and appends it to the plain text fileERROR.README
.- Parameters:
func (np.array(dtype=complex)) – the quantity to be checked. It can have any rank and shape, but the last dimension is summed over to get the relative error. All the components in the other dimensions are evalutated in the same way. The overall error is the average of the component-resolved error. It is appended to the plain text file
error.err
. The maximum and minimum component-resolve errors, as well as all the finite component-resolved error values are appended to the plain text fileserror.err.max
,error.err.min
anderror.err.distribution
respectively.threshold (float) – the error threshold (default =
dmft_error
)
- Returns:
the error
a boolean signifying convergence
- Return type:
- edipy2.global_env.get_bath_type()[source]
This function returns an integer number related to the value of
bath_type
in the input file1
for normal bath2
for hybrid bath3
for replica bath4
for general bath
- Returns:
the integer index
- Return type:
- edipy2.global_env.get_ed_mode()[source]
This function returns an integer number related to the value of
ed_mode
in the input file1
for normal mode2
for superc mode3
for nonsu2 mode
- Returns:
the integer index
- Return type:
- edipy2.global_env.search_variable(var, ntmp, converged)[source]
This function checks the value of the read density
ntmp
against the desired valuenread
(if different from zero) and adjustsvar
accordingly (in a monotonous way).- Parameters:
- Returns:
the new value of
var
a boolean signifying convergence
- Return type: