|
GBTOlib: library for evaluation of molecular integrals in mixed Gaussian / B-spline basis 111
|


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_mapping) | mmap |
| Auxiliary helper structure for virtual memory mapping. | |
| Public Attributes inherited from basis_data_generic_gbl::basis_data_generic_obj | |
| type(symmetry_obj) | symmetry_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. | |
| 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.
| 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.
| 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.
| 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.
| 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.
| 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).
| 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.
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.
| this | Reference to the parent type. |
| ao_integrals | Pointer to the p2d_array_obj structure where the AO integrals are stored |
| iblk | Zero-based rectangular multi-index of the block to retrive. |
| rbeg | Starting 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. |
| Rn | On return, number of elements written into the arrays Rv and Ri. |
| Ri | Zero-based multi-index for each element in Rv. |
| Rv | Array of non-zero atomic two-electron integrals. |
| skip2ec | Whether to skip [CC|CT] and [CC|CC] integrals (mostly .TRUE.). |
| index_scheme | AO integral indexing scheme (1 = standard, 2 = compact). |
| block_offset | If 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). |
| procedure molecular_basis_gbl::molecular_orbital_basis_obj::final | ( | class(molecular_orbital_basis_obj) | this | ) |
Finalizes the basis set.
| 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.
Uses the triple orbital overlaps and the inner region Poisson solutions expanded in molecular orbital basis to evaluate two-particle Coulomb integrals.
| 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.
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.
| 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.
| 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.
| procedure molecular_basis_gbl::molecular_orbital_basis_obj::get_basis_name | ( | class(molecular_orbital_basis_obj) | this | ) |
Returns the name of the basis set.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| procedure molecular_basis_gbl::molecular_orbital_basis_obj::is_initialized | ( | class(molecular_orbital_basis_obj) | this | ) |
Returns the value of initialized.
| 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.
| 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.
| 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.
| 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.
| 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.
| procedure molecular_basis_gbl::molecular_orbital_basis_obj::print_orbitals | ( | class(molecular_orbital_basis_obj) | this | ) |
Prints the orbital coefficients to the stdout unit.
| 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.
| 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.
| 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.
| 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.
| 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.
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.
| Nbk | Number of blocks along the diagonal (= nAO in the first step, nMO in the second step). |
| nAO | Number of atomic orbitals (dimension of the index to transform). |
| nMO | Number of molecular orbitals (dimension of the index after transformation). |
| mo_integrals | Storage object for working with the (semi)transformed two-electron integrals. |
| Cp | Column pointers in Ci (ie. where the coefficients corresponding to i-th MO start in Cv). |
| Cj | Row indices corresponding to elements in Cv. |
| Cv | Structurally non-zero elements of C (the MO <- AO coefficient matrix). |
| step | First or second step of the transformation. |
| tolerance | Minimal absolute value of integral to keep it. |
| skip2ec | Whether to skip CCCT and CCCC combinations. |
| max_buffer_size | Maximum size (in MiB) of the auxiliary buffer array: used only in MPI mode. |
| index_scheme | AO integrals indexing scheme (1 = standard, 2 = compact). |
| keep_ao_integrals | Logical switch to preserve or not the array of AO 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.
| 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.
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. \]
| 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.
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:
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:
Note that this subroutine uses rectangular indexing function and transforms the indices to the triangular ones only at the very end.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| integer molecular_basis_gbl::molecular_orbital_basis_obj::ind_ijkl_integral = 0 |
Index of the last integral stored in ijkl_indices.
| type(file_mapping) molecular_basis_gbl::molecular_orbital_basis_obj::mmap |
Auxiliary helper structure for virtual memory mapping.
| integer, dimension(:,:), allocatable molecular_basis_gbl::molecular_orbital_basis_obj::mo2so_range |
| integer molecular_basis_gbl::molecular_orbital_basis_obj::no_irr = 0 |
Number of irreducible representations.
| integer molecular_basis_gbl::molecular_orbital_basis_obj::pg = -1 |
Point group symmetry of the orbitals in this set.
| 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.
| integer, dimension(:), allocatable molecular_basis_gbl::molecular_orbital_basis_obj::sym_offset |