PDECO

class n2v.PDECO[source]

Bases: object

Performs Optimization as in: 10.1063/1.1535422 - Qin Wu + Weitao Yang

lambda_rgl: {None, float}. If float, lambda-regularization is added with lambda=lambda_rgl.

Attributes Summary

lambda_reg

regul_norm

Methods Summary

find_regularization_constant_pdeco(opt_max_iter)

Finding regularization constant lambda.

fouroverlap([wfn])

Calculates four overlap integral with Density Fitting method.

gradient_pbeco(v)

Calculates gradient wrt target density Equation (11) of main reference

lagrangian_pbeco(v)

Lagrangian to be minimized wrt external potential Equation (5) of main reference

pdeco(opt_max_iter[, reg, gtol, opt_method, opt])

Calls scipy minimizer to minimize lagrangian.

Attributes Documentation

lambda_reg = None
regul_norm = None

Methods Documentation

find_regularization_constant_pdeco(opt_max_iter, opt_method='L-BFGS-B', gtol=0.001, opt=None, lambda_list=None)[source]

Finding regularization constant lambda.

Note: it is recommend to set a specific convergence criteria by opt or tol,

in order to control the same convergence for different lambda value.

After the calculation is done, one can plot the returns to select a good lambda.

guide_potential_components: a list of string

the components for guide potential v_pbs. see Inverter.generate_components() for details.

opt_method: string default: “trust-krylov”

opt_methods available in scipy.optimize.minimize

tol: float

Tolerance for termination. See scipy.optimize.minimize for details.

opt: dictionary, optional
if given:

scipy.optimize.minimize(method=opt_method, options=opt)

lambda_list: np.ndarray, optional

A array of lambda to search; otherwise, it will be 10 ** np.linspace(-1, -7, 7).

lambda_list: np.ndarray

A array of lambda searched.

P_list: np.ndarray

The value defined by [Bulat, Heaton-Burgess, Cohen, Yang 2007] eqn (21). Corresponding to lambda in lambda_list.

error_list: np.ndarray

The Ts value for each lambda.

fouroverlap(wfn=None)[source]

Calculates four overlap integral with Density Fitting method. S4_{ijkl} = int dr phi_i(r)*phi_j(r)*phi_k(r)*phi_l(r)

Parameters

wfn (psi4.core.Wavefunction) – Wavefunction object of molecule

Returns

Return type

S4

gradient_pbeco(v)[source]

Calculates gradient wrt target density Equation (11) of main reference

lagrangian_pbeco(v)[source]

Lagrangian to be minimized wrt external potential Equation (5) of main reference

pdeco(opt_max_iter, reg=None, gtol=0.001, opt_method='L-BFGS-B', opt=None)[source]

Calls scipy minimizer to minimize lagrangian.