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, verb=True)¶
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)
accur (float or [float]) – accuracy of parameters (also step for 2nd derivatives)
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 (bool) – 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)
verb (bool) – if True (default) prints ample progress messages
- 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_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
model – the lattice model on which the computation is based
accur_SEF (float) – precision of the computation of the self-energy functional
file (str) – name of the file to which intermediate results are written
hartree ([hartree]) – Hartree approximation couplings (see pyqcm/hartree.py)
show (bool) – if True, the plot is shown on the screen
symmetrized_operator (str) – name of an operator with respect to which the functional is symmetrized
consistency_check (bool) – if True, checks the ground state consistency at each point
- Returns:
None
- 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:
model (lattice_model) – the lattice model on which the computation is based
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 (matplotlib.axes.Axes) – 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
- 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 on which the computation is based
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 (bool) – 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