Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public, | parameter | :: | OQP_FUNTYP_LDA | = | 0 | |
integer, | public, | parameter | :: | OQP_FUNTYP_GGA | = | 1 | |
integer, | public, | parameter | :: | OQP_FUNTYP_MGGA | = | 2 | |
integer, | public, | parameter | :: | X__ | = | 1 | |
integer, | public, | parameter | :: | Y__ | = | 2 | |
integer, | public, | parameter | :: | Z__ | = | 3 | |
integer, | public, | parameter | :: | XX_ | = | 1 | |
integer, | public, | parameter | :: | YY_ | = | 2 | |
integer, | public, | parameter | :: | ZZ_ | = | 3 | |
integer, | public, | parameter | :: | XY_ | = | 4 | |
integer, | public, | parameter | :: | YZ_ | = | 5 | |
integer, | public, | parameter | :: | XZ_ | = | 6 | |
integer, | public, | parameter | :: | dXX | = | 1 | |
integer, | public, | parameter | :: | dXY | = | 2 | |
integer, | public, | parameter | :: | dXZ | = | 3 | |
integer, | public, | parameter | :: | dYX | = | 4 | |
integer, | public, | parameter | :: | dYY | = | 5 | |
integer, | public, | parameter | :: | dYZ | = | 6 | |
integer, | public, | parameter | :: | dZX | = | 7 | |
integer, | public, | parameter | :: | dZY | = | 8 | |
integer, | public, | parameter | :: | dZZ | = | 9 | |
integer, | public, | parameter | :: | XXX | = | 1 | |
integer, | public, | parameter | :: | YYY | = | 2 | |
integer, | public, | parameter | :: | ZZZ | = | 3 | |
integer, | public, | parameter | :: | XXY | = | 4 | |
integer, | public, | parameter | :: | XXZ | = | 5 | |
integer, | public, | parameter | :: | YYX | = | 6 | |
integer, | public, | parameter | :: | YYZ | = | 7 | |
integer, | public, | parameter | :: | ZZX | = | 8 | |
integer, | public, | parameter | :: | ZZY | = | 9 | |
integer, | public, | parameter | :: | XYZ | = | 10 | |
integer, | public, | parameter | :: | SQ_TO_TR(3,3) | = | reshape([XX_, XY_, XZ_, XY_, YY_, YZ_, XZ_, YZ_, ZZ_], shape(SQ_TO_TR)) |
@brief Initialization of the data for XC consumer
Note
This class should handle multithreaded runs by its own means
Note
This subroutine is executed inside the parallel region by master thread only
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_consumer_t), | intent(inout), | target | :: | self | ||
class(xc_engine_t), | intent(in) | :: | xce | |||
integer, | intent(in) | :: | nthreads |
@brief Finalization of data in parallel run
Note
This subroutine is executed outside of the parallel region
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_consumer_t), | intent(inout) | :: | self |
@brief Release resources of xc_consumer_t
Note
This subroutine is executed outside of the parallel region
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_consumer_t), | intent(inout) | :: | self |
@brief Main subroutine to consume XC functional values provided by xc_engine_t
Note
This subroutine is executed inside the parallel region by every thread
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_consumer_t), | intent(inout) | :: | self | |||
class(xc_engine_t), | intent(in) | :: | xce | |||
integer | :: | mythread |
Note
This subroutine is executed inside the parallel region by every thread
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_consumer_t), | intent(inout) | :: | self | |||
class(xc_engine_t), | intent(in) | :: | xce | |||
integer | :: | mythread |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_engine_t) | :: | self | ||||
real(kind=fp), | intent(out) | :: | rho(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_engine_t) | :: | self | ||||
real(kind=fp), | intent(out) | :: | drho(:,:) | |||
real(kind=fp), | intent(out) | :: | sigma(:,:) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_engine_t) | :: | self | ||||
real(kind=fp), | intent(out) | :: | tau(:,:) |
@brief Basic type to consume XC values on a grid
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=fp), | public | :: | E_xc | ||||
real(kind=fp), | public | :: | E_exch | ||||
real(kind=fp), | public | :: | E_corr | ||||
real(kind=fp), | public | :: | N_elec | ||||
real(kind=fp), | public | :: | E_kin | ||||
real(kind=fp), | public | :: | G_total(3) | ||||
type(par_env_t), | public | :: | pe |
procedure(xc_consumer_parallel_start), public, deferred, pass :: parallel_start | |
procedure(xc_consumer_parallel_stop), public, deferred, pass :: parallel_stop | |
procedure(xc_consumer_update), public, deferred, pass :: update | |
procedure(xc_consumer_postUpdate), public, deferred, pass :: postUpdate | |
procedure(xc_consumer_clean), public, deferred, pass :: clean |
@brief Interface structure to set up XC engine options
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
logical, | public | :: | isGGA | = | .false. | ||
logical, | public | :: | needTau | = | .false. | ||
logical, | public | :: | hasBeta | = | .false. | ||
logical, | public | :: | isWFVecs | = | .true. | ||
integer, | public | :: | numAOs | = | 0 | ||
integer, | public | :: | maxPts | = | 0 | ||
integer, | public | :: | limPts | = | 0 | ||
integer, | public | :: | numAtoms | = | 0 | ||
integer, | public | :: | maxAngMom | = | 0 | ||
integer, | public | :: | nDer | = | 0 | ||
integer, | public | :: | nXCDer | = | 0 | ||
integer, | public | :: | numAOVecs | = | 0 | ||
integer, | public | :: | numTmpVec | = | 0 | ||
integer, | public | :: | numOccAlpha | = | 0 | ||
integer, | public | :: | numOccBeta | = | 0 | ||
real(kind=fp), | public | :: | dft_threshold | = | 0.0d0 | ||
real(kind=fp), | public | :: | ao_threshold | = | 0.0d0 | ||
real(kind=fp), | public | :: | ao_sparsity_ratio | = | 0.0d0 | ||
real(kind=fp), | public, | contiguous, pointer | :: | wfAlpha(:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | wfBeta(:,:) | => | null() | |
type(dft_grid_t), | public, | pointer | :: | molGrid | => | null() | |
type(functional_t), | public, | pointer | :: | functional |
@brief Main class which knows how to compute XC functional values, AO and MO values and gradients on a grid @details It is complemented with xc_consumer_t class to use calculation results
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
real(kind=fp), | public, | allocatable | :: | xyzw(:,:) | |||
real(kind=fp), | public, | allocatable | :: | aoMem_(:) | |||
real(kind=fp), | public, | allocatable | :: | moMemA_(:) | |||
real(kind=fp), | public, | allocatable | :: | moMemB_(:) | |||
real(kind=fp), | public, | allocatable | :: | tmpWfAlpha(:) | |||
real(kind=fp), | public, | allocatable | :: | tmpWfBeta(:) | |||
integer, | public, | allocatable | :: | indices_p(:) | |||
real(kind=fp), | public, | contiguous, pointer | :: | aoMem(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | moMemA(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | moMemB(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | aoV(:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | moVA(:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | moVB(:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | aoG1(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | aoG2(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | moG1A(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | moG2A(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | moG1B(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | moG2B(:,:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | wts(:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | wfAlpha(:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | wfBeta(:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | wfAlpha_p(:,:) | => | null() | |
real(kind=fp), | public, | contiguous, pointer | :: | wfBeta_p(:,:) | => | null() | |
logical, | public | :: | isGGA | = | .false. | ||
logical, | public | :: | needTau | = | .false. | ||
logical, | public | :: | hasBeta | = | .false. | ||
logical, | public | :: | isWFVecs | = | .true. | ||
integer, | public | :: | numAOs | = | 0 | ||
integer, | public | :: | numAOs_p | = | 0 | ||
logical, | public | :: | skip_p | = | .true. | ||
integer, | public | :: | numPts | = | 0 | ||
integer, | public | :: | numAtoms | = | 0 | ||
integer, | public | :: | maxPts | = | 0 | ||
integer, | public | :: | maxAngMom | = | 0 | ||
integer, | public | :: | nAODer | = | 0 | ||
integer, | public | :: | nXCDer | = | 1 | ||
integer, | public | :: | funTyp | = | 0 | ||
integer, | public | :: | numAOVecs | = | 0 | ||
integer, | public | :: | numTmpVec | = | 0 | ||
integer, | public | :: | numOccAlpha | = | 0 | ||
integer, | public | :: | numOccBeta | = | 0 | ||
real(kind=fp), | public | :: | threshold | = | 1.0d-15 | ||
real(kind=fp), | public | :: | ao_threshold | = | 1.0d-15 | ||
real(kind=fp), | public | :: | ao_sparsity_ratio | = | 0.90d+0 | ||
type(xc_libxc_t), | public, | allocatable | :: | XCLib | |||
integer, | public | :: | dbgLevel | = | 0 | ||
real(kind=fp), | public | :: | N_elec | = | 0.0 | ||
real(kind=fp), | public | :: | E_kin | = | 0.0 | ||
real(kind=fp), | public | :: | G_total(3) | = | 0.0 | ||
procedure(compute_density), | public, | pointer, pass | :: | compRho | => | null() | |
procedure(compute_density_grad), | public, | pointer, pass | :: | compDRho | => | null() | |
procedure(compute_density_tau), | public, | pointer, pass | :: | compTau | => | null() |
procedure, public :: init | |
procedure, public :: echo => echoVars | |
procedure, public :: getStats | |
procedure, public :: resetPointers | |
procedure, public :: resetOrbPointers | |
procedure, public :: resetXCPointers | |
procedure, public :: compAOs | |
procedure, public :: pruneAOs | |
procedure, public :: resetPrunedPointers | |
procedure, public :: compMOs | |
procedure, public :: compRMOs | |
procedure, public :: compRMOGs | |
generic, public :: compRRho => compRRho_ab, compRRho_a | |
generic, public :: compRDRho => compRDRho_ab, compRDRho_a | |
generic, public :: compRTau => compRTau_ab, compRTau_a | |
procedure, public :: compRhoAll | |
procedure, public :: compXC |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | numAOs | |||
integer, | intent(in) | :: | nVecs | |||
integer, | intent(in) | :: | nPts | |||
real(kind=fp), | intent(in) | :: | A(*) | |||
real(kind=fp), | intent(in) | :: | B(*) | |||
real(kind=fp), | intent(inout) | :: | C(*) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | numMOs | |||
integer, | intent(in) | :: | numAOs | |||
integer, | intent(in) | :: | nVecs | |||
integer, | intent(in) | :: | nPts | |||
integer, | intent(in) | :: | numAOs_active | |||
real(kind=fp), | intent(in) | :: | A(*) | |||
real(kind=fp), | intent(in) | :: | B(*) | |||
real(kind=fp), | intent(inout) | :: | C(*) |
@brief Compute XC contributions to the gradient from a grid point, LDA part @param[in] iPt index of a grid point @param[inout] bfGrad array of gradient contributions per basis function @param[in] fgrad XC gradient @param[in] moV MO-like orbital values @author Vladimir Mironov
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=fp), | intent(inout) | :: | bfGrad(:,:) | |||
real(kind=fp), | intent(in) | :: | fGrad(:) | |||
real(kind=fp), | intent(in), | contiguous | :: | moV(:,:) | ||
real(kind=fp), | intent(in), | contiguous | :: | aoG1(:,:,:) | ||
integer, | intent(in) | :: | nPts |
@brief Compute XC contributions to the gradient from a grid point, GGA part @param[inout] bfGrad array of gradient contributions per basis function @param[in] fgrad XC gradient @param[in] moV MO-like orbital values @param[in] moG1 MO-like orbital gradients @author Vladimir Mironov
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=fp), | intent(inout) | :: | bfGrad(:,:) | |||
real(kind=fp), | intent(in) | :: | fGrad(:,:) | |||
real(kind=fp), | intent(in), | contiguous | :: | moV(:,:) | ||
real(kind=fp), | intent(in), | contiguous | :: | moG1(:,:,:) | ||
real(kind=fp), | intent(in), | contiguous | :: | aoG1(:,:,:) | ||
real(kind=fp), | intent(in), | contiguous | :: | aoG2(:,:,:) | ||
integer, | intent(in) | :: | npts |
@brief Compute XC contributions to the gradient from a grid point, mGGA part @param[in] iPt index of a grid point @param[inout] bfGrad array of gradient contributinos per basis function @param[in] dedta XC energy, mGGA contribution, alpha-spin @param[in] dedtb XC energy, mGGA contribution, beta-spin @author Vladimir Mironov
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=fp), | intent(inout) | :: | bfGrad(:,:) | |||
real(kind=fp), | intent(in) | :: | fgrad(:) | |||
real(kind=fp), | intent(in), | contiguous | :: | moG1(:,:,:) | ||
real(kind=fp), | intent(in), | contiguous | :: | aoG2(:,:,:) | ||
integer, | intent(in) | :: | npts |
@brief Get first derivative of the XC functional @param[in] xce XC engine @param[in] beta Whether to return spin-polarized quantities @param[out] d_r dE_xc / d_rho (alpha, beta) @param[out] d_s dE_xc / d_sigma (alpha-alpha, beta-beta, alpha-beta) @param[out] d_t dE_xc / d_tau (alpha, beta)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_engine_t) | :: | xce | ||||
logical | :: | beta | ||||
integer, | intent(in) | :: | ipt | |||
real(kind=fp), | intent(out) | :: | d_r(2) | |||
real(kind=fp), | intent(out) | :: | d_s(3) | |||
real(kind=fp), | intent(out) | :: | d_t(2) |
@brief Get second derivative of the XC functional contracted with response densities @param[in] xce XC engine @param[in] beta Whether to return spin-polarized quantities @param[in] d_r \delta_rho (alpha, beta) @param[in] d_s \delta_sigma (alpha-alpha, beta-beta, alpha-beta) @param[in] d_t \delta_tau (alpha, beta) @param[out] f_r \sum_i d2E_xc / (d_rho * d_zeta_i) (alpha, beta) @param[out] f_s \sum_i d2E_xc / (d_sigma * d_zeta_i) (alpha-alpha, beta-beta, alpha-beta) @param[out] f_t \sum_i d2E_xc / (d_tau * d_zeta_i) (alpha, beta)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_engine_t) | :: | xce | ||||
logical, | intent(in) | :: | beta | |||
integer, | intent(in) | :: | ipt | |||
real(kind=fp), | intent(in) | :: | dr(2) | |||
real(kind=fp), | intent(in) | :: | ds(3) | |||
real(kind=fp), | intent(in) | :: | dt(2) | |||
real(kind=fp), | intent(out) | :: | f_r(2) | |||
real(kind=fp), | intent(out) | :: | f_s(3) | |||
real(kind=fp), | intent(out) | :: | f_t(2) |
@brief Get third derivative of the XC functional contracted with response densities, spin-polarized version @param[in] xce XC engine @param[in] d_r \delta_rho (alpha, beta) @param[in] d_s \delta_sigma (alpha-alpha, beta-beta, alpha-beta) @param[in] d_t \delta_tau (alpha, beta) @param[in] ss (\nabla\rho(T)\nabla\rho(T)) (alpha-alpha, beta-beta, alpha-beta) @param[out] g_r \sum_i,j d2E_xc / (d_rho * d_zeta_id_zeta_j) (alpha, beta) @param[out] g_s \sum_i,j d2E_xc / (d_sigma * d_zeta_id_zeta_j) (alpha-alpha, beta-beta, alpha-beta) @param[out] g_t \sum_i,j d2E_xc / (d_tau * d_zeta_id_zeta_j) (alpha, beta)
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(xc_engine_t) | :: | xce | ||||
integer, | intent(in) | :: | ipt | |||
real(kind=fp), | intent(in) | :: | dr(2) | |||
real(kind=fp), | intent(in) | :: | ds(3) | |||
real(kind=fp), | intent(in) | :: | dt(2) | |||
real(kind=fp), | intent(in) | :: | ss(3) | |||
real(kind=fp), | intent(out) | :: | f_s(3) | |||
real(kind=fp), | intent(out) | :: | g_r(2) | |||
real(kind=fp), | intent(out) | :: | g_s(3) | |||
real(kind=fp), | intent(out) | :: | g_t(2) |
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(xc_options_t), | intent(in) | :: | xc_opts | |||
class(xc_consumer_t), | intent(inout) | :: | xc_dat | |||
type(basis_set), | intent(in) | :: | basis |