102#include "../base/base_uses.f90"
118 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'rt_propagation_utils'
135 CHARACTER(LEN=*),
PARAMETER :: routinen =
'calc_S_derivs'
136 REAL(kind=
dp),
PARAMETER ::
one = 1.0_dp,
zero = 0.0_dp
138 INTEGER :: col_atom, handle, i, j, m, maxder, n, &
140 INTEGER,
DIMENSION(6, 2) :: c_map_mat
141 LOGICAL :: return_s_derivatives
142 REAL(
dp),
DIMENSION(:, :),
POINTER :: block_values
144 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: c_mat, s_der, s_derivs
145 TYPE(
dbcsr_type),
POINTER :: b_mat, tmp_mat, tmp_mat2
153 CALL timeset(routinen, handle)
155 return_s_derivatives = .true.
157 NULLIFY (particle_set)
160 NULLIFY (dft_control)
165 particle_set=particle_set, &
167 dft_control=dft_control, &
170 CALL get_rtp(rtp=rtp, b_mat=b_mat, c_mat=c_mat, s_der=s_der)
177 CALL dbcsr_create(tmp_mat, template=s_der(1)%matrix, matrix_type=
"N")
179 IF (rtp%iter < 2)
THEN
181 IF (dft_control%qs_control%dftb)
THEN
185 basis_type_a=
"ORB", basis_type_b=
"ORB", sab_nl=sab_orb)
190 CALL dbcsr_create(tmp_mat2, template=s_der(1)%matrix, matrix_type=
"S")
192 CALL dbcsr_copy(tmp_mat2, s_derivs(m + 1)%matrix)
200 IF (row_atom == col_atom) block_values = 0.0_dp
216 IF (row_atom == col_atom) block_values = 0.0_dp
217 block_values = block_values*particle_set(col_atom)%v(m)
242 IF (c_map_mat(m, j) == 0) cycle
251 block_values = block_values*particle_set(row_atom)%v(m)
258 CALL timestop(handle)
270 CHARACTER(LEN=default_path_length) :: file_name, project_name
271 INTEGER :: i, id_nr, im, ispin, ncol, nspin, &
272 output_unit, re, unit_nr
273 REAL(kind=
dp) :: alpha, cs_pos
276 TYPE(
cp_fm_type),
DIMENSION(:),
POINTER :: mos_old
279 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: p_rmpv, rho_new, rho_old
281 TYPE(
mo_set_type),
DIMENSION(:),
POINTER :: mo_array
284 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
289 NULLIFY (atomic_kind_set, qs_kind_set, mo_array, particle_set, rho_struct, para_env)
292 qs_kind_set=qs_kind_set, &
293 atomic_kind_set=atomic_kind_set, &
294 particle_set=particle_set, &
298 dft_control=dft_control, &
304 IF (logger%para_env%is_source())
THEN
311 nspin =
SIZE(mo_array)
314 SELECT CASE (dft_control%rtp_control%initial_wfn)
317 id_nr=id_nr, multiplicity=dft_control%multiplicity, &
318 dft_section=dft_section)
319 CALL set_uniform_occupation_mo_array(mo_array, nspin)
321 IF (dft_control%rtp_control%apply_wfn_mix_init_restart)
THEN
322 CALL wfn_mix(mo_array, particle_set, dft_section, qs_kind_set, para_env, output_unit, &
329 IF (rtp%linear_scaling)
THEN
330 CALL get_rtp(rtp=rtp, rho_old=rho_old, rho_new=rho_new)
336 matrix_struct=mo_array(ispin)%mo_coeff%matrix_struct, &
338 CALL cp_fm_to_fm(mo_array(ispin)%mo_coeff, mos_occ)
339 IF (mo_array(ispin)%uniform_occupation)
THEN
340 alpha = 3.0_dp - real(nspin,
dp)
345 alpha=alpha, keep_sparsity=.false.)
350 matrix_v=mo_array(ispin)%mo_coeff, &
353 alpha=alpha, keep_sparsity=.false.)
356 CALL dbcsr_copy(rho_new(re)%matrix, rho_old(re)%matrix)
361 CALL get_rtp(rtp=rtp, mos_old=mos_old)
362 DO i = 1,
SIZE(qs_env%mos)
363 CALL cp_fm_to_fm(mo_array(i)%mo_coeff, mos_old(2*i - 1))
368 IF (rtp%linear_scaling)
THEN
369 CALL get_rtp(rtp=rtp, rho_old=rho_old, rho_new=rho_new)
370 project_name = logger%iter_info%project_name
374 WRITE (file_name,
'(A,I0,A)') trim(project_name)//
"_LS_DM_SPIN_RE", ispin,
"_RESTART.dm"
376 CALL dbcsr_binary_read(file_name, distribution=dist, matrix_new=rho_old(re)%matrix)
378 IF (unit_nr > 0)
THEN
379 WRITE (unit_nr,
'(T2,A,E20.8)')
"Read restart DM "//trim(file_name)//
" with checksum: ", cs_pos
381 WRITE (file_name,
'(A,I0,A)') trim(project_name)//
"_LS_DM_SPIN_IM", ispin,
"_RESTART.dm"
383 CALL dbcsr_binary_read(file_name, distribution=dist, matrix_new=rho_old(im)%matrix)
385 IF (unit_nr > 0)
THEN
386 WRITE (unit_nr,
'(T2,A,E20.8)')
"Read restart DM "//trim(file_name)//
" with checksum: ", cs_pos
389 DO i = 1,
SIZE(rho_new)
390 CALL dbcsr_copy(rho_new(i)%matrix, rho_old(i)%matrix)
394 CALL get_rtp(rtp=rtp, mos_old=mos_old)
396 id_nr, dft_control%multiplicity, dft_section)
397 CALL set_uniform_occupation_mo_array(mo_array, nspin)
400 p_rmpv(ispin)%matrix)
414 SUBROUTINE set_uniform_occupation_mo_array(mo_array, nspin)
416 TYPE(
mo_set_type),
DIMENSION(:),
POINTER :: mo_array
420 LOGICAL :: is_uniform
424 DO mo = 1, mo_array(ispin)%nmo
425 IF (mo_array(ispin)%occupation_numbers(mo) /= 0.0 .AND. &
426 mo_array(ispin)%occupation_numbers(mo) /= 1.0 .AND. &
427 mo_array(ispin)%occupation_numbers(mo) /= 2.0)
THEN
431 mo_array(ispin)%uniform_occupation = is_uniform
434 END SUBROUTINE set_uniform_occupation_mo_array
447 CHARACTER(len=*),
PARAMETER :: routinen =
'calc_update_rho'
448 REAL(kind=
dp),
PARAMETER ::
one = 1.0_dp,
zero = 0.0_dp
450 INTEGER :: handle, i, im, ncol, re
451 REAL(kind=
dp) :: alpha
453 TYPE(
cp_fm_type),
DIMENSION(:),
POINTER :: mos_new
454 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: rho_ao, rho_ao_im
460 CALL timeset(routinen, handle)
462 NULLIFY (rho, ks_env, mos_new, rtp)
468 CALL get_rtp(rtp=rtp, mos_new=mos_new)
469 CALL qs_rho_get(rho_struct=rho, rho_ao=rho_ao)
470 DO i = 1,
SIZE(mos_new)/2
471 re = 2*i - 1; im = 2*i
475 matrix_struct=mos(i)%mo_coeff%matrix_struct, &
478 IF (mos(i)%uniform_occupation)
THEN
479 alpha = 3*
one - real(
SIZE(mos_new)/2,
dp)
489 matrix_v=mos_new(re), &
497 IF (mos(i)%uniform_occupation)
THEN
498 alpha = 3*
one - real(
SIZE(mos_new)/2,
dp)
508 matrix_v=mos_new(im), &
517 IF (rtp%track_imag_density)
THEN
518 CALL qs_rho_get(rho_struct=rho, rho_ao_im=rho_ao_im)
525 CALL timestop(handle)
539 CHARACTER(len=*),
PARAMETER :: routinen =
'calc_update_rho_sparse'
540 REAL(kind=
dp),
PARAMETER ::
zero = 0.0_dp
542 INTEGER :: handle, ispin
543 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: rho_ao, rho_ao_im, rho_new
550 NULLIFY (rho, ks_env, rtp, dft_control)
551 CALL timeset(routinen, handle)
556 dft_control=dft_control)
557 rtp_control => dft_control%rtp_control
558 CALL get_rtp(rtp=rtp, rho_new=rho_new)
559 CALL qs_rho_get(rho_struct=rho, rho_ao=rho_ao)
560 IF (rtp%track_imag_density)
CALL qs_rho_get(rho_struct=rho, rho_ao_im=rho_ao_im)
561 DO ispin = 1,
SIZE(rho_ao)
563 CALL dbcsr_copy(rho_ao(ispin)%matrix, rho_new(ispin*2 - 1)%matrix, keep_sparsity=.true.)
564 IF (rtp%track_imag_density)
THEN
565 CALL dbcsr_copy(rho_ao_im(ispin)%matrix, rho_new(ispin*2)%matrix, keep_sparsity=.true.)
572 CALL timestop(handle)
586 TYPE(
dbcsr_p_type),
DIMENSION(:),
POINTER :: matrix_p_im
587 LOGICAL,
OPTIONAL :: keep_sparsity
589 INTEGER :: i, im, ncol, re
590 LOGICAL :: my_keep_sparsity
591 REAL(kind=
dp) :: alpha
592 TYPE(
cp_fm_type),
DIMENSION(:),
POINTER :: mos_new, mos_occ
595 CALL get_rtp(rtp=rtp, mos_new=mos_new)
597 my_keep_sparsity = .false.
598 IF (
PRESENT(keep_sparsity)) my_keep_sparsity = keep_sparsity
600 ALLOCATE (mos_occ(
SIZE(mos)*2))
602 DO i = 1,
SIZE(mos_new)/2
603 re = 2*i - 1; im = 2*i
604 alpha = 3.0_dp - real(
SIZE(matrix_p_im),
dp)
606 matrix_struct=mos(i)%mo_coeff%matrix_struct, &
609 matrix_struct=mos(i)%mo_coeff%matrix_struct, &
611 CALL dbcsr_set(matrix_p_im(i)%matrix, 0.0_dp)
618 matrix_v=mos_occ(im), &
619 matrix_g=mos_occ(re), &
621 keep_sparsity=my_keep_sparsity, &
622 alpha=2.0_dp*alpha, &
638 CHARACTER(len=*),
PARAMETER :: routinen =
'write_rtp_mos_to_output_unit'
640 CHARACTER(LEN=10) :: spin
641 CHARACTER(LEN=2*default_string_length) :: name
642 INTEGER :: handle, i, ispin, nao, nelectron, nmo, &
644 LOGICAL :: print_eigvecs, print_mo_info
645 REAL(kind=
dp) :: flexible_electron_count, maxocc, n_el_f
647 TYPE(
cp_fm_type),
DIMENSION(:),
POINTER :: mos_new
652 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
655 NULLIFY (atomic_kind_set, particle_set, qs_kind_set, input, mos, dft_section)
657 CALL timeset(routinen, handle)
660 atomic_kind_set=atomic_kind_set, &
661 qs_kind_set=qs_kind_set, &
662 particle_set=particle_set, &
672 dft_section,
"PRINT%MO") /= 0) .OR. &
673 (qs_env%sim_step == 1)
675 IF ((.NOT. print_mo_info) .OR. (.NOT. print_eigvecs))
THEN
676 CALL timestop(handle)
680 CALL get_rtp(rtp=rtp, mos_new=mos_new)
682 nspins =
SIZE(mos_new)/2
686 CALL get_mo_set(mo_set=mos(ispin), nao=nao, nmo=nmo, nelectron=nelectron, &
687 n_el_f=n_el_f, maxocc=maxocc, flexible_electron_count=flexible_electron_count)
692 nelectron=nelectron, &
695 flexible_electron_count=flexible_electron_count)
697 WRITE (name, fmt=
"(A,I6)")
"RTP MO SET, SPIN ", ispin
698 CALL init_mo_set(mo_set_rtp, fm_ref=mos_new(2*ispin - 1), name=name)
710 mo_set_rtp%occupation_numbers = mos(ispin)%occupation_numbers
714 CALL cp_fm_to_fm(mos_new(2*ispin - i), mo_set_rtp%mo_coeff)
716 dft_section, 4, 0, rtp=.true., spin=trim(spin), &
717 cpart=mod(i, 2), sim_step=qs_env%sim_step)
723 CALL timestop(handle)
738 CHARACTER(LEN=*),
PARAMETER :: routinen =
'write_rtp_mo_cubes'
740 CHARACTER(LEN=default_path_length) :: filename, my_pos_cube, title
741 INTEGER :: handle, homo, i, ir, ispin, ivector, &
742 n_rep, nhomo, nlist, nspins, &
743 rt_time_step, unit_nr
744 INTEGER,
DIMENSION(:),
POINTER ::
list, list_index
745 LOGICAL :: append_cube, do_kpoints, mpi_io
749 TYPE(
cp_fm_type),
DIMENSION(:),
POINTER :: mos_new
762 TYPE(
qs_kind_type),
DIMENSION(:),
POINTER :: qs_kind_set
766 CALL timeset(routinen, handle)
768 NULLIFY (logger, auxbas_pw_pool, pw_pools, pw_env)
771 CALL get_qs_env(qs_env, do_kpoints=do_kpoints, &
776 cpabort(
"K points not handled yet for printing MO_CUBE")
785 CALL timestop(handle)
789 CALL get_qs_env(qs_env, atomic_kind_set=atomic_kind_set, &
791 blacs_env=blacs_env, &
792 qs_kind_set=qs_kind_set, &
796 particle_set=particle_set, &
797 dft_control=dft_control)
800 nspins = dft_control%nspins
801 rt_time_step = qs_env%sim_step
804 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool, &
806 CALL auxbas_pw_pool%create_pw(wf_r)
807 CALL auxbas_pw_pool%create_pw(wf_g)
808 CALL auxbas_pw_pool%create_pw(density_r)
809 CALL get_rtp(rtp=rtp, mos_new=mos_new)
816 my_pos_cube =
"REWIND"
817 IF (append_cube)
THEN
818 my_pos_cube =
"APPEND"
827 IF (
ASSOCIATED(
list))
THEN
830 list_index(i + nlist) =
list(i)
832 nlist = nlist +
SIZE(
list)
837 IF (nhomo == -1) nhomo = homo
838 nlist = homo - max(1, homo - nhomo + 1) + 1
839 ALLOCATE (list_index(nlist))
841 list_index(i) = max(1, homo - nhomo + 1) + i - 1
845 ivector = list_index(i)
847 atomic_kind_set=atomic_kind_set, &
848 qs_kind_set=qs_kind_set, &
850 particle_set=particle_set, &
855 mo_coeff => mos_new(2*ispin - 1)
857 cell, dft_control, particle_set, pw_env)
861 mo_coeff => mos_new(2*ispin)
863 cell, dft_control, particle_set, pw_env)
867 WRITE (filename,
'(a4,I5.5,a1,I1.1)')
"WFN_", ivector,
"_", ispin
870 middle_name=trim(filename), file_position=my_pos_cube, log_filename=.false., &
872 WRITE (title, *)
"DENSITY ", ivector,
" spin ", ispin,
" i.e. HOMO - ", ivector - homo
873 CALL cp_pw_to_cube(density_r, unit_nr, title, particles=particles, &
877 IF (
ASSOCIATED(list_index))
DEALLOCATE (list_index)
881 CALL auxbas_pw_pool%give_back_pw(wf_r)
882 CALL auxbas_pw_pool%give_back_pw(wf_g)
883 CALL auxbas_pw_pool%give_back_pw(density_r)
885 CALL timestop(handle)
898 CHARACTER(len=*) :: subsection_name, error_message
905 IF (explicit) cpwarn(error_message)
917 SUBROUTINE read_moments(moments_section, orig_start, current_start, moments, times, mom_read)
919 INTEGER :: orig_start, current_start
920 COMPLEX(kind=dp),
DIMENSION(:, :, :),
POINTER :: moments
921 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: times
922 LOGICAL,
OPTIONAL :: mom_read
924 CHARACTER(len=14),
DIMENSION(4) :: file_extensions
925 CHARACTER(len=default_path_length) :: save_name_im, save_name_re
926 INTEGER :: i, k, max_n, n, n_spin, unit_im, unit_re
927 REAL(kind=
dp) :: time
928 REAL(kind=
dp),
DIMENSION(3) :: moments_im, moments_re
933 file_extensions(1) =
"_SPIN_A_RE.dat"
934 file_extensions(2) =
"_SPIN_A_IM.dat"
935 file_extensions(3) =
"_SPIN_B_RE.dat"
936 file_extensions(4) =
"_SPIN_B_IM.dat"
938 IF (
PRESENT(mom_read)) mom_read = .false.
940 n_spin =
SIZE(moments, 1)
943 max_n = current_start - orig_start + 1
948 extension=file_extensions(2*i - 1), my_local=.false.)
950 extension=file_extensions(2*i), my_local=.false.)
952 CALL open_file(save_name_re, file_status=
"OLD", file_form=
"FORMATTED", file_action=
"READ", &
954 CALL open_file(save_name_im, file_status=
"OLD", file_form=
"FORMATTED", file_action=
"READ", &
961 READ (unit_re,
'(E20.8E3,E20.8E3,E20.8E3,E20.8E3,E20.8E3)') time, &
962 moments_re(1), moments_re(2), moments_re(3)
963 READ (unit_im,
'(E20.8E3,E20.8E3,E20.8E3,E20.8E3,E20.8E3)') time, &
964 moments_im(1), moments_im(2), moments_im(3)
966 moments(i, k, n) = cmplx(moments_re(k), moments_im(k), kind=
dp)
968 IF (
PRESENT(times))
THEN
972 IF (
PRESENT(mom_read)) mom_read = .true.
976 moments(i, :, 1:max_n) = cmplx(0.0, 0.0, kind=
dp)
977 cpwarn(
"Could not read at least one moments file - missing trace is set to zero.")
994 COMPLEX(kind=dp),
DIMENSION(:, :),
POINTER :: fields
995 REAL(kind=
dp),
DIMENSION(:),
POINTER :: times
996 INTEGER :: orig_start, i_start
1000 REAL(kind=
dp),
DIMENSION(3) :: field
1002 max_n = i_start - orig_start + 1
1004 IF (dft_control%rtp_control%apply_delta_pulse .OR. &
1005 dft_control%rtp_control%apply_delta_pulse_mag)
THEN
1006 fields(:, 1:max_n) = 0.0_dp
1009 CALL make_field(dft_control, field, i + orig_start - 1, times(i))
1010 fields(:, i) = field(:)
Define the atomic kind types and their sub types.
Handles all functions related to the CELL.
methods related to the blacs parallel environment
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_scale(matrix, alpha_scalar)
...
subroutine, public dbcsr_deallocate_matrix(matrix)
...
logical function, public dbcsr_iterator_blocks_left(iterator)
...
subroutine, public dbcsr_iterator_stop(iterator)
...
subroutine, public dbcsr_desymmetrize(matrix_a, matrix_b)
...
subroutine, public dbcsr_copy(matrix_b, matrix_a, name, keep_sparsity, keep_imaginary)
...
subroutine, public dbcsr_get_info(matrix, nblkrows_total, nblkcols_total, nfullrows_total, nfullcols_total, nblkrows_local, nblkcols_local, nfullrows_local, nfullcols_local, my_prow, my_pcol, local_rows, local_cols, proc_row_dist, proc_col_dist, row_blk_size, col_blk_size, row_blk_offset, col_blk_offset, distribution, name, matrix_type, group)
...
subroutine, public dbcsr_iterator_next_block(iterator, row, column, block, block_number_argument_has_been_removed, row_size, col_size, row_offset, col_offset, transposed)
...
subroutine, public dbcsr_filter(matrix, eps)
...
subroutine, public dbcsr_iterator_start(iterator, matrix, shared, dynamic, dynamic_byrows)
...
subroutine, public dbcsr_set(matrix, alpha)
...
subroutine, public dbcsr_binary_read(filepath, distribution, matrix_new)
...
subroutine, public dbcsr_add(matrix_a, matrix_b, alpha_scalar, beta_scalar)
...
real(kind=dp) function, public dbcsr_checksum(matrix, pos)
Calculates the checksum of a DBCSR matrix.
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_plus_fm_fm_t(sparse_matrix, matrix_v, matrix_g, ncol, alpha, keep_sparsity, symmetry_mode)
performs the multiplication sparse_matrix+dense_mat*dens_mat^T if matrix_g is not explicitly given,...
Utility routines to open and close files. Tracking of preconnections.
subroutine, public open_file(file_name, file_status, file_form, file_action, file_position, file_pad, unit_number, debug, skip_get_unit_number, file_access)
Opens the requested file using a free unit number.
subroutine, public close_file(unit_number, file_status, keep_preconnection)
Close an open file given by its logical unit number. Optionally, keep the file and unit preconnected.
logical function, public file_exists(file_name)
Checks if file exists, considering also the file discovery mechanism.
Basic linear algebra operations for full matrices.
subroutine, public cp_fm_column_scale(matrixa, scaling)
scales column i of matrix a with scaling(i)
represent a full matrix distributed on many processors
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_set_all(matrix, alpha, beta)
set all elements of a matrix to the same value, and optionally the diagonal to a different one
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 ...
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...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
integer, parameter, public cp_p_file
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...
A wrapper around pw_to_cube() which accepts particle_list_type.
subroutine, public cp_pw_to_cube(pw, unit_nr, title, particles, zeff, stride, max_file_size_mb, zero_tails, silent, mpi_io)
...
all routins needed for a nonperiodic electric field
subroutine, public make_field(dft_control, field, sim_step, sim_time)
computes the amplitude of the efield within a given envelop
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
An array-based list which grows on demand. When the internal array is full, a new array of twice the ...
Definition of mathematical constants and functions.
real(kind=dp), parameter, public one
real(kind=dp), parameter, public zero
Utility routines for the memory handling.
Interface to the message passing library MPI.
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset
represent a simple array based list of the given type
Define the data structure for the particle information.
Definition of physical constants:
real(kind=dp), parameter, public femtoseconds
container for various plainwaves related things
subroutine, public pw_env_get(pw_env, pw_pools, cube_info, gridlevel_info, auxbas_pw_pool, auxbas_grid, auxbas_rs_desc, auxbas_rs_grid, rs_descs, rs_grids, xc_pw_pool, vdw_pw_pool, poisson_env, interp_section)
returns the various attributes of the pw env
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
Calculate the plane wave density by collocating the primitive Gaussian functions (pgf).
subroutine, public calculate_wavefunction(mo_vectors, ivector, rho, rho_gspace, atomic_kind_set, qs_kind_set, cell, dft_control, particle_set, pw_env, basis_type)
maps a given wavefunction on the grid
collects routines that calculate density matrices
Calculation of Overlap and Hamiltonian matrices in DFTB.
subroutine, public build_dftb_overlap(qs_env, nderivative, matrix_s)
...
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.
Define the quickstep kind type and their sub types.
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 read_mo_set_from_restart(mo_array, qs_kind_set, particle_set, para_env, id_nr, multiplicity, dft_section, natom_mismatch, cdft, out_unit)
...
subroutine, public read_rt_mos_from_restart(mo_array, rt_mos, qs_kind_set, particle_set, para_env, id_nr, multiplicity, dft_section)
...
subroutine, public write_mo_set_to_output_unit(mo_set, qs_kind_set, particle_set, dft_section, before, kpoint, final_mos, spin, solver_method, rtp, cpart, sim_step, umo_set, qs_env)
Write MO information to output file (eigenvalues, occupation numbers, coefficients)
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 allocate_mo_set(mo_set, nao, nmo, nelectron, n_el_f, maxocc, flexible_electron_count)
Allocates a mo set and partially initializes it (nao,nmo,nelectron, and flexible_electron_count are v...
subroutine, public deallocate_mo_set(mo_set)
Deallocate a wavefunction data structure.
subroutine, public get_mo_set(mo_set, maxocc, homo, lfomo, nao, nelectron, n_el_f, nmo, eigenvalues, occupation_numbers, mo_coeff, mo_coeff_b, uniform_occupation, kts, mu, flexible_electron_count)
Get the components of a MO set data structure.
Define the neighbor list data types and the corresponding functionality.
Calculation of overlap matrix, its derivatives and forces.
subroutine, public build_overlap_matrix(ks_env, matrix_s, matrixkp_s, matrix_name, nderivative, basis_type_a, basis_type_b, sab_nl, calculate_forces, matrix_p, matrixkp_p, ext_kpoints)
Calculation of the overlap matrix over Cartesian Gaussian functions.
methods of the rho structure (defined in qs_rho_types)
subroutine, public qs_rho_update_rho(rho_struct, qs_env, rho_xc_external, local_rho_set, task_list_external, task_list_external_soft, pw_env_external, para_env_external)
updates rho_r and rho_g to the rhorho_ao. if use_kinetic_energy_density also computes tau_r and tau_g...
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)
...
subroutine, public qs_rho_get(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)
returns info about the density described by this object. If some representation is not available an e...
Does all kind of post scf calculations for GPW/GAPW.
subroutine, public wfn_mix(mos, particle_set, dft_section, qs_kind_set, para_env, output_unit, unoccupied_orbs, scf_env, matrix_s, marked_states, for_rtp)
writes a new 'mixed' set of mos to restart file, without touching the current MOs
types that represent a quickstep subsys
subroutine, public qs_subsys_get(subsys, atomic_kinds, atomic_kind_set, particles, particle_set, local_particles, molecules, molecule_set, molecule_kinds, molecule_kind_set, local_molecules, para_env, colvar_p, shell_particles, core_particles, gci, multipoles, natom, nparticle, ncore, nshell, nkind, atprop, virial, results, cell, cell_ref, use_ref_cell, energy, force, qs_kind_set, cp_subsys, nelectron_total, nelectron_spin)
...
Types and set_get for real time propagation depending on runtype and diagonalization method different...
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 write_rtp_mos_to_output_unit(qs_env, rtp)
...
subroutine, public write_rtp_mo_cubes(qs_env, rtp)
Write the time dependent amplitude of the MOs in real grid. Very close to qs_scf_post_gpw/qs_scf_post...
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 calculate_p_imaginary(qs_env, rtp, matrix_p_im, keep_sparsity)
...
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)
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
represent a blacs multidimensional parallel environment (for the mpi corrispective see cp_paratypes/m...
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
represent a list of objects
contained for different pw related things
to create arrays of pools
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
Provides all information about a quickstep kind.
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.