qmctorch.wavefunction.orbitals.atomic_orbitals_orbital_dependent_backflow module

class qmctorch.wavefunction.orbitals.atomic_orbitals_orbital_dependent_backflow.AtomicOrbitalsOrbitalDependentBackFlow(mol, backflow_kernel, backflow_kernel_kwargs={}, cuda=False)[source]

Bases: qmctorch.wavefunction.orbitals.atomic_orbitals.AtomicOrbitals

Computes the value of atomic orbitals

Parameters:
  • mol (Molecule) – Molecule object
  • cuda (bool, optional) – Turn GPU ON/OFF Defaults to False.
forward(pos, derivative=[0], sum_grad=True, sum_hess=True, one_elec=False)[source]

Computes the values of the atomic orbitals.

\[\begin{split}\phi_i(r_j) = \sum_n c_n \\text{Rad}^{i}_n(r_j) \\text{Y}^{i}_n(r_j)\end{split}\]

where Rad is the radial part and Y the spherical harmonics part. It is also possible to compute the first and second derivatives

\[\begin{split}\\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) \n \\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)) \n \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{split}\]
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
  • one_elec (bool, optional) – if only one electron is in input
Returns:

Value of the AO (or their derivatives) n

size : Nbatch, Nelec, Norb (sum_grad = True) n size : Nbatch, Nelec, Norb, Ndim (sum_grad = False)

Return type:

torch.tensor

Examples::
>>> mol = Molecule('h2.xyz')
>>> ao = AtomicOrbitals(mol)
>>> pos = torch.rand(100,6)
>>> aovals = ao(pos)
>>> daovals = ao(pos,derivative=1)