basis_set Derived Type

type, public :: basis_set


Inherits

type~~basis_set~~InheritsGraph type~basis_set basis_set type~atomic_structure atomic_structure type~basis_set->type~atomic_structure atoms type~ecp_parameters ecp_parameters type~basis_set->type~ecp_parameters ecp_params

Inherited by

type~~basis_set~~InheritedByGraph type~basis_set basis_set type~information information type~information->type~basis_set basis type~int2_compute_t int2_compute_t type~int2_compute_t->type~basis_set basis

Components

Type Visibility Attributes Name Initial
real(kind=real64), public, dimension(:), allocatable :: ex
real(kind=real64), public, dimension(:), allocatable :: cc
real(kind=real64), public, dimension(:), allocatable :: bfnrm
integer, public, dimension(:), allocatable :: g_offset
integer, public, dimension(:), allocatable :: origin
integer, public, dimension(:), allocatable :: am
integer, public, dimension(:), allocatable :: ncontr
integer, public, dimension(:), allocatable :: ao_offset
integer, public, dimension(:), allocatable :: naos
integer, public, dimension(:), allocatable :: ecp_zn_num
integer, public :: nshell = 0
integer, public :: nprim = 0
integer, public :: nbf = 0
integer, public :: mxcontr = 0
integer, public :: mxam = 0
type(ecp_parameters), public :: ecp_params
type(atomic_structure), public, pointer :: atoms
real(kind=real64), public, allocatable :: at_mx_dist2(:)
real(kind=real64), public, allocatable :: prim_mx_dist2(:)
real(kind=real64), public, allocatable :: shell_mx_dist2(:)
real(kind=real64), public, allocatable :: shell_centers(:,:)

Type-Bound Procedures

procedure, public, pass(basis) :: from_file

  • private subroutine from_file(basis, basis_file, atoms, err)

    @brief Apply selected basis set library to the molecule @param[inout] basis applied basis set to system @param[in] basis_file path to basis set in OQP basis set format @param[in] atoms atoms in systems (pointer to this variable will be set) @param[out] err err flag

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis
    character(len=*), intent(in) :: basis_file
    type(atomic_structure), intent(in), target :: atoms
    logical, intent(out) :: err

procedure, public, pass(basis) :: append

  • private subroutine append(basis, atom, atom_index, atom_number, err, newatom)

    @brief Append a set of shells to the basis set @param[in] atom basis set for atom, which contains: nshells number of shells to append nprims number of primites to append nbfs number of basis functions to append ang(:) array of shells angular momentums ncontract(:) array of shells contraction degrees ex(:) array of primitive exponent coefficients cc(:) array of primitive contraction coefficients @param[in] atom_index index of added atom in molecule specification @param[in[ atom_number number/charge of added atom in molecule specification @param[in] newatom whether to add a new atom or add to the last one @param[inout] err err flag @author Vladimir Mironov @date -Sep, 2021- Initial release

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis
    class(atom_basis_t), intent(in) :: atom
    integer, intent(in) :: atom_index
    integer, intent(in) :: atom_number
    logical, intent(inout) :: err
    logical, intent(in), optional :: newatom

procedure, public, pass(basis) :: load

  • private subroutine load(basis, LU)

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis
    integer, intent(in) :: LU

procedure, public, pass(basis) :: dump

  • private subroutine dump(basis, LU)

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(in) :: basis
    integer, intent(in) :: LU

procedure, public, pass(basis) :: normalize_primitives

  • private subroutine normalize_primitives(basis)

    @brief Remove normalization for primitives @author Vladimir Mironov @date -Sep, 2021- Initial release

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis

procedure, public, pass(basis) :: normalize_contracted

  • private subroutine normalize_contracted(basis)

    @brief Normalize contracted shells @author Vladimir Mironov @date -Sep, 2021- Initial release

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis

procedure, public, pass(basis) :: set_bfnorms

  • private subroutine set_bfnorms(basis)

    @brief Initialize array of basis function normalization factors @author Vladimir Mironov @date -Sep, 2018- Initial release

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis

procedure, public, pass(basis) :: reserve => omp_sp_reserve

  • private subroutine omp_sp_reserve(basis, num_shell, num_gauss, num_bf)

    @brief Allocate arrays in BASIS_SET type variable @author Vladimir Mironov @date -Sep, 2021- Initial release

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis
    integer, intent(in) :: num_shell
    integer, intent(in) :: num_gauss
    integer, intent(in) :: num_bf

generic, public :: aoval => compAOv, compAOvg, compAOvgg

  • private subroutine compAOv(basis, ptxyz, naos, aov)

    @brief Compute AO values in a point @param[in] basis atomic basis set @param[in] ptxyz coordinates of a point in space @param[out] naos number of significant AOs @param[out] aov AO values @author Vladimir Mironov

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set) :: basis
    real(kind=fp), intent(in) :: ptxyz(3)
    integer, intent(out) :: naos
    real(kind=fp), intent(out), contiguous :: aov(:)
  • private subroutine compAOvg(basis, ptxyz, naos, aov, aogx, aogy, aogz)

    @brief Compute AO values and gradient in a point @param[in] basis atomic basis set @param[in] ptxyz coordinates of a point in space @param[out] naos number of significant AOs @param[out] aov AO values @param[out] aogx AO gradient, X component @param[out] aogy AO gradient, Y component @param[out] aogz AO gradient, Z component @author Vladimir Mironov

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set) :: basis
    real(kind=fp), intent(in) :: ptxyz(3)
    integer, intent(out) :: naos
    real(kind=fp), intent(out), contiguous :: aov(:)
    real(kind=fp), intent(out), contiguous :: aogx(:)
    real(kind=fp), intent(out), contiguous :: aogy(:)
    real(kind=fp), intent(out), contiguous :: aogz(:)
  • private subroutine compAOvgg(basis, ptxyz, naos, aov, aogx, aogy, aogz, aog2xx, aog2yy, aog2zz, aog2xy, aog2yz, aog2xz)

    @brief Compute AO values, and their 1st and 2nd derivatives in a point @param[in] basis atomic basis set @param[in] ptxyz coordinates of a point in space @param[out] naos number of significant AOs @param[out] aov AO values @param[out] aogx AO gradient, X component @param[out] aogy AO gradient, Y component @param[out] aogz AO gradient, Z component @param[out] aog2xx AO 2nd derivative, XX component @param[out] aog2yy AO 2nd derivative, YY component @param[out] aog2zz AO 2nd derivative, ZZ component @param[out] aog2xy AO 2nd derivative, XY component @param[out] aog2yz AO 2nd derivative, YZ component @param[out] aog2xz AO 2nd derivative, XZ component @author Vladimir Mironov

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set) :: basis
    real(kind=fp), intent(in) :: ptxyz(3)
    integer, intent(out) :: naos
    real(kind=fp), intent(out), contiguous :: aov(:)
    real(kind=fp), intent(out), contiguous :: aogx(:)
    real(kind=fp), intent(out), contiguous :: aogy(:)
    real(kind=fp), intent(out), contiguous :: aogz(:)
    real(kind=fp), intent(out), contiguous :: aog2xx(:)
    real(kind=fp), intent(out), contiguous :: aog2yy(:)
    real(kind=fp), intent(out), contiguous :: aog2zz(:)
    real(kind=fp), intent(out), contiguous :: aog2xy(:)
    real(kind=fp), intent(out), contiguous :: aog2yz(:)
    real(kind=fp), intent(out), contiguous :: aog2xz(:)

procedure, public, pass(basis) :: compAOv

  • private subroutine compAOv(basis, ptxyz, naos, aov)

    @brief Compute AO values in a point @param[in] basis atomic basis set @param[in] ptxyz coordinates of a point in space @param[out] naos number of significant AOs @param[out] aov AO values @author Vladimir Mironov

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set) :: basis
    real(kind=fp), intent(in) :: ptxyz(3)
    integer, intent(out) :: naos
    real(kind=fp), intent(out), contiguous :: aov(:)

procedure, public, pass(basis) :: compAOvg

  • private subroutine compAOvg(basis, ptxyz, naos, aov, aogx, aogy, aogz)

    @brief Compute AO values and gradient in a point @param[in] basis atomic basis set @param[in] ptxyz coordinates of a point in space @param[out] naos number of significant AOs @param[out] aov AO values @param[out] aogx AO gradient, X component @param[out] aogy AO gradient, Y component @param[out] aogz AO gradient, Z component @author Vladimir Mironov

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set) :: basis
    real(kind=fp), intent(in) :: ptxyz(3)
    integer, intent(out) :: naos
    real(kind=fp), intent(out), contiguous :: aov(:)
    real(kind=fp), intent(out), contiguous :: aogx(:)
    real(kind=fp), intent(out), contiguous :: aogy(:)
    real(kind=fp), intent(out), contiguous :: aogz(:)

procedure, public, pass(basis) :: compAOvgg

  • private subroutine compAOvgg(basis, ptxyz, naos, aov, aogx, aogy, aogz, aog2xx, aog2yy, aog2zz, aog2xy, aog2yz, aog2xz)

    @brief Compute AO values, and their 1st and 2nd derivatives in a point @param[in] basis atomic basis set @param[in] ptxyz coordinates of a point in space @param[out] naos number of significant AOs @param[out] aov AO values @param[out] aogx AO gradient, X component @param[out] aogy AO gradient, Y component @param[out] aogz AO gradient, Z component @param[out] aog2xx AO 2nd derivative, XX component @param[out] aog2yy AO 2nd derivative, YY component @param[out] aog2zz AO 2nd derivative, ZZ component @param[out] aog2xy AO 2nd derivative, XY component @param[out] aog2yz AO 2nd derivative, YZ component @param[out] aog2xz AO 2nd derivative, XZ component @author Vladimir Mironov

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set) :: basis
    real(kind=fp), intent(in) :: ptxyz(3)
    integer, intent(out) :: naos
    real(kind=fp), intent(out), contiguous :: aov(:)
    real(kind=fp), intent(out), contiguous :: aogx(:)
    real(kind=fp), intent(out), contiguous :: aogy(:)
    real(kind=fp), intent(out), contiguous :: aogz(:)
    real(kind=fp), intent(out), contiguous :: aog2xx(:)
    real(kind=fp), intent(out), contiguous :: aog2yy(:)
    real(kind=fp), intent(out), contiguous :: aog2zz(:)
    real(kind=fp), intent(out), contiguous :: aog2xy(:)
    real(kind=fp), intent(out), contiguous :: aog2yz(:)
    real(kind=fp), intent(out), contiguous :: aog2xz(:)

procedure, public, pass(basis) :: init_shell_centers

  • private subroutine init_shell_centers(basis)

    @brief Initialize array of shell centers used in electronic integral code

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis

procedure, public :: set_screening => comp_basis_mxdists

  • private subroutine comp_basis_mxdists(basis, mLogTol)

    @brief Compute maximum extent of basis set primitives up to a given tolerance. @details Find the largest root of the eqn.: rn * exp(-a*r2) = tol, and fill prim_mx_dist2 array with correspoinding r2 values For n==0 (S shells) the solution is trivial. For n>0 (P,D,F... shells) the equivalent equation is used: ln(q)/2 - a*q/n - ln(tol)/n == 0, where q = r2 The solution of this equation is: q = -n/(2a) * W_{-1} (-(2a/n)tol(2/n)) where W_{k} (x) - k-th branch of Lambert W function Assuming that a << 0.5tol(-2/n), W_{-1} (x) can be approximated: W_{-1} (-x) = log(x) - log(-log(x)) The assumption holds for reasonable basis sets. Next, the approximated result is then refined by making 1-2 Newton-Raphson steps. The error of this approximation is (much) less than 10(-4) Bohr2 for typical cases: a < 10^6, n = (1 to 3) (P to F shells), tol = 10(-10) a < 10^3, n = (4 to 6) (G to I shells), tol = 10**(-10) @param[in] basis basis set variable @param[in] mlogtol -ln(tol) value @author Vladimir Mironov

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis
    real(kind=dp), intent(in) :: mLogTol

procedure, public, pass(basis) :: basis_broadcast

  • private subroutine basis_broadcast(basis, comm, usempi)

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(inout) :: basis
    integer(kind=int32) :: comm
    logical(kind=c_bool), intent(in) :: usempi

procedure, public, pass(basis) :: bf_label

  • private function bf_label(basis, bf) result(label)

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(in) :: basis
    integer, intent(in) :: bf

    Return Value character(len=8)

procedure, public, pass(basis) :: bf_to_shell

  • private function bf_to_shell(basis, bf) result(res)

    Arguments

    Type IntentOptional Attributes Name
    class(basis_set), intent(in) :: basis
    integer, intent(in) :: bf

    Return Value integer