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
39 use lda_u_oct_m
41 use math_oct_m
46 use parser_oct_m
49 use space_oct_m
53 use types_oct_m
54 use v_ks_oct_m
57 use xc_oct_m
58
59 implicit none
60
61 private
62
63 public :: &
64 td_etrs, &
65 td_etrs_sc, &
66 td_aetrs, &
69
70contains
71
72 ! ---------------------------------------------------------
74 subroutine td_etrs(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, &
75 ions_dyn, ions, mc)
76 type(v_ks_t), intent(inout) :: ks
77 type(namespace_t), intent(in) :: namespace
78 type(electron_space_t), intent(in) :: space
79 type(hamiltonian_elec_t), intent(inout) :: hm
80 type(partner_list_t), intent(in) :: ext_partners
81 type(grid_t), intent(inout) :: gr
82 type(states_elec_t), intent(inout) :: st
83 type(propagator_base_t), intent(inout) :: tr
84 real(real64), intent(in) :: time
85 real(real64), intent(in) :: dt
86 type(ion_dynamics_t), intent(inout) :: ions_dyn
87 type(ions_t), intent(inout) :: ions
88 type(multicomm_t), intent(inout) :: mc
89
90 type(xc_copied_potentials_t) :: vhxc_t1, vhxc_t2
91 type(gauge_field_t), pointer :: gfield
92
93 push_sub(td_etrs)
94
95 if (hm%theory_level /= independent_particles) then
96
97 call hm%ks_pot%store_potentials(vhxc_t1)
98
99 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt, dt)
100
101 call v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, &
102 calc_current = .false., calc_energy = .false., calc_eigenval = .false.)
103
104 call hm%ks_pot%store_potentials(vhxc_t2)
105 call hm%ks_pot%restore_potentials(vhxc_t1)
106 call hm%update(gr, namespace, space, ext_partners, time = time - dt)
107
108 else
109
110 call propagation_ops_elec_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
111
112 end if
113
114 ! propagate dt/2 with H(t)
115
116 ! first move the ions to time t
117 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, ions, &
118 ext_partners, mc, time, dt)
119
120 gfield => list_get_gauge_field(ext_partners)
121 if(associated(gfield)) then
122 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
123 end if
124
125 if (hm%theory_level /= independent_particles) then
126 call hm%ks_pot%restore_potentials(vhxc_t2)
127 end if
128
129 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
130
131 ! propagate dt/2 with H(time - dt)
132 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
133
134 pop_sub(td_etrs)
135 end subroutine td_etrs
136
137 ! ---------------------------------------------------------
139 subroutine td_etrs_sc(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, &
140 ions_dyn, ions, mc, sctol, scsteps)
141 type(v_ks_t), intent(inout) :: ks
142 type(namespace_t), intent(in) :: namespace
143 type(electron_space_t), intent(in) :: space
144 type(hamiltonian_elec_t), intent(inout) :: hm
145 type(partner_list_t), intent(in) :: ext_partners
146 type(grid_t), intent(inout) :: gr
147 type(states_elec_t), intent(inout) :: st
148 type(propagator_base_t), intent(inout) :: tr
149 real(real64), intent(in) :: time
150 real(real64), intent(in) :: dt
151 type(ion_dynamics_t), intent(inout) :: ions_dyn
152 type(ions_t), intent(inout) :: ions
153 type(multicomm_t), intent(inout) :: mc
154 real(real64), intent(in) :: sctol
155 integer, optional, intent(out) :: scsteps
156
157 real(real64) :: diff
158 integer :: ik, ib, iter
159 class(wfs_elec_t), allocatable :: psi2(:, :)
160 ! these are hardcoded for the moment
161 integer, parameter :: niter = 10
162 type(gauge_field_t), pointer :: gfield
163 type(xc_copied_potentials_t) :: vhxc_t1, vhxc_t2
164
165 push_sub(td_etrs_sc)
166
167 assert(hm%theory_level /= independent_particles)
168
169 call hm%ks_pot%store_potentials(vhxc_t1)
170
171 call messages_new_line()
172 call messages_write(' Self-consistency iteration:')
173 call messages_info(namespace=namespace)
174
175 !Propagate the states to t+dt/2 and compute the density at t+dt
176 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt, dt)
177
178 call v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, &
179 calc_current = .false., calc_energy = .false., calc_eigenval = .false.)
180
181
182 call hm%ks_pot%store_potentials(vhxc_t2)
183 call hm%ks_pot%restore_potentials(vhxc_t1)
184
185 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time - dt)
186
187 ! propagate dt/2 with H(t)
188
189 ! first move the ions to time t
190 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, ions, &
191 ext_partners, mc, time, dt)
192
193 gfield => list_get_gauge_field(ext_partners)
194 if(associated(gfield)) then
195 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
196 end if
197
198 call hm%ks_pot%restore_potentials(vhxc_t2)
199
200 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
201
202 safe_allocate_type_array(wfs_elec_t, psi2, (st%group%block_start:st%group%block_end, st%d%kpt%start:st%d%kpt%end))
203
204 ! store the state at half iteration
205 do ik = st%d%kpt%start, st%d%kpt%end
206 do ib = st%group%block_start, st%group%block_end
207 call st%group%psib(ib, ik)%copy_to(psi2(ib, ik), copy_data=.true.)
208 end do
209 end do
210
211 do iter = 1, niter
212
213 call hm%ks_pot%store_potentials(vhxc_t2)
214
215 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half * dt)
216
217 call v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, &
218 time = time, calc_current = .false., calc_energy = .false., calc_eigenval = .false.)
219 call lda_u_update_occ_matrices(hm%lda_u, namespace, gr, st, hm%phase, hm%energy)
220
221 ! now check how much the potential changed
222 diff = hm%ks_pot%check_convergence(vhxc_t2, gr, st%rho, st%qtot)
223
224 call messages_write(' step ')
225 call messages_write(iter)
226 call messages_write(', residue = ')
227 call messages_write(abs(diff), fmt = '(1x,es9.2)')
228 call messages_info(namespace=namespace)
229
230 if (abs(diff) <= sctol) exit
231
232 if (iter /= niter) then
233 ! we are not converged, restore the states
234 do ik = st%d%kpt%start, st%d%kpt%end
235 do ib = st%group%block_start, st%group%block_end
236 call psi2(ib, ik)%copy_data_to(gr%np, st%group%psib(ib, ik))
237 end do
238 end do
239 end if
240
241 end do
242
243 if (hm%lda_u_level /= dft_u_none) then
244 call lda_u_write_u(hm%lda_u, namespace=namespace)
245 call lda_u_write_v(hm%lda_u, namespace=namespace)
246 end if
247
248 ! print an empty line
249 call messages_info(namespace=namespace)
250
251 if (present(scsteps)) scsteps = iter
252
253 do ik = st%d%kpt%start, st%d%kpt%end
254 do ib = st%group%block_start, st%group%block_end
255 call psi2(ib, ik)%end()
256 end do
257 end do
258
259 safe_deallocate_a(psi2)
260
261 pop_sub(td_etrs_sc)
262 end subroutine td_etrs_sc
263
264 ! ---------------------------------------------------------
266 subroutine td_aetrs(namespace, space, hm, gr, st, tr, time, dt, ions_dyn, ions, ext_partners, mc)
267 type(namespace_t), intent(in) :: namespace
268 type(electron_space_t), intent(in) :: space
269 type(hamiltonian_elec_t), intent(inout) :: hm
270 type(grid_t), intent(inout) :: gr
271 type(states_elec_t), intent(inout) :: st
272 type(propagator_base_t), intent(inout) :: tr
273 real(real64), intent(in) :: time
274 real(real64), intent(in) :: dt
275 type(ion_dynamics_t), intent(inout) :: ions_dyn
276 type(ions_t), intent(inout) :: ions
277 type(partner_list_t), intent(in) :: ext_partners
278 type(multicomm_t), intent(inout) :: mc
279
280 type(gauge_field_t), pointer :: gfield
281
282 push_sub(td_aetrs)
283
284 ! propagate half of the time step with H(time - dt)
285 call propagation_ops_elec_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
286
287 !Get the potentials from the interpolation
288 call propagation_ops_elec_interpolate_get(hm, tr%vks_old)
289
290 ! move the ions to time t
291 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, &
292 ions, ext_partners, mc, time, dt)
293
294 !Propagate gauge field
295 gfield => list_get_gauge_field(ext_partners)
296 if(associated(gfield)) then
297 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
298 end if
299
300 !Update Hamiltonian
301 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
302
303 !Do the time propagation for the second half of the time step
304 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
305
306 pop_sub(td_aetrs)
307 end subroutine td_aetrs
308
309 ! ---------------------------------------------------------
311 subroutine td_aetrs_sc(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, &
312 ions_dyn, ions, mc, sctol, scsteps)
313 type(v_ks_t), intent(inout) :: ks
314 type(namespace_t), intent(in) :: namespace
315 type(electron_space_t), intent(in) :: space
316 type(hamiltonian_elec_t), intent(inout) :: hm
317 type(partner_list_t), intent(in) :: ext_partners
318 type(grid_t), intent(inout) :: gr
319 type(states_elec_t), intent(inout) :: st
320 type(propagator_base_t), intent(inout) :: tr
321 real(real64), intent(in) :: time
322 real(real64), intent(in) :: dt
323 type(ion_dynamics_t), intent(inout) :: ions_dyn
324 type(ions_t), intent(inout) :: ions
325 type(multicomm_t), intent(inout) :: mc
326 real(real64), intent(in) :: sctol
327 integer, optional, intent(out) :: scsteps
328
329 real(real64) :: diff
330 integer :: iter
331 type(states_elec_t) :: st0
332 integer, parameter :: niter = 10
333 type(gauge_field_t), pointer :: gfield
334 type(xc_copied_potentials_t) :: vhxc_t2
335
336 push_sub(td_aetrs_sc)
337
338 assert(hm%theory_level /= independent_particles)
339
340 call messages_new_line()
341 call messages_write(' Self-consistency iteration:')
342 call messages_info(namespace=namespace)
343
344 ! First half-step with H(t - dt)
345 call propagation_ops_elec_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
346
347 ! Initial guess for H(t) from extrapolated potentials
348 call propagation_ops_elec_interpolate_get(hm, tr%vks_old)
349
350 ! Move ions and gauge to t only once before SC loop
351 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, ions, &
352 ext_partners, mc, time, dt)
353
354 gfield => list_get_gauge_field(ext_partners)
355 if (associated(gfield)) then
356 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
357 end if
358
359 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
360
361 ! Store the half-step state to restart each SC iteration
362 call states_elec_copy(st0, st)
363
364 do iter = 1, niter
365 call hm%ks_pot%store_potentials(vhxc_t2)
366
367 call propagation_ops_elec_fuse_density_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
368
369 call v_ks_calc(ks, namespace, space, hm, st, ions, ext_partners, &
370 time = time, calc_current = .false., calc_energy = .false., calc_eigenval = .false.)
371 call lda_u_update_occ_matrices(hm%lda_u, namespace, gr, st, hm%phase, hm%energy)
372
373 diff = hm%ks_pot%check_convergence(vhxc_t2, gr, st%rho, st%qtot)
374
375 call messages_write(' step ')
376 call messages_write(iter)
377 call messages_write(', residue = ')
378 call messages_write(abs(diff), fmt = '(1x,es9.2)')
379 call messages_info(namespace=namespace)
380
381 if (diff <= sctol) exit
382
383 if (iter /= niter) then
384 ! restore initial states for next iteration
385 call states_elec_group_copy(st0%d, st0%group, st%group)
386 end if
387 end do
388
389 if (hm%lda_u_level /= dft_u_none) then
390 call lda_u_write_u(hm%lda_u, namespace=namespace)
391 call lda_u_write_v(hm%lda_u, namespace=namespace)
392 end if
393
394 call messages_info(namespace=namespace)
395
396 if (present(scsteps)) scsteps = iter
397
398 call states_elec_end(st0)
399
400 pop_sub(td_aetrs_sc)
401 end subroutine td_aetrs_sc
402
403 ! ---------------------------------------------------------
405 subroutine td_caetrs(ks, namespace, space, hm, ext_partners, gr, st, tr, time, dt, &
406 ions_dyn, ions, mc)
407 type(v_ks_t), intent(inout) :: ks
408 type(namespace_t), intent(in) :: namespace
409 type(electron_space_t), intent(in) :: space
410 type(hamiltonian_elec_t), intent(inout) :: hm
411 type(partner_list_t), intent(in) :: ext_partners
412 type(grid_t), intent(inout) :: gr
413 type(states_elec_t), intent(inout) :: st
414 type(propagator_base_t), intent(inout) :: tr
415 real(real64), intent(in) :: time
416 real(real64), intent(in) :: dt
417 type(ion_dynamics_t), intent(inout) :: ions_dyn
418 type(ions_t), intent(inout) :: ions
419 type(multicomm_t), intent(inout) :: mc
420
421 integer :: ik, ispin, ip, ib
422 real(real64) :: vv
423 complex(real64), allocatable :: phase(:)
424 type(density_calc_t) :: dens_calc
425 integer(int64) :: pnp
426 integer(int64), dimension(3) :: gsizes, bsizes
427 type(accel_mem_t) :: phase_buff
428 type(gauge_field_t), pointer :: gfield
429 type(xc_copied_potentials_t) :: vold
430
431 push_sub(td_caetrs)
432
433 ! Get the interpolated KS potentials into vold
434 call hm%ks_pot%get_interpolated_potentials(tr%vks_old, 2, storage=vold)
435 ! And set it to the Hamiltonian
436 call hm%ks_pot%restore_potentials(vold)
437
438 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time - dt)
439
440 call v_ks_calc_start(ks, namespace, space, hm, st, ions, ions%latt, ext_partners, &
441 time = time - dt, calc_energy = .false.)
442
443 ! propagate half of the time step with H(time - dt)
444 call propagation_ops_elec_exp_apply(tr%te, namespace, st, gr, hm, m_half*dt)
445
446 call v_ks_calc_finish(ks, hm, namespace, space, ions%latt, st, ext_partners)
447
448 call hm%ks_pot%set_interpolated_potentials(tr%vks_old, 1)
449
450 call hm%ks_pot%perform_interpolation(tr%vks_old, (/time - dt, time - m_two*dt, time - m_three*dt/), time)
451
452 ! Replace vold by 0.5(vhxc+vold)
453 call hm%ks_pot%mix_potentials(vold, dt)
454
455 ! copy vold to a cl buffer
456 if (accel_is_enabled() .and. hm%apply_packed()) then
457 if (family_is_mgga_with_exc(hm%xc)) then
458 call messages_not_implemented('CAETRS propagator with accel and MGGA with energy functionals', namespace=namespace)
459 end if
460 pnp = accel_padded_size(gr%np)
461 call accel_create_buffer(phase_buff, accel_mem_read_only, type_float, pnp*st%d%nspin)
462 call vold%copy_vhxc_to_buffer(int(gr%np, int64), st%d%nspin, pnp, phase_buff)
463 end if
464
465 !Get the potentials from the interpolator
466 call propagation_ops_elec_interpolate_get(hm, tr%vks_old)
467
468 ! move the ions to time t
469 call propagation_ops_elec_move_ions(tr%propagation_ops_elec, gr, hm, st, namespace, space, ions_dyn, &
470 ions, ext_partners, mc, time, dt)
471
472 gfield => list_get_gauge_field(ext_partners)
473 if(associated(gfield)) then
474 call propagation_ops_elec_propagate_gauge_field(tr%propagation_ops_elec, gfield, dt, time)
475 end if
476
477 call propagation_ops_elec_update_hamiltonian(namespace, space, st, gr, hm, ext_partners, time)
478
479 call density_calc_init(dens_calc, st, gr, st%rho)
480
481 ! propagate the other half with H(t)
482 do ik = st%d%kpt%start, st%d%kpt%end
483 ispin = st%d%get_spin_index(ik)
484
485 do ib = st%group%block_start, st%group%block_end
486 if (hm%apply_packed()) then
487 call st%group%psib(ib, ik)%do_pack()
488 if (hamiltonian_elec_inh_term(hm)) call hm%inh_st%group%psib(ib, ik)%do_pack()
489 end if
490
491 call profiling_in("CAETRS_PHASE")
492 select case (st%group%psib(ib, ik)%status())
494 safe_allocate(phase(1:gr%np))
495 do ip = 1, gr%np
496 vv = vold%vhxc(ip, ispin)
497 phase(ip) = cmplx(cos(vv), -sin(vv), real64)
498 end do
499 call batch_mul_mf(gr%np, phase, st%group%psib(ib, ik), st%group%psib(ib, ik))
500 safe_deallocate_a(phase)
502 call accel_set_kernel_arg(kernel_phase, 0, pnp*(ispin - 1))
503 call accel_set_kernel_arg(kernel_phase, 1, gr%np)
504 call accel_set_kernel_arg(kernel_phase, 2, phase_buff)
505 call accel_set_kernel_arg(kernel_phase, 3, st%group%psib(ib, ik)%ff_device)
506 call accel_set_kernel_arg(kernel_phase, 4, 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:1006
type(accel_kernel_t), target, save, public kernel_phase
Definition: accel.F90:275
pure logical function, public accel_is_enabled()
Definition: accel.F90:403
integer, parameter, public accel_mem_read_only
Definition: accel.F90:186
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_accumulate(this, psib, async)
Accumulate weighted orbital densities for a batch psib.
Definition: density.F90:400
subroutine, public density_calc_init(this, st, gr, density)
initialize the density calculator
Definition: density.F90:191
subroutine, public density_calc_end(this, allreduce, symmetrize, buff_density)
Finalize the density calculation.
Definition: density.F90:570
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:527
subroutine, public lda_u_write_v(this, iunit, namespace)
Definition: lda_u_io.F90:575
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:895
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), parameter, 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:1133
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:120
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:721
The calculator object.
Definition: density.F90:172
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)