The Variational Cluster Approximation¶
This submodule provides functions that implements the Variational Cluster Approximation (VCA). The class VCA implements the VCA method. Defining an instance of this class performs the VCA procedure.
- class VCA(model, var2sef=None, varia=None, start=None, steps=0.01, accur=0.0001, max=100, file='vca.tsv', accur_grad=1e-06, max_iter=30, max_iter_diff=None, method='NR', hartree=None, hartree_self_consistent=False, symmetrized_operator=None, var_max_start=None, consistency_check=False)¶
class containing the elements of a VCA computation. The constructor executes the computation.
- Parameters:
model (lattice_model) – the (unique) model on which the computation is based
var2sef – function that converts variational parameters to model parameters
varia (str or [str]) – variational parameters (list or tuple)
start (float or [float]) – starting values
steps (float or [float]) – initial steps
accur (float or [float]) – accuracy of parameters (also step for 2nd derivatives)
max (float or [float]) – maximum values that are tolerated
accur_grad (float) – max value of gradient for convergence
max_iter (int) – maximum number of iterations in the procedure
max_iter_diff (float) – optional maximum value of the maximum step in the quasi-Newton method
method (str) – method used to optimize (‘SYMR1’, ‘NR’, ‘BFGS’, ‘altNR’, ‘Nelder-Mead’, ‘COBYLA’, ‘Powell’, ‘CG’, ‘minimax’)
hartree ([hartree]) – Hartree approximation couplings (see pyqcm/hartree.py)
hartree_self_consistent (boolean) – True if the Hartree approximation is treated in the self-consistent, rather than variational, way.
symmetrized_operator (str) – name of an operator wrt which the functional must be symmetrized
var_max_start (int) – label of the first variable for which the function is a maximum (minimal vars first, maximal vars last)
- Returns:
None
- Variables:
model (lattice_model) – (unique) model on which the computation is based
I – current model instance (changes in the course of the computation)
hessian – Hessian matrix of the Potthoff functional (matrix of second derivatives)
Other VCA-related functions¶
- plot_GS_energy(model, param, prm, clus=0, file=None, plt_ax=None, **kwargs)¶
Draws a plot of the ground state energy as a function of a parameter param taken from the list prm. The results are going to be appended to ‘GS.tsv’
- Parameters:
param (str) – name of the parameter (independent variable)
prm ([float]) – list of values of the parameter
clus (int) – label of the cluster (starts at 0)
file (str) – if not None, saves the plot in a file with that name
plt_ax – optional matplotlib axis set, to be passed when one wants to collect a subplot of a larger set
kwargs – keyword arguments passed to the matplotlib ‘plot’ function
- Returns:
None
- plot_sef(model, param, prm, file='sef.tsv', accur_SEF=0.0001, hartree=None, show=True, symmetrized_operator=None, consistency_check=False)¶
Draws a plot of the Potthoff functional as a function of a parameter param taken from the list prm. The results are going to be appended to ‘sef.tsv’
- Parameters:
model (lattice_model) – the lattice model
param (str) – name of the parameter (independent variable)
prm ([float]) – list of values of the parameter
accur_SEF (float) – precision of the computation of the self-energy functional
hartree ([hartree]) – Hartree approximation couplings (see pyqcm/hartree.py)
show (boolean) – if True, the plot is shown on the screen.
- Returns:
None
- transition_line(model, varia, P1, P1_range, P2, P2_range, delta, verb=False)¶
Builds the second-order transition line as a function of a control parameter P1. The results are written in the file transition.tsv
- Parameters:
model (lattice_model) – the lattice model
varia (str) – variational parameter
P1 (str) – control parameter
P1_range ([float]) – an array of values of P1
P2 (str) – dependent parameter
P2_range ((float)) – 2-uple of values of P2 that bracket the transition
verb (boolean) – If True, prints progress
delta (float) – at each step, the new bracket for P2 will be P2c +/- delta, P2c being the previous critical value
- Returns:
None