qmctorch.wavefunction.jastrows.elec_elec package
Subpackages
- qmctorch.wavefunction.jastrows.elec_elec.kernels package
- Submodules
- qmctorch.wavefunction.jastrows.elec_elec.kernels.fully_connected_jastrow_kernel module
- qmctorch.wavefunction.jastrows.elec_elec.kernels.jastrow_kernel_electron_electron_base module
- qmctorch.wavefunction.jastrows.elec_elec.kernels.pade_jastrow_kernel module
- qmctorch.wavefunction.jastrows.elec_elec.kernels.pade_jastrow_polynomial_kernel module
- Module contents
- Submodules
Submodules
- qmctorch.wavefunction.jastrows.elec_elec.jastrow_factor_electron_electron module
JastrowFactorElectronElectron
JastrowFactorElectronElectron.get_mask_tri_up()
JastrowFactorElectronElectron.extract_tri_up()
JastrowFactorElectronElectron.get_edist_unique()
JastrowFactorElectronElectron.forward()
JastrowFactorElectronElectron.jastrow_factor_derivative()
JastrowFactorElectronElectron.jastrow_factor_second_derivative()
JastrowFactorElectronElectron.partial_derivative()
- qmctorch.wavefunction.jastrows.elec_elec.orbital_dependent_jastrow_kernel module
Module contents
- qmctorch.wavefunction.jastrows.elec_elec.JastrowFactor
alias of
JastrowFactorElectronElectron
- class qmctorch.wavefunction.jastrows.elec_elec.PadeJastrowKernel(*args: Any, **kwargs: Any)[source]
Bases:
JastrowKernelElectronElectronBase
Computes the Simple Pade-Jastrow factor
\[B_{ij} = \frac{w_0 r_{ij}}{1 + w r_{ij}}\]where \(w_0\) equals 0.5 for parallel spin and 0.25 for antiparallel spin
- Parameters:
- get_static_weight()[source]
Get the matrix of static weights
- Returns:
matrix of the static weights
- Return type:
torch.tensor
- forward(r)[source]
Get the jastrow kernel.
\[B_{ij} = \frac{w_0 r_{i,j}}{1+w r_{i,j}}\]- Parameters:
r (torch.tensor) – matrix of the e-e distances Nbatch x Nelec x Nelec
- Returns:
- matrix of the jastrow kernels
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
\[\frac{d B_{ij}}{d k_i} = \frac{d B_{ij}}{ d k_j } = - \frac{d B_{ji}}{d k_i}\]\[\text{out}_{k,i,j} = A1 + A2\]\[A1_{kij} = w0 \frac{dr_{ij}}{dk_i} \frac{1}{1 + w r_{ij}}\]\[A2_{kij} = - w0 w' r_{ij} \frac{dr_{ij}}{dk_i} \frac{1}{1 + w r_{ij}}^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
- Returns:
- matrix fof the derivative of the jastrow elements
Nbatch x Ndim x Nelec x Nelec
- Return type:
torch.tensor
- compute_second_derivative(r, dr, d2r)[source]
Get the elements of the pure 2nd derivative of the jastrow kernels wrt to the first electron
\[\frac{d^2 B_{ij}}{d k_i^2} = \frac{d^2 B_{ij}}{d k_j^2} = \frac{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
- class qmctorch.wavefunction.jastrows.elec_elec.FullyConnectedJastrowKernel(*args: Any, **kwargs: Any)[source]
Bases:
JastrowKernelElectronElectronBase
Defines a fully connected jastrow factors.
- class qmctorch.wavefunction.jastrows.elec_elec.PadeJastrowPolynomialKernel(*args: Any, **kwargs: Any)[source]
Bases:
JastrowKernelElectronElectronBase
Computes a polynomial Pade-Jastrow factor
\[B_{ij} = \frac{P_{ij}}{Q_{ij}}\]with : .. math:
P_{ij} = a_1 r_{i,j} + a_2 r_{ij}^2 + ....
and :
- Parameters:
- get_static_weight()[source]
Get the matrix of static weights
- Returns:
static weight (0.5 (0.25) for parallel(anti) spins
- Return type:
torch.tensor
- set_variational_weights(weight_a, weight_b)[source]
Define the initial values of the variational weights.
- Parameters:
weight_a (torch.tensor or None) – Value of the weight
weight_b (torch.tensor or None) – Value of the weight
- forward(r)[source]
Get the jastrow kernel.
\[B_{ij} = \frac{P_{ij}}{Q_{ij}}\]- Parameters:
r (torch.tensor) – matrix of the e-e distances Nbatch x Nelec x Nelec
- Returns:
- matrix of the jastrow kernels
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
The derivative is given by:
\[\text{out}_{k,i,j} = \frac{P'Q - PQ'}{Q^2}\]with:
\[P_{ij} = a_1 r_{i,j} + a_2 r_{ij}^2 + .... Q_{ij} = 1 + b_1 r_{i,j} + b_2 r_{ij}^2 +\]and :
\[P'_{ij} = a_1 dr + a_2 2 r dr + a_r 3 dr r^2 + .... Q'_{ij} = b_1 dr + b_2 2 r dr + b_r 3 dr r^2 + ....\]Due to the properties of the derivative we have .. math:
\frac{d B_{ij}}{d k_i} = \frac{d B_{ij}}{d k_j} = -\frac{d B_{ji}{d k_i}
- 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
- Returns:
- matrix fof the derivative of the jastrow elements
Nbatch x Ndim x Nelec x Nelec
- Return type:
torch.tensor
- compute_second_derivative(r, dr, d2r)[source]
Get the elements of the pure 2nd derivative of the jastrow kernels wrt to the first electron
Due to the properties of the derivative we have .. math:
\frac{d B_{ij}}{d k_i} = \frac{d B_{ij}}{d k_j} = \frac{d B_{ji}{d k_i}
- 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