Interface: Integral Namemanager#

The libcint interface is accessed via strings. This module provides the corresponding name handling and manipulation.

class tad_libcint.interface.namemanager.IntorNameManager(int_type, shortname)[source]#

Bases: object

Class for integral name manipulation.

This class should only perform string-manipulation and no array operations.

property fullname#
get_comp_permute_path(transpose_path)[source]#

Get the component permute path given the basis transpose path.

Parameters:

transpose_path (list[tuple[int, int]]) – Transpose path of the basis.

Returns:

Component permute path.

Return type:

list[int]

get_ft_intgl_name(spherical)[source]#

Get the full name of the Fourier transform integral in libcint library.

Parameters:

spherical (bool) – Whether the integral is in spherical or cartesian coordinates.

Returns:

Full name of the Fourier transform integral in libcint library.

Return type:

str

Raises:

NotImplementedError – If the Fourier transform integral is not implemented for the given integral type.

get_intgl_components_shape()[source]#
get_intgl_deriv_namemgr(derivop, ibasis)[source]#

Get the name manager of a new integral when derivop is applied to ibasis-th basis.

Parameters:
  • derivop (str) – String of the derivative operation.

  • ibasis (int) – Which basis the derivative operation should be performed (0-based).

Returns:

Name manager of the new integral.

Return type:

IntorNameManager

get_intgl_deriv_newaxispos(derivop, ibasis)[source]#

Get the new axis position in the new integral name when derivop is applied

Parameters:
  • derivop (str) – String of the derivative operation.

  • ibasis (int) – Which basis the derivative operation should be performed (0-based).

Returns:

New axis position or None if no new axis is inserted.

Return type:

None | int

get_intgl_name(spherical)[source]#

Get the full name of the integral in libcint library.

Parameters:

spherical (bool) – Whether the integral is in spherical or cartesian coordinates.

Returns:

Full name of the integral in libcint library.

Return type:

str

get_intgl_symmetry(_)[source]#
classmethod get_nbasis(int_type)[source]#

Get the number of basis for the given integral type.

Parameters:

int_type (str) – Type of the integral.

Returns:

Number of basis.

Return type:

int

Raises:

RuntimeError – If the integral type is unknown.

get_transpose_path_to(other)[source]#

Get the transpose path to the other integral. Check if the other integral can be achieved by transposing the current integral.

Parameters:

other (IntorNameManager) – The other integral name manager.

Returns:

Transpose path of self to get the same result as the other integral or None if it cannot be achieved.

Return type:

list[tuple[int, int]] | None

Raises:

RuntimeError – If the number of basis is not supported.

property int_type#
classmethod join_name(int_type, rawsname, ops)[source]#

Join the raw shortname and list of basis operators into a shortname.

Parameters:
  • int_type (str) – Type of the integral.

  • rawsname (str) – Raw shortname (i.e., the middle operator).

  • ops (list[list[str]]) – List of basis-operator shortname.

Returns:

Shortname of the integral.

Return type:

str

Raises:

RuntimeError – If the number of basis is not supported.

op_comp = {'ip': (3,)}#
op_ndim = {'ip': 1}#
ops_name = ['ip', 'rr']#
property order#

Get the order of the derivative of the integral.

Returns:

Order of derivative.

Return type:

int

rawop_comp = {'j': (3,), 'jj': (9,), 'jjj': (27,), 'm': (3,), 'mm': (9,), 'mmm': (27,), 'n': (3,), 'nn': (9,), 'nnn': (27,), 'r0': (3,), 'r0r0': (9,), 'r0r0r0': (27,)}#
rawop_ndim = {'j': 1, 'jj': 1, 'jjj': 1, 'm': 1, 'mm': 1, 'mmm': 1, 'n': 1, 'nn': 1, 'nnn': 1, 'r0': 1, 'r0r0': 1, 'r0r0r0': 1}#
property rawopname#
sep_name = ['a', 'b']#
property shortname#
classmethod split_name(int_type, shortname)[source]#

Split the shortname into operator per basis.

Parameters:
  • int_type (str) – Type of the integral.

  • shortname (str) – Shortname of the integral.

Returns:

Raw shortname (i.e., the middle operator) and list of basis-operator shortname.

Return type:

tuple[str, list[list[str]]]

Raises:

RuntimeError – If the number of basis is not supported.