Libcint#
Integral Driver: Libcint#
libcint-based integral implementations.
Drivers#
Driver: Libcint#
Base class for a libcint-based integral implementation Calculation and modification of multipole integrals.
- class dxtb._src.integral.driver.libcint.driver.BaseIntDriverLibcint(*args, **kwargs)[source]#
Bases:
LibcintImplementation,IntDriverImplementation of libcint-based integral driver.
- family: Literal['libcint']#
Label for integral implementation family.
- ihelp: IndexHelper#
Helper class for indexing.
- numbers: Tensor#
Atomic numbers of the atoms in the system.
- par: ParamModule#
Representation of parametrization of xTB method.
- class dxtb._src.integral.driver.libcint.driver.IntDriverLibcint(*args, **kwargs)[source]#
Bases:
BaseIntDriverLibcintImplementation of
libcint-based integral driver.- family: Literal['libcint']#
Label for integral implementation family.
- ihelp: IndexHelper#
Helper class for indexing.
- numbers: Tensor#
Atomic numbers of the atoms in the system.
- par: ParamModule#
Representation of parametrization of xTB method.
Implementations#
Implementation: Overlap#
Overlap implementation based on libcint.
- class dxtb._src.integral.driver.libcint.overlap.OverlapLibcint(device=None, dtype=None, uplo='l', cutoff=50.0)[source]#
Bases:
OverlapIntegral,IntegralLibcintOverlap integral from atomic orbitals.
Use the
build()method to calculate the overlap integral. The returned matrix uses a custom autograd function to calculate the backward pass with the analytical gradient. For the full gradient, i.e., a matrix of shape(..., norb, norb, 3), theget_gradient()method should be used.- Parameters:
device (torch.device | None)
dtype (torch.dtype | None)
uplo (Literal['n', 'u', 'l'])
- build(driver, **_)[source]#
Calculation of overlap integral using libcint.
- Return type:
- Returns:
driver – The integral driver for the calculation.
- Return type:
- Returns:
Overlap integral matrix of shape
(..., norb, norb).- Return type:
Tensor
- Parameters:
driver (IntDriverLibcint)
_ (Any)
- get_gradient(driver, **_)[source]#
Overlap gradient calculation using libcint.
- Return type:
- Parameters:
driver (IntDriverLibcint) – The integral driver for the calculation.
- Returns:
Overlap gradient of shape
(..., norb, norb, 3).- Return type:
Tensor
- Parameters:
driver (IntDriverLibcint)
_ (Any)
- cutoff: Tensor | float | int | None#
Real-space cutoff for integral calculation in Bohr. Defaults to constants.defaults.INTCUTOFF.
- family: Literal['libcint']#
Label for integral implementation family.
- uplo: Literal['n', 'u', 'l']#
Whether the matrix of unique shell pairs should be create as a triangular matrix (l: lower, u: upper) or full matrix (n). Defaults to l (lower triangular matrix).
Implementation: Multipole Base#
Template for calculation and modification of multipole integrals.
- class dxtb._src.integral.driver.libcint.multipole.MultipoleLibcint(device=None, dtype=None, uplo='l', cutoff=50.0)[source]#
Bases:
IntegralLibcintBase class for multipole integrals calculated with libcint.
- Parameters:
device (torch.device | None)
dtype (torch.dtype | None)
uplo (Literal['n', 'u', 'l'])
- multipole(driver, intstring)[source]#
Calculation of multipole integral. The integral is normalized, using the diagonal of the overlap integral.
- Return type:
- Parameters:
driver (IntDriver) – The integral driver for the calculation.
intstring (str) – String for libcint integral engine.
- Returns:
Normalized multipole integral.
- Return type:
Tensor
- Parameters:
driver (IntDriverLibcint)
intstring (str)
- cutoff: Tensor | float | int | None#
Real-space cutoff for integral calculation in Bohr. Defaults to constants.defaults.INTCUTOFF.
- family: Literal['libcint']#
Label for integral implementation family.
- uplo: Literal['n', 'u', 'l']#
Whether the matrix of unique shell pairs should be create as a triangular matrix (l: lower, u: upper) or full matrix (n). Defaults to l (lower triangular matrix).
Implementation: Dipole#
Dipole integral implementation based on libcint.
- class dxtb._src.integral.driver.libcint.dipole.DipoleLibcint(device=None, dtype=None, uplo='l', cutoff=50.0)[source]#
Bases:
DipoleIntegral,MultipoleLibcintDipole integral from atomic orbitals.
- Parameters:
device (torch.device | None)
dtype (torch.dtype | None)
uplo (Literal['n', 'N', 'u', 'U', 'l', 'L'])
- build(driver)[source]#
Calculation of dipole integral using libcint.
- Return type:
- Parameters:
driver (IntDriverLibcint) – The integral driver for the calculation.
- Returns:
Dipole integral.
- Return type:
Tensor
- Parameters:
driver (IntDriverLibcint)
- get_gradient(driver)[source]#
Calculation of dipole gradient using libcint.
- Return type:
- Parameters:
driver (IntDriverLibcint) – The integral driver for the calculation.
- Returns:
Dipole gradient.
- Return type:
Tensor
- Parameters:
driver (IntDriverLibcint)
- cutoff: Tensor | float | int | None#
Real-space cutoff for integral calculation in Bohr. Defaults to constants.defaults.INTCUTOFF.
- family: Literal['libcint']#
Label for integral implementation family.
- uplo: Literal['n', 'u', 'l']#
Whether the matrix of unique shell pairs should be create as a triangular matrix (l: lower, u: upper) or full matrix (n). Defaults to l (lower triangular matrix).
Implementation: Quadrupole#
Quadrupole integral implementation based on libcint.
- class dxtb._src.integral.driver.libcint.quadrupole.QuadrupoleLibcint(device=None, dtype=None, uplo='l', cutoff=50.0)[source]#
Bases:
QuadrupoleIntegral,MultipoleLibcintQuadrupole integral from atomic orbitals.
- Parameters:
device (torch.device | None)
dtype (torch.dtype | None)
uplo (Literal['n', 'N', 'u', 'U', 'l', 'L'])
- build(driver)[source]#
Calculation of quadrupole integral using libcint.
- Return type:
- Parameters:
driver (IntDriverLibcint) – The integral driver for the calculation.
- Returns:
Quadrupole integral.
- Return type:
Tensor
- Parameters:
driver (IntDriverLibcint)
- cutoff: Tensor | float | int | None#
Real-space cutoff for integral calculation in Bohr. Defaults to constants.defaults.INTCUTOFF.
- family: Literal['libcint']#
Label for integral implementation family.
- uplo: Literal['n', 'u', 'l']#
Whether the matrix of unique shell pairs should be create as a triangular matrix (l: lower, u: upper) or full matrix (n). Defaults to l (lower triangular matrix).