qml.qchem.attraction_integral

attraction_integral(r, basis_a, basis_b, normalize=True)[source]

Return a function that computes the nuclear attraction integral for two contracted Gaussian functions.

Parameters
  • r (array[float]) – position vector of nucleus

  • basis_a (BasisFunction) – first basis function

  • basis_b (BasisFunction) – second basis function

  • normalize (bool) – if True, the basis functions get normalized

Returns

function that computes the electron-nuclear attraction integral

Return type

function

Example

>>> symbols  = ['H', 'H']
>>> geometry = np.array([[0.0, 0.0, 0.0], [0.0, 0.0, 1.0]], requires_grad = False)
>>> alpha = np.array([[3.425250914, 0.6239137298, 0.168855404],
>>>                   [3.425250914, 0.6239137298, 0.168855404]], requires_grad = True)
>>> mol = qml.qchem.Molecule(symbols, geometry, alpha=alpha)
>>> basis_a = mol.basis_set[0]
>>> basis_b = mol.basis_set[1]
>>> args = [mol.alpha]
>>> attraction_integral(geometry[0], basis_a, basis_b)(*args)
0.801208332328965