106#include "../base/base_uses.f90"
112 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'rt_propagation'
128 INTEGER :: aspc_order
129 LOGICAL :: magnetic, track_current, &
130 track_current_int, vel_reprs
137 TYPE(
section_vals_type),
POINTER :: current_int_section, current_section, hfx_sections, &
138 input, ls_scf_section, md_section, motion_section, print_moments_section, &
139 rtp_print_section, rtp_section
141 NULLIFY (qs_env, rtp_control, dft_control)
145 CALL force_env_get(force_env=force_env, qs_env=qs_env, globenv=globenv)
146 CALL get_qs_env(qs_env, dft_control=dft_control, energy=energy)
147 rtp_control => dft_control%rtp_control
151 CALL rt_initial_guess(qs_env, force_env, rtp_control)
155 CALL get_qs_env(qs_env=qs_env, rtp=rtp, input=input)
156 aspc_order = rtp_control%aspc_order
172 IF (.NOT. qs_env%rtp%linear_scaling) rtp%filter_eps = 0.0_dp
173 IF (rtp_control%acc_ref < 1) rtp_control%acc_ref = 1
174 rtp%filter_eps_small = rtp%filter_eps/rtp_control%acc_ref
194 rtp%track_imag_density = (magnetic) .OR. (vel_reprs) .OR. (rtp_control%velocity_gauge) &
195 .OR. (rtp%do_hfx) .OR. (.NOT. rtp_control%fixed_ions) &
196 .OR. (track_current) .OR. (track_current_int)
197 rtp%propagate_complex_ks = rtp%do_hfx .OR. rtp_control%velocity_gauge
202 "DENSITY_MATRIX printing not implemented for non-RTBSE code.")
204 CALL rt_init_complex_quantities(qs_env, imag_p=rtp%track_imag_density, &
205 imag_ks=rtp%propagate_complex_ks, imag_h=rtp_control%velocity_gauge)
207 IF (rtp_control%save_local_moments)
CALL rt_init_local_moments(rtp, qs_env)
216 CALL init_propagation_run(qs_env)
217 IF (.NOT. rtp_control%fixed_ions)
THEN
224 IF (rtp_control%fixed_ions)
THEN
225 CALL run_propagation(qs_env, force_env, globenv)
227 rtp_control%initial_step = .true.
229 rtp_control%initial_step = .false.
230 rtp%energy_old = energy%total
233 IF (rtp_control%save_local_moments)
THEN
235 CALL final_ft_output(qs_env)
238 IF (
ASSOCIATED(rtp_control%print_pol_elements))
DEALLOCATE (rtp_control%print_pol_elements)
248 SUBROUTINE init_propagation_run(qs_env)
251 REAL(kind=
dp),
PARAMETER :: zero = 0.0_dp
253 INTEGER :: i, ispin, re
254 INTEGER,
DIMENSION(2) :: nelectron_spin
255 TYPE(
cp_fm_type),
DIMENSION(:),
POINTER :: mos_new, mos_old
256 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_ks, rho_new, rho_old
262 NULLIFY (dft_control, rtp, rtp_control)
268 dft_control=dft_control)
269 rtp_control => dft_control%rtp_control
272 IF (rtp_control%apply_delta_pulse .OR. rtp_control%apply_delta_pulse_mag)
THEN
275 IF (.NOT. rtp%linear_scaling)
THEN
276 CALL get_rtp(rtp=rtp, mos_old=mos_old)
279 CALL cp_fm_to_fm(mos(i)%mo_coeff, mos_old(2*i - 1))
286 IF (.NOT. rtp%linear_scaling)
THEN
287 CALL get_rtp(rtp=rtp, mos_old=mos_old, mos_new=mos_new)
288 DO i = 1,
SIZE(mos_old)
295 matrix_ks=matrix_ks, &
297 nelectron_spin=nelectron_spin)
298 IF (
ASSOCIATED(mos))
THEN
300 IF (
ASSOCIATED(rtp%mos))
THEN
301 IF (
ASSOCIATED(rtp%mos%old))
THEN
313 CALL get_rtp(rtp=rtp, rho_old=rho_old, rho_new=rho_new)
314 DO ispin = 1,
SIZE(rho_old)/2
316 CALL dbcsr_copy(rho_old(re)%matrix, qs_env%ls_scf_env%matrix_p(ispin))
317 CALL dbcsr_copy(rho_new(re)%matrix, qs_env%ls_scf_env%matrix_p(ispin))
324 IF (rtp_control%velocity_gauge)
THEN
331 END SUBROUTINE init_propagation_run
342 SUBROUTINE run_propagation(qs_env, force_env, globenv)
347 CHARACTER(len=*),
PARAMETER :: routinen =
'run_propagation'
349 INTEGER :: aspc_order, handle, i_iter, i_step, &
350 max_iter, max_steps, output_unit, &
352 LOGICAL :: moments_read, should_stop
353 REAL(kind=
dp) :: eps_ener, time_iter_start, &
354 time_iter_stop, used_time
364 should_stop = .false.
365 CALL timeset(routinen, handle)
369 NULLIFY (logger, dft_control, energy, rtp, rtp_control, input, rtp_section)
371 IF (logger%para_env%is_source())
THEN
377 CALL get_qs_env(qs_env=qs_env, dft_control=dft_control, rtp=rtp, energy=energy, input=input)
379 rtp_control => dft_control%rtp_control
380 max_steps = min(rtp%nsteps, rtp%max_steps)
381 max_iter = rtp_control%max_iter
382 eps_ener = rtp_control%eps_ener
384 aspc_order = rtp_control%aspc_order
386 rtp%energy_old = energy%total
390 IF (rtp%i_start >= max_steps)
CALL cp_abort(__location__, &
391 "maximum step number smaller than initial step value")
397 IF (rtp_control%save_local_moments)
THEN
398 CALL get_rtp(rtp, rho_new=rho_new)
401 CALL read_moments(moments_section, 0, rtp%i_start, rtp%moments, rtp%times, moments_read)
404 IF (.NOT. moments_read)
THEN
405 CALL calc_local_moment(rtp%local_moments, rho_new, rtp%local_moments_work, rtp%moments(:, :, 1))
406 qs_env%sim_time = real(rtp%i_start,
dp)*rtp%dt
407 rtp%times(1) = qs_env%sim_time
408 CALL print_moments(moments_section, output_unit, rtp%moments(:, :, 1), &
409 qs_env%sim_time, rtp%track_imag_density)
413 DO i_step = rtp%i_start + 1, max_steps
414 IF (output_unit > 0)
THEN
415 WRITE (output_unit, fmt=
"(/,(T2,A,T40,I6))") &
416 "Real time propagation step:", i_step
418 energy%efield_core = 0.0_dp
419 qs_env%sim_time = real(i_step,
dp)*rtp%dt
421 pw_env%poisson_env%parameters%dbc_params%time = qs_env%sim_time
422 qs_env%sim_step = i_step
423 rtp%istep = i_step - rtp%i_start
425 IF (dft_control%apply_external_potential)
THEN
426 IF (.NOT. dft_control%expot_control%static)
THEN
427 dft_control%eval_external_potential = .true.
432 CALL cp_iterate(logger%iter_info, last=(i_step == max_steps), iter_nr=i_step)
433 rtp%converged = .false.
434 DO i_iter = 1, max_iter
435 IF (i_step == rtp%i_start + 1 .AND. i_iter == 2 .AND. rtp_control%hfx_redistribute)
THEN
441 rtp%energy_new = energy%total
442 IF (rtp%converged)
EXIT
445 IF (rtp%converged)
THEN
447 IF (should_stop)
CALL cp_iterate(logger%iter_info, last=.true., iter_nr=i_step)
449 used_time = time_iter_stop - time_iter_start
450 time_iter_start = time_iter_stop
452 CALL rt_write_input_restart(force_env=force_env, qs_env=qs_env)
453 IF (
modulo(i_step, dft_control%localize_each) == 0)
THEN
456 IF (should_stop)
EXIT
463 IF (.NOT. rtp%converged)
THEN
464 CALL cp_abort(__location__,
"propagation did not converge, "// &
465 "either increase MAX_ITER or use a smaller TIMESTEP")
468 CALL timestop(handle)
470 END SUBROUTINE run_propagation
481 SUBROUTINE rt_write_input_restart(md_env, qs_env, force_env)
486 CHARACTER(len=default_path_length) :: file_name
487 REAL(kind=
dp),
DIMENSION(:),
POINTER :: tmp_vals
491 motion_section, print_key, &
492 root_section, rt_section
494 CALL get_qs_env(qs_env=qs_env, dft_control=dft_control)
495 root_section => force_env%root_section
509 rt_section,
"PRINT%RESTART"),
cp_p_file))
THEN
512 extension=
".rtpwfn", my_local=.false.)
517 IF (.NOT.
PRESENT(md_env))
THEN
521 IF (dft_control%apply_vector_potential)
THEN
524 ALLOCATE (tmp_vals(3))
525 tmp_vals = dft_control%efield_fields(1)%efield%vec_pot_initial
527 r_vals_ptr=tmp_vals, &
533 END SUBROUTINE rt_write_input_restart
544 SUBROUTINE rt_initial_guess(qs_env, force_env, rtp_control)
549 INTEGER :: homo, ispin
550 LOGICAL :: energy_consistency
555 NULLIFY (matrix_s, dft_control)
556 CALL get_qs_env(qs_env, dft_control=dft_control)
557 cpassert(
ASSOCIATED(qs_env))
559 SELECT CASE (rtp_control%initial_wfn)
561 qs_env%sim_time = 0.0_dp
563 energy_consistency = .true.
565 IF (rtp_control%linear_scaling) energy_consistency = .false.
567 consistent_energies=energy_consistency)
568 qs_env%run_rtp = .true.
569 ALLOCATE (qs_env%rtp)
571 IF (dft_control%do_admm)
THEN
573 CALL rt_prop_create(qs_env%rtp, qs_env%mos, qs_env%mpools, dft_control, matrix_s(1)%matrix, &
574 rtp_control%linear_scaling, qs_env%admm_env%mos_aux_fit)
576 CALL rt_prop_create(qs_env%rtp, qs_env%mos, qs_env%mpools, dft_control, matrix_s(1)%matrix, &
577 rtp_control%linear_scaling)
582 IF (.NOT. rtp_control%linear_scaling .OR. rtp_control%initial_wfn ==
use_restart_wfn)
THEN
583 DO ispin = 1,
SIZE(qs_env%mos)
584 CALL get_mo_set(qs_env%mos(ispin), mo_coeff=mo_coeff, homo=homo)
585 IF (.NOT.
ASSOCIATED(mo_coeff))
THEN
587 qs_env%mpools%ao_mo_fm_pools(ispin)%pool, &
593 ALLOCATE (qs_env%rtp)
595 CALL rt_prop_create(qs_env%rtp, qs_env%mos, qs_env%mpools, dft_control, matrix_s(1)%matrix, &
596 rtp_control%linear_scaling, qs_env%admm_env%mos_aux_fit)
598 cpassert(
ASSOCIATED(qs_env))
600 qs_env%run_rtp = .true.
603 END SUBROUTINE rt_initial_guess
612 SUBROUTINE rt_init_complex_quantities(qs_env, imag_p, imag_ks, imag_h)
614 LOGICAL,
INTENT(in) :: imag_p, imag_ks, imag_h
621 NULLIFY (ks_env, rho, dft_control)
624 dft_control=dft_control, &
637 IF (.NOT. dft_control%rtp_control%fixed_ions)
THEN
645 END SUBROUTINE rt_init_complex_quantities
652 SUBROUTINE rt_init_local_moments(rtp, qs_env)
656 INTEGER :: k, nspin, output_unit
657 REAL(kind=
dp),
DIMENSION(3) :: reference_point
659 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_s, rho_old
667 CALL get_qs_env(qs_env, dft_control=dft_control, matrix_s=matrix_s, input=input)
668 rtc => dft_control%rtp_control
670 "DFT%REAL_TIME_PROPAGATION%PRINT%MOMENTS")
678 NULLIFY (rtp%local_moments)
679 ALLOCATE (rtp%local_moments(3))
681 NULLIFY (rtp%local_moments(k)%matrix)
682 ALLOCATE (rtp%local_moments(k)%matrix)
683 CALL dbcsr_create(rtp%local_moments(k)%matrix, template=matrix_s(1)%matrix, name=
"Local moment")
684 CALL dbcsr_copy(rtp%local_moments(k)%matrix, matrix_s(1)%matrix)
685 CALL dbcsr_set(rtp%local_moments(k)%matrix, 0.0_dp)
688 NULLIFY (rtp%local_moments_work)
689 ALLOCATE (rtp%local_moments_work)
690 CALL dbcsr_create(rtp%local_moments_work, template=rtp%local_moments(1)%matrix, name=
"tmp")
691 CALL dbcsr_copy(rtp%local_moments_work, rtp%local_moments(1)%matrix)
694 reference=rtc%moment_trace_ref_type, ref_point=rtc%moment_trace_user_ref_point)
699 CALL get_rtp(rtp, rho_old=rho_old)
700 nspin =
SIZE(rho_old)/2
701 ALLOCATE (rtp%moments(
SIZE(rho_old)/2, 3, rtp%nsteps + 1), source=cmplx(0.0, 0.0, kind=
dp))
703 ALLOCATE (rtp%times(rtp%nsteps + 1))
705 ALLOCATE (rtp%fields(3, rtp%nsteps + 1), source=cmplx(0.0, 0.0, kind=
dp))
707 END SUBROUTINE rt_init_local_moments
713 SUBROUTINE final_ft_output(qs_env)
716 INTEGER :: k, unit_nr
723 CALL get_qs_env(qs_env, cell=cell, rtp=rtp, input=input, dft_control=dft_control)
727 CALL print_ft(rtp_section, rtp%moments, rtp%times, rtp%fields, dft_control%rtp_control, &
728 info_opt=unit_nr, cell=cell)
732 DEALLOCATE (rtp%local_moments(k)%matrix)
734 DEALLOCATE (rtp%local_moments)
736 DEALLOCATE (rtp%local_moments_work)
737 DEALLOCATE (rtp%moments)
738 DEALLOCATE (rtp%times)
739 DEALLOCATE (rtp%fields)
740 END SUBROUTINE final_ft_output
static GRID_HOST_DEVICE int modulo(int a, int m)
Equivalent of Fortran's MODULO, which always return a positive number. https://gcc....
collects all references to literature in CP2K as new algorithms / method are included from literature...
integer, save, public andermatt2016
Handles all functions related to the CELL.
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_release(matrix)
...
Routines to handle the external control of CP2K.
subroutine, public external_control(should_stop, flag, globenv, target_time, start_time, force_check)
External manipulations during a run : when the <PROJECT_NAME>.EXIT_$runtype command is sent the progr...
represent a full matrix distributed on many processors
subroutine, public cp_fm_set_all(matrix, alpha, beta)
set all elements of a matrix to the same value, and optionally the diagonal to a different one
various routines to log and control the output. The idea is that decisions about where to log should ...
recursive integer function, public cp_logger_get_default_unit_nr(logger, local, skip_not_ionode)
asks the default unit number of the given logger. try to use cp_logger_get_unit_nr
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
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
character(len=default_path_length) function, public cp_print_key_generate_filename(logger, print_key, middle_name, extension, my_local)
Utility function that returns a unit number to write the print key. Might open a file with a unique f...
integer, parameter, public cp_p_file
subroutine, public cp_iterate(iteration_info, last, iter_nr, increment, iter_nr_out)
adds one to the actual iteration
subroutine, public cp_rm_iter_level(iteration_info, level_name, n_rlevel_att)
Removes an iteration level.
integer function, public cp_print_key_should_output(iteration_info, basis_section, print_key_path, used_print_key, first_time)
returns what should be done with the given property if btest(res,cp_p_store) then the property should...
subroutine, public cp_add_iter_level(iteration_info, level_name, n_rlevel_new)
Adds an iteration level.
all routins needed for a nonperiodic electric field
subroutine, public calculate_ecore_efield(qs_env, calculate_forces)
Computes the force and the energy due to a efield on the cores Note: In the velocity gauge,...
Interface for the force calculations.
recursive subroutine, public force_env_calc_energy_force(force_env, calc_force, consistent_energies, skip_external_control, eval_energy_forces, require_consistent_energy_force, linres, calc_stress_tensor)
Interface routine for force and energy calculations.
Interface for the force calculations.
recursive subroutine, public force_env_get(force_env, in_use, fist_env, qs_env, meta_env, fp_env, subsys, para_env, potential_energy, additional_potential, kinetic_energy, harmonic_shell, kinetic_shell, cell, sub_force_env, qmmm_env, qmmmx_env, eip_env, pwdft_env, globenv, input, force_env_section, method_name_id, root_section, mixed_env, nnp_env, embed_env, ipi_env)
returns various attributes about the force environment
Define type storing the global information of a run. Keep the amount of stored data small....
Utilities for hfx and admm methods.
subroutine, public hfx_admm_init(qs_env, calculate_forces, ext_xc_section)
...
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_path_length
Machine interface based on Fortran 2003 and POSIX.
real(kind=dp) function, public m_walltime()
returns time from a real-time clock, protected against rolling early/easily
Calculates the moment integrals <a|r^m|b>
subroutine, public get_reference_point(rpoint, drpoint, qs_env, fist_env, reference, ref_point, ifirst, ilast)
...
container for various plainwaves related things
Calculation of the core Hamiltonian integral matrix <a|H|b> over Cartesian Gaussian-type functions.
subroutine, public qs_matrix_h_allocate_imag_from_real(qs_env)
(Re-)allocates matrix_h_im from matrix_h
Utility subroutine for qs energy calculation.
subroutine, public qs_energies_init(qs_env, calc_forces)
Refactoring of qs_energies_scf. Driver routine for the initial setup and calculations for a qs energy...
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.
Routines to handle an external electrostatic field The external field can be generic and is provided ...
subroutine, public external_c_potential(qs_env, calculate_forces)
Computes the force and the energy due to the external potential on the cores.
subroutine, public external_e_potential(qs_env)
Computes the external potential on the grid.
routines that build the Kohn-Sham matrix (i.e calculate the coulomb and xc parts
subroutine, public qs_ks_update_qs_env(qs_env, calculate_forces, just_energy, print_active)
updates the Kohn Sham matrix of the given qs_env (facility method)
subroutine, public qs_ks_allocate_basics(qs_env, is_complex)
Allocate ks_matrix if necessary, take current overlap matrix as template.
subroutine, public set_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, exc_accint, potential_changed, forces_up_to_date, complex_ks, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, kinetic, matrix_s, matrix_s_ri_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_vhxc, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_ri_aux_kp, matrix_ks_im_kp, vppl, xcint_weights, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, kpoints, sab_orb, sab_all, sac_ae, sac_ppl, sac_lri, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_pp, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, sab_cneo, task_list, task_list_soft, subsys, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env)
...
subroutine, public qs_ks_did_change(ks_env, s_mstruct_changed, rho_changed, potential_changed, full_reset)
tells that some of the things relevant to the ks calculation did change. has to be called when change...
Definition and initialisation of the mo data type.
subroutine, public wfn_restart_file_name(filename, exist, section, logger, kp, xas, rtp)
...
Definition and initialisation of the mo data type.
subroutine, public init_mo_set(mo_set, fm_pool, fm_ref, fm_struct, name, counter)
initializes an allocated mo_set. eigenvalues, mo_coeff, occupation_numbers are valid only after this ...
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)
Get the components of a MO set data structure.
Calculates the moment integrals <a|r^m|b> and <a|r x d/dr|b>
subroutine, public build_local_moment_matrix(qs_env, moments, nmoments, ref_point, ref_points, basis_type)
...
methods of the rho structure (defined in qs_rho_types)
subroutine, public allocate_rho_ao_imag_from_real(rho, qs_env)
(Re-)allocates rho_ao_im from real part rho_ao
superstucture that hold various representations of the density and keeps track of which ones are vali...
subroutine, public qs_rho_set(rho_struct, rho_ao, rho_ao_im, rho_ao_kp, rho_ao_im_kp, rho_r, drho_r, rho_g, drho_g, tau_r, tau_g, rho_r_valid, drho_r_valid, rho_g_valid, drho_g_valid, tau_r_valid, tau_g_valid, tot_rho_r, tot_rho_g, rho_r_sccs, soft_valid, complex_rho_ao)
...
Routines to apply a delta pulse for RTP and EMD.
subroutine, public apply_delta_pulse(qs_env, rtp, rtp_control)
Interface to call the delta pulse depending on the type of calculation.
Utility functions that are needed for RTP/EMD in combination with HF or hybrid functionals (needs to ...
subroutine, public rtp_hfx_rebuild(qs_env)
rebuilds the structures of P and KS (imaginary) in case S changed
Function related to MO projection in RTP calculations.
subroutine, public init_mo_projection(qs_env, rtp_control)
Initialize the mo projection objects for time dependent run.
Routines for propagating the orbitals.
subroutine, public rtp_localize(qs_env, rtp)
Computes Maximally localised Wannier functions and print properties according to FORCE_EVALDFTLOCALIZ...
subroutine, public propagation_step(qs_env, rtp, rtp_control)
performs a single propagation step a(t+Dt)=U(t+Dt,t)*a(0) and calculates the new exponential
Routine for the real time propagation output.
subroutine, public print_ft(rtp_section, moments, times, fields, rtc, info_opt, cell)
Calculate and print the Fourier transforms + polarizabilites from moment trace.
subroutine, public rt_prop_output(qs_env, run_type, delta_iter, used_time)
...
subroutine, public print_moments(moments_section, info_unit, moments, time, imag_opt, append_opt)
Print the dipole moments into a file.
subroutine, public calc_local_moment(moment_matrices, density_matrices, work, moment, imag_opt)
Calculate the values of real/imaginary parts of moments in all directions.
Types and set_get for real time propagation depending on runtype and diagonalization method different...
subroutine, public rt_prop_create(rtp, mos, mpools, dft_control, template, linear_scaling, mos_aux)
...
subroutine, public rtp_create_sinvh_imag(rtp, nspins)
Initialize SinvH_imag for rtp.
subroutine, public rtp_history_create(rtp, aspc_order)
...
subroutine, public get_rtp(rtp, exp_h_old, exp_h_new, h_last_iter, rho_old, rho_next, rho_new, mos, mos_new, mos_old, mos_next, s_inv, s_half, s_minus_half, b_mat, c_mat, propagator_matrix, mixing, mixing_factor, s_der, dt, nsteps, sinvh, sinvh_imag, sinvb, admm_mos)
...
subroutine, public calc_update_rho_sparse(qs_env)
Copies the density matrix back into the qs_envrhorho_ao.
subroutine, public recalculate_fields(fields, times, orig_start, i_start, dft_control)
Recalculates the field for index range given by orig_start and i_start, with times taken from the tim...
subroutine, public calc_s_derivs(qs_env)
Calculates dS/dR respectily the velocity weighted derivatves only needed for ehrenfest MD.
subroutine, public read_moments(moments_section, orig_start, current_start, moments, times, mom_read)
Attempt to read the moments from a previously written file.
subroutine, public calc_update_rho(qs_env)
calculates the density from the complex MOs and passes the density to qs_env.
subroutine, public warn_section_unused(section, subsection_name, error_message)
Warn about unused sections of the print section - only implemented for some of the methods.
subroutine, public get_restart_wfn(qs_env)
reads the restart file. At the moment only SCF (means only real)
Routines to perform the RTP in the velocity gauge.
subroutine, public velocity_gauge_ks_matrix(qs_env, subtract_nl_term)
...
Routines for the real time propagation.
subroutine, public rt_prop_setup(force_env)
creates rtp_type, gets the initial state, either by reading MO's from file or calling SCF run
Routines for that prepare rtp and EMD.
subroutine, public init_propagators(qs_env)
prepares the initial matrices for the propagators
subroutine, public rt_initialize_rho_from_mos(rtp, mos, mos_old)
Computes the density matrix from the mos Update: Initialized the density matrix from complex mos (for...
Type defining parameters related to the simulation cell.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
wrapper to abstract the force evaluation of the various methods
contains the initially parsed file and the initial parallel environment
contained for different pw related things
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...
keeps the density in various representations, keeping track of which ones are valid.