Octopus
propagator_etrs.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
22 use accel_oct_m
23 use batch_oct_m
25 use debug_oct_m
30 use grid_oct_m
32 use global_oct_m
37 use ions_oct_m
40 use lda_u_oct_m
42 use math_oct_m
47 use parser_oct_m
50 use space_oct_m
54 use types_oct_m
55 use v_ks_oct_m
58 use xc_oct_m
59
60 implicit none
61
62 private
63
64 public :: &
65 td_etrs, &
66 td_etrs_sc, &
67 td_aetrs, &
70
71contains
72
73 ! ---------------------------------------------------------
75 subroutine td_etrs(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, &
76 ions_dyn, ions, mc)
77 type(v_ks_t), intent(inout) :: ks
78 type(namespace_t), intent(in) :: namespace
79 type(electron_space_t), intent(in) :: space
80 type(hamiltonian_elec_t), intent(inout) :: hm
81 type(partner_list_t), intent(in) :: ext_partners
82 type(grid_t), intent(inout) :: gr
83 type(states_elec_t), intent(inout) :: st
84 type(propagator_base_t), intent(inout) :: tr
85 real(real64), intent(in) :: time
86 real(real64), intent(in) :: dt
87 type(ion_dynamics_t), intent(inout) :: ions_dyn
88 type(ions_t), intent(inout) :: ions
89 type(multicomm_t), intent(inout) :: mc
90
91 type(xc_copied_potentials_t) :: vhxc_t1, vhxc_t2
92 type(gauge_field_t), pointer :: gfield
93
94 push_sub(td_etrs)
95
96 if (hm%theory_level /= independent_particles) then
97
98 call hm%ks_pot%store_potentials(vhxc_t1)
99
100 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt, dt)
101
102 call v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, &
103 calc_current = .false., calc_energy = .false., calc_eigenval = .false.)
104
105 call hm%ks_pot%store_potentials(vhxc_t2)
106 call hm%ks_pot%restore_potentials(vhxc_t1)
107 call hm%update(gr, namespace, space, ext_partners, time = time - dt)
108
109 else
110
111 call propagation_ops_elec_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
112
113 end if
114
115 ! propagate dt/2 with H(t)
117 ! first move the ions to time t
118 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, ions, &
119 ext_partners, mc, time, dt)
120
121 gfield => list_get_gauge_field(ext_partners)
122 if(associated(gfield)) then
123 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
124 end if
125
126 if (hm%theory_level /= independent_particles) then
127 call hm%ks_pot%restore_potentials(vhxc_t2)
128 end if
129
130 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
131
132 ! propagate dt/2 with H(time - dt)
133 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
134
135 pop_sub(td_etrs)
136 end subroutine td_etrs
137
138 ! ---------------------------------------------------------
140 subroutine td_etrs_sc(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, &
141 ions_dyn, ions, mc, sctol, scsteps)
142 type(v_ks_t), intent(inout) :: ks
143 type(namespace_t), intent(in) :: namespace
144 type(electron_space_t), intent(in) :: space
145 type(hamiltonian_elec_t), intent(inout) :: hm
146 type(partner_list_t), intent(in) :: ext_partners
147 type(grid_t), intent(inout) :: gr
148 type(states_elec_t), intent(inout) :: st
149 type(propagator_base_t), intent(inout) :: tr
150 real(real64), intent(in) :: time
151 real(real64), intent(in) :: dt
152 type(ion_dynamics_t), intent(inout) :: ions_dyn
153 type(ions_t), intent(inout) :: ions
154 type(multicomm_t), intent(inout) :: mc
155 real(real64), intent(in) :: sctol
156 integer, optional, intent(out) :: scsteps
157
158 real(real64) :: diff
159 integer :: ik, ib, iter
160 class(wfs_elec_t), allocatable :: psi2(:, :)
161 ! these are hardcoded for the moment
162 integer, parameter :: niter = 10
163 type(gauge_field_t), pointer :: gfield
164 type(xc_copied_potentials_t) :: vhxc_t1, vhxc_t2
165
166 push_sub(td_etrs_sc)
167
168 assert(hm%theory_level /= independent_particles)
169
170 call hm%ks_pot%store_potentials(vhxc_t1)
171
172 call messages_new_line()
173 call messages_write(' Self-consistency iteration:')
174 call messages_info(namespace=namespace)
175
176 !Propagate the states to t+dt/2 and compute the density at t+dt
177 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt, dt)
178
179 call v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, &
180 calc_current = .false., calc_energy = .false., calc_eigenval = .false.)
181
182
183 call hm%ks_pot%store_potentials(vhxc_t2)
184 call hm%ks_pot%restore_potentials(vhxc_t1)
185
186 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time - dt)
187
188 ! propagate dt/2 with H(t)
189
190 ! first move the ions to time t
191 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, ions, &
192 ext_partners, mc, time, dt)
193
194 gfield => list_get_gauge_field(ext_partners)
195 if(associated(gfield)) then
196 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
197 end if
198
199 call hm%ks_pot%restore_potentials(vhxc_t2)
200
201 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
202
203 safe_allocate_type_array(wfs_elec_t, psi2, (st%group%block_start:st%group%block_end, st%d%kpt%start:st%d%kpt%end))
204
205 ! store the state at half iteration
206 do ik = st%d%kpt%start, st%d%kpt%end
207 do ib = st%group%block_start, st%group%block_end
208 call st%group%psib(ib, ik)%copy_to(psi2(ib, ik), copy_data=.true.)
209 end do
210 end do
211
212 do iter = 1, niter
213
214 call hm%ks_pot%store_potentials(vhxc_t2)
215
216 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half * dt)
217
218 call v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, &
219 time = time, calc_current = .false., calc_energy = .false., calc_eigenval = .false.)
220 call lda_u_update_occ_matrices(hm%lda_u, namespace, gr, st, hm%phase, hm%energy)
221
222 ! now check how much the potential changed
223 diff = hm%ks_pot%check_convergence(vhxc_t2, gr, st%rho, st%qtot)
224
225 call messages_write(' step ')
226 call messages_write(iter)
227 call messages_write(', residue = ')
228 call messages_write(abs(diff), fmt = '(1x,es9.2)')
229 call messages_info(namespace=namespace)
230
231 if (abs(diff) <= sctol) exit
232
233 if (iter /= niter) then
234 ! we are not converged, restore the states
235 do ik = st%d%kpt%start, st%d%kpt%end
236 do ib = st%group%block_start, st%group%block_end
237 call psi2(ib, ik)%copy_data_to(gr%np, st%group%psib(ib, ik))
238 end do
239 end do
240 end if
241
242 end do
243
244 if (hm%lda_u_level /= dft_u_none) then
245 call lda_u_write_u(hm%lda_u, namespace=namespace)
246 call lda_u_write_v(hm%lda_u, namespace=namespace)
247 end if
248
249 ! print an empty line
250 call messages_info(namespace=namespace)
251
252 if (present(scsteps)) scsteps = iter
253
254 do ik = st%d%kpt%start, st%d%kpt%end
255 do ib = st%group%block_start, st%group%block_end
256 call psi2(ib, ik)%end()
257 end do
258 end do
259
260 safe_deallocate_a(psi2)
261
262 pop_sub(td_etrs_sc)
263 end subroutine td_etrs_sc
264
265 ! ---------------------------------------------------------
267 subroutine td_aetrs(namespace, space, hm, gr, st, tr, time, dt, ions_dyn, ions, ext_partners, mc)
268 type(namespace_t), intent(in) :: namespace
269 type(electron_space_t), intent(in) :: space
270 type(hamiltonian_elec_t), intent(inout) :: hm
271 type(grid_t), intent(inout) :: gr
272 type(states_elec_t), intent(inout) :: st
273 type(propagator_base_t), intent(inout) :: tr
274 real(real64), intent(in) :: time
275 real(real64), intent(in) :: dt
276 type(ion_dynamics_t), intent(inout) :: ions_dyn
277 type(ions_t), intent(inout) :: ions
278 type(partner_list_t), intent(in) :: ext_partners
279 type(multicomm_t), intent(inout) :: mc
280
281 type(gauge_field_t), pointer :: gfield
282
283 push_sub(td_aetrs)
284
285 ! propagate half of the time step with H(time - dt)
286 call propagation_ops_elec_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
287
288 !Get the potentials from the interpolation
289 call propagation_ops_elec_interpolate_get(hm, tr%vks_old)
290
291 ! move the ions to time t
292 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, &
293 ions, ext_partners, mc, time, dt)
294
295 !Propagate gauge field
296 gfield => list_get_gauge_field(ext_partners)
297 if(associated(gfield)) then
298 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
299 end if
300
301 !Update Hamiltonian
302 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
303
304 !Do the time propagation for the second half of the time step
305 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
306
307 pop_sub(td_aetrs)
308 end subroutine td_aetrs
309
310 ! ---------------------------------------------------------
312 subroutine td_aetrs_sc(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, &
313 ions_dyn, ions, mc, sctol, scsteps)
314 type(v_ks_t), intent(inout) :: ks
315 type(namespace_t), intent(in) :: namespace
316 type(electron_space_t), intent(in) :: space
317 type(hamiltonian_elec_t), intent(inout) :: hm
318 type(partner_list_t), intent(in) :: ext_partners
319 type(grid_t), intent(inout) :: gr
320 type(states_elec_t), intent(inout) :: st
321 type(propagator_base_t), intent(inout) :: tr
322 real(real64), intent(in) :: time
323 real(real64), intent(in) :: dt
324 type(ion_dynamics_t), intent(inout) :: ions_dyn
325 type(ions_t), intent(inout) :: ions
326 type(multicomm_t), intent(inout) :: mc
327 real(real64), intent(in) :: sctol
328 integer, optional, intent(out) :: scsteps
329
330 real(real64) :: diff
331 integer :: iter
332 type(states_elec_t) :: st0
333 integer, parameter :: niter = 10
334 type(gauge_field_t), pointer :: gfield
335 type(xc_copied_potentials_t) :: vhxc_t2
336
337 push_sub(td_aetrs_sc)
338
339 assert(hm%theory_level /= independent_particles)
340
341 call messages_new_line()
342 call messages_write(' Self-consistency iteration:')
343 call messages_info(namespace=namespace)
344
345 ! First half-step with H(t - dt)
346 call propagation_ops_elec_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
347
348 ! Initial guess for H(t) from extrapolated potentials
349 call propagation_ops_elec_interpolate_get(hm, tr%vks_old)
350
351 ! Move ions and gauge to t only once before SC loop
352 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, ions, &
353 ext_partners, mc, time, dt)
354
355 gfield => list_get_gauge_field(ext_partners)
356 if (associated(gfield)) then
357 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
358 end if
359
360 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
361
362 ! Store the half-step state to restart each SC iteration
363 call states_elec_copy(st0, st)
364
365 do iter = 1, niter
366 call hm%ks_pot%store_potentials(vhxc_t2)
367
368 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
369
370 call v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, &
371 time = time, calc_current = .false., calc_energy = .false., calc_eigenval = .false.)
372 call lda_u_update_occ_matrices(hm%lda_u, namespace, gr, st, hm%phase, hm%energy)
373
374 diff = hm%ks_pot%check_convergence(vhxc_t2, gr, st%rho, st%qtot)
375
376 call messages_write(' step ')
377 call messages_write(iter)
378 call messages_write(', residue = ')
379 call messages_write(abs(diff), fmt = '(1x,es9.2)')
380 call messages_info(namespace=namespace)
381
382 if (diff <= sctol) exit
383
384 if (iter /= niter) then
385 ! restore initial states for next iteration
386 call states_elec_group_copy(st0%d, st0%group, st%group)
387 end if
388 end do
389
390 if (hm%lda_u_level /= dft_u_none) then
391 call lda_u_write_u(hm%lda_u, namespace=namespace)
392 call lda_u_write_v(hm%lda_u, namespace=namespace)
393 end if
394
395 call messages_info(namespace=namespace)
396
397 if (present(scsteps)) scsteps = iter
398
399 call states_elec_end(st0)
400
401 pop_sub(td_aetrs_sc)
402 end subroutine td_aetrs_sc
403
404 ! ---------------------------------------------------------
406 subroutine td_caetrs(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, &
407 ions_dyn, ions, mc)
408 type(v_ks_t), intent(inout) :: ks
409 type(namespace_t), intent(in) :: namespace
410 type(electron_space_t), intent(in) :: space
411 type(hamiltonian_elec_t), intent(inout) :: hm
412 type(partner_list_t), intent(in) :: ext_partners
413 type(grid_t), intent(inout) :: gr
414 type(states_elec_t), intent(inout) :: st
415 type(propagator_base_t), intent(inout) :: tr
416 real(real64), intent(in) :: time
417 real(real64), intent(in) :: dt
418 type(ion_dynamics_t), intent(inout) :: ions_dyn
419 type(ions_t), intent(inout) :: ions
420 type(multicomm_t), intent(inout) :: mc
421
422 integer :: ik, ispin, ip, ib
423 real(real64) :: vv
424 complex(real64), allocatable :: phase(:)
425 type(density_calc_t) :: dens_calc
426 integer(int64) :: pnp
427 integer(int64), dimension(3) :: gsizes, bsizes
428 type(accel_mem_t) :: phase_buff
429 type(gauge_field_t), pointer :: gfield
430 type(xc_copied_potentials_t) :: vold
431
432 push_sub(td_caetrs)
433
434 ! Get the interpolated KS potentials into vold
435 call hm%ks_pot%get_interpolated_potentials(tr%vks_old, 2, storage=vold)
436 ! And set it to the Hamiltonian
437 call hm%ks_pot%restore_potentials(vold)
438
439 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time - dt)
440
441 call v_ks_calc_start(ks, namespace, space, hm, st, ions, ions%latt, ext_partners, &
442 time = time - dt, calc_energy = .false.)
443
444 ! propagate half of the time step with H(time - dt)
445 call propagation_ops_elec_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
446
447 call v_ks_calc_finish(ks, hm, namespace, space, ions%latt, st, ext_partners)
448
449 call hm%ks_pot%set_interpolated_potentials(tr%vks_old, 1)
450
451 call hm%ks_pot%perform_interpolation(tr%vks_old, (/time - dt, time - m_two*dt, time - m_three*dt/), time)
452
453 ! Replace vold by 0.5(vhxc+vold)
454 call hm%ks_pot%mix_potentials(vold, dt)
455
456 ! copy vold to a cl buffer
457 if (accel_is_enabled() .and. hm%apply_packed()) then
458 if (family_is_mgga_with_exc(hm%xc)) then
459 call messages_not_implemented('CAETRS propagator with accel and MGGA with energy functionals', namespace=namespace)
460 end if
461 pnp = accel_padded_size(gr%np)
462 call accel_create_buffer(phase_buff, accel_mem_read_only, type_float, pnp*st%d%nspin)
463 call vold%copy_vhxc_to_buffer(int(gr%np, int64), st%d%nspin, pnp, phase_buff)
464 end if
465
466 !Get the potentials from the interpolator
467 call propagation_ops_elec_interpolate_get(hm, tr%vks_old)
468
469 ! move the ions to time t
470 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, &
471 ions, ext_partners, mc, time, dt)
472
473 gfield => list_get_gauge_field(ext_partners)
474 if(associated(gfield)) then
475 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
476 end if
477
478 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
479
480 call density_calc_init(dens_calc, st, gr, st%rho)
481
482 ! propagate the other half with H(t)
483 do ik = st%d%kpt%start, st%d%kpt%end
484 ispin = st%d%get_spin_index(ik)
485
486 do ib = st%group%block_start, st%group%block_end
487 if (hm%apply_packed()) then
488 call st%group%psib(ib, ik)%do_pack()
489 if (hamiltonian_elec_inh_term(hm)) call hm%inh_st%group%psib(ib, ik)%do_pack()
490 end if
491
492 call profiling_in("CAETRS_PHASE")
493 select case (st%group%psib(ib, ik)%status())
495 safe_allocate(phase(1:gr%np))
496 do ip = 1, gr%np
497 vv = vold%vhxc(ip, ispin)
498 phase(ip) = cmplx(cos(vv), -sin(vv), real64)
499 end do
500 call batch_mul_mf(gr%np, phase, st%group%psib(ib, ik), st%group%psib(ib, ik))
501 safe_deallocate_a(phase)
503 call accel_set_kernel_arg(kernel_phase, 0, pnp*(ispin - 1))
504 call accel_set_kernel_arg(kernel_phase, 1, phase_buff)
505 call accel_set_kernel_arg(kernel_phase, 2, st%group%psib(ib, ik)%ff_device)
506 call accel_set_kernel_arg(kernel_phase, 3, log2(st%group%psib(ib, ik)%pack_size(1)))
507
508 ! Compute the grid (extend to another dimensions if the size of the problem is too big)
509 call accel_grid_size_extend_dim(pnp, st%group%psib(ib, ik)%pack_size(1), gsizes, bsizes)
510
511 call accel_kernel_run(kernel_phase, gsizes, bsizes)
512
513 end select
514 call profiling_out("CAETRS_PHASE")
515
516 call hm%phase%set_phase_corr(gr, st%group%psib(ib, ik))
517 if (hamiltonian_elec_inh_term(hm)) then
518 call tr%te%apply_batch(namespace, gr, hm, st%group%psib(ib, ik), m_half*dt, &
519 inh_psib = hm%inh_st%group%psib(ib, ik))
520 else
521 call tr%te%apply_batch(namespace, gr, hm, st%group%psib(ib, ik), m_half*dt)
522 end if
523 call hm%phase%unset_phase_corr(gr, st%group%psib(ib, ik))
524
525 call density_calc_accumulate(dens_calc, st%group%psib(ib, ik))
526
527 if (hm%apply_packed()) then
528 call st%group%psib(ib, ik)%do_unpack()
529 if (hamiltonian_elec_inh_term(hm)) call hm%inh_st%group%psib(ib, ik)%do_unpack()
530 end if
531 end do
532 end do
533
534 call density_calc_end(dens_calc)
535
536 if (accel_is_enabled() .and. hm%apply_packed()) then
537 call accel_free_buffer(phase_buff)
538 end if
539
540 pop_sub(td_caetrs)
541 end subroutine td_caetrs
542
543end module propagator_etrs_oct_m
544
545!! Local Variables:
546!! mode: f90
547!! coding: utf-8
548!! End:
batchified multiplication by mesh function with optional conjugation:
Definition: batch_ops.F90:254
double sin(double __x) __attribute__((__nothrow__
double cos(double __x) __attribute__((__nothrow__
subroutine, public accel_free_buffer(this, async)
Definition: accel.F90:1005
type(accel_kernel_t), target, save, public kernel_phase
Definition: accel.F90:274
pure logical function, public accel_is_enabled()
Definition: accel.F90:402
integer, parameter, public accel_mem_read_only
Definition: accel.F90:185
This module implements batches of mesh functions.
Definition: batch.F90:135
integer, parameter, public batch_not_packed
functions are stored in CPU memory, unpacked order
Definition: batch.F90:286
integer, parameter, public batch_device_packed
functions are stored in device memory in packed order
Definition: batch.F90:286
integer, parameter, public batch_packed
functions are stored in CPU memory, in transposed (packed) order
Definition: batch.F90:286
This module implements common operations on batches of mesh functions.
Definition: batch_ops.F90:118
This module implements a calculator for the density and defines related functions.
Definition: density.F90:122
subroutine, public density_calc_end(this, allreduce, symmetrize)
Finalize the density calculation.
Definition: density.F90:568
subroutine, public density_calc_accumulate(this, psib, async)
Accumulate weighted orbital densities for a batch psib.
Definition: density.F90:399
subroutine, public density_calc_init(this, st, gr, density)
initialize the density calculator
Definition: density.F90:190
type(gauge_field_t) function, pointer, public list_get_gauge_field(partners)
real(real64), parameter, public m_two
Definition: global.F90:202
integer, parameter, public independent_particles
Theory level.
Definition: global.F90:250
real(real64), parameter, public m_half
Definition: global.F90:206
real(real64), parameter, public m_three
Definition: global.F90:203
This module implements the underlying real-space grid.
Definition: grid.F90:119
pure logical function, public hamiltonian_elec_inh_term(hm)
This module defines classes and functions for interaction partners.
A module to handle KS potential, without the external potential.
subroutine, public lda_u_write_u(this, iunit, namespace)
Definition: lda_u_io.F90:528
subroutine, public lda_u_write_v(this, iunit, namespace)
Definition: lda_u_io.F90:576
integer, parameter, public dft_u_none
Definition: lda_u.F90:205
subroutine, public lda_u_update_occ_matrices(this, namespace, mesh, st, phase, energy)
Definition: lda_u.F90:892
This module is intended to contain "only mathematical" functions and procedures.
Definition: math.F90:117
This module defines various routines, operating on mesh functions.
subroutine, public messages_not_implemented(feature, namespace)
Definition: messages.F90:1068
subroutine, public messages_new_line()
Definition: messages.F90:1089
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
Definition: messages.F90:594
This module handles the communicators for the various parallelization strategies.
Definition: multicomm.F90:147
subroutine, public profiling_out(label)
Increment out counter and sum up difference between entry and exit time.
Definition: profiling.F90:631
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.
Definition: profiling.F90:554
subroutine, public propagation_ops_elec_propagate_gauge_field(wo, gfield, dt, time, save_gf)
subroutine, public propagation_ops_elec_update_hamiltonian(namespace, space, st, mesh, hm, ext_partners, time)
subroutine, public propagation_ops_elec_interpolate_get(hm, vks_old)
subroutine, public propagation_ops_elec_fuse_density_exp_apply(te, namespace, st, gr, hm, dt, dt2, op)
subroutine, public propagation_ops_elec_move_ions(wo, gr, hm, st, namespace, space, ions_dyn, ions, ext_partners, mc, time, dt, save_pos)
subroutine, public propagation_ops_elec_exp_apply(te, namespace, st, mesh, hm, dt, op)
subroutine, public td_aetrs(namespace, space, hm, gr, st, tr, time, dt, ions_dyn, ions, ext_partners, mc)
Propagator with approximate enforced time-reversal symmetry.
subroutine, public td_etrs_sc(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, ions_dyn, ions, mc, sctol, scsteps)
Propagator with enforced time-reversal symmetry and self-consistency.
subroutine, public td_etrs(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, ions_dyn, ions, mc)
Propagator with enforced time-reversal symmetry.
subroutine, public td_caetrs(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, ions_dyn, ions, mc)
Propagator with approximate enforced time-reversal symmetry.
subroutine, public td_aetrs_sc(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, ions_dyn, ions, mc, sctol, scsteps)
Propagator with approximate enforced time-reversal symmetry and self-consistency.
This module handles spin dimensions of the states and the k-point distribution.
This module handles groups of electronic batches and their parallel distribution.
subroutine, public states_elec_group_copy(d, group_in, group_out, copy_data, special)
make a copy of a group
subroutine, public states_elec_end(st)
finalize the states_elec_t object
subroutine, public states_elec_copy(stout, stin, exclude_wfns, exclude_eigenval, special)
make a (selective) copy of a states_elec_t object
type(type_t), public type_float
Definition: types.F90:135
subroutine, public v_ks_calc_finish(ks, hm, namespace, space, latt, st, ext_partners, force_semilocal)
Definition: v_ks.F90:1106
subroutine, public v_ks_calc_start(ks, namespace, space, hm, st, ions, latt, ext_partners, time, calc_energy, force_semilocal)
This routine starts the calculation of the Kohn-Sham potential. The routine v_ks_calc_finish must be ...
Definition: v_ks.F90:809
subroutine, public v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, calc_eigenval, time, calc_energy, calc_current, force_semilocal)
Definition: v_ks.F90:754
Definition: xc.F90:116
logical pure function, public family_is_mgga_with_exc(xcs)
Is the xc function part of the mGGA family with an energy functional.
Definition: xc.F90:599
The calculator object.
Definition: density.F90:171
Extension of space that contains the knowledge of the spin dimension.
Description of the grid, containing information on derivatives, stencil, and symmetries.
Definition: grid.F90:171
Stores all communicators and groups.
Definition: multicomm.F90:208
The states_elec_t class contains all electronic wave functions.
batches of electronic states
Definition: wfs_elec.F90:141
int true(void)