Auxiliary procedures
- edipack2py.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
Truewith 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.minanderror.err.distributionrespectively.threshold (float) – the error threshold (default =
dmft_error)
- Returns:
the error
a boolean signifying convergence
- Return type:
- edipack2py.global_env.get_bath_type()[source]
This function returns an integer number related to the value of
bath_typein the input file1for normal bath2for hybrid bath3for replica bath4for general bath
- Returns:
the integer index
- Return type:
- edipack2py.global_env.get_ed_mode()[source]
This function returns an integer number related to the value of
ed_modein the input file1for normal mode2for superc mode3for nonsu2 mode
- Returns:
the integer index
- Return type:
- edipack2py.global_env.search_variable(var, ntmp, converged)[source]
This function checks the value of the read density
ntmpagainst the desired valuenread(if different from zero) and adjustsvaraccordingly (in a monotonous way).- Parameters:
- Returns:
the new value of
vara boolean signifying convergence
- Return type: