pyscfad.gto.mole.Mole.eval_gto#

Mole.eval_gto(eval_name, grid_coords, comp=None, shls_slice=None, non0tab=None, ao_loc=None, cutoff=None, out=None)[source]#

Evaluate AO function value on the given grids,

Args:

eval_name : str

Function

comp

Expression

“GTOval_sph”

1

|AO>

“GTOval_ip_sph”

3

nabla |AO>

“GTOval_ig_sph”

3

(#C(0 1) g) |AO>

“GTOval_ipig_sph”

9

(#C(0 1) nabla g) |AO>

“GTOval_cart”

1

|AO>

“GTOval_ip_cart”

3

nabla |AO>

“GTOval_ig_cart”

3

(#C(0 1) g)|AO>

“GTOval_sph_deriv1”

4

GTO value and 1st order GTO values

“GTOval_sph_deriv2”

10

All derivatives up to 2nd order

“GTOval_sph_deriv3”

20

All derivatives up to 3rd order

“GTOval_sph_deriv4”

35

All derivatives up to 4th order

“GTOval_sp_spinor”

1

sigma dot p |AO> (spinor basis)

“GTOval_ipsp_spinor”

3

nabla sigma dot p |AO> (spinor basis)

“GTOval_ipipsp_spinor”

9

nabla nabla sigma dot p |AO> (spinor basis)

atmint32 ndarray

libcint integral function argument

basint32 ndarray

libcint integral function argument

envfloat64 ndarray

libcint integral function argument

coords2D array, shape (N,3)

The coordinates of the grids.

Kwargs:
compint

Number of the components of the operator

shls_slice2-element list

(shl_start, shl_end). If given, only part of AOs (shl_start <= shell_id < shl_end) are evaluated. By default, all shells defined in mol will be evaluated.

non0tab2D bool array

mask array to indicate whether the AO values are zero. The mask array can be obtained by calling dft.gen_grid.make_mask()

cutofffloat

AO values smaller than cutoff will be set to zero. The default cutoff threshold is ~1e-22 (defined in gto/grid_ao_drv.h)

outndarray

If provided, results are written into this array.

Returns:

An 2D to 4D array for AO values on grids. If eval_name is scalar functions, such as GTOval and GTOval_ip_cart, the shape of the return is (N,nao) for GTOval, and (,N,nao) for other functions. If eval_name is spinor functions, such as GTOval_spinor and GTOval_sp_spinor, the shape of the return is (2,N,nao) for GTOval_spinor, and (2,,N,nao) for other functions. The leading dimension 2 represents the spin-up and spin-down components of the spinor basis.

Examples:

>>> mol = gto.M(atom='O 0 0 0; H 0 0 1; H 0 1 0', basis='ccpvdz')
>>> coords = numpy.random.random((100,3))  # 100 random points
>>> ao_value = mol.eval_gto("GTOval_sph", coords)
>>> print(ao_value.shape)
(100, 24)
>>> ao_value = mol.eval_gto("GTOval_ig_sph", coords)
>>> print(ao_value.shape)
(3, 100, 24)
>>> ao_a, ao_b = mol.eval_gto("GTOval_spinor", coords)
>>> print(ao_a.shape)
(100, 24)