This module contain initial_density, density, density matrix, molecular orbial density, wavefunction of molecular orbital, external potential, direct Coulomb potential, single-center integral, single-center Coulomb potential, Checking fidelity of molecular orbitals, and some other things
Calculate the product of all occupied orbital projections
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(param), | intent(in) | :: | p | |||
type(wf_data), | intent(in) | :: | f | |||
real(kind=long), | intent(in), | dimension(f%n_basis, f%n_basis) | :: | strans |
The overlap matrix SI(i,j) between the |
|
real(kind=long), | intent(in), | dimension(f%n_basis, f%nr_basis) | :: | lcref |
The reference MO coefficients |
Calculate the product of all occupied orbital projections
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(param), | intent(in) | :: | p | |||
type(wf_data), | intent(inout) | :: | f | |||
real(kind=long), | intent(in), | dimension(f%n_basis, f%n_basis) | :: | strans |
The overlap matrix SI(i,j) between the |
|
real(kind=long), | intent(in), | dimension(f%n_basis, f%nr_basis) | :: | lcrefa |
The reference MO coefficients |
|
real(kind=long), | intent(in), | dimension(f%n_basis, f%nr_basis) | :: | lcrefb |
The reference MO coefficients |
returns 0 for unoccupied MO 1 for singly occupied MO 2 for doubly occupied MO 2+i for orbital in average_occ_MO subspace i=1,...n if the orbitals are partially occupied
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(wf_data), | intent(in) | :: | f | |||
integer, | intent(in) | :: | mo |
computes the overlaps to reference orbitals squared
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=long), | intent(in), | dimension(:, :) | :: | lc | ||
real(kind=long), | intent(in), | dimension(:, :) | :: | strans | ||
real(kind=long), | intent(in), | dimension(:, :) | :: | lcref |
calculating the direct Coulomb potential a.k.a. Hartree potential or classical electron-electron repulsion potential
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(param), | intent(in) | :: | p | |||
type(grid3d), | intent(in) | :: | g | |||
type(atom_set), | intent(in) | :: | a(:) | |||
real(kind=long), | intent(in) | :: | rho(:) | |||
real(kind=long), | intent(out), | optional | :: | q_a(:) | ||
real(kind=long), | intent(out), | optional | :: | dipole_a(:,:) |
Yajiang's original implementation for the direct Coulomb potential - potential_J_MC() - potential_J_A_R() - integral_A() - potential_J_A()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(param), | intent(in) | :: | p | |||
type(grid3d), | intent(in) | :: | g | |||
type(atom_set), | intent(in) | :: | a(:) | |||
real(kind=long), | intent(in) | :: | rho(:) |
integral on atomic grid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atom_set), | intent(in) | :: | a | |||
real(kind=long), | intent(in) | :: | v(:) |
Calculating Coulomb potential on the atomic grid
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atom_set), | intent(in) | :: | a | |||
real(kind=long), | intent(in) | :: | rho(:) |
returns ground state occupation numbers
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | occ(:) | |||
integer, | optional | :: | ncore | |||
logical, | optional | :: | open_shell | |||
logical, | optional | :: | add_electrons |
returns overlap square between configurations in occ to configurations in occs with different molecular orbitals and basis sets considering only high-spin configurations
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | occ(:) | |||
integer, | intent(in) | :: | occs(:,:) | |||
real(kind=long), | intent(in) | :: | lc1(:,:) | |||
real(kind=long), | intent(in) | :: | lc2(:,:) | |||
real(kind=long), | intent(in) | :: | s12(:,:) | |||
integer, | intent(in) | :: | ncore | |||
real(kind=long), | intent(out) | :: | overlap2(size(occs,2)) |
given a list of combinations k out of n this subroutine returns the complement combinations
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | |||
integer, | intent(in) | :: | k | |||
integer, | intent(in) | :: | combinations(:,:) | |||
integer, | intent(out), | allocatable | :: | complement(:,:) |
returns the list of combinations k out of 1..n in lexicographical order
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer | :: | n | ||||
integer | :: | k | ||||
integer, | allocatable | :: | combinations(:,:) |
returns a list of occupations, constructed from N_occ by exciting one electron
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n_occ(:) | |||
integer, | intent(out), | allocatable | :: | occs(:,:) | ||
integer, | optional | :: | lower_limit | |||
integer, | optional | :: | upper_limit |
returns a list of occupations, constructed from N_occ by exciting one electron
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | in_occs(:,:) | |||
integer, | intent(out), | allocatable | :: | occs(:,:) | ||
integer, | optional | :: | lower_limit | |||
integer, | optional | :: | upper_limit |
from an occupation occ and a new, LC1, and old, LC2, orbital set plus given basis set overlap matrix S12 return the orbital indices that are involved in the changes/rotations of orbitals Ncore is the number of core orbitals
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | occ(:) | |||
real(kind=long), | intent(in) | :: | lc1(:,:) | |||
real(kind=long), | intent(in) | :: | lc2(:,:) | |||
real(kind=long), | intent(in) | :: | s12(:,:) | |||
integer, | intent(out), | allocatable | :: | active_space(:) | ||
integer, | intent(in), | optional | :: | ncore |
returns a list of occupations in occs that distributes Nelectot electrons in Norbtot orbitals where the occupations comply with the general active space definitions provides by the list of gass: gass(i)%orbitals(:) is a list defining an orbital subset gass(i)%nmin the minimum number of electrons in this orbital subset gass(i)%nmax the maximum number of electrons in this orbital subset
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | norbtot | |||
integer, | intent(in) | :: | nelectot | |||
type(gas), | intent(in) | :: | gass(:) | |||
integer, | intent(out), | allocatable | :: | occs(:,:) |
filters set of occupation numbers to meet symmetry restrictions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | irrep_prod(:,:) | |||
integer, | intent(in) | :: | irrep_mo(:) | |||
integer, | intent(in) | :: | irrep_state | |||
integer, | intent(in) | :: | occs_in(:,:) | |||
integer, | intent(out), | allocatable | :: | occs_out(:,:) |
filters set of occupation numbers to meet ras restrictions
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(gas), | intent(in) | :: | ras(:) | |||
integer, | intent(in), | allocatable | :: | occs_in(:,:) | ||
integer, | intent(out), | allocatable | :: | occs_out(:,:) |
returns a list of occupations, constructed from N_occ by redistributing electrons wihtin the orbitals given in active_space_MO
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n_occ(:) | |||
integer, | intent(in) | :: | active_space_mo(:) | |||
integer, | intent(out), | allocatable | :: | occs(:,:) |
computes the density matrix
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=long), | intent(in) | :: | lc(:,:) | |||
real(kind=long), | intent(in) | :: | occ(:) | |||
real(kind=long), | intent(out) | :: | d(size(lc,1),size(lc,1)) |
rotates the orbitals F%LC inside the av_occ(:)%MO subspace such that they best overlap with the orbitals in the av_occ(:)%MO subspace in Cref
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(average_occ), | intent(in) | :: | av_occ(:) | |||
real(kind=long), | intent(in), | dimension(:, :) | :: | cref | ||
real(kind=long), | intent(in), | dimension(:, :) | :: | si | ||
real(kind=long), | intent(inout), | dimension(:, :) | :: | crot |
print spherically averaged quantity (potential or density) for each atom with and without multicenter decomposition
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(atom_set), | intent(in) | :: | a(:) | |||
type(grid3d), | intent(in) | :: | g | |||
real(kind=long), | intent(in) | :: | v(:) | |||
integer, | intent(in) | :: | output |
This subroutines returns a set of coefficients for 'optimal' representing the current Density matrix F%D as a linear combination of the saved density matrices in the F%Dsave array F%D(:,:) = sum_i coef(i) * F%Dsave(:,:,i) + deltaD(:,:) 'optimal' means that the rest is small in that sense that it has minimal number of nonzero elements. To achieve this, we use unconstrained Newton minimizer to minimize the function
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(param), | intent(in) | :: | p | |||
type(wf_data), | intent(in) | :: | f | |||
real(kind=long), | intent(inout), | dimension(f%nsave) | :: | coef |