17 #include "./base/base_uses.f90"
22 LOGICAL,
PRIVATE,
PARAMETER :: debug_this_module = .true.
23 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_charges_types'
25 PUBLIC :: qs_charges_type
42 REAL(KIND=
dp) :: total_rho_core_rspace, total_rho_gspace
43 REAL(KIND=
dp) :: total_rho0_soft_rspace, total_rho0_hard_lebedev
44 REAL(KIND=
dp) :: total_rho_soft_gspace
45 REAL(KIND=
dp),
DIMENSION(:),
POINTER :: total_rho1_hard, &
47 REAL(KIND=
dp) :: background
48 END TYPE qs_charges_type
64 TYPE(qs_charges_type),
INTENT(OUT) :: qs_charges
65 INTEGER,
INTENT(in) :: nspins
66 REAL(kind=
dp),
INTENT(in),
OPTIONAL :: total_rho_core_rspace, total_rho_gspace
68 qs_charges%total_rho_core_rspace = 0.0_dp
69 IF (
PRESENT(total_rho_core_rspace)) &
70 qs_charges%total_rho_core_rspace = total_rho_core_rspace
71 qs_charges%total_rho_gspace = 0.0_dp
72 IF (
PRESENT(total_rho_gspace)) &
73 qs_charges%total_rho_gspace = total_rho_gspace
74 qs_charges%total_rho_soft_gspace = 0.0_dp
75 qs_charges%total_rho0_hard_lebedev = 0.0_dp
76 qs_charges%total_rho_soft_gspace = 0.0_dp
77 qs_charges%background = 0.0_dp
78 ALLOCATE (qs_charges%total_rho1_hard(nspins))
79 qs_charges%total_rho1_hard(:) = 0.0_dp
80 ALLOCATE (qs_charges%total_rho1_soft(nspins))
81 qs_charges%total_rho1_soft(:) = 0.0_dp
92 TYPE(qs_charges_type),
INTENT(INOUT) :: qs_charges
94 DEALLOCATE (qs_charges%total_rho1_hard)
95 DEALLOCATE (qs_charges%total_rho1_soft)
Defines the basic variable types.
integer, parameter, public dp
container for information about total charges on the grids
subroutine, public qs_charges_release(qs_charges)
releases the charges object (see cp2k/doc/ReferenceCounting.html)
subroutine, public qs_charges_create(qs_charges, nspins, total_rho_core_rspace, total_rho_gspace)
creates a charges object