29  use, 
intrinsic :: iso_fortran_env
 
   66  integer, 
public, 
parameter :: &
 
   75    class(interaction_partner_t), 
target, 
intent(inout) :: partner
 
   76    class(xc_interaction_t),               
pointer       :: this
 
   82    this%label = 
"exchange-correlation interaction" 
   84    this%partner => partner
 
   91    class(xc_interaction_t),    
intent(inout) :: this
 
  100    class(xc_interaction_t),             
intent(inout) :: this
 
  111    class(xc_interaction_t),             
intent(inout) :: this
 
  123    class(xc_interaction_t),             
intent(inout) :: this
 
  133    class(xc_interaction_t), 
intent(inout) :: this
 
  137    safe_deallocate_a(this%density)
 
  147    type(xc_interaction_t), 
intent(inout) :: this
 
  157  subroutine calc_tb09_c(mesh, space, functl, dens, gdens, ispin, rcell_volume)
 
  158    class(
mesh_t),         
intent(in) :: mesh
 
  161    real(real64),          
intent(in) :: dens(:,:)
 
  162    real(real64),          
intent(in) :: gdens(:,:,:)
 
  163    integer,               
intent(in) :: ispin
 
  164    real(real64),          
intent(in) :: rcell_volume
 
  166    real(real64), 
allocatable :: gnon(:)
 
  167    real(real64) :: gn(space%dim), n, parameters(1)
 
  172    safe_allocate(gnon(1:mesh%np))
 
  177        gn(1:space%dim) = gdens(ii, 1:space%dim, 1)
 
  179        n = dens(ii, 1) + dens(ii, 2)
 
  180        gn(1:space%dim) = gdens(ii, 1:space%dim, 1) + gdens(ii, 1:space%dim, 2)
 
  183      if (n <= 1e-7_real64) 
then 
  186        gnon(ii) = 
sqrt(sum((gn(1:space%dim)/n)**2))
 
  190    parameters(1) =  -0.012_real64 + 1.023_real64*
sqrt(
dmf_integrate(mesh, gnon)/rcell_volume)
 
  192    call xc_f03_func_set_ext_params(functl(1)%conf, parameters)
 
  194    safe_deallocate_a(gnon)
 
  200  subroutine calc_mvorb_alpha(mesh, namespace, space, functl, dens, gdens, ispin, rcell_volume, &
 
  201    cam_alpha, cam_beta, cam_omega)
 
  202    class(
mesh_t),         
intent(in) :: mesh
 
  204    class(
space_t),        
intent(in) :: space
 
  206    real(real64),          
intent(in) :: dens(:,:)
 
  207    real(real64),          
intent(in) :: gdens(:,:,:)
 
  208    integer,               
intent(in) :: ispin
 
  209    real(real64),          
intent(in) :: rcell_volume
 
  210    real(real64),          
intent(inout) :: cam_alpha, cam_beta, cam_omega
 
  212    real(real64), 
allocatable :: gnon(:)
 
  213    real(real64) :: tb09_c, alpha
 
  214    real(real64) :: gn(space%dim), n
 
  216    real(real64) :: parameters(3)
 
  220    safe_allocate(gnon(1:mesh%np))
 
  225        gn(1:space%dim) = gdens(ii, 1:space%dim, 1)
 
  227        n = dens(ii, 1) + dens(ii, 2)
 
  228        gn(1:space%dim) = gdens(ii, 1:space%dim, 1) + gdens(ii, 1:space%dim, 2)
 
  231      if (n <= 1e-7_real64) 
then 
  234        gnon(ii) = 
sqrt(sum((gn(1:space%dim)/n)**2))
 
  235        gnon(ii) = 
sqrt(gnon(ii))
 
  241    safe_deallocate_a(gnon)
 
  243    select case (functl(
func_c)%id)
 
  245      alpha = 0.121983_real64+0.130711_real64*tb09_c**4
 
  248        write(
message(1), 
'(a,f6.3,a)') 
'MVORB mixing parameter bigger than one (' , alpha ,
').' 
  254      parameters(1) = alpha
 
  255      parameters(2) = cam_omega
 
  256      parameters(3) = cam_omega
 
  257      call xc_f03_func_set_ext_params(functl(
func_c)%conf, parameters)
 
  263      alpha = -1.00778_real64+1.10507_real64*tb09_c
 
  266        write(
message(1), 
'(a,f6.3,a)') 
'MVORB mixing parameter bigger than one (' , alpha ,
').' 
  271        write(
message(1), 
'(a,f6.3,a)') 
'MVORB mixing parameter smaller than zero (' , alpha ,
').' 
  276      parameters(1) = alpha
 
  277      call xc_f03_func_set_ext_params(functl(
func_c)%conf, parameters)
 
  280      call messages_not_implemented(
"MVORB density-based mixing for functionals other than PBE0 and HSE06", namespace=namespace)
 
double sqrt(double __x) __attribute__((__nothrow__
 
integer, parameter, public unpolarized
Parameters...
 
real(real64), parameter, public m_zero
 
This module defines the abstract interaction_t class, and some auxiliary classes for interactions.
 
subroutine, public interaction_end(this)
 
This module defines classes and functions for interaction partners.
 
This module defines various routines, operating on mesh functions.
 
real(real64) function, public dmf_integrate(mesh, ff, mask, reduce)
Integrate a function on the mesh.
 
This module defines the meshes, which are used in Octopus.
 
subroutine, public messages_not_implemented(feature, namespace)
 
subroutine, public messages_warning(no_lines, all_nodes, namespace)
 
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
 
This module defines the quantity_t class and the IDs for quantities, which can be exposed by a system...
 
This module handles spin dimensions of the states and the k-point distribution.
 
integer, parameter, public xc_hyb_gga_xc_mvorb_pbeh
Density-based mixing parameter of PBE0.
 
integer, parameter, public xc_hyb_gga_xc_mvorb_hse06
Density-based mixing parameter of HSE06.
 
subroutine xc_interaction_finalize(this)
 
class(xc_interaction_t) function, pointer xc_interaction_constructor(partner)
 
subroutine, public calc_mvorb_alpha(mesh, namespace, space, functl, dens, gdens, ispin, rcell_volume, cam_alpha, cam_beta, cam_omega)
 
subroutine, public xc_interaction_compute(this)
 
subroutine xc_interaction_end(this)
 
subroutine, public calc_tb09_c(mesh, space, functl, dens, gdens, ispin, rcell_volume)
 
integer, parameter, public func_c
 
subroutine xc_interaction_init(this)
 
subroutine xc_interaction_calculate(this)
 
subroutine xc_interaction_calculate_energy(this)
 
Describes mesh distribution to nodes.