60 INTEGER :: i, iat, j, n, natom
62 IF (
ASSOCIATED(rho_atom_set))
THEN
64 natom =
SIZE(rho_atom_set)
67 IF (
ASSOCIATED(rho_atom_set(iat)%cpc_h))
THEN
68 IF (
ASSOCIATED(rho_atom_set(iat)%cpc_h(1)%r_coef))
THEN
69 n =
SIZE(rho_atom_set(iat)%cpc_h, 1)
71 DEALLOCATE (rho_atom_set(iat)%cpc_h(i)%r_coef)
72 DEALLOCATE (rho_atom_set(iat)%cpc_s(i)%r_coef)
75 DEALLOCATE (rho_atom_set(iat)%cpc_h)
76 DEALLOCATE (rho_atom_set(iat)%cpc_s)
78 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_h))
THEN
79 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_h(1)%r_coef))
THEN
80 n =
SIZE(rho_atom_set(iat)%ga_Vlocal_gb_h, 1)
82 DEALLOCATE (rho_atom_set(iat)%ga_Vlocal_gb_h(i)%r_coef)
83 DEALLOCATE (rho_atom_set(iat)%ga_Vlocal_gb_s(i)%r_coef)
86 DEALLOCATE (rho_atom_set(iat)%ga_Vlocal_gb_h)
87 DEALLOCATE (rho_atom_set(iat)%ga_Vlocal_gb_s)
89 IF (
ASSOCIATED(rho_atom_set(iat)%int_scr_h))
THEN
90 IF (
ASSOCIATED(rho_atom_set(iat)%int_scr_h(1)%r_coef))
THEN
91 n =
SIZE(rho_atom_set(iat)%int_scr_h, 1)
93 DEALLOCATE (rho_atom_set(iat)%int_scr_h(i)%r_coef)
94 DEALLOCATE (rho_atom_set(iat)%int_scr_s(i)%r_coef)
97 DEALLOCATE (rho_atom_set(iat)%int_scr_h)
98 DEALLOCATE (rho_atom_set(iat)%int_scr_s)
101 IF (
ASSOCIATED(rho_atom_set(iat)%drho_rad_h))
THEN
102 IF (
ASSOCIATED(rho_atom_set(iat)%drho_rad_h(1)%r_coef))
THEN
103 n =
SIZE(rho_atom_set(iat)%drho_rad_h, 1)
105 DEALLOCATE (rho_atom_set(iat)%drho_rad_h(i)%r_coef)
106 DEALLOCATE (rho_atom_set(iat)%drho_rad_s(i)%r_coef)
108 DEALLOCATE (rho_atom_set(iat)%rho_rad_h_d(j, i)%r_coef)
109 DEALLOCATE (rho_atom_set(iat)%rho_rad_s_d(j, i)%r_coef)
113 DEALLOCATE (rho_atom_set(iat)%drho_rad_h)
114 DEALLOCATE (rho_atom_set(iat)%drho_rad_s)
115 DEALLOCATE (rho_atom_set(iat)%rho_rad_h_d)
116 DEALLOCATE (rho_atom_set(iat)%rho_rad_s_d)
119 IF (
ASSOCIATED(rho_atom_set(iat)%rho_rad_h))
THEN
120 IF (
ASSOCIATED(rho_atom_set(iat)%rho_rad_h(1)%r_coef))
THEN
121 n =
SIZE(rho_atom_set(iat)%rho_rad_h)
123 DEALLOCATE (rho_atom_set(iat)%rho_rad_h(i)%r_coef)
126 DEALLOCATE (rho_atom_set(iat)%rho_rad_h)
129 IF (
ASSOCIATED(rho_atom_set(iat)%rho_rad_s))
THEN
130 IF (
ASSOCIATED(rho_atom_set(iat)%rho_rad_s(1)%r_coef))
THEN
131 n =
SIZE(rho_atom_set(iat)%rho_rad_s)
133 DEALLOCATE (rho_atom_set(iat)%rho_rad_s(i)%r_coef)
136 DEALLOCATE (rho_atom_set(iat)%rho_rad_s)
139 IF (
ASSOCIATED(rho_atom_set(iat)%vrho_rad_h))
THEN
140 IF (
ASSOCIATED(rho_atom_set(iat)%vrho_rad_h(1)%r_coef))
THEN
141 n =
SIZE(rho_atom_set(iat)%vrho_rad_h)
143 DEALLOCATE (rho_atom_set(iat)%vrho_rad_h(i)%r_coef)
146 DEALLOCATE (rho_atom_set(iat)%vrho_rad_h)
149 IF (
ASSOCIATED(rho_atom_set(iat)%vrho_rad_s))
THEN
150 IF (
ASSOCIATED(rho_atom_set(iat)%vrho_rad_s(1)%r_coef))
THEN
151 n =
SIZE(rho_atom_set(iat)%vrho_rad_s)
153 DEALLOCATE (rho_atom_set(iat)%vrho_rad_s(i)%r_coef)
156 DEALLOCATE (rho_atom_set(iat)%vrho_rad_s)
161 DEALLOCATE (rho_atom_set)
165 CALL cp_abort(__location__, &
166 "The pointer rho_atom_set is not associated and "// &
167 "cannot be deallocated")
191 SUBROUTINE get_rho_atom(rho_atom, cpc_h, cpc_s, rho_rad_h, rho_rad_s, &
192 drho_rad_h, drho_rad_s, vrho_rad_h, vrho_rad_s, &
193 rho_rad_h_d, rho_rad_s_d, ga_Vlocal_gb_h, ga_Vlocal_gb_s, &
194 int_scr_h, int_scr_s)
198 POINTER :: cpc_h, cpc_s, rho_rad_h, rho_rad_s, &
199 drho_rad_h, drho_rad_s, vrho_rad_h, &
202 POINTER :: rho_rad_h_d, rho_rad_s_d
204 POINTER :: ga_vlocal_gb_h, ga_vlocal_gb_s, &
207 IF (
ASSOCIATED(rho_atom))
THEN
208 IF (
PRESENT(cpc_h)) cpc_h => rho_atom%cpc_h
209 IF (
PRESENT(cpc_s)) cpc_s => rho_atom%cpc_s
210 IF (
PRESENT(rho_rad_h)) rho_rad_h => rho_atom%rho_rad_h
211 IF (
PRESENT(rho_rad_s)) rho_rad_s => rho_atom%rho_rad_s
212 IF (
PRESENT(drho_rad_h)) drho_rad_h => rho_atom%drho_rad_h
213 IF (
PRESENT(drho_rad_s)) drho_rad_s => rho_atom%drho_rad_s
214 IF (
PRESENT(rho_rad_h_d)) rho_rad_h_d => rho_atom%rho_rad_h_d
215 IF (
PRESENT(rho_rad_s_d)) rho_rad_s_d => rho_atom%rho_rad_s_d
216 IF (
PRESENT(vrho_rad_h)) vrho_rad_h => rho_atom%vrho_rad_h
217 IF (
PRESENT(vrho_rad_s)) vrho_rad_s => rho_atom%vrho_rad_s
218 IF (
PRESENT(ga_vlocal_gb_h)) ga_vlocal_gb_h => rho_atom%ga_Vlocal_gb_h
219 IF (
PRESENT(ga_vlocal_gb_s)) ga_vlocal_gb_s => rho_atom%ga_Vlocal_gb_s
220 IF (
PRESENT(int_scr_h)) int_scr_h => rho_atom%int_scr_h
221 IF (
PRESENT(int_scr_s)) int_scr_s => rho_atom%int_scr_s
223 cpabort(
"The pointer rho_atom is not associated")
235 INTEGER :: i, iat, n, natom
237 IF (
ASSOCIATED(rho_atom_set))
THEN
238 natom =
SIZE(rho_atom_set)
240 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_h))
THEN
241 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_h(1)%r_coef))
THEN
242 n =
SIZE(rho_atom_set(iat)%ga_Vlocal_gb_h, 1)
244 rho_atom_set(iat)%ga_Vlocal_gb_h(i)%r_coef = 0.0_dp
248 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_s))
THEN
249 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_s(1)%r_coef))
THEN
250 n =
SIZE(rho_atom_set(iat)%ga_Vlocal_gb_s, 1)
252 rho_atom_set(iat)%ga_Vlocal_gb_s(i)%r_coef = 0.0_dp
subroutine, public get_rho_atom(rho_atom, cpc_h, cpc_s, rho_rad_h, rho_rad_s, drho_rad_h, drho_rad_s, vrho_rad_h, vrho_rad_s, rho_rad_h_d, rho_rad_s_d, ga_vlocal_gb_h, ga_vlocal_gb_s, int_scr_h, int_scr_s)
...