qmctorch.wavefunction.jastrows.elec_nuclei.kernels.jastrow_kernel_electron_nuclei_base module

class qmctorch.wavefunction.jastrows.elec_nuclei.kernels.jastrow_kernel_electron_nuclei_base.JastrowKernelElectronNucleiBase(nup, ndown, atomic_pos, cuda, **kwargs)[source]

Bases: sphinx.ext.autodoc.importer._MockObject

Base class for the elec-nuc jastrow factor

\[\]
Parameters:
  • nup (int) – number of spin up electons
  • ndow (int) – number of spin down electons
  • atoms (torch.tensor) – atomic positions of the atoms
  • w (float, optional) – Value of the variational parameter. Defaults to 1..
  • cuda (bool, optional) – Turns GPU ON/OFF. Defaults to False.
forward(r)[source]

Get the elements of the jastrow matrix : .. math:

out_{i,j} = \exp{ \frac{b r_{i,j}}{1+b'r_{i,j}} }
Parameters:r (torch.tensor) – matrix of the e-e distances Nbatch x Nelec x Nelec
Returns:
matrix fof the jastrow elements
Nbatch x Nelec x Nelec
Return type:torch.tensor
compute_derivative(r, dr)[source]
Get the elements of the derivative of the jastrow kernels

wrt to the first electrons

\[ \begin{align}\begin{aligned}d B_{ij} / d k_i = d B_{ij} / d k_j = - d B_{ji} / d k_i\\out_{k,i,j} = A1 + A2 A1_{kij} = w0\end{aligned}\end{align} \]
rac{dr_{ij}}{dk_i} / (1 + w r_{ij})
A2_{kij} = - w0 w’ r_{ij}

rac{dr_{ij}}{dk_i} / (1 + w r_{ij})^2

Args:
r (torch.tensor): matrix of the e-e distances
Nbatch x Nelec x Nelec
dr (torch.tensor): matrix of the derivative of the e-e distances
Nbatch x Ndim x Nelec x Nelec
Returns:
torch.tensor: matrix fof the derivative of the jastrow elements
Nbatch x Ndim x Nelec x Nelec
compute_second_derivative(r, dr, d2r)[source]

Get the elements of the pure 2nd derivative of the jastrow kernels wrt to the first electron

\[d^2 B_{ij} / d k_i^2 = d^2 B_{ij} / d k_j^2 = d^2 B_{ji} / d k_i^2\]
Parameters:
  • r (torch.tensor) – matrix of the e-e distances Nbatch x Nelec x Nelec
  • dr (torch.tensor) – matrix of the derivative of the e-e distances Nbatch x Ndim x Nelec x Nelec
  • d2r (torch.tensor) –
    matrix of the 2nd derivative of
    the e-e distances

    Nbatch x Ndim x Nelec x Nelec

Returns:

matrix fof the pure 2nd derivative of

the jastrow elements Nbatch x Ndim x Nelec x Nelec

Return type:

torch.tensor