(git:3d5d2e5)
Loading...
Searching...
No Matches
admm_types.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2026 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Types and set/get functions for auxiliary density matrix methods
10!> \par History
11!> 05.2008 created [Manuel Guidon]
12!> 12.2019 Made GAPW compatiblae [Augustin Bussy]
13!> \author Manuel Guidon
14! **************************************************************************************************
18 USE bibliography, ONLY: guidon2010,&
19 cite_reference
22 USE cp_dbcsr_api, ONLY: dbcsr_p_type
27 USE cp_fm_types, ONLY: cp_fm_create,&
39 USE kinds, ONLY: dp
58 USE qs_rho_types, ONLY: qs_rho_release,&
62#include "./base/base_uses.f90"
63
64 IMPLICIT NONE
65 PRIVATE
68
69 CHARACTER(LEN=*), PARAMETER, PRIVATE :: moduleN = 'admm_types'
70
71 TYPE eigvals_type
72 REAL(dp), DIMENSION(:), POINTER :: DATA => null()
73 END TYPE eigvals_type
74
75 TYPE eigvals_p_type
76 TYPE(eigvals_type), POINTER :: eigvals => null()
77 END TYPE eigvals_p_type
78
79! **************************************************************************************************
80!> \brief A subtype of the admm_env that contains the extra data needed for an ADMM GAPW calculation
81!> \param admm_kind_set gets its own qs_kind set to store all relevant basis/grid/etc info
82!> \param local_rho_set caontains soft and hard AUX_FIT atomoc densities
83!> \param task_list the task list used for all soft density pw operations
84!> \param oce stores the precomputed oce integrals
85! **************************************************************************************************
87 TYPE(qs_kind_type), DIMENSION(:), POINTER :: admm_kind_set => null()
88 TYPE(local_rho_type), POINTER :: local_rho_set => null()
89 TYPE(task_list_type), POINTER :: task_list => null()
90 TYPE(oce_matrix_type), POINTER :: oce => null()
92
93! **************************************************************************************************
94!> \brief stores some data used in wavefunction fitting
95!> \param S overlap matrix for auxiliary fit basis set
96!> \param P overlap matrix for mixed aux_fit/orb basis set
97!> \param A contains inv(S)*P
98!> \param B contains transpose(P)*inv(S)*P = transpose(P)*A
99!> \param lambda contains transpose(mo_coeff_aux_fit)*B*mo_coeff_aux_fit
100!> \param lambda_inv_sqrt contains inv(SQRT(lambda))
101!> \param R contains eigenvectors of lambda
102!> \param work_aux_aux temporary matrix
103!> \param work_orb_nmo temporary matrix
104!> \param work_nmo_nmo1 temporary matrix
105!> \param work_nmo_nmo2 temporary matrix
106!> \param work_aux_nmo temporary matrix
107!> \param H contains KS_matrix * mo_coeff for auxiliary basis set
108!> \param K contains KS matrix for auxiliary basis set
109!> \param M contains matrix holding the 2nd order residues
110!> \param nao_orb number of atomic orbitals in orb basis set
111!> \param nao_aux_fit number of atomic orbitals in aux basis set
112!> \param nmo number of molecular orbitals per spin
113!> \param eigvals_lamda eigenvalues of lambda matrix
114!> \param gsi contains ratio N_dens_m/N_aux_dens_m
115!> \param admm_gapw_env the type containing ADMM GAPW specific data
116!> \param do_gapw an internal logical switch for GAPW
117!> \par History
118!> 05.2008 created [Manuel Guidon]
119!> \author Manuel Guidon
120! **************************************************************************************************
122 TYPE(cp_fm_type), POINTER :: s_inv => null(), &
123 s => null(), &
124 q => null(), &
125 a => null(), &
126 b => null(), &
127 work_orb_orb => null(), &
128 work_orb_orb2 => null(), &
129 work_orb_orb3 => null(), &
130 work_aux_orb => null(), &
131 work_aux_orb2 => null(), &
132 work_aux_orb3 => null(), &
133 work_aux_aux => null(), &
134 work_aux_aux2 => null(), &
135 work_aux_aux3 => null(), &
136 work_aux_aux4 => null(), &
137 work_aux_aux5 => null()
138
139 TYPE(cp_fm_type), DIMENSION(:), &
140 POINTER :: lambda => null(), &
141 lambda_inv => null(), &
142 lambda_inv_sqrt => null(), &
143 r => null(), &
144 r_purify => null(), &
145 work_orb_nmo => null(), &
146 work_nmo_nmo1 => null(), &
147 r_schur_r_t => null(), &
148 work_nmo_nmo2 => null(), &
149 work_aux_nmo => null(), &
150 work_aux_nmo2 => null(), &
151 h => null(), &
152 h_corr => null(), &
153 mo_derivs_tmp => null(), &
154 k => null(), &
155 m => null(), &
156 m_purify => null(), &
157 p_to_be_purified => null(), &
158 lambda_inv2 => null(), &
159 c_hat => null(), &
160 p_tilde => null(), &
161 ks_to_be_merged => null(), &
162 scf_work_aux_fit => null()
163 TYPE(eigvals_p_type), DIMENSION(:), &
164 POINTER :: eigvals_lambda => null(), &
165 eigvals_p_to_be_purified => null()
166 TYPE(section_vals_type), POINTER :: xc_section_primary => null(), &
167 xc_section_aux => null()
168 REAL(kind=dp) :: gsi(3) = 0.0_dp, &
169 lambda_merlot(2) = 0.0_dp, &
170 n_large_basis(3) = 0.0_dp
171 INTEGER :: nao_orb = 0, nao_aux_fit = 0, nmo(2) = 0
172 INTEGER :: purification_method = do_admm_purify_none
173 LOGICAL :: charge_constrain = .false., do_admmp = .false., &
174 do_admmq = .false., do_admms = .false.
175 INTEGER :: scaling_model = do_admm_exch_scaling_none, &
176 aux_exch_func = do_admm_aux_exch_func_none
177 LOGICAL :: aux_exch_func_param = .false.
178 REAL(kind=dp), DIMENSION(3) :: aux_x_param = 0.0_dp
179 LOGICAL :: block_dm = .false.
180 LOGICAL :: block_fit = .false.
181 INTEGER, DIMENSION(:, :), POINTER :: block_map => null()
182 TYPE(admm_gapw_r3d_rs_type), POINTER :: admm_gapw_env => null()
183 LOGICAL :: do_gapw = .false.
184 TYPE(admm_dm_type), POINTER :: admm_dm => null()
185
186 TYPE(mo_set_type), DIMENSION(:), &
187 POINTER :: mos_aux_fit => null()
189 DIMENSION(:), POINTER :: sab_aux_fit => null(), sab_aux_fit_asymm => null(), sab_aux_fit_vs_orb => null()
190 TYPE(dbcsr_p_type), DIMENSION(:), &
191 POINTER :: matrix_ks_aux_fit_im => null()
192 TYPE(kpoint_transitional_type) :: matrix_ks_aux_fit, &
193 matrix_ks_aux_fit_dft, &
194 matrix_ks_aux_fit_hfx, &
195 matrix_s_aux_fit, &
196 matrix_s_aux_fit_vs_orb
197 TYPE(qs_rho_type), POINTER :: rho_aux_fit => null(), rho_aux_fit_buffer => null()
198 TYPE(task_list_type), POINTER :: task_list_aux_fit => null()
199 TYPE(cp_fm_type), DIMENSION(:), &
200 POINTER :: mo_derivs_aux_fit => null()
201
202 END TYPE admm_type
203
204CONTAINS
205
206! **************************************************************************************************
207!> \brief creates ADMM environment, initializes the basic types
208!>
209!> \param admm_env The ADMM env
210!> \param admm_control ...
211!> \param mos the MO's of the orbital basis set
212!> \param para_env The parallel env
213!> \param natoms ...
214!> \param nao_aux_fit ...
215!> \param blacs_env_ext ...
216!> \par History
217!> 05.2008 created [Manuel Guidon]
218!> \author Manuel Guidon
219! **************************************************************************************************
220 SUBROUTINE admm_env_create(admm_env, admm_control, mos, para_env, natoms, nao_aux_fit, blacs_env_ext)
221
222 TYPE(admm_type), POINTER :: admm_env
223 TYPE(admm_control_type), POINTER :: admm_control
224 TYPE(mo_set_type), DIMENSION(:), INTENT(IN) :: mos
225 TYPE(mp_para_env_type), POINTER :: para_env
226 INTEGER, INTENT(IN) :: natoms, nao_aux_fit
227 TYPE(cp_blacs_env_type), OPTIONAL, POINTER :: blacs_env_ext
228
229 INTEGER :: i, iatom, iblock, ispin, j, jatom, &
230 nao_orb, nmo, nspins
231 TYPE(cp_blacs_env_type), POINTER :: blacs_env
232 TYPE(cp_fm_struct_type), POINTER :: fm_struct_aux_aux, fm_struct_aux_nmo, fm_struct_aux_orb, &
233 fm_struct_nmo_nmo, fm_struct_orb_nmo, fm_struct_orb_orb
234 TYPE(cp_fm_type), POINTER :: mo_coeff
235
236 CALL cite_reference(guidon2010)
237
238 ALLOCATE (admm_env)
239
240 nspins = SIZE(mos)
241 CALL get_mo_set(mos(1), mo_coeff=mo_coeff, nmo=nmo, nao=nao_orb)
242 blacs_env => mo_coeff%matrix_struct%context
243 IF (PRESENT(blacs_env_ext)) blacs_env => blacs_env_ext
244
245 admm_env%nmo = 0
246 admm_env%nao_aux_fit = nao_aux_fit
247 admm_env%nao_orb = nao_orb
248 CALL cp_fm_struct_create(fm_struct_aux_aux, &
249 context=blacs_env, &
250 nrow_global=nao_aux_fit, &
251 ncol_global=nao_aux_fit, &
252 para_env=para_env)
253 CALL cp_fm_struct_create(fm_struct_aux_orb, &
254 context=blacs_env, &
255 nrow_global=nao_aux_fit, &
256 ncol_global=nao_orb, &
257 para_env=para_env)
258 CALL cp_fm_struct_create(fm_struct_orb_orb, &
259 context=blacs_env, &
260 nrow_global=nao_orb, &
261 ncol_global=nao_orb, &
262 para_env=para_env)
263
264 NULLIFY (admm_env%S, admm_env%S_inv, admm_env%Q, admm_env%A, admm_env%B, &
265 admm_env%work_orb_orb, admm_env%work_orb_orb2, admm_env%work_orb_orb3, &
266 admm_env%work_aux_orb, admm_env%work_aux_orb2, admm_env%work_aux_orb3, &
267 admm_env%work_aux_aux, admm_env%work_aux_aux2, admm_env%work_aux_aux3, &
268 admm_env%work_aux_aux4, admm_env%work_aux_aux5)
269 ALLOCATE (admm_env%S, admm_env%S_inv, admm_env%Q, admm_env%A, admm_env%B, &
270 admm_env%work_orb_orb, admm_env%work_orb_orb2, admm_env%work_orb_orb3, &
271 admm_env%work_aux_orb, admm_env%work_aux_orb2, admm_env%work_aux_orb3, &
272 admm_env%work_aux_aux, admm_env%work_aux_aux2, admm_env%work_aux_aux3, &
273 admm_env%work_aux_aux4, admm_env%work_aux_aux5)
274 CALL cp_fm_create(admm_env%S, fm_struct_aux_aux, name="aux_fit_overlap")
275 CALL cp_fm_create(admm_env%S_inv, fm_struct_aux_aux, name="aux_fit_overlap_inv")
276 CALL cp_fm_create(admm_env%Q, fm_struct_aux_orb, name="mixed_overlap")
277 CALL cp_fm_create(admm_env%A, fm_struct_aux_orb, name="work_A")
278 CALL cp_fm_create(admm_env%B, fm_struct_orb_orb, name="work_B")
279 CALL cp_fm_create(admm_env%work_orb_orb, fm_struct_orb_orb, name="work_orb_orb")
280 CALL cp_fm_create(admm_env%work_orb_orb2, fm_struct_orb_orb, name="work_orb_orb")
281 CALL cp_fm_create(admm_env%work_orb_orb3, fm_struct_orb_orb, name="work_orb_orb3")
282 CALL cp_fm_create(admm_env%work_aux_orb, fm_struct_aux_orb, name="work_aux_orb")
283 CALL cp_fm_create(admm_env%work_aux_orb2, fm_struct_aux_orb, name="work_aux_orb2")
284 CALL cp_fm_create(admm_env%work_aux_orb3, fm_struct_aux_orb, name="work_aux_orb3")
285 CALL cp_fm_create(admm_env%work_aux_aux, fm_struct_aux_aux, name="work_aux_aux")
286 CALL cp_fm_create(admm_env%work_aux_aux2, fm_struct_aux_aux, name="work_aux_aux2")
287 CALL cp_fm_create(admm_env%work_aux_aux3, fm_struct_aux_aux, name="work_aux_aux3")
288 CALL cp_fm_create(admm_env%work_aux_aux4, fm_struct_aux_aux, name="work_aux_aux4")
289 CALL cp_fm_create(admm_env%work_aux_aux5, fm_struct_aux_aux, name="work_aux_aux5")
290
291 ALLOCATE (admm_env%lambda_inv(nspins))
292 ALLOCATE (admm_env%lambda(nspins))
293 ALLOCATE (admm_env%lambda_inv_sqrt(nspins))
294 ALLOCATE (admm_env%R(nspins))
295 ALLOCATE (admm_env%R_purify(nspins))
296 ALLOCATE (admm_env%work_orb_nmo(nspins))
297 ALLOCATE (admm_env%work_nmo_nmo1(nspins))
298 ALLOCATE (admm_env%R_schur_R_t(nspins))
299 ALLOCATE (admm_env%work_nmo_nmo2(nspins))
300 ALLOCATE (admm_env%eigvals_lambda(nspins))
301 ALLOCATE (admm_env%eigvals_P_to_be_purified(nspins))
302 ALLOCATE (admm_env%H(nspins))
303 ALLOCATE (admm_env%K(nspins))
304 ALLOCATE (admm_env%M(nspins))
305 ALLOCATE (admm_env%M_purify(nspins))
306 ALLOCATE (admm_env%P_to_be_purified(nspins))
307 ALLOCATE (admm_env%work_aux_nmo(nspins))
308 ALLOCATE (admm_env%work_aux_nmo2(nspins))
309 ALLOCATE (admm_env%mo_derivs_tmp(nspins))
310 ALLOCATE (admm_env%H_corr(nspins))
311 ALLOCATE (admm_env%ks_to_be_merged(nspins))
312 ALLOCATE (admm_env%lambda_inv2(nspins))
313 ALLOCATE (admm_env%C_hat(nspins))
314 ALLOCATE (admm_env%P_tilde(nspins))
315
316 DO ispin = 1, nspins
317 CALL get_mo_set(mos(ispin), mo_coeff=mo_coeff, nmo=nmo)
318 admm_env%nmo(ispin) = nmo
319 CALL cp_fm_struct_create(fm_struct_aux_nmo, &
320 context=blacs_env, &
321 nrow_global=nao_aux_fit, &
322 ncol_global=nmo, &
323 para_env=para_env)
324 CALL cp_fm_struct_create(fm_struct_orb_nmo, &
325 context=blacs_env, &
326 nrow_global=nao_orb, &
327 ncol_global=nmo, &
328 para_env=para_env)
329 CALL cp_fm_struct_create(fm_struct_nmo_nmo, &
330 context=blacs_env, &
331 nrow_global=nmo, &
332 ncol_global=nmo, &
333 para_env=para_env)
334
335 CALL cp_fm_create(admm_env%work_orb_nmo(ispin), fm_struct_orb_nmo, name="work_orb_nmo")
336 CALL cp_fm_create(admm_env%work_nmo_nmo1(ispin), fm_struct_nmo_nmo, name="work_nmo_nmo1")
337 CALL cp_fm_create(admm_env%R_schur_R_t(ispin), fm_struct_nmo_nmo, name="R_schur_R_t")
338 CALL cp_fm_create(admm_env%work_nmo_nmo2(ispin), fm_struct_nmo_nmo, name="work_nmo_nmo2")
339 CALL cp_fm_create(admm_env%lambda(ispin), fm_struct_nmo_nmo, name="lambda")
340 CALL cp_fm_create(admm_env%lambda_inv(ispin), fm_struct_nmo_nmo, name="lambda_inv")
341 CALL cp_fm_create(admm_env%lambda_inv_sqrt(ispin), fm_struct_nmo_nmo, name="lambda_inv_sqrt")
342 CALL cp_fm_create(admm_env%R(ispin), fm_struct_nmo_nmo, name="R")
343 CALL cp_fm_create(admm_env%R_purify(ispin), fm_struct_aux_aux, name="R_purify")
344 CALL cp_fm_create(admm_env%K(ispin), fm_struct_aux_aux, name="K")
345 CALL cp_fm_create(admm_env%H(ispin), fm_struct_aux_nmo, name="H")
346 CALL cp_fm_create(admm_env%H_corr(ispin), fm_struct_orb_orb, name="H_corr")
347 CALL cp_fm_create(admm_env%M(ispin), fm_struct_nmo_nmo, name="M")
348 CALL cp_fm_create(admm_env%M_purify(ispin), fm_struct_aux_aux, name="M aux")
349 CALL cp_fm_create(admm_env%P_to_be_purified(ispin), fm_struct_aux_aux, name="P_to_be_purified")
350 CALL cp_fm_create(admm_env%work_aux_nmo(ispin), fm_struct_aux_nmo, name="work_aux_nmo")
351 CALL cp_fm_create(admm_env%work_aux_nmo2(ispin), fm_struct_aux_nmo, name="work_aux_nmo2")
352 CALL cp_fm_create(admm_env%mo_derivs_tmp(ispin), fm_struct_orb_nmo, name="mo_derivs_tmp")
353 CALL cp_fm_create(admm_env%lambda_inv2(ispin), fm_struct_nmo_nmo, name="lambda_inv2")
354 CALL cp_fm_create(admm_env%C_hat(ispin), fm_struct_aux_nmo, name="C_hat")
355 CALL cp_fm_create(admm_env%P_tilde(ispin), fm_struct_aux_aux, name="P_tilde")
356 CALL cp_fm_create(admm_env%ks_to_be_merged(ispin), fm_struct_orb_orb, name="KS_to_be_merged")
357
358 ALLOCATE (admm_env%eigvals_lambda(ispin)%eigvals)
359 ALLOCATE (admm_env%eigvals_P_to_be_purified(ispin)%eigvals)
360 ALLOCATE (admm_env%eigvals_lambda(ispin)%eigvals%data(nmo))
361 ALLOCATE (admm_env%eigvals_P_to_be_purified(ispin)%eigvals%data(nao_aux_fit))
362 admm_env%eigvals_lambda(ispin)%eigvals%data = 0.0_dp
363 admm_env%eigvals_P_to_be_purified(ispin)%eigvals%data = 0.0_dp
364 CALL cp_fm_struct_release(fm_struct_aux_nmo)
365 CALL cp_fm_struct_release(fm_struct_orb_nmo)
366 CALL cp_fm_struct_release(fm_struct_nmo_nmo)
367 END DO
368
369 CALL cp_fm_struct_release(fm_struct_aux_aux)
370 CALL cp_fm_struct_release(fm_struct_aux_orb)
371 CALL cp_fm_struct_release(fm_struct_orb_orb)
372
373 ! Copy settings from admm_control
374 cpassert(ASSOCIATED(admm_control))
375 admm_env%purification_method = admm_control%purification_method
376 admm_env%scaling_model = admm_control%scaling_model
377 admm_env%aux_exch_func = admm_control%aux_exch_func
378 admm_env%charge_constrain = (admm_control%method == do_admm_charge_constrained_projection)
379 admm_env%block_dm = ((admm_control%method == do_admm_blocking_purify_full) .OR. &
380 (admm_control%method == do_admm_blocked_projection))
381 admm_env%block_fit = admm_control%method == do_admm_blocked_projection
382 admm_env%aux_exch_func_param = admm_control%aux_exch_func_param
383 admm_env%aux_x_param(:) = admm_control%aux_x_param(:)
384
385 !ADMMP, ADMMQ, ADMMS
386 IF ((.NOT. admm_env%charge_constrain) .AND. (admm_env%scaling_model == do_admm_exch_scaling_merlot)) THEN
387 admm_env%do_admmp = .true.
388 END IF
389 IF (admm_env%charge_constrain .AND. (admm_env%scaling_model == do_admm_exch_scaling_none)) THEN
390 admm_env%do_admmq = .true.
391 END IF
392 IF (admm_env%charge_constrain .AND. (admm_env%scaling_model == do_admm_exch_scaling_merlot)) THEN
393 admm_env%do_admms = .true.
394 END IF
395
396 IF ((admm_control%method == do_admm_blocking_purify_full) .OR. &
397 (admm_control%method == do_admm_blocked_projection)) THEN
398 ! Create block map
399 ALLOCATE (admm_env%block_map(natoms, natoms))
400 admm_env%block_map(:, :) = 0
401 DO iblock = 1, SIZE(admm_control%blocks)
402 DO i = 1, SIZE(admm_control%blocks(iblock)%list)
403 iatom = admm_control%blocks(iblock)%list(i)
404 DO j = 1, SIZE(admm_control%blocks(iblock)%list)
405 jatom = admm_control%blocks(iblock)%list(j)
406 admm_env%block_map(iatom, jatom) = 1
407 END DO
408 END DO
409 END DO
410 END IF
411
412 NULLIFY (admm_env%admm_gapw_env)
413 admm_env%do_gapw = .false.
414
415 NULLIFY (admm_env%mos_aux_fit, admm_env%sab_aux_fit, admm_env%sab_aux_fit_asymm, admm_env%sab_aux_fit_vs_orb)
416 NULLIFY (admm_env%matrix_ks_aux_fit_im)
417 NULLIFY (admm_env%rho_aux_fit, admm_env%rho_aux_fit_buffer, admm_env%task_list_aux_fit, admm_env%mo_derivs_aux_fit)
418
419 END SUBROUTINE admm_env_create
420
421! **************************************************************************************************
422!> \brief releases the ADMM environment, cleans up all types
423!>
424!> \param admm_env The ADMM env
425!> \par History
426!> 05.2008 created [Manuel Guidon]
427!> \author Manuel Guidon
428! **************************************************************************************************
429 SUBROUTINE admm_env_release(admm_env)
430
431 TYPE(admm_type), POINTER :: admm_env
432
433 INTEGER :: ispin
434
435 cpassert(ASSOCIATED(admm_env))
436
437 CALL cp_fm_release(admm_env%S)
438 CALL cp_fm_release(admm_env%S_inv)
439 CALL cp_fm_release(admm_env%Q)
440 CALL cp_fm_release(admm_env%A)
441 CALL cp_fm_release(admm_env%B)
442 CALL cp_fm_release(admm_env%work_orb_orb)
443 CALL cp_fm_release(admm_env%work_orb_orb2)
444 CALL cp_fm_release(admm_env%work_orb_orb3)
445 CALL cp_fm_release(admm_env%work_aux_aux)
446 CALL cp_fm_release(admm_env%work_aux_aux2)
447 CALL cp_fm_release(admm_env%work_aux_aux3)
448 CALL cp_fm_release(admm_env%work_aux_aux4)
449 CALL cp_fm_release(admm_env%work_aux_aux5)
450 CALL cp_fm_release(admm_env%work_aux_orb)
451 CALL cp_fm_release(admm_env%work_aux_orb2)
452 CALL cp_fm_release(admm_env%work_aux_orb3)
453 DEALLOCATE (admm_env%S, admm_env%S_inv, admm_env%Q, admm_env%A, admm_env%B, &
454 admm_env%work_orb_orb, admm_env%work_orb_orb2, admm_env%work_orb_orb3, &
455 admm_env%work_aux_orb, admm_env%work_aux_orb2, admm_env%work_aux_orb3, &
456 admm_env%work_aux_aux, admm_env%work_aux_aux2, admm_env%work_aux_aux3, &
457 admm_env%work_aux_aux4, admm_env%work_aux_aux5)
458 CALL cp_fm_release(admm_env%lambda)
459 CALL cp_fm_release(admm_env%lambda_inv)
460 CALL cp_fm_release(admm_env%lambda_inv_sqrt)
461 CALL cp_fm_release(admm_env%lambda_inv2)
462 CALL cp_fm_release(admm_env%C_hat)
463 CALL cp_fm_release(admm_env%P_tilde)
464 CALL cp_fm_release(admm_env%R)
465 CALL cp_fm_release(admm_env%R_purify)
466 CALL cp_fm_release(admm_env%H)
467 CALL cp_fm_release(admm_env%H_corr)
468 CALL cp_fm_release(admm_env%K)
469 CALL cp_fm_release(admm_env%M)
470 CALL cp_fm_release(admm_env%M_purify)
471 CALL cp_fm_release(admm_env%P_to_be_purified)
472 CALL cp_fm_release(admm_env%work_orb_nmo)
473 CALL cp_fm_release(admm_env%work_nmo_nmo1)
474 CALL cp_fm_release(admm_env%R_schur_R_t)
475 CALL cp_fm_release(admm_env%work_nmo_nmo2)
476 CALL cp_fm_release(admm_env%work_aux_nmo)
477 CALL cp_fm_release(admm_env%work_aux_nmo2)
478 CALL cp_fm_release(admm_env%mo_derivs_tmp)
479 CALL cp_fm_release(admm_env%ks_to_be_merged)
480 CALL cp_fm_release(admm_env%lambda_inv2)
481 DO ispin = 1, SIZE(admm_env%eigvals_lambda)
482 DEALLOCATE (admm_env%eigvals_lambda(ispin)%eigvals%data)
483 DEALLOCATE (admm_env%eigvals_P_to_be_purified(ispin)%eigvals%data)
484 DEALLOCATE (admm_env%eigvals_lambda(ispin)%eigvals)
485 DEALLOCATE (admm_env%eigvals_P_to_be_purified(ispin)%eigvals)
486 END DO
487 DEALLOCATE (admm_env%eigvals_lambda)
488 DEALLOCATE (admm_env%eigvals_P_to_be_purified)
489
490 IF (ASSOCIATED(admm_env%block_map)) THEN
491 DEALLOCATE (admm_env%block_map)
492 END IF
493
494 IF (ASSOCIATED(admm_env%xc_section_primary)) THEN
495 CALL section_vals_release(admm_env%xc_section_primary)
496 END IF
497 IF (ASSOCIATED(admm_env%xc_section_aux)) THEN
498 CALL section_vals_release(admm_env%xc_section_aux)
499 END IF
500
501 IF (ASSOCIATED(admm_env%admm_gapw_env)) CALL admm_gapw_env_release(admm_env%admm_gapw_env)
502 IF (ASSOCIATED(admm_env%admm_dm)) CALL admm_dm_release(admm_env%admm_dm)
503
504 IF (ASSOCIATED(admm_env%mos_aux_fit)) THEN
505 DO ispin = 1, SIZE(admm_env%mos_aux_fit)
506 CALL deallocate_mo_set(admm_env%mos_aux_fit(ispin))
507 END DO
508 DEALLOCATE (admm_env%mos_aux_fit)
509 END IF
510 CALL cp_fm_release(admm_env%mo_derivs_aux_fit)
511
512 IF (ASSOCIATED(admm_env%scf_work_aux_fit)) THEN
513 CALL cp_fm_release(admm_env%scf_work_aux_fit)
514 END IF
515
516 IF (ASSOCIATED(admm_env%sab_aux_fit)) CALL release_neighbor_list_sets(admm_env%sab_aux_fit)
517 IF (ASSOCIATED(admm_env%sab_aux_fit_vs_orb)) CALL release_neighbor_list_sets(admm_env%sab_aux_fit_vs_orb)
518 IF (ASSOCIATED(admm_env%sab_aux_fit_asymm)) CALL release_neighbor_list_sets(admm_env%sab_aux_fit_asymm)
519
520 CALL kpoint_transitional_release(admm_env%matrix_ks_aux_fit)
521 CALL kpoint_transitional_release(admm_env%matrix_ks_aux_fit_dft)
522 CALL kpoint_transitional_release(admm_env%matrix_ks_aux_fit_hfx)
523 CALL kpoint_transitional_release(admm_env%matrix_s_aux_fit)
524 CALL kpoint_transitional_release(admm_env%matrix_s_aux_fit_vs_orb)
525
526 IF (ASSOCIATED(admm_env%matrix_ks_aux_fit_im)) CALL dbcsr_deallocate_matrix_set(admm_env%matrix_ks_aux_fit_im)
527
528 IF (ASSOCIATED(admm_env%rho_aux_fit)) THEN
529 CALL qs_rho_release(admm_env%rho_aux_fit)
530 DEALLOCATE (admm_env%rho_aux_fit)
531 END IF
532 IF (ASSOCIATED(admm_env%rho_aux_fit_buffer)) THEN
533 CALL qs_rho_release(admm_env%rho_aux_fit_buffer)
534 DEALLOCATE (admm_env%rho_aux_fit_buffer)
535 END IF
536
537 IF (ASSOCIATED(admm_env%task_list_aux_fit)) CALL deallocate_task_list(admm_env%task_list_aux_fit)
538
539 DEALLOCATE (admm_env)
540
541 END SUBROUTINE admm_env_release
542
543! **************************************************************************************************
544!> \brief Release the ADMM GAPW stuff
545!> \param admm_gapw_env ...
546! **************************************************************************************************
547 SUBROUTINE admm_gapw_env_release(admm_gapw_env)
548
549 TYPE(admm_gapw_r3d_rs_type), POINTER :: admm_gapw_env
550
551 IF (ASSOCIATED(admm_gapw_env%admm_kind_set)) THEN
552 CALL deallocate_qs_kind_set(admm_gapw_env%admm_kind_set)
553 END IF
554
555 IF (ASSOCIATED(admm_gapw_env%local_rho_set)) THEN
556 CALL local_rho_set_release(admm_gapw_env%local_rho_set)
557 END IF
558
559 IF (ASSOCIATED(admm_gapw_env%task_list)) THEN
560 CALL deallocate_task_list(admm_gapw_env%task_list)
561 END IF
562
563 IF (ASSOCIATED(admm_gapw_env%oce)) THEN
564 CALL deallocate_oce_set(admm_gapw_env%oce)
565 END IF
566
567 DEALLOCATE (admm_gapw_env)
568
569 END SUBROUTINE admm_gapw_env_release
570
571! **************************************************************************************************
572!> \brief Get routine for the ADMM env
573!> \param admm_env ...
574!> \param mo_derivs_aux_fit ...
575!> \param mos_aux_fit ...
576!> \param sab_aux_fit ...
577!> \param sab_aux_fit_asymm ...
578!> \param sab_aux_fit_vs_orb ...
579!> \param matrix_s_aux_fit ...
580!> \param matrix_s_aux_fit_kp ...
581!> \param matrix_s_aux_fit_vs_orb ...
582!> \param matrix_s_aux_fit_vs_orb_kp ...
583!> \param task_list_aux_fit ...
584!> \param matrix_ks_aux_fit ...
585!> \param matrix_ks_aux_fit_kp ...
586!> \param matrix_ks_aux_fit_im ...
587!> \param matrix_ks_aux_fit_dft ...
588!> \param matrix_ks_aux_fit_hfx ...
589!> \param matrix_ks_aux_fit_dft_kp ...
590!> \param matrix_ks_aux_fit_hfx_kp ...
591!> \param rho_aux_fit ...
592!> \param rho_aux_fit_buffer ...
593!> \param admm_dm ...
594! **************************************************************************************************
595 SUBROUTINE get_admm_env(admm_env, mo_derivs_aux_fit, mos_aux_fit, sab_aux_fit, sab_aux_fit_asymm, &
596 sab_aux_fit_vs_orb, matrix_s_aux_fit, matrix_s_aux_fit_kp, matrix_s_aux_fit_vs_orb, matrix_s_aux_fit_vs_orb_kp, &
597 task_list_aux_fit, matrix_ks_aux_fit, matrix_ks_aux_fit_kp, matrix_ks_aux_fit_im, &
598 matrix_ks_aux_fit_dft, matrix_ks_aux_fit_hfx, matrix_ks_aux_fit_dft_kp, matrix_ks_aux_fit_hfx_kp, rho_aux_fit, &
599 rho_aux_fit_buffer, admm_dm)
600
601 TYPE(admm_type), INTENT(IN), POINTER :: admm_env
602 TYPE(cp_fm_type), DIMENSION(:), OPTIONAL, POINTER :: mo_derivs_aux_fit
603 TYPE(mo_set_type), DIMENSION(:), OPTIONAL, POINTER :: mos_aux_fit
604 TYPE(neighbor_list_set_p_type), DIMENSION(:), &
605 OPTIONAL, POINTER :: sab_aux_fit, sab_aux_fit_asymm, &
606 sab_aux_fit_vs_orb
607 TYPE(dbcsr_p_type), DIMENSION(:), OPTIONAL, &
608 POINTER :: matrix_s_aux_fit
609 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
610 POINTER :: matrix_s_aux_fit_kp
611 TYPE(dbcsr_p_type), DIMENSION(:), OPTIONAL, &
612 POINTER :: matrix_s_aux_fit_vs_orb
613 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
614 POINTER :: matrix_s_aux_fit_vs_orb_kp
615 TYPE(task_list_type), OPTIONAL, POINTER :: task_list_aux_fit
616 TYPE(dbcsr_p_type), DIMENSION(:), OPTIONAL, &
617 POINTER :: matrix_ks_aux_fit
618 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
619 POINTER :: matrix_ks_aux_fit_kp
620 TYPE(dbcsr_p_type), DIMENSION(:), OPTIONAL, &
621 POINTER :: matrix_ks_aux_fit_im, &
622 matrix_ks_aux_fit_dft, &
623 matrix_ks_aux_fit_hfx
624 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
625 POINTER :: matrix_ks_aux_fit_dft_kp, &
626 matrix_ks_aux_fit_hfx_kp
627 TYPE(qs_rho_type), OPTIONAL, POINTER :: rho_aux_fit, rho_aux_fit_buffer
628 TYPE(admm_dm_type), OPTIONAL, POINTER :: admm_dm
629
630 cpassert(ASSOCIATED(admm_env))
631
632 IF (PRESENT(mo_derivs_aux_fit)) mo_derivs_aux_fit => admm_env%mo_derivs_aux_fit
633 IF (PRESENT(mos_aux_fit)) mos_aux_fit => admm_env%mos_aux_fit
634 IF (PRESENT(sab_aux_fit)) sab_aux_fit => admm_env%sab_aux_fit
635 IF (PRESENT(sab_aux_fit_asymm)) sab_aux_fit_asymm => admm_env%sab_aux_fit_asymm
636 IF (PRESENT(sab_aux_fit_vs_orb)) sab_aux_fit_vs_orb => admm_env%sab_aux_fit_vs_orb
637 IF (PRESENT(task_list_aux_fit)) task_list_aux_fit => admm_env%task_list_aux_fit
638 IF (PRESENT(matrix_ks_aux_fit_im)) matrix_ks_aux_fit_im => admm_env%matrix_ks_aux_fit_im
639 IF (PRESENT(rho_aux_fit)) rho_aux_fit => admm_env%rho_aux_fit
640 IF (PRESENT(rho_aux_fit_buffer)) rho_aux_fit_buffer => admm_env%rho_aux_fit_buffer
641 IF (PRESENT(admm_dm)) admm_dm => admm_env%admm_dm
642
643 IF (PRESENT(matrix_ks_aux_fit)) matrix_ks_aux_fit => get_1d_pointer(admm_env%matrix_ks_aux_fit)
644 IF (PRESENT(matrix_ks_aux_fit_kp)) matrix_ks_aux_fit_kp => get_2d_pointer(admm_env%matrix_ks_aux_fit)
645 IF (PRESENT(matrix_ks_aux_fit_dft)) matrix_ks_aux_fit_dft => get_1d_pointer(admm_env%matrix_ks_aux_fit_dft)
646 IF (PRESENT(matrix_ks_aux_fit_dft_kp)) matrix_ks_aux_fit_dft_kp => get_2d_pointer(admm_env%matrix_ks_aux_fit_dft)
647 IF (PRESENT(matrix_ks_aux_fit_hfx)) matrix_ks_aux_fit_hfx => get_1d_pointer(admm_env%matrix_ks_aux_fit_hfx)
648 IF (PRESENT(matrix_ks_aux_fit_hfx_kp)) matrix_ks_aux_fit_hfx_kp => get_2d_pointer(admm_env%matrix_ks_aux_fit_hfx)
649 IF (PRESENT(matrix_s_aux_fit)) matrix_s_aux_fit => get_1d_pointer(admm_env%matrix_s_aux_fit)
650 IF (PRESENT(matrix_s_aux_fit_kp)) matrix_s_aux_fit_kp => get_2d_pointer(admm_env%matrix_s_aux_fit)
651 IF (PRESENT(matrix_s_aux_fit_vs_orb)) matrix_s_aux_fit_vs_orb => get_1d_pointer(admm_env%matrix_s_aux_fit_vs_orb)
652 IF (PRESENT(matrix_s_aux_fit_vs_orb_kp)) matrix_s_aux_fit_vs_orb_kp => get_2d_pointer(admm_env%matrix_s_aux_fit_vs_orb)
653 END SUBROUTINE get_admm_env
654
655! **************************************************************************************************
656!> \brief Set routine for the ADMM env
657!> \param admm_env ...
658!> \param mo_derivs_aux_fit ...
659!> \param mos_aux_fit ...
660!> \param sab_aux_fit ...
661!> \param sab_aux_fit_asymm ...
662!> \param sab_aux_fit_vs_orb ...
663!> \param matrix_s_aux_fit ...
664!> \param matrix_s_aux_fit_kp ...
665!> \param matrix_s_aux_fit_vs_orb ...
666!> \param matrix_s_aux_fit_vs_orb_kp ...
667!> \param task_list_aux_fit ...
668!> \param matrix_ks_aux_fit ...
669!> \param matrix_ks_aux_fit_kp ...
670!> \param matrix_ks_aux_fit_im ...
671!> \param matrix_ks_aux_fit_dft ...
672!> \param matrix_ks_aux_fit_hfx ...
673!> \param matrix_ks_aux_fit_dft_kp ...
674!> \param matrix_ks_aux_fit_hfx_kp ...
675!> \param rho_aux_fit ...
676!> \param rho_aux_fit_buffer ...
677!> \param admm_dm ...
678! **************************************************************************************************
679 SUBROUTINE set_admm_env(admm_env, mo_derivs_aux_fit, mos_aux_fit, sab_aux_fit, sab_aux_fit_asymm, &
680 sab_aux_fit_vs_orb, matrix_s_aux_fit, matrix_s_aux_fit_kp, matrix_s_aux_fit_vs_orb, matrix_s_aux_fit_vs_orb_kp, &
681 task_list_aux_fit, matrix_ks_aux_fit, matrix_ks_aux_fit_kp, matrix_ks_aux_fit_im, &
682 matrix_ks_aux_fit_dft, matrix_ks_aux_fit_hfx, matrix_ks_aux_fit_dft_kp, matrix_ks_aux_fit_hfx_kp, rho_aux_fit, &
683 rho_aux_fit_buffer, admm_dm)
684
685 TYPE(admm_type), INTENT(INOUT), POINTER :: admm_env
686 TYPE(cp_fm_type), DIMENSION(:), OPTIONAL, POINTER :: mo_derivs_aux_fit
687 TYPE(mo_set_type), DIMENSION(:), OPTIONAL, POINTER :: mos_aux_fit
688 TYPE(neighbor_list_set_p_type), DIMENSION(:), &
689 OPTIONAL, POINTER :: sab_aux_fit, sab_aux_fit_asymm, &
690 sab_aux_fit_vs_orb
691 TYPE(dbcsr_p_type), DIMENSION(:), OPTIONAL, &
692 POINTER :: matrix_s_aux_fit
693 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
694 POINTER :: matrix_s_aux_fit_kp
695 TYPE(dbcsr_p_type), DIMENSION(:), OPTIONAL, &
696 POINTER :: matrix_s_aux_fit_vs_orb
697 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
698 POINTER :: matrix_s_aux_fit_vs_orb_kp
699 TYPE(task_list_type), OPTIONAL, POINTER :: task_list_aux_fit
700 TYPE(dbcsr_p_type), DIMENSION(:), OPTIONAL, &
701 POINTER :: matrix_ks_aux_fit
702 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
703 POINTER :: matrix_ks_aux_fit_kp
704 TYPE(dbcsr_p_type), DIMENSION(:), OPTIONAL, &
705 POINTER :: matrix_ks_aux_fit_im, &
706 matrix_ks_aux_fit_dft, &
707 matrix_ks_aux_fit_hfx
708 TYPE(dbcsr_p_type), DIMENSION(:, :), OPTIONAL, &
709 POINTER :: matrix_ks_aux_fit_dft_kp, &
710 matrix_ks_aux_fit_hfx_kp
711 TYPE(qs_rho_type), OPTIONAL, POINTER :: rho_aux_fit, rho_aux_fit_buffer
712 TYPE(admm_dm_type), OPTIONAL, POINTER :: admm_dm
713
714 cpassert(ASSOCIATED(admm_env))
715
716 IF (PRESENT(mo_derivs_aux_fit)) admm_env%mo_derivs_aux_fit => mo_derivs_aux_fit
717 IF (PRESENT(mos_aux_fit)) admm_env%mos_aux_fit => mos_aux_fit
718 IF (PRESENT(sab_aux_fit)) admm_env%sab_aux_fit => sab_aux_fit
719 IF (PRESENT(sab_aux_fit_asymm)) admm_env%sab_aux_fit_asymm => sab_aux_fit_asymm
720 IF (PRESENT(sab_aux_fit_vs_orb)) admm_env%sab_aux_fit_vs_orb => sab_aux_fit_vs_orb
721 IF (PRESENT(task_list_aux_fit)) admm_env%task_list_aux_fit => task_list_aux_fit
722 IF (PRESENT(matrix_ks_aux_fit_im)) admm_env%matrix_ks_aux_fit_im => matrix_ks_aux_fit_im
723 IF (PRESENT(rho_aux_fit)) admm_env%rho_aux_fit => rho_aux_fit
724 IF (PRESENT(rho_aux_fit_buffer)) admm_env%rho_aux_fit_buffer => rho_aux_fit_buffer
725 IF (PRESENT(admm_dm)) admm_env%admm_dm => admm_dm
726
727 IF (PRESENT(matrix_ks_aux_fit)) CALL set_1d_pointer(admm_env%matrix_ks_aux_fit, matrix_ks_aux_fit)
728 IF (PRESENT(matrix_ks_aux_fit_kp)) CALL set_2d_pointer(admm_env%matrix_ks_aux_fit, matrix_ks_aux_fit_kp)
729 IF (PRESENT(matrix_ks_aux_fit_dft)) CALL set_1d_pointer(admm_env%matrix_ks_aux_fit_dft, matrix_ks_aux_fit_dft)
730 IF (PRESENT(matrix_ks_aux_fit_dft_kp)) CALL set_2d_pointer(admm_env%matrix_ks_aux_fit_dft, matrix_ks_aux_fit_dft_kp)
731 IF (PRESENT(matrix_ks_aux_fit_hfx)) CALL set_1d_pointer(admm_env%matrix_ks_aux_fit_hfx, matrix_ks_aux_fit)
732 IF (PRESENT(matrix_ks_aux_fit_hfx_kp)) CALL set_2d_pointer(admm_env%matrix_ks_aux_fit_hfx, matrix_ks_aux_fit_hfx_kp)
733 IF (PRESENT(matrix_s_aux_fit)) CALL set_1d_pointer(admm_env%matrix_s_aux_fit, matrix_s_aux_fit)
734 IF (PRESENT(matrix_s_aux_fit_kp)) CALL set_2d_pointer(admm_env%matrix_s_aux_fit, matrix_s_aux_fit_kp)
735 IF (PRESENT(matrix_s_aux_fit_vs_orb)) CALL set_1d_pointer(admm_env%matrix_s_aux_fit_vs_orb, matrix_s_aux_fit_vs_orb)
736 IF (PRESENT(matrix_s_aux_fit_vs_orb_kp)) CALL set_2d_pointer(admm_env%matrix_s_aux_fit_vs_orb, matrix_s_aux_fit_vs_orb_kp)
737
738 END SUBROUTINE set_admm_env
739
740END MODULE admm_types
741
Types and set/get functions for auxiliary density matrix methods.
subroutine, public admm_dm_release(admm_dm)
Release a admm_dm type.
Types and set/get functions for auxiliary density matrix methods.
Definition admm_types.F:15
subroutine, public get_admm_env(admm_env, mo_derivs_aux_fit, mos_aux_fit, sab_aux_fit, sab_aux_fit_asymm, sab_aux_fit_vs_orb, matrix_s_aux_fit, matrix_s_aux_fit_kp, matrix_s_aux_fit_vs_orb, matrix_s_aux_fit_vs_orb_kp, task_list_aux_fit, matrix_ks_aux_fit, matrix_ks_aux_fit_kp, matrix_ks_aux_fit_im, matrix_ks_aux_fit_dft, matrix_ks_aux_fit_hfx, matrix_ks_aux_fit_dft_kp, matrix_ks_aux_fit_hfx_kp, rho_aux_fit, rho_aux_fit_buffer, admm_dm)
Get routine for the ADMM env.
Definition admm_types.F:600
subroutine, public set_admm_env(admm_env, mo_derivs_aux_fit, mos_aux_fit, sab_aux_fit, sab_aux_fit_asymm, sab_aux_fit_vs_orb, matrix_s_aux_fit, matrix_s_aux_fit_kp, matrix_s_aux_fit_vs_orb, matrix_s_aux_fit_vs_orb_kp, task_list_aux_fit, matrix_ks_aux_fit, matrix_ks_aux_fit_kp, matrix_ks_aux_fit_im, matrix_ks_aux_fit_dft, matrix_ks_aux_fit_hfx, matrix_ks_aux_fit_dft_kp, matrix_ks_aux_fit_hfx_kp, rho_aux_fit, rho_aux_fit_buffer, admm_dm)
Set routine for the ADMM env.
Definition admm_types.F:684
subroutine, public admm_env_release(admm_env)
releases the ADMM environment, cleans up all types
Definition admm_types.F:430
subroutine, public admm_env_create(admm_env, admm_control, mos, para_env, natoms, nao_aux_fit, blacs_env_ext)
creates ADMM environment, initializes the basic types
Definition admm_types.F:221
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public guidon2010
methods related to the blacs parallel environment
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
DBCSR operations in CP2K.
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
represent a full matrix distributed on many processors
Definition cp_fm_types.F:15
subroutine, public cp_fm_create(matrix, matrix_struct, name, nrow, ncol, set_zero)
creates a new full matrix with the given structure
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public do_admm_purify_none
integer, parameter, public do_admm_blocking_purify_full
integer, parameter, public do_admm_blocked_projection
integer, parameter, public do_admm_aux_exch_func_none
integer, parameter, public do_admm_charge_constrained_projection
integer, parameter, public do_admm_exch_scaling_none
integer, parameter, public do_admm_exch_scaling_merlot
objects that represent the structure of input sections and the data contained in an input section
recursive subroutine, public section_vals_release(section_vals)
releases the given object
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Datatype to translate between k-points (2d) and gamma-point (1d) code.
type(dbcsr_p_type) function, dimension(:), pointer, public get_1d_pointer(this)
Smart getter, raises an error when called during a k-point calculation.
type(dbcsr_p_type) function, dimension(:, :), pointer, public get_2d_pointer(this)
Simple getter, needed because of PRIVATE.
subroutine, public kpoint_transitional_release(this)
Release the matrix set, using the right pointer.
subroutine, public set_1d_pointer(this, ptr_1d)
Assigns a 1D pointer.
subroutine, public set_2d_pointer(this, ptr_2d)
Assigns a 2D pointer.
Interface to the message passing library MPI.
Define the quickstep kind type and their sub types.
subroutine, public deallocate_qs_kind_set(qs_kind_set)
Destructor routine for a set of qs kinds.
subroutine, public local_rho_set_release(local_rho_set)
...
Definition and initialisation of the mo data type.
Definition qs_mo_types.F:22
subroutine, public deallocate_mo_set(mo_set)
Deallocate a wavefunction data structure.
subroutine, public get_mo_set(mo_set, maxocc, homo, lfomo, nao, nelectron, n_el_f, nmo, eigenvalues, occupation_numbers, mo_coeff, mo_coeff_b, uniform_occupation, kts, mu, flexible_electron_count, cmo_coeff)
Get the components of a MO set data structure.
Define the neighbor list data types and the corresponding functionality.
subroutine, public release_neighbor_list_sets(nlists)
releases an array of neighbor_list_sets
subroutine, public deallocate_oce_set(oce_set)
Deallocate the matrix set of oce coefficients.
superstucture that hold various representations of the density and keeps track of which ones are vali...
subroutine, public qs_rho_release(rho_struct)
releases a rho_struct by decreasing the reference count by one and deallocating if it reaches 0 (to b...
types for task lists
subroutine, public deallocate_task_list(task_list)
deallocates the components and the object itself
A subtype of the admm_env that contains the extra data needed for an ADMM GAPW calculation.
Definition admm_types.F:86
stores some data used in wavefunction fitting
Definition admm_types.F:121
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
keeps the information about the structure of a full matrix
represent a full matrix
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.
keeps the density in various representations, keeping track of which ones are valid.