56 INTEGER :: i, iat, j, n, natom
58 IF (
ASSOCIATED(rho_atom_set))
THEN
60 natom =
SIZE(rho_atom_set)
63 IF (
ASSOCIATED(rho_atom_set(iat)%cpc_h))
THEN
64 IF (
ASSOCIATED(rho_atom_set(iat)%cpc_h(1)%r_coef))
THEN
65 n =
SIZE(rho_atom_set(iat)%cpc_h, 1)
67 DEALLOCATE (rho_atom_set(iat)%cpc_h(i)%r_coef)
68 DEALLOCATE (rho_atom_set(iat)%cpc_s(i)%r_coef)
71 DEALLOCATE (rho_atom_set(iat)%cpc_h)
72 DEALLOCATE (rho_atom_set(iat)%cpc_s)
74 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_h))
THEN
75 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_h(1)%r_coef))
THEN
76 n =
SIZE(rho_atom_set(iat)%ga_Vlocal_gb_h, 1)
78 DEALLOCATE (rho_atom_set(iat)%ga_Vlocal_gb_h(i)%r_coef)
79 DEALLOCATE (rho_atom_set(iat)%ga_Vlocal_gb_s(i)%r_coef)
82 DEALLOCATE (rho_atom_set(iat)%ga_Vlocal_gb_h)
83 DEALLOCATE (rho_atom_set(iat)%ga_Vlocal_gb_s)
85 IF (
ASSOCIATED(rho_atom_set(iat)%int_scr_h))
THEN
86 IF (
ASSOCIATED(rho_atom_set(iat)%int_scr_h(1)%r_coef))
THEN
87 n =
SIZE(rho_atom_set(iat)%int_scr_h, 1)
89 DEALLOCATE (rho_atom_set(iat)%int_scr_h(i)%r_coef)
90 DEALLOCATE (rho_atom_set(iat)%int_scr_s(i)%r_coef)
93 DEALLOCATE (rho_atom_set(iat)%int_scr_h)
94 DEALLOCATE (rho_atom_set(iat)%int_scr_s)
97 IF (
ASSOCIATED(rho_atom_set(iat)%drho_rad_h))
THEN
98 IF (
ASSOCIATED(rho_atom_set(iat)%drho_rad_h(1)%r_coef))
THEN
99 n =
SIZE(rho_atom_set(iat)%drho_rad_h, 1)
101 DEALLOCATE (rho_atom_set(iat)%drho_rad_h(i)%r_coef)
102 DEALLOCATE (rho_atom_set(iat)%drho_rad_s(i)%r_coef)
104 DEALLOCATE (rho_atom_set(iat)%rho_rad_h_d(j, i)%r_coef)
105 DEALLOCATE (rho_atom_set(iat)%rho_rad_s_d(j, i)%r_coef)
109 DEALLOCATE (rho_atom_set(iat)%drho_rad_h)
110 DEALLOCATE (rho_atom_set(iat)%drho_rad_s)
111 DEALLOCATE (rho_atom_set(iat)%rho_rad_h_d)
112 DEALLOCATE (rho_atom_set(iat)%rho_rad_s_d)
115 IF (
ASSOCIATED(rho_atom_set(iat)%rho_rad_h))
THEN
116 IF (
ASSOCIATED(rho_atom_set(iat)%rho_rad_h(1)%r_coef))
THEN
117 n =
SIZE(rho_atom_set(iat)%rho_rad_h)
119 DEALLOCATE (rho_atom_set(iat)%rho_rad_h(i)%r_coef)
122 DEALLOCATE (rho_atom_set(iat)%rho_rad_h)
125 IF (
ASSOCIATED(rho_atom_set(iat)%rho_rad_s))
THEN
126 IF (
ASSOCIATED(rho_atom_set(iat)%rho_rad_s(1)%r_coef))
THEN
127 n =
SIZE(rho_atom_set(iat)%rho_rad_s)
129 DEALLOCATE (rho_atom_set(iat)%rho_rad_s(i)%r_coef)
132 DEALLOCATE (rho_atom_set(iat)%rho_rad_s)
135 IF (
ASSOCIATED(rho_atom_set(iat)%vrho_rad_h))
THEN
136 IF (
ASSOCIATED(rho_atom_set(iat)%vrho_rad_h(1)%r_coef))
THEN
137 n =
SIZE(rho_atom_set(iat)%vrho_rad_h)
139 DEALLOCATE (rho_atom_set(iat)%vrho_rad_h(i)%r_coef)
142 DEALLOCATE (rho_atom_set(iat)%vrho_rad_h)
145 IF (
ASSOCIATED(rho_atom_set(iat)%vrho_rad_s))
THEN
146 IF (
ASSOCIATED(rho_atom_set(iat)%vrho_rad_s(1)%r_coef))
THEN
147 n =
SIZE(rho_atom_set(iat)%vrho_rad_s)
149 DEALLOCATE (rho_atom_set(iat)%vrho_rad_s(i)%r_coef)
152 DEALLOCATE (rho_atom_set(iat)%vrho_rad_s)
157 DEALLOCATE (rho_atom_set)
161 CALL cp_abort(__location__, &
162 "The pointer rho_atom_set is not associated and "// &
163 "cannot be deallocated")
187 SUBROUTINE get_rho_atom(rho_atom, cpc_h, cpc_s, rho_rad_h, rho_rad_s, &
188 drho_rad_h, drho_rad_s, vrho_rad_h, vrho_rad_s, &
189 rho_rad_h_d, rho_rad_s_d, ga_Vlocal_gb_h, ga_Vlocal_gb_s, &
190 int_scr_h, int_scr_s)
194 POINTER :: cpc_h, cpc_s, rho_rad_h, rho_rad_s, &
195 drho_rad_h, drho_rad_s, vrho_rad_h, &
198 POINTER :: rho_rad_h_d, rho_rad_s_d
200 POINTER :: ga_vlocal_gb_h, ga_vlocal_gb_s, &
203 IF (
ASSOCIATED(rho_atom))
THEN
204 IF (
PRESENT(cpc_h)) cpc_h => rho_atom%cpc_h
205 IF (
PRESENT(cpc_s)) cpc_s => rho_atom%cpc_s
206 IF (
PRESENT(rho_rad_h)) rho_rad_h => rho_atom%rho_rad_h
207 IF (
PRESENT(rho_rad_s)) rho_rad_s => rho_atom%rho_rad_s
208 IF (
PRESENT(drho_rad_h)) drho_rad_h => rho_atom%drho_rad_h
209 IF (
PRESENT(drho_rad_s)) drho_rad_s => rho_atom%drho_rad_s
210 IF (
PRESENT(rho_rad_h_d)) rho_rad_h_d => rho_atom%rho_rad_h_d
211 IF (
PRESENT(rho_rad_s_d)) rho_rad_s_d => rho_atom%rho_rad_s_d
212 IF (
PRESENT(vrho_rad_h)) vrho_rad_h => rho_atom%vrho_rad_h
213 IF (
PRESENT(vrho_rad_s)) vrho_rad_s => rho_atom%vrho_rad_s
214 IF (
PRESENT(ga_vlocal_gb_h)) ga_vlocal_gb_h => rho_atom%ga_Vlocal_gb_h
215 IF (
PRESENT(ga_vlocal_gb_s)) ga_vlocal_gb_s => rho_atom%ga_Vlocal_gb_s
216 IF (
PRESENT(int_scr_h)) int_scr_h => rho_atom%int_scr_h
217 IF (
PRESENT(int_scr_s)) int_scr_s => rho_atom%int_scr_s
219 cpabort(
"The pointer rho_atom is not associated")
231 INTEGER :: i, iat, n, natom
233 IF (
ASSOCIATED(rho_atom_set))
THEN
234 natom =
SIZE(rho_atom_set)
236 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_h))
THEN
237 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_h(1)%r_coef))
THEN
238 n =
SIZE(rho_atom_set(iat)%ga_Vlocal_gb_h, 1)
240 rho_atom_set(iat)%ga_Vlocal_gb_h(i)%r_coef = 0.0_dp
244 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_s))
THEN
245 IF (
ASSOCIATED(rho_atom_set(iat)%ga_Vlocal_gb_s(1)%r_coef))
THEN
246 n =
SIZE(rho_atom_set(iat)%ga_Vlocal_gb_s, 1)
248 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)
...