qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels package

Submodules

qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.boys_handy_jastrow_kernel module

class qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.boys_handy_jastrow_kernel.BoysHandyJastrowKernel(*args: Any, **kwargs: Any)[source]

Bases: JastrowKernelElectronElectronNucleiBase

Defines a Boys Handy jastrow factors.

J.W. Moskowitz et. al Correlated Monte Carlo Wave Functions for Some Cations and Anions of the First Row Atoms Journal of Chemical Physics, 97, 3382-85 (1992)

\[\begin{split}\\text{K}(R_{iA}, R_{jA}, r_{ij) = \\sum_\\mu c_\\mu \\left(\\frac{a_{1_\\mu} R_{iA}}{1 + b_{1_\\mu}R_{iA}}\\right)^{u_\\mu} \\left(\\frac{a_{2_\\mu} R_{jA}}{1 + b_{2_\\mu}R_{iA}}\\right)^{v_\\mu} \\left(\\frac{a_{3_\\mu} r_{ij}}{1 + b_{3_\\mu}r_{ij}}\\right)^{w_\\mu}\end{split}\]

We restrict the parameters of the two electron-nucleus distance to be equal otherwise the jastrow factor is not permutation invariant

forward(x: torch.Tensor) torch.Tensor[source]

Compute the values of the kernel

Parameters:

x (torch.tensor) – e-e and e-n distances distance (Nbatch, Natom, Nelec_pairs, 3) the last dimension holds the values [R_{iA}, R_{jA}, r_{ij}] where i,j are electron index in the pair and A the atom index.

Returns:

values of the kernel (Nbatch, Natom, Nelec_pairs, 1)

Return type:

torch.tensor

qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.fully_connected_jastrow_kernel module

class qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.fully_connected_jastrow_kernel.FullyConnectedJastrowKernel(*args: Any, **kwargs: Any)[source]

Bases: JastrowKernelElectronElectronNucleiBase

Defines a fully connected jastrow factors.

Parameters:
  • nup (int) – number of spin up electrons

  • ndown (int) – number of spin down electrons

  • atomic_pos (torch.tensor) – atomic positions of the atoms

  • cuda (bool) – whether to use the GPU or not

forward(x: torch.Tensor) torch.Tensor[source]

Compute the values of the individual f_ij=f(r_ij)

Parameters:

x (torch.tensor) – e-e distance Nbatch, Nele_pairs

Returns:

values of the f_ij

Return type:

torch.tensor

qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.jastrow_kernel_electron_electron_nuclei_base module

class qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.jastrow_kernel_electron_electron_nuclei_base.JastrowKernelElectronElectronNucleiBase(*args: Any, **kwargs: Any)[source]

Bases: Module

Base Class for the elec-elec-nuc jastrow kernel

Parameters:
  • nup (int) – number of spin up electons

  • ndown (int) – number of spin down electons

  • atomic_pos (torch.tensor) – atomic positions of the atoms

  • cuda (bool, optional) – Turns GPU ON/OFF. Defaults to False.

forward(x: torch.Tensor) torch.Tensor[source]

Compute the values of the kernel

Parameters:

x (torch.tensor) – e-e and e-n distances distance (Nbatch, Natom, Nelec_pairs, 3) the last dimension holds the values [R_{iA}, R_{jA}, r_{ij}] in that order.

Returns:

values of the kernel (Nbatch, Natom, Nelec_pairs, 1)

Return type:

torch.tensor

compute_derivative(r: torch.Tensor, dr: torch.Tensor) torch.Tensor[source]

Get the elements of the derivative of the jastrow kernels.

compute_second_derivative(r: torch.Tensor, dr: torch.Tensor, d2r: torch.Tensor) torch.Tensor[source]

Get the elements of the pure 2nd derivative of the jastrow kernels.

Module contents

class qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.FullyConnectedJastrowKernel(*args: Any, **kwargs: Any)[source]

Bases: JastrowKernelElectronElectronNucleiBase

Defines a fully connected jastrow factors.

Parameters:
  • nup (int) – number of spin up electrons

  • ndown (int) – number of spin down electrons

  • atomic_pos (torch.tensor) – atomic positions of the atoms

  • cuda (bool) – whether to use the GPU or not

forward(x: torch.Tensor) torch.Tensor[source]

Compute the values of the individual f_ij=f(r_ij)

Parameters:

x (torch.tensor) – e-e distance Nbatch, Nele_pairs

Returns:

values of the f_ij

Return type:

torch.tensor

class qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.JastrowKernelElectronElectronNucleiBase(*args: Any, **kwargs: Any)[source]

Bases: Module

Base Class for the elec-elec-nuc jastrow kernel

Parameters:
  • nup (int) – number of spin up electons

  • ndown (int) – number of spin down electons

  • atomic_pos (torch.tensor) – atomic positions of the atoms

  • cuda (bool, optional) – Turns GPU ON/OFF. Defaults to False.

forward(x: torch.Tensor) torch.Tensor[source]

Compute the values of the kernel

Parameters:

x (torch.tensor) – e-e and e-n distances distance (Nbatch, Natom, Nelec_pairs, 3) the last dimension holds the values [R_{iA}, R_{jA}, r_{ij}] in that order.

Returns:

values of the kernel (Nbatch, Natom, Nelec_pairs, 1)

Return type:

torch.tensor

compute_derivative(r: torch.Tensor, dr: torch.Tensor) torch.Tensor[source]

Get the elements of the derivative of the jastrow kernels.

compute_second_derivative(r: torch.Tensor, dr: torch.Tensor, d2r: torch.Tensor) torch.Tensor[source]

Get the elements of the pure 2nd derivative of the jastrow kernels.

class qmctorch.wavefunction.jastrows.elec_elec_nuclei.kernels.BoysHandyJastrowKernel(*args: Any, **kwargs: Any)[source]

Bases: JastrowKernelElectronElectronNucleiBase

Defines a Boys Handy jastrow factors.

J.W. Moskowitz et. al Correlated Monte Carlo Wave Functions for Some Cations and Anions of the First Row Atoms Journal of Chemical Physics, 97, 3382-85 (1992)

\[\begin{split}\\text{K}(R_{iA}, R_{jA}, r_{ij) = \\sum_\\mu c_\\mu \\left(\\frac{a_{1_\\mu} R_{iA}}{1 + b_{1_\\mu}R_{iA}}\\right)^{u_\\mu} \\left(\\frac{a_{2_\\mu} R_{jA}}{1 + b_{2_\\mu}R_{iA}}\\right)^{v_\\mu} \\left(\\frac{a_{3_\\mu} r_{ij}}{1 + b_{3_\\mu}r_{ij}}\\right)^{w_\\mu}\end{split}\]

We restrict the parameters of the two electron-nucleus distance to be equal otherwise the jastrow factor is not permutation invariant

forward(x: torch.Tensor) torch.Tensor[source]

Compute the values of the kernel

Parameters:

x (torch.tensor) – e-e and e-n distances distance (Nbatch, Natom, Nelec_pairs, 3) the last dimension holds the values [R_{iA}, R_{jA}, r_{ij}] where i,j are electron index in the pair and A the atom index.

Returns:

values of the kernel (Nbatch, Natom, Nelec_pairs, 1)

Return type:

torch.tensor