GBTOlib: library for evaluation of molecular integrals in mixed Gaussian / B-spline basis 111
Loading...
Searching...
No Matches
molecular_basis_gbl::molecular_orbital_basis_obj Type Reference
Inheritance diagram for molecular_basis_gbl::molecular_orbital_basis_obj:
Collaboration diagram for molecular_basis_gbl::molecular_orbital_basis_obj:

Public Member Functions

procedure init (this, n, geometry)
 Allocates space for a given number and type of shells of basis functions.
procedure read_basis_and_integrals (this, file_name, atomic_orbital_basis, one_electron_integrals, two_electron_integrals, options)
 Initialize the object by reading everything from the given integrals file and read all MO integrals. The input is the path to the moints file and the atomic basis object to be pointed at. On output the molecular basis is initialized, the integral arrays and the integral options objects are initialized with the data read-in from the moints file. It is assumed that the moints file includes 1-electron and 2-electron integrals.
procedure final (this)
 Finalizes the basis set.
procedure add_shell (this, shell_data)
 Adds data for one shell into the basis set.
procedure print (this)
 Prints the orbital basis set data to the stdout unit.
procedure write_qec_orbital_table (this)
 Prints the orbital basis set data to a file. Uses by QEC controlled with a logical in the scatci_integrals program.
procedure print_molecular_orbital_info (this, unit_number)
 Prints the orbital basis set data to any unit number.
procedure print_orbitals (this)
 Prints the orbital coefficients to the stdout unit.
procedure print_energy_sorted_orbital_table (this, print_level_override)
 Prints an orbital table showing the orbitals sorted in energy.
procedure orthogonalize (this, overlap_matrix, symmetry, gramm_schmidt, gramm_schmidt_one_by_one, symmetric, sym_ortho_data, active_start, active_end, passive_start, passive_end, check_overlaps)
 Performs Gramm-Schmidt or Symmetric orthogonalization. The type of orthogonalization is selected using the logical parameters 'gramm_schmidt' or 'symmetric'. By default for G-S orthogonalization all orbitals are orthogonalized starting from the orbital with index 1 in the basis set. By default for symmetric orthogonalization all orbitals are orthogonalized. The range of 'active' and 'passive' orbitals can be selected by specifying the optional integers active_start, active_end and passive_start, passive_end which specify the range of indices for the orbitals to orthogonalize and not to orthogonalize. The format for the indices is (/num,sym/) where num is the (external) number of the orbital and sym is its symmetry. For symmetric orthogonalization the set of 'passive' orbitals is used only to check at the end that all 'active' orbitals are orthogonal to the 'passive' orbitals. The orthogonalization requires the AO overlap integrals array. If symmetric orthogonalization is required then the data structure of type sym_ortho_io must be also present on input. It specifies the deletion thresholds for each symmetry. On output it contains the list of orbitals to delete (i.e. those that didn't pass the deletion threshold criterion) in the form of a logical array which marks the orbitals for deletion.
procedure delete_orbitals (this, symmetry, to_delete)
 Deletes specified orbitals of a given symmetry. The orbitals to delete are marked in an input logical array which must have size equal to the number of orbitals in the given symmetry.
procedure one_electron_integrals (this, integral_storage, integral_options)
 Calculates and stores 1-electron integrals for all pairs of shells in the basis. The atomic integrals to be transformed are input via the type-bound pointer ao_integral_storage.
procedure two_electron_integrals (this, integral_storage, integral_options)
 Calculates and stores 2-electron integrals for all pairs of shells in the basis. The atomic integrals to be transformed are input via the type-bound pointer ao_integral_storage.
procedure two_electron_integrals_sparse (this, integral_storage, integral_options)
 Variant of "two_electron_integrals" useful for B-spline-only continuum basis. The subroutine makes use of sparsity of the two-electron integral matrix.
procedure transform_two_indices (this, nbk, nao, nmo, mo_integrals, cp, cj, cv, step, tolerance, skip2ec, max_buffer_size, index_scheme, keep_ao_integrals)
 Transforms two of four atomic orbital indices to molecular ones.
procedure fetch_atomic_integrals_block (this, ao_integrals, iblk, rbeg, rn, ri, rv, skip2ec, index_scheme, block_offset)
 Retrieves a block of atomic integrals from the integral array.
procedure finalize_two_electron_integrals_sparse (this, rn, ri, rv, integral_storage, integral_options, column_descriptor)
 Moves temporary integral arrays to this object's data arrays and stores the integrals to disk.
procedure integral_index (this, integral_type, bf_indices, two_p_continuum)
 Calculates indices for 1- or 2-electron integrals given their type and the number of basis function pairs/quartets. The two_p_continuum input variable is not used for MO integrals, the indexing method is the same whether we calculate the two particle continuum integrals or not.
procedure get_basis_name (this)
 Returns the name of the basis set.
procedure get_shell_name (this, i)
 Returns the name of the i-th shell in the basis set.
procedure get_shell_data (this, i, shell_data)
 Returns the shell data for the i-th shell in the basis set.
procedure get_all_orbital_sets (this, orbital_sets, number_of_orbital_sets)
 Returns an array containing data for all shells of CGTOs in the basis.
procedure get_orbital_coefficient_matrix (this, cf)
 Returns the matrix containing coefficients for all orbitals in the basis.
procedure is_initialized (this)
 Returns the value of initialized.
procedure get_continuum_flags (this, irr, list)
 Same as for atomic_orbital_basis_obj but here we use the symmetry information for the orbitals.
procedure get_number_of_orbitals (this, irr)
 Returns the number of orbitals in a given symmetry.
procedure get_index_within_symmetry (this, absolute_index)
 Returns the index within its own symmetry of a given orbital.
procedure get_orbital_symmetry (this, absolute_index)
 Returns the symmetry of a given orbital.
procedure get_absolute_index (this, num, sym)
 Given the pair of numbers num,sym it returns the absolute index of the orbital within the whole orbital set.
procedure calculate_amplitudes (this, a, normalize_to_a, amplitudes, continuum_channels)
 Calculates orbital amplitudes for all continuum channels.
procedure radial_charge_density (this, rmat_radius, a, b, delta_r, save_to_disk, charge_densities)
 Calculates radial charge densities of all orbitals in the basis. If the input value of rmat_radius is > 0.0_cfp then the continuum functions will be normalized to the R-matrix radius rmat_radius. If rmat_radius .le. 0 then normalization of the continuum functions will not be done. This is useful in case the orbital set corresponds to the Dyson orbitals obtained from CDENPROP: in this case the orbital coefficients already include the continuum normalization factors and therefore rmat_radius must be set to < 0.0_cfp.
procedure delete_small_coefficients (this)
 Deletes orbital coefficients with magnitude smaller than thrs_orb_cf.
procedure write_ijkl_indices (this, lunit, record_start, position_after_write)
 Writes to disk the array ijkl_indices and the value ind_ijkl_integral. As usual, only master writes its own array.
procedure read_ijkl_indices (this, lunit, file_name, record_start, position_after_read)
 Reads from the disk the array ijkl_indices and the value ind_ijkl_integral. The reading is done by the master task which also perform redistribution to other processes. If shared-memory MPI is used then each NODE keeps only one copy of the array thisijkl_indices, otherwise the array is kept by every MPI task.
procedure eval_orbital (this, orb_i, r, n_points, orbital_at_r, sign_at_r)
 Evaluates a given orbital (specified by its absolute index) at a set of points in space. The sign of the orbital at the corresponding points is output too in a separate array. No normalization of the continuum functions is performed so make sure you're either using atomic basis set whose functions have been normalized to the required R-matrix radius or use orbital coefficients which include the continuum normalization factors (as is the case for the Dyson orbitals produced by CDENPROP).
procedure construct_canonical_continuum (this, atomic_1el_integral_storage, atomic_2el_integral_storage, molecular_integral_storage, integral_options_in, molecular_2el_algorithm, n_cont_bto, n_cont_cgto, mo_integrals_file_name, can_mo_integrals_file_name)
 Constructs canonical continuum.
procedure solve_roothan_equations (this, integral_options, orbital_data)
 Obtains atomic and molecular basis and solves iteratively the roothan equations.
procedure two_electron_integrals_poisson (this, mo_integral_storage, mo_integral_options)
 Calculates and stores 2-electron integrals for all pairs of shells in the basis using the Poisson equation.
procedure finalize_two_electron_integrals_poisson (this, no_mo, mo_integral_options, mo_integral_storage, mo_integrals, dnc, anc)
 Last stage of the Poisson equation method - populates the integral array and writes it to disk.
Public Member Functions inherited from basis_data_generic_gbl::basis_data_generic_obj
procedure(init_bdg_intf), deferred init (this, n, geometry)
 Allocates space for a given number and type of shells of basis functions.
procedure(final_bdg_intf), deferred final (this)
 Finalizes the basis set.
procedure(add_shell_bdg_intf), deferred add_shell (this, shell_data)
 Adds data for one shell into the basis set.
procedure(one_electron_integrals_bdg_intf), deferred one_electron_integrals (this, integral_storage, integral_options)
 Calculates and stores 1-electron integrals for all pairs of shells in the basis.
procedure(two_electron_integrals_bdg_intf), deferred two_electron_integrals (this, integral_storage, integral_options)
 Calculates and stores 2-electron integrals for all quartets of shells in the basis with possible exclusion of certain classes of integrals as specified on input in integral_options.
procedure(integral_index_bdg_intf), deferred integral_index (this, integral_type, bf_indices, two_p_continuum)
 Calculates indices for 1-electron or 2-electron integrals given a list of pairs or quartets of basis functions and specifying the type of the integral to index. The two_p_continuum input variable is used only for AO integrals.
procedure, non_overridable write (this, path)
 Writes the basis set data into the given file.
procedure, non_overridable read (this, path)
 Reads the basis set data from the given file.
procedure(print_bdg), deferred print (this)
 Prints the basis set data to stdout.
procedure(get_basis_name_bdg_intf), deferred get_basis_name (this)
 Returns the character string identifying the basis set. This is used for input/output involving disk.
procedure(get_shell_name_bdg_intf), deferred get_shell_name (this, i)
 Returns the character string identifying the i-th shell in the basis set. This is used for input/output involving disk.
procedure(get_shell_data_bdg_intf), deferred get_shell_data (this, i, shell_data)
 Returns the shell data for the i-th shell in the basis set. This is used for input/output involving disk.
procedure(is_initialized_bdg_intf), deferred is_initialized (this)
 Returns .true. if the basis set has been initialized.
procedure(get_continuum_flags_bdg_intf), deferred get_continuum_flags (this, irr, list)
 For a given IRR it returns a list of logical values of size equal to the number of functions with that IRR in the basis. i-th element of the output array is set to .true. if the i-th function in the basis is a continuum function.
procedure(amplitudes_intf), deferred calculate_amplitudes (this, a, normalize_to_a, amplitudes, continuum_channels)
 Calculates amplitudes for all functions in the basis up to the channel with the given maximum l-value of and radial distance from CMS.

Public Attributes

class(atomic_orbital_basis_obj), pointer ao_basis => null()
 Pointer to the AO basis object in terms of which this MO set is specified. This pointer must be associated before calling init.
class(integral_storage_obj), pointer ao_integral_storage => null()
 This pointer must be associated by the user before calling one_electron_integrals or two_electron_integrals to the set of atomic integrals to be transformed.
integer pg = -1
 Point group symmetry of the orbitals in this set.
integer no_irr = 0
 Number of irreducible representations.
integer, dimension(:,:), allocatable so2mo_range
 so2mo_range: indices of the first and the last MO to which a given AO contributes. mo2so_range is the opposite for the MOs. These arrays have a meaning identical to the one explained in: S.Yamamoto, U. Nagashima, CPC 166 (2005) 58-65.
integer, dimension(:,:), allocatable mo2so_range
integer, dimension(:), allocatable block_offset
 Arrays used to compute the index for the 2-particle symmetric (AB|CD) integrals. For details see add_function.
integer, dimension(:), allocatable sym_offset
integer, dimension(:,:), pointer ijkl_indices => null()
 Indices of the 2-electron integrals for each type of integral. Determined by two_electron_integrals. The pointer attribute is necessary for shared memory usage.
integer ind_ijkl_integral = 0
 Index of the last integral stored in ijkl_indices.
type(file_mappingmmap
 Auxiliary helper structure for virtual memory mapping.
Public Attributes inherited from basis_data_generic_gbl::basis_data_generic_obj
type(symmetry_objsymmetry_data
 The symmetry specification is fully in control of the user.
integer number_of_shells = 0
 Total number of shells in the basis.
integer number_of_functions = 0
 The number of functions generated by all shells in the basis.

Member Function/Subroutine Documentation

◆ add_shell()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::add_shell ( class(molecular_orbital_basis_obj) this,
class(shell_data_obj), intent(inout) shell_data )

Adds data for one shell into the basis set.

◆ calculate_amplitudes()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::calculate_amplitudes ( class(molecular_orbital_basis_obj) this,
real(kind=cfp), intent(in) a,
logical, intent(in) normalize_to_a,
real(kind=cfp), dimension(:,:), allocatable amplitudes,
integer, dimension(:,:), allocatable continuum_channels )

Calculates orbital amplitudes for all continuum channels.

◆ construct_canonical_continuum()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::construct_canonical_continuum ( class(molecular_orbital_basis_obj) this,
class(integral_storage_obj), intent(inout), target atomic_1el_integral_storage,
class(integral_storage_obj), intent(inout), target atomic_2el_integral_storage,
class(integral_storage_obj), intent(inout), target molecular_integral_storage,
class(integral_options_obj), intent(in) integral_options_in,
integer, intent(in) molecular_2el_algorithm,
integer, intent(in) n_cont_bto,
integer, intent(in) n_cont_cgto,
character(len=line_len), intent(in) mo_integrals_file_name,
character(len=line_len), intent(in) can_mo_integrals_file_name )

Constructs canonical continuum.

◆ delete_orbitals()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::delete_orbitals ( class(molecular_orbital_basis_obj) this,
integer, intent(in) symmetry,
logical, dimension(:), intent(in) to_delete )

Deletes specified orbitals of a given symmetry. The orbitals to delete are marked in an input logical array which must have size equal to the number of orbitals in the given symmetry.

◆ delete_small_coefficients()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::delete_small_coefficients ( class(molecular_orbital_basis_obj) this)

Deletes orbital coefficients with magnitude smaller than thrs_orb_cf.

◆ eval_orbital()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::eval_orbital ( class(molecular_orbital_basis_obj) this,
integer, intent(in) orb_i,
real(kind=cfp), dimension(3,n_points), intent(in) r,
integer, intent(in) n_points,
real(kind=cfp), dimension(:), allocatable orbital_at_r,
integer, dimension(:), allocatable sign_at_r )

Evaluates a given orbital (specified by its absolute index) at a set of points in space. The sign of the orbital at the corresponding points is output too in a separate array. No normalization of the continuum functions is performed so make sure you're either using atomic basis set whose functions have been normalized to the required R-matrix radius or use orbital coefficients which include the continuum normalization factors (as is the case for the Dyson orbitals produced by CDENPROP).

◆ fetch_atomic_integrals_block()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::fetch_atomic_integrals_block ( class(molecular_orbital_basis_obj) this,
type(p2d_array_obj), pointer ao_integrals,
integer, intent(in) iblk,
integer, intent(inout) rbeg,
integer, intent(out) rn,
integer, dimension(:,:), intent(inout) ri,
real(kind=cfp), dimension(:,:), intent(inout) rv,
logical, intent(in) skip2ec,
integer, intent(in) index_scheme,
integer, dimension(:), optional, allocatable block_offset )

Retrieves a block of atomic integrals from the integral array.

Authors
Jakub Benda, Zdenek Masin
Date
2018, 2020 - 2025

Retrieve non-zero [pq|rs] atomic integrals for given block index (ie. for given p,q), restricted to the upper triangle (r <= s). Write them into the supplied (pre-allocated) arrays Ri(:), Rv(:) as elements of sparse 4-index tensor; Ri(:) will contain rectangular zero-based multi-indices of the non-zero elements, Rv(:) will contain the values of the integrals.

If the optional parameter block_offset is specified, implying prefetching in MPI mode, both triangles are fetched.

Parameters
thisReference to the parent type.
ao_integralsPointer to the p2d_array_obj structure where the AO integrals are stored
iblkZero-based rectangular multi-index of the block to retrive.
rbegStarting index for arrays Ri, Rv. In case block_offset is present this value has the meaning of the offset for storage of the integrals in the Rv array which is gradually accumulated in the main loop over iblk.
RnOn return, number of elements written into the arrays Rv and Ri.
RiZero-based multi-index for each element in Rv.
RvArray of non-zero atomic two-electron integrals.
skip2ecWhether to skip [CC|CT] and [CC|CC] integrals (mostly .TRUE.).
index_schemeAO integral indexing scheme (1 = standard, 2 = compact).
block_offsetIf present then the integrals from ao_integrals are copied to the block_offset, and Rv arrays in the blocked storage format used in case of nprocs > 1. In this case it is required that the ao_integrals are also stored in the block format. The array Ri is not touched at all (may be unallocated on input).

◆ final()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::final ( class(molecular_orbital_basis_obj) this)

Finalizes the basis set.

◆ finalize_two_electron_integrals_poisson()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::finalize_two_electron_integrals_poisson ( class(molecular_orbital_basis_obj), intent(inout) this,
integer, intent(in) no_mo,
type(integral_options_obj), intent(in) mo_integral_options,
type(integral_storage_obj), intent(inout) mo_integral_storage,
type(p2d_array_obj), intent(in), pointer mo_integrals,
real(kind=cfp), dimension(:,:,:), intent(in), allocatable dnc,
real(kind=cfp), dimension(:,:,:), intent(in), allocatable anc )

Last stage of the Poisson equation method - populates the integral array and writes it to disk.

Authors
M Konvalinka, Z Masin, J Benda
Date
2024

Uses the triple orbital overlaps and the inner region Poisson solutions expanded in molecular orbital basis to evaluate two-particle Coulomb integrals.

◆ finalize_two_electron_integrals_sparse()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::finalize_two_electron_integrals_sparse ( class(molecular_orbital_basis_obj) this,
integer, intent(in) rn,
integer, dimension(:,:), intent(inout), target ri,
real(kind=cfp), dimension(:,:), intent(inout), target rv,
class(integral_storage_obj), intent(inout) integral_storage,
class(integral_options_obj), intent(in) integral_options,
character(len=line_len), dimension(:), intent(in), allocatable column_descriptor )

Moves temporary integral arrays to this object's data arrays and stores the integrals to disk.

Authors
Jakub Benda, Zdenek Masin
Date
2018, 2020

Writes integrals and indices to disk and releases allocated memory. This includes gathering of the transformed molecular integrals scattered over all MPI tasks. In the sparse integral transform the parallelization scheme is that both AO and MO integrals are scattered but each task calculates the full contribution to each assigned MO integral. Note that this type of finalization only applies to the sparse integral transform.

◆ get_absolute_index()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_absolute_index ( class(molecular_orbital_basis_obj) this,
integer, intent(in) num,
integer, intent(in) sym )

Given the pair of numbers num,sym it returns the absolute index of the orbital within the whole orbital set.

◆ get_all_orbital_sets()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_all_orbital_sets ( class(molecular_orbital_basis_obj) this,
type(orbital_data_obj), dimension(:), allocatable orbital_sets,
integer, intent(out) number_of_orbital_sets )

Returns an array containing data for all shells of CGTOs in the basis.

◆ get_basis_name()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_basis_name ( class(molecular_orbital_basis_obj) this)

Returns the name of the basis set.

◆ get_continuum_flags()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_continuum_flags ( class(molecular_orbital_basis_obj) this,
integer, intent(in) irr,
logical, dimension(:), allocatable list )

Same as for atomic_orbital_basis_obj but here we use the symmetry information for the orbitals.

◆ get_index_within_symmetry()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_index_within_symmetry ( class(molecular_orbital_basis_obj) this,
integer, intent(in) absolute_index )

Returns the index within its own symmetry of a given orbital.

◆ get_number_of_orbitals()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_number_of_orbitals ( class(molecular_orbital_basis_obj) this,
integer, intent(in) irr )

Returns the number of orbitals in a given symmetry.

◆ get_orbital_coefficient_matrix()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_orbital_coefficient_matrix ( class(molecular_orbital_basis_obj) this,
real(kind=cfp), dimension(:,:), allocatable cf )

Returns the matrix containing coefficients for all orbitals in the basis.

◆ get_orbital_symmetry()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_orbital_symmetry ( class(molecular_orbital_basis_obj) this,
integer, intent(in) absolute_index )

Returns the symmetry of a given orbital.

◆ get_shell_data()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_shell_data ( class(molecular_orbital_basis_obj) this,
integer, intent(in) i,
class(shell_data_obj), intent(out) shell_data )

Returns the shell data for the i-th shell in the basis set.

◆ get_shell_name()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_shell_name ( class(molecular_orbital_basis_obj) this,
integer, intent(in) i )

Returns the name of the i-th shell in the basis set.

◆ init()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::init ( class(molecular_orbital_basis_obj) this,
integer, intent(in) n,
class(geometry_obj), intent(in) geometry )

Allocates space for a given number and type of shells of basis functions.

◆ integral_index()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::integral_index ( class(molecular_orbital_basis_obj) this,
character(len=*), intent(in) integral_type,
integer, dimension(:,:), intent(in) bf_indices,
logical, intent(in) two_p_continuum )

Calculates indices for 1- or 2-electron integrals given their type and the number of basis function pairs/quartets. The two_p_continuum input variable is not used for MO integrals, the indexing method is the same whether we calculate the two particle continuum integrals or not.

◆ is_initialized()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::is_initialized ( class(molecular_orbital_basis_obj) this)

Returns the value of initialized.

◆ one_electron_integrals()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::one_electron_integrals ( class(molecular_orbital_basis_obj) this,
class(integral_storage_obj), intent(inout) integral_storage,
class(integral_options_obj), intent(in) integral_options )

Calculates and stores 1-electron integrals for all pairs of shells in the basis. The atomic integrals to be transformed are input via the type-bound pointer ao_integral_storage.

◆ orthogonalize()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::orthogonalize ( class(molecular_orbital_basis_obj) this,
real(kind=cfp), dimension(:,:), allocatable overlap_matrix,
integer, intent(in) symmetry,
logical, intent(in), optional gramm_schmidt,
logical, intent(in), optional gramm_schmidt_one_by_one,
logical, intent(in), optional symmetric,
type(sym_ortho_io), intent(inout), optional sym_ortho_data,
integer, intent(in), optional active_start,
integer, intent(in), optional active_end,
integer, intent(in), optional passive_start,
integer, intent(in), optional passive_end,
logical, intent(in), optional check_overlaps )

Performs Gramm-Schmidt or Symmetric orthogonalization. The type of orthogonalization is selected using the logical parameters 'gramm_schmidt' or 'symmetric'. By default for G-S orthogonalization all orbitals are orthogonalized starting from the orbital with index 1 in the basis set. By default for symmetric orthogonalization all orbitals are orthogonalized. The range of 'active' and 'passive' orbitals can be selected by specifying the optional integers active_start, active_end and passive_start, passive_end which specify the range of indices for the orbitals to orthogonalize and not to orthogonalize. The format for the indices is (/num,sym/) where num is the (external) number of the orbital and sym is its symmetry. For symmetric orthogonalization the set of 'passive' orbitals is used only to check at the end that all 'active' orbitals are orthogonal to the 'passive' orbitals. The orthogonalization requires the AO overlap integrals array. If symmetric orthogonalization is required then the data structure of type sym_ortho_io must be also present on input. It specifies the deletion thresholds for each symmetry. On output it contains the list of orbitals to delete (i.e. those that didn't pass the deletion threshold criterion) in the form of a logical array which marks the orbitals for deletion.

◆ print()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::print ( class(molecular_orbital_basis_obj) this)

Prints the orbital basis set data to the stdout unit.

Authors
Zdenek Masin. Modified by Bridgette Cooper
Date
October 2019

◆ print_energy_sorted_orbital_table()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::print_energy_sorted_orbital_table ( class(molecular_orbital_basis_obj) this,
integer, intent(in), optional print_level_override )

Prints an orbital table showing the orbitals sorted in energy.

◆ print_molecular_orbital_info()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::print_molecular_orbital_info ( integer this,
integer unit_number )

Prints the orbital basis set data to any unit number.

Author
Zdenek Masin. Modified by Bridgette Cooper
Date
October 2019

◆ print_orbitals()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::print_orbitals ( class(molecular_orbital_basis_obj) this)

Prints the orbital coefficients to the stdout unit.

◆ radial_charge_density()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::radial_charge_density ( class(molecular_orbital_basis_obj) this,
real(kind=cfp), intent(in) rmat_radius,
real(kind=cfp), intent(in) a,
real(kind=cfp), intent(in) b,
real(kind=cfp), intent(in) delta_r,
logical, intent(in) save_to_disk,
real(kind=cfp), dimension(:,:), allocatable charge_densities )

Calculates radial charge densities of all orbitals in the basis. If the input value of rmat_radius is > 0.0_cfp then the continuum functions will be normalized to the R-matrix radius rmat_radius. If rmat_radius .le. 0 then normalization of the continuum functions will not be done. This is useful in case the orbital set corresponds to the Dyson orbitals obtained from CDENPROP: in this case the orbital coefficients already include the continuum normalization factors and therefore rmat_radius must be set to < 0.0_cfp.

◆ read_basis_and_integrals()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::read_basis_and_integrals ( class(molecular_orbital_basis_obj) this,
character(len=line_len), intent(in) file_name,
type(atomic_orbital_basis_obj), target atomic_orbital_basis,
type(p2d_array_obj), target one_electron_integrals,
type(p2d_array_obj), target two_electron_integrals,
type(integral_options_obj) options )

Initialize the object by reading everything from the given integrals file and read all MO integrals. The input is the path to the moints file and the atomic basis object to be pointed at. On output the molecular basis is initialized, the integral arrays and the integral options objects are initialized with the data read-in from the moints file. It is assumed that the moints file includes 1-electron and 2-electron integrals.

◆ read_ijkl_indices()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::read_ijkl_indices ( class(molecular_orbital_basis_obj) this,
integer, intent(in) lunit,
character(len=*) file_name,
integer, intent(in) record_start,
integer, intent(out) position_after_read )

Reads from the disk the array ijkl_indices and the value ind_ijkl_integral. The reading is done by the master task which also perform redistribution to other processes. If shared-memory MPI is used then each NODE keeps only one copy of the array thisijkl_indices, otherwise the array is kept by every MPI task.

◆ solve_roothan_equations()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::solve_roothan_equations ( class(molecular_orbital_basis_obj) this,
class(integral_options_obj) integral_options,
type(orbital_data_obj), dimension(:), allocatable orbital_data )

Obtains atomic and molecular basis and solves iteratively the roothan equations.

◆ transform_two_indices()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::transform_two_indices ( class(molecular_orbital_basis_obj) this,
integer, intent(in) nbk,
integer, intent(in) nao,
integer, intent(in) nmo,
type(sparse_block_storage_obj), intent(inout), target mo_integrals,
integer, dimension(:), intent(in), allocatable cp,
integer, dimension(:), intent(in), allocatable cj,
real(kind=cfp), dimension(:), intent(in), allocatable cv,
integer, intent(in) step,
real(kind=cfp), intent(in) tolerance,
logical, intent(in) skip2ec,
real(kind=cfp), intent(in) max_buffer_size,
integer, intent(in) index_scheme,
logical, intent(in) keep_ao_integrals )

Transforms two of four atomic orbital indices to molecular ones.

Authors
Jakub Benda, Zdenek Masin
Date
2018, 2020

In the first step of the transformation (ie. [pq|rs] -> [pq|kl)), the input arrays Ri, Rv are ignored and the sparse blocks Rb of the 4-index tensor R are retrieved directly from the atomic integrals storage. Ri, Rv are then allocated and filled with the transformed data.

In the second step, the sparse blocks Rb are truly read from the input arrays Ri, Rv. These are then destroyed and reallocated to the proper size before returning the transformed data.

Transformation of every block amounts to two sparse matrix multiplications (with some restrictions on non-zero elements). The result of each such transformation is a subset of a dense block. Each transformed block is stored in a separate array in a linked list data structure to avoid frequent reallocations of a growing array of elements. These are merged to Ri, Rv at the very end of the transformation step.

Note that this subroutine deliberately transforms only half of all blocks. Specifically, the input in the first step are [pq|rs] and only blocks with p >= q are considered by this function. Similarly, the subroutine fetch_atomic_integrals_block called from here also provides only triangles. The triangles are symmetrized prior to the transformation of each block. On exit from this subroutine we have semi-transformed integrals [pq|kl), once again restricted do k >= l due to a triangular reduction in transform_one_index. Due to the subsequent sorting of the semitransformed integrals between the first and the second step of the sparse transformation, the inputs to the second step will then be the integrals (kl|pq], where only k >= l and p >= q are non-zero. This is perfectly compatible with the requirements above, so no integrals are calculated needlessly.

Todo
The merging could be parallelized, too, if each block also stored its offset.
Parameters
NbkNumber of blocks along the diagonal (= nAO in the first step, nMO in the second step).
nAONumber of atomic orbitals (dimension of the index to transform).
nMONumber of molecular orbitals (dimension of the index after transformation).
mo_integralsStorage object for working with the (semi)transformed two-electron integrals.
CpColumn pointers in Ci (ie. where the coefficients corresponding to i-th MO start in Cv).
CjRow indices corresponding to elements in Cv.
CvStructurally non-zero elements of C (the MO <- AO coefficient matrix).
stepFirst or second step of the transformation.
toleranceMinimal absolute value of integral to keep it.
skip2ecWhether to skip CCCT and CCCC combinations.
max_buffer_sizeMaximum size (in MiB) of the auxiliary buffer array: used only in MPI mode.
index_schemeAO integrals indexing scheme (1 = standard, 2 = compact).
keep_ao_integralsLogical switch to preserve or not the array of AO integrals.

◆ two_electron_integrals()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::two_electron_integrals ( class(molecular_orbital_basis_obj) this,
class(integral_storage_obj), intent(inout) integral_storage,
class(integral_options_obj), intent(in) integral_options )

Calculates and stores 2-electron integrals for all pairs of shells in the basis. The atomic integrals to be transformed are input via the type-bound pointer ao_integral_storage.

◆ two_electron_integrals_poisson()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::two_electron_integrals_poisson ( class(molecular_orbital_basis_obj), intent(inout) this,
class(integral_storage_obj), intent(inout) mo_integral_storage,
class(integral_options_obj), intent(in) mo_integral_options )

Calculates and stores 2-electron integrals for all pairs of shells in the basis using the Poisson equation.

Authors
M Konvalinka, Z Masin, J Benda
Date
2024

Evaluate the two-particle Coulomb repulsion and exchange integrals. One pair of orbitals acts as a source term in the Poisson equation with the Bloch operator:

\[ (\nabla^2 + L) V = -4 \pi \phi_a \phi_b + L V. \]

The product of the two orbitals on the right-hand side is expanded in the molecular orbital basis (reusing triple overlaps calculated earlier), and the equation is solved by the R-matrix method in the same basis. The unknown potential in Bloch term on the right-hand side is represented by a known multipole expansion of the orbital pair. The remaining pair of orbitals is then included by the triple overlaps, again:

\[ I = \langle \phi_c \phi_d | V \rangle. \]

◆ two_electron_integrals_sparse()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::two_electron_integrals_sparse ( class(molecular_orbital_basis_obj) this,
class(integral_storage_obj), intent(inout) integral_storage,
class(integral_options_obj), intent(in) integral_options )

Variant of "two_electron_integrals" useful for B-spline-only continuum basis. The subroutine makes use of sparsity of the two-electron integral matrix.

Authors
Jakub Benda
Date
2018

Calculates the molecular-orbital 2-electron integrals (ij|kl) from the known atomic-orbital 2-electron integrals [pq|rs]. The algorithm proceeds in several steps:

  1. Expand all atomic integrals to a working array, including all those redundant in the sense of index symmetries.
  2. Sort the integral array so that all integrals with common p,q are clustered together, resulting in a sequence of sparse matrices whose elements are indexed by atomic indices r,s.
  3. Transform both indices of these sparse matrices to molecular ones by application of the expansion coefficient matrices, yielding object [pq|kl).
  4. Sort the integral array again, but now group together elements with the same k,l, resulting in a sequence of sparse matrices whose elements are indexed by atomic indices p,q. Symbolically: (kl|pq].
  5. Transform both indices p,q by application of the coefficient matrices, yielding (kl|ij).
  6. Finally, sort the integrals to satisfy expectations of the library.

In the present implementation, steps 1, 2 and 3 are fused to avoid large memory use; only a few blocks are expanded at a time.

Some work can be saved with the knowledge of index and orbital symmetries:

  • In the step 1 discard CCCC and CCCT types if not needed.
  • In the step 3 it is possible to calculate the numbers [pq|kl) just for k >= l, due to symmetry k <-> l. In addition to this, the CCCC and CCCT combinations can be ignored if two electrons in continuum are not required.
  • In the step 5 it is possible to used the same, ignoring anything else than i >= j, and one can skip also all i,j pairs, whose combined orbital symmetry is different than the combined orbital symmetry of the pair k,l. This is due to the fact that the product of the two pairs i,j and k,l must be totally symmetric. Furthermore, one can skip all i,j pairs that violate [ij] >= [kl], due to the symmetry i,j <-> k,l. Here [ij] is the standard triangular multi-index function. Again, as before, CCCC and CCCT combination can be skipped.

Note that this subroutine uses rectangular indexing function and transforms the indices to the triangular ones only at the very end.

◆ write_ijkl_indices()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::write_ijkl_indices ( class(molecular_orbital_basis_obj) this,
integer, intent(in) lunit,
integer, intent(in) record_start,
integer, intent(out) position_after_write )

Writes to disk the array ijkl_indices and the value ind_ijkl_integral. As usual, only master writes its own array.

◆ write_qec_orbital_table()

procedure molecular_basis_gbl::molecular_orbital_basis_obj::write_qec_orbital_table ( class(molecular_orbital_basis_obj) this)

Prints the orbital basis set data to a file. Uses by QEC controlled with a logical in the scatci_integrals program.

Authors
Bridgette Cooper
Date
October 2019

Member Data Documentation

◆ ao_basis

class(atomic_orbital_basis_obj), pointer molecular_basis_gbl::molecular_orbital_basis_obj::ao_basis => null()

Pointer to the AO basis object in terms of which this MO set is specified. This pointer must be associated before calling init.

◆ ao_integral_storage

class(integral_storage_obj), pointer molecular_basis_gbl::molecular_orbital_basis_obj::ao_integral_storage => null()

This pointer must be associated by the user before calling one_electron_integrals or two_electron_integrals to the set of atomic integrals to be transformed.

◆ block_offset

integer, dimension(:), allocatable molecular_basis_gbl::molecular_orbital_basis_obj::block_offset

Arrays used to compute the index for the 2-particle symmetric (AB|CD) integrals. For details see add_function.

◆ ijkl_indices

integer, dimension(:,:), pointer molecular_basis_gbl::molecular_orbital_basis_obj::ijkl_indices => null()

Indices of the 2-electron integrals for each type of integral. Determined by two_electron_integrals. The pointer attribute is necessary for shared memory usage.

◆ ind_ijkl_integral

integer molecular_basis_gbl::molecular_orbital_basis_obj::ind_ijkl_integral = 0

Index of the last integral stored in ijkl_indices.

◆ mmap

type(file_mapping) molecular_basis_gbl::molecular_orbital_basis_obj::mmap

Auxiliary helper structure for virtual memory mapping.

◆ mo2so_range

integer, dimension(:,:), allocatable molecular_basis_gbl::molecular_orbital_basis_obj::mo2so_range

◆ no_irr

integer molecular_basis_gbl::molecular_orbital_basis_obj::no_irr = 0

Number of irreducible representations.

◆ pg

integer molecular_basis_gbl::molecular_orbital_basis_obj::pg = -1

Point group symmetry of the orbitals in this set.

◆ so2mo_range

integer, dimension(:,:), allocatable molecular_basis_gbl::molecular_orbital_basis_obj::so2mo_range

so2mo_range: indices of the first and the last MO to which a given AO contributes. mo2so_range is the opposite for the MOs. These arrays have a meaning identical to the one explained in: S.Yamamoto, U. Nagashima, CPC 166 (2005) 58-65.

◆ sym_offset

integer, dimension(:), allocatable molecular_basis_gbl::molecular_orbital_basis_obj::sym_offset

The documentation for this type was generated from the following file: