MRKS¶
-
class
n2v.
MRKS
[source]¶ Bases:
object
Wavefunction to KS_potential method based on [1] [PRL 115, 083001 (2015)], [2] [J. Chem. Phys. 146, 084103 (2017)].
The XC potential is calculated on the grid instead of on the potential basis set. Whereas, the guide potential is still used and plays the role of v_hartree. And because of this, the grid for vxc for output has to be specified beforehand.
For CIWavefunction as input, make sure to turn on option opdm and tpdm:
- psi4.set_options({
“opdm”: True, “tpdm”: True, ‘REFERENCE’: “RHF” })
- Vpot: psi4.core.VBase
V_potential that contains the info of DFT spherical grid.
- npoint_DFT: int
number of points for DFT spherical grid.
- vxc_hole_WF: np.ndarray
vxc_hole_WF on spherical grid. This is stored because the calculation of this takes most time.
Attributes Summary
Methods Summary
mRKS
(maxiter[, vxc_grid, v_tol, D_tol, …])the modified Ryabinkin-Kohut-Staroverov method.
Attributes Documentation
-
vxc_hole_WF
= None¶
Methods Documentation
-
mRKS
(maxiter, vxc_grid=None, v_tol=0.0001, D_tol=1e-07, eig_tol=0.0001, frac_old=0.5, init='scan', sing=(1e-05, 0.0001, 1e-05, 0.0001))[source]¶ the modified Ryabinkin-Kohut-Staroverov method.
- Currently it supports two different kind of input wavefunction:
Psi4.CIWavefunction
Psi4.RHF
and it only supports spin-restricted wavefunction. Side note: spin-unrestricted HF wavefunction (psi4.UHF) can easily be supported but unrestricted CI or restricted/unrestricted CCSD can not, because of the absence of tpdm in both methods.
- maxiter: int
same as opt_max_iter
- vxc_grid: np.ndarray of shape (3, num_grid_points), opt
When this is given, the final result will be represented
- v_tol: float, opt
convergence criteria for vxc Fock matrices. default: 1e-4
- D_tol: float, opt
convergence criteria for density matrices. default: 1e-7
- eig_tol: float, opt
convergence criteria for occupied eigenvalue spectrum. default: 1e-4
- frac_old: float, opt
Linear mixing parameter for current vxc and old vxc. If 0, no old vxc is mixed in. Should be in [0,1) default: 0.5.
- init: string, opt
Initial guess method. default: “SCAN” 1) If None, input wfn info will be used as initial guess. 2) If “continue” is given, then it will not initialize but use the densities and orbitals stored. Meaningly, one can run a quick WY calculation as the initial guess. This can also be used to user speficified initial guess by setting Da, Coca, eigvec_a. 3) If it’s not continue, it would be expecting a method name string that works for psi4. A separate psi4 calculation would be performed.
- sing: tuple of float of length 4, opt.
Singularity parameter for _vxc_hole_quadrature() default: (1e-5, 1e-4, 1e-5, 1e-4) [0]: atol, [1]: atol1 for dft_spherical grid calculation. [2]: atol, [3]: atol1 for vxc_grid calculation.
The result will be save as self.grid.vxc