The Variational Cluster Approximation¶
This submodule provides functions that implements the Variational Cluster Approximation (VCA)
List of functions¶
- pyqcm.vca.plot_GS_energy(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
- pyqcm.vca.plot_sef(param, prm, file='sef.tsv', accur_SEF=0.0001, hartree=None, show=True, symmetrized_operator=None)¶
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
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 ((class hartree)) – Hartree approximation couplings (see pyqcm/hartree.py)
show (boolean) – if True, the plot is shown on the screen.
- Returns
None
- pyqcm.vca.transition_line(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
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
- pyqcm.vca.vca(var2sef=None, names=None, start=None, steps=None, accur=None, max=None, 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)¶
Performs a VCA with the QN or NR method
- Parameters
var2sef – function that converts variational parameters to model parameters
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 ((class 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