qmctorch.wavefunction.orbitals.atomic_orbitals_backflow module
- class qmctorch.wavefunction.orbitals.atomic_orbitals_backflow.AtomicOrbitalsBackFlow(*args: Any, **kwargs: Any)[source]
Bases:
AtomicOrbitals
Computes the value of atomic orbitals
- Parameters:
- forward(pos, derivative=[0], sum_grad=True, sum_hess=True, one_elec=False)[source]
Computes the values of the atomic orbitals.
\[\phi_i(q_j) = \sum_n c_n \text{Rad}^{i}_n(q_j) \text{Y}^{i}_n(q_j)\]where :math: text{Rad}^{i}_n(r_j) is the radial part and :math: text{Y}^{i}_n(r_j) the spherical harmonics part.
The electronic positions are calculated via a backflow transformation :
\[q_i = r_i + \sum_{j\neq i} \text{Kernel}(r_{ij}) (r_i-r_j)\]It is also possible to compute the first and second derivatives
\[ \begin{align}\begin{aligned}\nabla \phi_i(r_j) = \frac{d}{dx_j} \phi_i(r_j) + \frac{d}{dy_j} \phi_i(r_j) + \frac{d}{dz_j} \phi_i(r_j)\\\text{grad} \phi_i(r_j) = (\frac{d}{dx_j} \phi_i(r_j), \frac{d}{dy_j} \phi_i(r_j), \frac{d}{dz_j} \phi_i(r_j))\\\Delta \phi_i(r_j) = \frac{d^2}{dx^2_j} \phi_i(r_j) + \frac{d^2}{dy^2_j} \phi_i(r_j) + \frac{d^2}{dz^2_j} \phi_i(r_j)\end{aligned}\end{align} \]- 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.
sum_hess (bool, optional) – Return the sum_hess (i.e. the sum of the derivatives) or the individual terms. Defaults to True.
one_elec (bool, optional) – if only one electron is in input
- Returns:
Value of the AO (or their derivatives)
size : Nbatch, Nelec, Norb (sum_grad = True)
size : Nbatch, Nelec, Norb, Ndim (sum_grad = False)
- Return type:
torch.tensor
- Examples::
>>> mol = Molecule('h2.xyz') >>> ao = AtomicOrbitalsBackflow(mol) >>> pos = torch.rand(100,6) >>> aovals = ao(pos) >>> daovals = ao(pos,derivative=1)