qmctorch.wavefunction.slater_orbital_dependent_jastrow module¶
-
class
qmctorch.wavefunction.slater_orbital_dependent_jastrow.
SlaterOrbitalDependentJastrow
(mol, configs='ground_state', kinetic='jacobi', jastrow_kernel=<class 'qmctorch.wavefunction.jastrows.elec_elec.kernels.pade_jastrow_kernel.PadeJastrowKernel'>, jastrow_kernel_kwargs={}, cuda=False, include_all_mo=True)[source]¶ Bases:
qmctorch.wavefunction.slater_jastrow_base.SlaterJastrowBase
Slater Jastrow Wave function with an orbital dependent Electron-Electron Jastrow Factor
\[\Psi(R_{at}, r) = \sum_n c_n D^\uparrow_n(r^\uparrow)D^\downarrow_n(r^\downarrow)\]where each molecular orbital of the determinants is multiplied with a different electron-electron Jastrow
\[\phi_i(r) \rightarrow J_i(r) \phi_i(r)\]Parameters: - mol (Molecule) – a QMCTorch molecule object
- configs (str, optional) – defines the CI configurations to be used. Defaults to ‘ground_state’. - ground_state : only the ground state determinant in the wave function - single(n,m) : only single excitation with n electrons and m orbitals - single_double(n,m) : single and double excitation with n electrons and m orbitals - cas(n, m) : all possible configuration using n eletrons and m orbitals
- kinetic (str, optional) – method to compute the kinetic energy. Defaults to ‘jacobi’. - jacobi : use the Jacobi formula to compute the kinetic energy - auto : use automatic differentiation to compute the kinetic energy
- jastrow_kernel (JastrowKernelBase, optional) – Class that computes the jastrow kernels
- jastrow_kernel_kwargs (dict, optional) – keyword arguments for the jastrow kernel contructor
- cuda (bool, optional) – turns GPU ON/OFF Defaults to False.
- include_all_mo (bool, optional) – include either all molecular orbitals or only the ones that are popualted in the configs. Defaults to False
- Examples::
>>> from qmctorch.scf import Molecule >>> from qmctorch.wavefunction import SlaterOrbitalDependentJastrow >>> mol = Molecule('h2o.xyz', calculator='adf', basis = 'dzp') >>> wf = SlaterOrbitalDependentJastrow(mol, configs='cas(2,2)')
-
ordered_jastrow
(pos, derivative=0, sum_grad=True)[source]¶ Returns the value of the jastrow with the correct dimensions
Parameters: - pos (torch.tensor) – Positions of the electrons Size : Nbatch, Nelec x Ndim
- derivative (int, optional) – order of the derivative (0,1,2,). Defaults to 0.
- sum_grad (bool, optional) – Return the sum_grad (i.e. the sum of the derivatives) or the individual terms. Defaults to True. False only for derivative=1
Returns: - value of the jastrow parameter for all confs
Nbatch, Nelec, Nmo (sum_grad = True) Nbatch, Nelec, Nmo, Ndim (sum_grad = False)
Return type: torch.tensor
-
forward
(x, ao=None)[source]¶ computes the value of the wave function for the sampling points
\[\Psi(R) = \sum_{n} c_n D^{u}_n(r^u) \times D^{d}_n(r^d)\]Parameters: - x (torch.tensor) – sampling points (Nbatch, 3*Nelec)
- ao (torch.tensor, optional) – values of the atomic orbitals (Nbatch, Nelec, Nao)
Returns: values of the wave functions at each sampling point (Nbatch, 1)
Return type: torch.tensor
- Examples::
>>> mol = Molecule('h2.xyz', calculator='adf', basis = 'dzp') >>> wf = SlaterJastrow(mol, configs='cas(2,2)') >>> pos = torch.rand(500,6) >>> vals = wf(pos)
-
pos2cmo
(x, derivative=0, sum_grad=True)[source]¶ Get the values of correlated MOs
Parameters: {torch.tensor} -- positions of the electrons [nbatch, nelec*ndim] (x) – Returns: torch.tensor – MO matrix [nbatch, nelec, nmo]
-
kinetic_energy_jacobi
(x, **kwargs)[source]¶ Compute the value of the kinetic enery using the Jacobi Formula. C. Filippi, Simple Formalism for Efficient Derivatives .
\[\frac{K(R)}{\Psi(R)} = Tr(A^{-1} B_{kin})\]Parameters: x (torch.tensor) – sampling points (Nbatch, 3*Nelec) Returns: values of the kinetic energy at each sampling points Return type: torch.tensor
-
gradients_jacobi
(x, sum_grad=True, pdf=False)[source]¶ Computes the gradients of the wf using Jacobi’s Formula
Parameters: x ([type]) – [description]