(git:27c966b)
Loading...
Searching...
No Matches
qs_tddfpt2_smearing_methods.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
13 USE cp_dbcsr_api, ONLY: dbcsr_type
30 USE kinds, ONLY: dp
35 USE qs_mo_types, ONLY: get_mo_set,&
40 USE smearing_utils, ONLY: smearocc
41#include "./base/base_uses.f90"
42
43 IMPLICIT NONE
44
45 PRIVATE
46
47 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_tddfpt2_smearing_methods'
48
49 LOGICAL, PARAMETER, PRIVATE :: debug_this_module = .false.
50
51 PUBLIC :: tddfpt_smeared_occupation, &
54
55CONTAINS
56
57! **************************************************************************************************
58!> \brief ...
59!> \param qs_env ...
60!> \param gs_mos ...
61!> \param log_unit ...
62! **************************************************************************************************
63 SUBROUTINE tddfpt_smeared_occupation(qs_env, gs_mos, log_unit)
64
65 TYPE(qs_environment_type), POINTER :: qs_env
66 TYPE(tddfpt_ground_state_mos), DIMENSION(:), &
67 INTENT(IN), POINTER :: gs_mos
68 INTEGER, INTENT(in) :: log_unit
69
70 CHARACTER(len=*), PARAMETER :: routinen = 'tddfpt_smeared_occupation'
71
72 INTEGER :: handle, iocc, ispin, nspins
73 INTEGER, ALLOCATABLE, DIMENSION(:) :: nocc, nvirt
74 REAL(kind=dp), DIMENSION(:), POINTER :: mo_evals, occup
75 TYPE(mo_set_type), DIMENSION(:), POINTER :: mos
76 TYPE(scf_control_type), POINTER :: scf_control
77 TYPE(smear_type), POINTER :: smear
78
79 CALL timeset(routinen, handle)
80
81 nspins = SIZE(gs_mos)
82
83 NULLIFY (mos, scf_control)
84 CALL get_qs_env(qs_env, mos=mos, scf_control=scf_control)
85 NULLIFY (smear)
86 IF (ASSOCIATED(qs_env%scf_control%smear)) THEN
87 smear => qs_env%scf_control%smear
88 ELSE
89 cpabort("Smeared input section no longer associated.")
90 END IF
91
92 IF (debug_this_module) THEN
93 NULLIFY (mo_evals, occup)
94 ALLOCATE (nocc(nspins), nvirt(nspins))
95 DO ispin = 1, nspins
96 CALL get_mo_set(mos(ispin), eigenvalues=mo_evals, occupation_numbers=occup)
97 CALL cp_fm_get_info(gs_mos(ispin)%mos_occ, ncol_global=nocc(ispin))
98 CALL cp_fm_get_info(gs_mos(ispin)%mos_virt, ncol_global=nvirt(ispin))
99 IF (log_unit > 0) THEN
100 DO iocc = 1, nocc(ispin)
101 WRITE (log_unit, '(A,F14.5)') "Occupation numbers", occup(iocc)
102 END DO
103 END IF
104 END DO
105 END IF
106
107 CALL allocate_fermi_params(qs_env, gs_mos)
108 CALL compute_fermia(qs_env, gs_mos, log_unit)
109
110 CALL timestop(handle)
111
112 END SUBROUTINE tddfpt_smeared_occupation
113! **************************************************************************************************
114!> \brief ...
115!> \param qs_env ...
116!> \param gs_mos ...
117!> \param log_unit ...
118! **************************************************************************************************
119 SUBROUTINE compute_fermia(qs_env, gs_mos, log_unit)
120
121 TYPE(qs_environment_type), POINTER :: qs_env
122 TYPE(tddfpt_ground_state_mos), DIMENSION(:), &
123 INTENT(IN), POINTER :: gs_mos
124 INTEGER, INTENT(IN) :: log_unit
125
126 CHARACTER(len=*), PARAMETER :: routinen = 'compute_fermia'
127
128 INTEGER :: handle, iocc, ispin, nocc, nspins
129 REAL(kind=dp) :: maxvalue, mu
130 REAL(kind=dp), DIMENSION(:), POINTER :: fermia, mo_evals
131 TYPE(dft_control_type), POINTER :: dft_control
132 TYPE(mo_set_type), DIMENSION(:), POINTER :: mos
133 TYPE(scf_control_type), POINTER :: scf_control
134 TYPE(smear_type), POINTER :: smear
135 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
136
137 CALL timeset(routinen, handle)
138
139 NULLIFY (mos, dft_control, tddfpt_control, scf_control)
140 CALL get_qs_env(qs_env, dft_control=dft_control, scf_control=scf_control)
141 tddfpt_control => dft_control%tddfpt2_control
142
143 CALL get_qs_env(qs_env, mos=mos)
144 nspins = SIZE(mos)
145
146 NULLIFY (smear)
147 IF (ASSOCIATED(qs_env%scf_control%smear)) THEN
148 smear => qs_env%scf_control%smear
149 ELSE
150 cpabort("Smeared input section no longer associated.")
151 END IF
152
153 IF (debug_this_module .AND. (log_unit > 0)) THEN
154 WRITE (log_unit, '(A,F14.5)') "Smearing temperature", smear%electronic_temperature
155 END IF
156
157 NULLIFY (mo_evals)
158 DO ispin = 1, nspins
159 CALL get_mo_set(mos(ispin), eigenvalues=mo_evals, mu=mu)
160 CALL cp_fm_get_info(gs_mos(ispin)%mos_occ, ncol_global=nocc)
161 fermia => tddfpt_control%smeared_occup(ispin)%fermia
162 DO iocc = 1, nocc
163 maxvalue = mu + 3.0_dp*smear%electronic_temperature - mo_evals(iocc)
164
165 fermia(iocc) = max(0.0_dp, maxvalue)
166 IF (debug_this_module) THEN
167 IF (log_unit > 0) WRITE (log_unit, '(A,F14.5)') "Fermi smearing parameter alpha", fermia(iocc)
168 END IF
169 END DO
170 END DO
171
172 CALL timestop(handle)
173 END SUBROUTINE compute_fermia
174! **************************************************************************************************
175
176! **************************************************************************************************
177!> \brief ...
178!> \param qs_env ...
179!> \param Aop_evects ...
180!> \param evects ...
181!> \param S_evects ...
182!> \param mos_occ ...
183!> \param fermia ...
184!> \param matrix_s ...
185! **************************************************************************************************
186 SUBROUTINE add_smearing_aterm(qs_env, Aop_evects, evects, S_evects, mos_occ, fermia, matrix_s)
187
188 TYPE(qs_environment_type), POINTER :: qs_env
189 TYPE(cp_fm_type), INTENT(in) :: aop_evects, evects, s_evects, mos_occ
190 REAL(kind=dp), DIMENSION(:), POINTER :: fermia
191 TYPE(dbcsr_type), POINTER :: matrix_s
192
193 CHARACTER(len=*), PARAMETER :: routinen = 'add_smearing_aterm'
194
195 INTEGER :: handle, iounit, nactive, nao
196 TYPE(cp_fm_struct_type), POINTER :: matrix_struct, matrix_struct_tmp
197 TYPE(cp_fm_type) :: ccsxvec, csxvec, cvec, sccsxvec
198 TYPE(cp_logger_type), POINTER :: logger
199 TYPE(dft_control_type), POINTER :: dft_control
200 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
201
202 CALL timeset(routinen, handle)
203
204 NULLIFY (logger)
205 logger => cp_get_default_logger()
206 iounit = cp_logger_get_default_io_unit(logger)
207
208 NULLIFY (dft_control, tddfpt_control)
209 CALL get_qs_env(qs_env, dft_control=dft_control)
210 tddfpt_control => dft_control%tddfpt2_control
211
212 CALL cp_fm_get_info(matrix=evects, matrix_struct=matrix_struct, &
213 nrow_global=nao, ncol_global=nactive)
214 CALL cp_fm_create(ccsxvec, matrix_struct)
215 CALL cp_fm_create(sccsxvec, matrix_struct)
216 CALL cp_fm_create(cvec, matrix_struct)
217
218 NULLIFY (matrix_struct_tmp)
219 CALL cp_fm_struct_create(matrix_struct_tmp, nrow_global=nactive, &
220 ncol_global=nactive, template_fmstruct=matrix_struct)
221 CALL cp_fm_create(csxvec, matrix_struct_tmp)
222 CALL cp_fm_struct_release(fmstruct=matrix_struct_tmp)
223
224 CALL parallel_gemm('T', 'N', nactive, nactive, nao, 1.0_dp, &
225 mos_occ, s_evects, 0.0_dp, csxvec)
226 CALL cp_fm_to_fm(mos_occ, cvec)
227
228 CALL cp_fm_column_scale(cvec, fermia)
229 CALL parallel_gemm('N', 'N', nao, nactive, nactive, 1.0_dp, &
230 cvec, csxvec, 0.0_dp, ccsxvec)
231
232 ! alpha S C C^T S X
233 CALL cp_dbcsr_sm_fm_multiply(matrix_s, ccsxvec, &
234 sccsxvec, ncol=nactive, alpha=1.0_dp, beta=0.0_dp)
235 CALL cp_fm_scale_and_add(1.0_dp, aop_evects, 1.0_dp, sccsxvec)
236
237 CALL cp_fm_release(sccsxvec)
238 CALL cp_fm_release(ccsxvec)
239 CALL cp_fm_release(csxvec)
240 CALL cp_fm_release(cvec)
241
242 CALL timestop(handle)
243 END SUBROUTINE add_smearing_aterm
244! **************************************************************************************************
245!> \brief ...
246!> \param qs_env ...
247!> \param gs_mos ...
248!> \param evals ...
249! **************************************************************************************************
250 SUBROUTINE compute_fermib(qs_env, gs_mos, evals)
251
252 TYPE(qs_environment_type), POINTER :: qs_env
253 TYPE(tddfpt_ground_state_mos), DIMENSION(:), &
254 INTENT(IN) :: gs_mos
255 REAL(kind=dp), INTENT(in) :: evals
256
257 CHARACTER(len=*), PARAMETER :: routinen = 'compute_fermib'
258
259 INTEGER :: handle, iocc, iounit, ispin, jocc, &
260 nactive, nspins
261 REAL(kind=dp) :: dummykts, interocc, nelec
262 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: occuptmp
263 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :) :: occup_im
264 REAL(kind=dp), DIMENSION(:), POINTER :: fermia, mo_evals, occup
265 REAL(kind=dp), DIMENSION(:, :), POINTER :: fermib
266 TYPE(cp_logger_type), POINTER :: logger
267 TYPE(dft_control_type), POINTER :: dft_control
268 TYPE(mo_set_type), DIMENSION(:), POINTER :: mos
269 TYPE(scf_control_type), POINTER :: scf_control
270 TYPE(smear_type), POINTER :: smear
271 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
272
273 CALL timeset(routinen, handle)
274
275 NULLIFY (logger)
276 logger => cp_get_default_logger()
277 iounit = cp_logger_get_default_io_unit(logger)
278
279 NULLIFY (mos, scf_control)
280 CALL get_qs_env(qs_env, mos=mos, scf_control=scf_control)
281 NULLIFY (smear)
282 IF (ASSOCIATED(qs_env%scf_control%smear)) THEN
283 smear => qs_env%scf_control%smear
284 ELSE
285 cpabort("Smeared input section no longer associated.")
286 END IF
287
288 NULLIFY (dft_control, tddfpt_control)
289 CALL get_qs_env(qs_env, dft_control=dft_control)
290 tddfpt_control => dft_control%tddfpt2_control
291
292 NULLIFY (fermib, fermia)
293 nspins = SIZE(gs_mos)
294
295 DO ispin = 1, nspins
296
297 fermib => dft_control%tddfpt2_control%smeared_occup(ispin)%fermib
298 fermia => dft_control%tddfpt2_control%smeared_occup(ispin)%fermia
299 fermib = 0.0_dp
300
301 ! get theta_Fi
302 NULLIFY (mo_evals, occup)
303 CALL get_mo_set(mos(ispin), eigenvalues=mo_evals, occupation_numbers=occup)
304 CALL cp_fm_get_info(gs_mos(ispin)%mos_occ, ncol_global=nactive)
305
306 ! compute theta_im
307 ! SmearOcc writes its output; keep the ground-state occupations unchanged.
308 ALLOCATE (occuptmp(SIZE(mo_evals)), occup_im(nactive, nactive))
309
310 DO iocc = 1, nactive
311 IF (smear%method == smear_fermi_dirac) THEN
312 ! Different prefactor in comparison to Octopus !
313 CALL smearocc(occuptmp, nelec, dummykts, mos(ispin)%eigenvalues, mos(ispin)%eigenvalues(iocc), &
314 smear%electronic_temperature, mos(ispin)%maxocc, smear_fermi_dirac)
315 ELSE
316 cpabort("TDDFT with smearing only works with Fermi-Dirac distribution.")
317 END IF
318 occup_im(iocc, :) = occuptmp(:nactive)
319 END DO
320
321 ! compute fermib
322 DO iocc = 1, nactive
323 DO jocc = 1, nactive
324 interocc = (occup(iocc) - occup(jocc))/(mo_evals(iocc) - mo_evals(jocc) - evals)
325 fermib(iocc, jocc) = fermib(iocc, jocc) + occup(iocc)*occup_im(iocc, jocc) &
326 + occup(jocc)*occup_im(jocc, iocc) &
327 + fermia(jocc)*interocc*occup_im(jocc, iocc)
328 END DO
329 END DO
330
331 IF (debug_this_module .AND. (iounit > 0)) THEN
332 DO iocc = 1, nactive
333 DO jocc = 1, nactive
334 WRITE (iounit, '(A,F14.5)') "Fermi smearing parameter beta,", fermib(iocc, jocc)
335 END DO
336 END DO
337 END IF
338
339 DEALLOCATE (occuptmp, occup_im)
340
341 END DO ! ispin
342
343 CALL timestop(handle)
344 END SUBROUTINE compute_fermib
345! **************************************************************************************************
346!> \brief ...
347!> \param qs_env ...
348!> \param gs_mos ...
349! **************************************************************************************************
350 SUBROUTINE allocate_fermi_params(qs_env, gs_mos)
351
352 TYPE(qs_environment_type), POINTER :: qs_env
353 TYPE(tddfpt_ground_state_mos), DIMENSION(:), &
354 INTENT(IN), POINTER :: gs_mos
355
356 CHARACTER(len=*), PARAMETER :: routinen = 'allocate_fermi_params'
357
358 INTEGER :: handle, ispin, nocc, nspins
359 TYPE(dft_control_type), POINTER :: dft_control
360 TYPE(smeared_type), DIMENSION(:), POINTER :: smeared_occup
361 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
362
363 CALL timeset(routinen, handle)
364
365 NULLIFY (dft_control, tddfpt_control)
366 CALL get_qs_env(qs_env, dft_control=dft_control)
367 tddfpt_control => dft_control%tddfpt2_control
368
369 NULLIFY (smeared_occup)
370 smeared_occup => dft_control%tddfpt2_control%smeared_occup
371 nspins = SIZE(gs_mos)
372 ALLOCATE (smeared_occup(nspins))
373
374 DO ispin = 1, nspins
375 CALL cp_fm_get_info(gs_mos(ispin)%mos_occ, ncol_global=nocc)
376 ALLOCATE (smeared_occup(ispin)%fermia(nocc))
377 ALLOCATE (smeared_occup(ispin)%fermib(nocc, nocc))
378 END DO
379 dft_control%tddfpt2_control%smeared_occup => smeared_occup
380
381 CALL timestop(handle)
382 END SUBROUTINE allocate_fermi_params
383! **************************************************************************************************
384!> \brief ...
385!> \param smeared_occup ...
386! **************************************************************************************************
387 SUBROUTINE deallocate_fermi_params(smeared_occup)
388
389 TYPE(smeared_type), DIMENSION(:), POINTER :: smeared_occup
390
391 INTEGER :: ispin
392
393 IF (ASSOCIATED(smeared_occup)) THEN
394 DO ispin = 1, SIZE(smeared_occup)
395 IF (ASSOCIATED(smeared_occup(ispin)%fermia)) THEN
396 DEALLOCATE (smeared_occup(ispin)%fermia)
397 DEALLOCATE (smeared_occup(ispin)%fermib)
398 NULLIFY (smeared_occup(ispin)%fermia, smeared_occup(ispin)%fermib)
399 END IF
400 END DO
401 DEALLOCATE (smeared_occup)
402 NULLIFY (smeared_occup)
403 END IF
404
405 END SUBROUTINE deallocate_fermi_params
406! **************************************************************************************************
407!> \brief ...
408!> \param evects ...
409!> \param qs_env ...
410!> \param mos_occ ...
411!> \param S_C0 ...
412! **************************************************************************************************
413 SUBROUTINE orthogonalize_smeared_occupation(evects, qs_env, mos_occ, S_C0)
414
415 TYPE(cp_fm_type), DIMENSION(:), INTENT(in) :: evects
416 TYPE(qs_environment_type), POINTER :: qs_env
417 TYPE(cp_fm_type), DIMENSION(:), INTENT(in) :: mos_occ, s_c0
418
419 CHARACTER(LEN=*), PARAMETER :: routinen = 'orthogonalize_smeared_occupation'
420
421 INTEGER :: handle, iocc, ispin, nactive, nao, nspins
422 REAL(kind=dp), DIMENSION(:), POINTER :: occup
423 REAL(kind=dp), DIMENSION(:, :), POINTER :: fermib
424 TYPE(cp_blacs_env_type), POINTER :: blacs_env_global
425 TYPE(cp_fm_struct_type), POINTER :: matrix_struct
426 TYPE(cp_fm_type) :: betascc, cvec, evortho
427 TYPE(dft_control_type), POINTER :: dft_control
428 TYPE(mo_set_type), DIMENSION(:), POINTER :: mos
429 TYPE(mp_para_env_type), POINTER :: para_env
430 TYPE(tddfpt2_control_type), POINTER :: tddfpt_control
431
432 CALL timeset(routinen, handle)
433
434 NULLIFY (mos)
435 CALL get_qs_env(qs_env, mos=mos)
436 NULLIFY (dft_control, tddfpt_control)
437 CALL get_qs_env(qs_env, dft_control=dft_control)
438 tddfpt_control => dft_control%tddfpt2_control
439
440 CALL cp_fm_get_info(matrix=evects(1), nrow_global=nao)
441
442 nspins = SIZE(evects)
443 NULLIFY (para_env)
444 CALL cp_fm_get_info(evects(1), para_env=para_env, context=blacs_env_global)
445
446 NULLIFY (matrix_struct)
447 CALL cp_fm_struct_create(matrix_struct, nrow_global=nao, ncol_global=nao, context=blacs_env_global)
448 CALL cp_fm_create(betascc, matrix_struct)
449 CALL cp_fm_struct_release(fmstruct=matrix_struct)
450
451 DO ispin = 1, nspins
452 CALL cp_fm_get_info(matrix=evects(ispin), matrix_struct=matrix_struct, ncol_global=nactive)
453 CALL cp_fm_create(evortho, matrix_struct)
454 NULLIFY (matrix_struct)
455 CALL cp_fm_get_info(matrix=mos_occ(ispin), matrix_struct=matrix_struct)
456 CALL cp_fm_create(cvec, matrix_struct)
457
458 NULLIFY (occup)
459 CALL get_mo_set(mos(ispin), occupation_numbers=occup)
460
461 NULLIFY (fermib)
462 IF (.NOT. ASSOCIATED(dft_control%tddfpt2_control%smeared_occup)) THEN
463 cpabort("Smeared occupation intermediates not associated.")
464 END IF
465 fermib => dft_control%tddfpt2_control%smeared_occup(ispin)%fermib
466
467 DO iocc = 1, nactive
468 CALL cp_fm_copy_general(mos_occ(ispin), cvec, para_env)
469 CALL cp_fm_column_scale(cvec, fermib(iocc, :))
470
471 CALL parallel_gemm('N', 'T', nao, nao, nactive, 1.0_dp, cvec, s_c0(ispin), 0.0_dp, betascc)
472
473 ! Apply the occupied-space correction directly to column iocc.
474 CALL parallel_gemm('N', 'N', nao, 1, nao, 1.0_dp, betascc, &
475 evects(ispin), 0.0_dp, evortho, b_first_col=iocc, c_first_col=iocc)
476 END DO ! iocc
477 CALL cp_fm_column_scale(evects(ispin), occup)
478 CALL cp_fm_scale_and_add(1.0_dp, evects(ispin), -1.0_dp, evortho)
479 CALL cp_fm_release(cvec)
480 CALL cp_fm_release(evortho)
481 END DO ! nspins
482
483 CALL cp_fm_release(betascc)
484
485 CALL timestop(handle)
487
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.
subroutine, public cp_dbcsr_sm_fm_multiply(matrix, fm_in, fm_out, ncol, alpha, beta)
multiply a dbcsr with a fm matrix
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_scale_and_add(alpha, matrix_a, beta, matrix_b)
calc A <- alpha*A + beta*B optimized for alpha == 1.0 (just add beta*B) and beta == 0....
subroutine, public cp_fm_column_scale(matrixa, scaling, first_col, source)
Scales columns of the full matrix by corresponding factors.
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_copy_general(source, destination, para_env)
General copy of a fm matrix to another fm matrix. Uses non-blocking MPI rather than ScaLAPACK.
subroutine, public cp_fm_get_info(matrix, name, nrow_global, ncol_global, nrow_block, ncol_block, nrow_local, ncol_local, row_indices, col_indices, local_data, context, nrow_locals, ncol_locals, matrix_struct, para_env)
returns all kind of information about the full matrix
subroutine, public cp_fm_create(matrix, matrix_struct, name, nrow, ncol, set_zero)
creates a new full matrix with the given structure
various routines to log and control the output. The idea is that decisions about where to log should ...
integer function, public cp_logger_get_default_io_unit(logger)
returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs cal...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public smear_fermi_dirac
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Interface to the message passing library MPI.
basic linear algebra operations for full matrixes
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, mimic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_vhxc, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, rhoz_cneo_set, ecoul_1c, rho0_s_rs, rho0_s_gs, rhoz_cneo_s_rs, rhoz_cneo_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, harris_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, wanniercentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, eeq, rhs, do_rixs, tb_tblite)
Get the QUICKSTEP environment.
Definition and initialisation of the mo data type.
Definition qs_mo_types.F:22
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.
subroutine, public add_smearing_aterm(qs_env, aop_evects, evects, s_evects, mos_occ, fermia, matrix_s)
...
subroutine, public compute_fermib(qs_env, gs_mos, evals)
...
subroutine, public tddfpt_smeared_occupation(qs_env, gs_mos, log_unit)
...
subroutine, public deallocate_fermi_params(smeared_occup)
...
subroutine, public orthogonalize_smeared_occupation(evects, qs_env, mos_occ, s_c0)
...
parameters that control an scf iteration
Unified smearing module supporting four methods: smear_fermi_dirac — Fermi-Dirac distribution smear_g...
subroutine, public smearocc(f, n, kts, e, mu, sigma, maxocc, method, estate, festate)
Returns occupations and smearing correction for a given set of energies and chemical potential,...
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
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment
Ground state molecular orbitals.
contains the parameters needed by a scf run