Other functions¶
List of other functions in pyqcm¶
- exception MinimizationError¶
- exception MissingArgError¶
- exception OutOfBoundsError(variable)¶
- exception ParseError¶
- exception SolverError¶
- exception TooManyIterationsError(max_iteration)¶
- exception VarParamMismatchError¶
- exception WrongArgumentError¶
- banner(s, c='-', skip=0)¶
Pretty-prints a banner (one line across) on the screen with a message
- Parameters:
s (str) – message
c (char) – character used in the non-text part of the banner
skip (int) – number of blank lines above and below the banner
- class double_counting(e, V, n, coeff, e0)¶
Class used to correct the value of band energies and chemical potential as a function of interaction strength
\[e = e_0 + c V \langle n\rangle \]- Parameters:
e (str) – name of the kinetic operator to shift (e.g. a band energy)
V (str) – name of the interaction operator causing the shift
n (str) – name of the operator whose average will cause the shift
coeff (float) – coefficient c in the correction formula above
e0 (float) – bare value of the kinetic operator (before correction)
- correction(I)¶
Applies the double counting corretion to the model instance I. Changes the parameter_set taking into account the average values within the instance I
- Parameters:
I – instance of the lattice model
- epsilon(y, pr=False)¶
Performs the epsilon algorithm for accelerated convergence (e.g. in CDMFT)
- Parameters:
y ([float]) – sequence to be extrapolated
pr (boolean) – if True, prints the resulting extrapolation
- Returns:
the extrapolated values
- Return type:
[float]
- general_interaction_matrix_elements(e, n)¶
Translates a list of matrix elements (i,j,k,l,v) for a general interaction into a list of compound elements (I,J,v) where I = i+n*j and J = k+n*l and v is the value of the matrix element Also checks that only non redundant elements are given. A sum over spin for the Coulomb interaction est performed.
- Parameters:
e ((int,int,int,int,float)) – list of matrix elements
n (int) – number of orbitals in the impurity model (excluding spin; 2*n with spin)
- get_global_parameter(name, value=None)¶
Gets the value of a global parameter.
- Parameters:
name (str) – name of the global option
- Returns:
the value, according to type
- is_sequence(obj)¶
Tests whether an object is a sequence (list, tuple or ndarray)
- orbital_manager(orbitals, from_zero=False)¶
- orbital_pair_manager(orbitals)¶
- print_options(opt=0)¶
Prints the list of global parameters on the screen
- param int opt:
0 -> prints to screen. 1 -> prints to latex. 2 -> prints to RST
- print_statistics()¶
Prints various internal statistics (number of evaluations of certains quantities, etc.)
- reset_model()¶
Resets the lattice model. In other words, all cluster models, clusters and the content of the lattice_model object (including the parameter_set) are reset to void. Useful if one wants to conduct simulations with a new model without quitting Python.
- set_global_parameter(name, value=None)¶
Sets the value of a global parameter. If the global parameter is Boolean, then value is True by default and should not be specified.
- Parameters:
name (str) – name of the global option
value – value of that option (None, int, float or str)
- Returns:
None
- switch_cluster_model(name)¶
Switches cluster model to ‘name’. Hack used in DCA (yet to be developped)
- varia_table(var, val, prefix='')¶
Pretty prints a list of variational parameters and values in a table form. For screen output in CDMFT and VCA
- Parameters:
var ([str]) – list of parameter names
val ([float]) – list of associated values
prefix (str) – prefix string to each line
- wavevector_grid(n=100, orig=[-1.0, -1.0], side=2, k_perp=0, plane='z')¶
Produces a set of wavevectors for a MDC
- Parameters:
n (int) – number of wavevectors on the side
orig ([float]) – origin (in multiples of pi)
side (float) – length of the side (in multiples of pi)
k_perp (float) – momentum component in the third direction (in multiples of pi)
plane (str) – momentum plane, ‘xy’=’z’, ‘yz’=’x’=’zy’ or ‘xz’=’zx’=’y’
- Returns:
ndarray of wavevectors (n*n x 3)
- wavevector_path(n=32, shape='triangle')¶
Builds a wavevector path and associated tick marks
- Parameters:
n (int) – number of wavevectors per segment
shape (str) – the geometry of the path, one of: line, halfline, triangle, diagonal, graphene, graphene2, tri, cubic, cubic2, tetragonal, tetragonal2 OR a tuple with two wavevectors for a straight path between the two OR a filename ending with “.tsv”. In the latter case, the file contains a tab-separated list of wavevectors (in units of pi) and tick marks: the first three columns are the x,y,z components of the wavevectors, and the last columns the strings (possibly latex) for the tick marks (write - in that column if you do not want a tick mark for a specific wavevector).
- Returns tuple:
a ndarray of wavevectors 2) a list of tick positions 3) a list of tick strings