tdhf_energy Subroutine

public subroutine tdhf_energy(infos)

Uses

  • proc~~tdhf_energy~~UsesGraph proc~tdhf_energy tdhf_energy module~basis_tools basis_tools proc~tdhf_energy->module~basis_tools module~dft dft proc~tdhf_energy->module~dft module~int2_compute int2_compute proc~tdhf_energy->module~int2_compute module~io_constants io_constants proc~tdhf_energy->module~io_constants module~mathlib mathlib proc~tdhf_energy->module~mathlib module~messages messages proc~tdhf_energy->module~messages module~mod_dft_gridint_fxc mod_dft_gridint_fxc proc~tdhf_energy->module~mod_dft_gridint_fxc module~mod_dft_molgrid mod_dft_molgrid proc~tdhf_energy->module~mod_dft_molgrid module~oqp_tagarray_driver oqp_tagarray_driver proc~tdhf_energy->module~oqp_tagarray_driver module~precision precision proc~tdhf_energy->module~precision module~printing printing proc~tdhf_energy->module~printing module~strings strings proc~tdhf_energy->module~strings module~tdhf_lib tdhf_lib proc~tdhf_energy->module~tdhf_lib module~types types proc~tdhf_energy->module~types module~util util proc~tdhf_energy->module~util module~basis_tools->module~io_constants module~basis_tools->module~precision iso_fortran_env iso_fortran_env module~basis_tools->iso_fortran_env module~atomic_structure_m atomic_structure_m module~basis_tools->module~atomic_structure_m module~constants constants module~basis_tools->module~constants module~parallel parallel module~basis_tools->module~parallel module~dft->module~basis_tools module~dft->module~io_constants module~dft->module~messages module~dft->module~mod_dft_molgrid module~dft->module~precision module~int2_compute->module~basis_tools module~int2_compute->module~messages module~int2_compute->module~precision module~int2_compute->module~atomic_structure_m module~int2_pairs int2_pairs module~int2_compute->module~int2_pairs module~int2e_libint int2e_libint module~int2_compute->module~int2e_libint module~int2e_rys int2e_rys module~int2_compute->module~int2e_rys module~int2_compute->module~parallel module~mathlib->module~precision module~oqp_linalg oqp_linalg module~mathlib->module~oqp_linalg module~messages->module~io_constants module~messages->module~precision comm_IOFILE comm_IOFILE module~messages->comm_IOFILE comm_PAR comm_PAR module~messages->comm_PAR module~mod_dft_gridint_fxc->module~precision module~mod_dft_gridint mod_dft_gridint module~mod_dft_gridint_fxc->module~mod_dft_gridint module~mod_dft_gridint_fxc->module~oqp_linalg module~mod_dft_molgrid->module~precision module~bragg_slater_radii bragg_slater_radii module~mod_dft_molgrid->module~bragg_slater_radii module~lebedev lebedev module~mod_dft_molgrid->module~lebedev module~mod_grid_storage mod_grid_storage module~mod_dft_molgrid->module~mod_grid_storage iso_c_binding iso_c_binding module~oqp_tagarray_driver->iso_c_binding tagarray tagarray module~oqp_tagarray_driver->tagarray module~precision->iso_fortran_env module~printing->module~precision module~strings->iso_c_binding module~tdhf_lib->module~basis_tools module~tdhf_lib->module~int2_compute module~tdhf_lib->module~precision module~tdhf_lib->module~oqp_linalg module~types->module~basis_tools module~types->module~precision module~types->iso_c_binding module~types->module~atomic_structure_m module~functionals functionals module~types->module~functionals module~types->module~parallel module~types->tagarray module~util->module~precision module~atomic_structure_m->iso_c_binding module~bragg_slater_radii->module~precision module~constants->module~precision module~functionals->module~precision module~functionals->iso_c_binding xc_f03_lib_m xc_f03_lib_m module~functionals->xc_f03_lib_m module~int2_pairs->module~precision module~int2e_libint->module~precision module~int2e_libint->iso_c_binding module~int2e_libint->module~constants module~int2e_libint->module~int2_pairs module~libint_f libint_f module~int2e_libint->module~libint_f module~int2e_rys->module~basis_tools module~int2e_rys->module~precision module~int2e_rys->module~constants module~lebedev->module~precision module~mod_dft_gridint->module~basis_tools module~mod_dft_gridint->module~io_constants module~mod_dft_gridint->module~mod_dft_molgrid module~mod_dft_gridint->module~precision module~mod_dft_gridint->module~functionals module~mod_dft_gridint->module~oqp_linalg module~mod_dft_gridint->module~parallel module~mod_dft_xc_libxc mod_dft_xc_libxc module~mod_dft_gridint->module~mod_dft_xc_libxc module~mod_grid_storage->module~precision module~blas_wrap blas_wrap module~oqp_linalg->module~blas_wrap module~lapack_wrap lapack_wrap module~oqp_linalg->module~lapack_wrap module~parallel->module~precision module~parallel->iso_c_binding module~parallel->iso_fortran_env mpi mpi module~parallel->mpi module~blas_wrap->module~messages module~blas_wrap->module~precision module~mathlib_types mathlib_types module~blas_wrap->module~mathlib_types module~lapack_wrap->module~messages module~lapack_wrap->module~precision module~lapack_wrap->module~mathlib_types module~libint_f->iso_c_binding module~mod_dft_xc_libxc->module~precision module~mod_dft_xclib mod_dft_xclib module~mod_dft_xc_libxc->module~mod_dft_xclib module~mod_dft_xclib->module~precision module~mod_dft_xclib->module~functionals

Arguments

Type IntentOptional Attributes Name
type(information), intent(inout), target :: infos

Calls

proc~~tdhf_energy~~CallsGraph proc~tdhf_energy tdhf_energy interface~data_has_tags data_has_tags proc~tdhf_energy->interface~data_has_tags interface~show_message show_message proc~tdhf_energy->interface~show_message interface~tagarray_get_data tagarray_get_data proc~tdhf_energy->interface~tagarray_get_data none~clean~18 int2_compute_t%clean proc~tdhf_energy->none~clean~18 none~init~16 int2_compute_t%init proc~tdhf_energy->none~init~16 none~run~6 int2_compute_t%run proc~tdhf_energy->none~run~6 none~set_screening~2 int2_compute_t%set_screening proc~tdhf_energy->none~set_screening~2 proc~dft_initialize dft_initialize proc~tdhf_energy->proc~dft_initialize proc~dftclean dftclean proc~tdhf_energy->proc~dftclean proc~esum esum proc~tdhf_energy->proc~esum proc~get_td_transition_dipole get_td_transition_dipole proc~tdhf_energy->proc~get_td_transition_dipole proc~iatogen iatogen proc~tdhf_energy->proc~iatogen proc~inivec inivec proc~tdhf_energy->proc~inivec proc~measure_time measure_time proc~tdhf_energy->proc~measure_time proc~mntoia mntoia proc~tdhf_energy->proc~mntoia proc~orthogonal_transform orthogonal_transform proc~tdhf_energy->proc~orthogonal_transform proc~print_module_info print_module_info proc~tdhf_energy->proc~print_module_info proc~rpaechk rpaechk proc~tdhf_energy->proc~rpaechk proc~rpaeig rpaeig proc~tdhf_energy->proc~rpaeig proc~rpaexpndv rpaexpndv proc~tdhf_energy->proc~rpaexpndv proc~rpanewb rpanewb proc~tdhf_energy->proc~rpanewb proc~rpaprint rpaprint proc~tdhf_energy->proc~rpaprint proc~rparedms rparedms proc~tdhf_energy->proc~rparedms proc~rparesvec rparesvec proc~tdhf_energy->proc~rparesvec proc~rpavnorm rpavnorm proc~tdhf_energy->proc~rpavnorm proc~symmetrize_matrix symmetrize_matrix proc~tdhf_energy->proc~symmetrize_matrix proc~td_print_results td_print_results proc~tdhf_energy->proc~td_print_results proc~tddft_fxc tddft_fxc proc~tdhf_energy->proc~tddft_fxc remove_records remove_records proc~tdhf_energy->remove_records reserve_data reserve_data proc~tdhf_energy->reserve_data none~clean~5 int2_pair_storage%clean none~clean~18->none~clean~5 none~alloc int2_pair_storage%alloc none~init~16->none~alloc none~compute int2_pair_storage%compute none~init~16->none~compute none~init_shell_centers basis_set%init_shell_centers none~init~16->none~init_shell_centers none~init~14 par_env_t%init none~init~16->none~init~14 none~set int2_cutoffs_t%set none~init~16->none~set proc~libint_static_init libint_static_init none~init~16->proc~libint_static_init none~run~6->interface~show_message none~run_cam int2_compute_t%run_cam none~run~6->none~run_cam none~run_generic int2_compute_t%run_generic none~run~6->none~run_generic proc~ints_exchange ints_exchange none~set_screening~2->proc~ints_exchange proc~dft_initialize->interface~show_message none~add_atomic_grid dft_grid_t%add_atomic_grid proc~dft_initialize->none~add_atomic_grid none~add_grid sorted_grid_t%add_grid proc~dft_initialize->none~add_grid none~compress dft_grid_t%compress proc~dft_initialize->none~compress none~find_neighbours dft_grid_t%find_neighbours proc~dft_initialize->none~find_neighbours none~reset dft_grid_t%reset proc~dft_initialize->none~reset none~set_screening basis_set%set_screening proc~dft_initialize->none~set_screening proc~c_f_char c_f_char proc~dft_initialize->proc~c_f_char proc~dft_fc_blk dft_fc_blk proc~dft_initialize->proc~dft_fc_blk proc~get_radial_grid get_radial_grid proc~dft_initialize->proc~get_radial_grid proc~libxc_input libxc_input proc~dft_initialize->proc~libxc_input proc~set_bragg_slater set_bragg_slater proc~dft_initialize->proc~set_bragg_slater proc~libxc_destroy libxc_destroy proc~dftclean->proc~libxc_destroy proc~get_td_transition_dipole->interface~show_message proc~get_td_transition_dipole->proc~iatogen proc~get_td_transition_dipole->proc~orthogonal_transform proc~get_td_transition_dipole->proc~symmetrize_matrix interface~pack_matrix pack_matrix proc~get_td_transition_dipole->interface~pack_matrix proc~atomic_structure_center atomic_structure%atomic_structure_center proc~get_td_transition_dipole->proc~atomic_structure_center proc~multipole_integrals multipole_integrals proc~get_td_transition_dipole->proc~multipole_integrals proc~traceprod_sym_packed traceprod_sym_packed proc~get_td_transition_dipole->proc~traceprod_sym_packed proc~oqp_dgemm_i64 oqp_dgemm_i64 proc~mntoia->proc~oqp_dgemm_i64 proc~orthogonal_transform->interface~show_message proc~orthogonal_transform->proc~oqp_dgemm_i64 proc~diag_symm_packed diag_symm_packed proc~rpaeig->proc~diag_symm_packed proc~rpaeig->proc~oqp_dgemm_i64 proc~oqp_dtrttp_i64 oqp_dtrttp_i64 proc~rpaeig->proc~oqp_dtrttp_i64 proc~rpaexpndv->proc~oqp_dgemm_i64 proc~rparedms->proc~oqp_dgemm_i64 none~clean~21 xc_consumer_tde_t%clean proc~tddft_fxc->none~clean~21 proc~tddft_fxc->none~init~14 proc~run_xc run_xc proc~tddft_fxc->proc~run_xc proc~triangular_to_full triangular_to_full proc~tddft_fxc->proc~triangular_to_full proc~pack_f90 PACK_F90 interface~pack_matrix->proc~pack_f90 none~add_slices dft_grid_t%add_slices none~add_atomic_grid->none~add_slices none~get~5 list_grid_3d_t%get none~add_grid->none~get~5 none~set~4 list_grid_3d_t%set none~add_grid->none~set~4 proc~lebedev_get_grid lebedev_get_grid none~add_grid->proc~lebedev_get_grid none~set~2 partition_function%set none~find_neighbours->none~set~2 mpi_comm_rank mpi_comm_rank none~init~14->mpi_comm_rank mpi_comm_size mpi_comm_size none~init~14->mpi_comm_size none~init~21 sorted_grid_t%init none~reset->none~init~21 none~run_cam->none~run_generic none~run_generic->interface~show_message none~run_generic->proc~ints_exchange libint2_cleanup_eri libint2_cleanup_eri none~run_generic->libint2_cleanup_eri libint2_init_eri libint2_init_eri none~run_generic->libint2_init_eri none~clean~2 int2_rys_data_t%clean none~run_generic->none~clean~2 none~init~2 int2_rys_data_t%init none~run_generic->none~init~2 none~screen_ij int2_compute_data_t%screen_ij none~run_generic->none~screen_ij none~screen_ijkl int2_compute_data_t%screen_ijkl none~run_generic->none~screen_ijkl none~set_ids int2_rys_data_t%set_ids none~run_generic->none~set_ids parallel_start parallel_start none~run_generic->parallel_start parallel_stop parallel_stop none~run_generic->parallel_stop proc~genr22 genr22 none~run_generic->proc~genr22 proc~int2_rys_compute int2_rys_compute none~run_generic->proc~int2_rys_compute proc~libint_compute_eri libint_compute_eri none~run_generic->proc~libint_compute_eri proc~libint_print_eri libint_print_eri none~run_generic->proc~libint_print_eri proc~rys_print_eri rys_print_eri none~run_generic->proc~rys_print_eri update update none~run_generic->update proc~to_upper to_upper proc~atomic_structure_center->proc~to_upper none~getbyid list_grid_3d_t%getByID proc~dft_fc_blk->none~getbyid proc~dft_fc_blk->none~set~2 proc~diag_symm_packed->interface~show_message dspev dspev proc~diag_symm_packed->dspev dspevx dspevx proc~diag_symm_packed->dspevx set set proc~get_radial_grid->set transform transform proc~get_radial_grid->transform proc~ints_exchange->interface~show_message proc~ints_exchange->none~alloc proc~ints_exchange->none~compute proc~ints_exchange->none~set proc~ints_exchange->libint2_cleanup_eri proc~ints_exchange->libint2_init_eri proc~ints_exchange->none~clean~2 proc~ints_exchange->none~init~2 proc~ints_exchange->none~set_ids proc~ints_exchange->proc~genr22 proc~ints_exchange->proc~int2_rys_compute proc~ints_exchange->proc~libint_compute_eri libint2_static_init libint2_static_init proc~libint_static_init->libint2_static_init none~destroy~2 functional_t%destroy proc~libxc_destroy->none~destroy~2 proc~libxc_input->interface~show_message none~add_functional functional_t%add_functional proc~libxc_input->none~add_functional none~can_calculate functional_t%can_calculate proc~libxc_input->none~can_calculate xc_f03_reference xc_f03_reference proc~libxc_input->xc_f03_reference xc_f03_reference_doi xc_f03_reference_doi proc~libxc_input->xc_f03_reference_doi xc_f03_version_string xc_f03_version_string proc~libxc_input->xc_f03_version_string proc~multipole_integrals->interface~show_message interface~bas_norm_matrix bas_norm_matrix proc~multipole_integrals->interface~bas_norm_matrix none~alloc~2 shpair_t%alloc proc~multipole_integrals->none~alloc~2 none~fetch_by_id shell_t%fetch_by_id proc~multipole_integrals->none~fetch_by_id none~shell_pair shpair_t%shell_pair proc~multipole_integrals->none~shell_pair proc~comp_allmult_int1_prim comp_allmult_int1_prim proc~multipole_integrals->proc~comp_allmult_int1_prim proc~print_sym_labeled print_sym_labeled proc~multipole_integrals->proc~print_sym_labeled proc~update_triang_matrix update_triang_matrix proc~multipole_integrals->proc~update_triang_matrix proc~oqp_dgemm_i64->interface~show_message dgemm dgemm proc~oqp_dgemm_i64->dgemm proc~oqp_dtrttp_i64->interface~show_message dtrttp dtrttp proc~oqp_dtrttp_i64->dtrttp none~allreduce par_env_t%allreduce proc~run_xc->none~allreduce none~compaos xc_engine_t%compAOs proc~run_xc->none~compaos none~compxc xc_engine_t%compXC proc~run_xc->none~compxc none~getslicenonzero dft_grid_t%getSliceNonZero proc~run_xc->none~getslicenonzero none~getstats xc_engine_t%getStats proc~run_xc->none~getstats none~init~18 xc_engine_t%init proc~run_xc->none~init~18 none~pruneaos xc_engine_t%pruneAOs proc~run_xc->none~pruneaos none~resetpointers xc_engine_t%resetPointers proc~run_xc->none~resetpointers proc~run_xc->parallel_start proc~run_xc->parallel_stop postUpdate postUpdate proc~run_xc->postUpdate proc~run_xc->update proc~triangular_to_full->interface~show_message none~add_functional->interface~show_message xc_f03_func_get_info xc_f03_func_get_info none~add_functional->xc_f03_func_get_info xc_f03_func_info_get_family xc_f03_func_info_get_family none~add_functional->xc_f03_func_info_get_family xc_f03_func_info_get_flags xc_f03_func_info_get_flags none~add_functional->xc_f03_func_info_get_flags xc_f03_func_info_get_kind xc_f03_func_info_get_kind none~add_functional->xc_f03_func_info_get_kind xc_f03_func_info_get_name xc_f03_func_info_get_name none~add_functional->xc_f03_func_info_get_name xc_f03_func_info_get_references xc_f03_func_info_get_references none~add_functional->xc_f03_func_info_get_references xc_f03_func_init xc_f03_func_init none~add_functional->xc_f03_func_init xc_f03_func_reference_get_doi xc_f03_func_reference_get_doi none~add_functional->xc_f03_func_reference_get_doi xc_f03_func_reference_get_ref xc_f03_func_reference_get_ref none~add_functional->xc_f03_func_reference_get_ref xc_f03_func_set_ext_params xc_f03_func_set_ext_params none~add_functional->xc_f03_func_set_ext_params xc_f03_hyb_cam_coef xc_f03_hyb_cam_coef none~add_functional->xc_f03_hyb_cam_coef xc_f03_hyb_exx_coef xc_f03_hyb_exx_coef none~add_functional->xc_f03_hyb_exx_coef none~add_slices->none~get~5 none~extend dft_grid_t%extend none~add_slices->none~extend none~setslice dft_grid_t%setSlice none~add_slices->none~setslice none~par_env_t_allreduce_byte par_env_t%par_env_t_allreduce_byte none~allreduce->none~par_env_t_allreduce_byte none~par_env_t_allreduce_c_bool par_env_t%par_env_t_allreduce_c_bool none~allreduce->none~par_env_t_allreduce_c_bool none~par_env_t_allreduce_dp_1d par_env_t%par_env_t_allreduce_dp_1d none~allreduce->none~par_env_t_allreduce_dp_1d none~par_env_t_allreduce_dp_2d par_env_t%par_env_t_allreduce_dp_2d none~allreduce->none~par_env_t_allreduce_dp_2d none~par_env_t_allreduce_dp_3d par_env_t%par_env_t_allreduce_dp_3d none~allreduce->none~par_env_t_allreduce_dp_3d none~par_env_t_allreduce_dp_4d par_env_t%par_env_t_allreduce_dp_4d none~allreduce->none~par_env_t_allreduce_dp_4d none~par_env_t_allreduce_dp_scalar par_env_t%par_env_t_allreduce_dp_scalar none~allreduce->none~par_env_t_allreduce_dp_scalar none~par_env_t_allreduce_int32_1d par_env_t%par_env_t_allreduce_int32_1d none~allreduce->none~par_env_t_allreduce_int32_1d none~par_env_t_allreduce_int32_scalar par_env_t%par_env_t_allreduce_int32_scalar none~allreduce->none~par_env_t_allreduce_int32_scalar none~par_env_t_allreduce_int64_1d par_env_t%par_env_t_allreduce_int64_1d none~allreduce->none~par_env_t_allreduce_int64_1d none~par_env_t_allreduce_int64_scalar par_env_t%par_env_t_allreduce_int64_scalar none~allreduce->none~par_env_t_allreduce_int64_scalar none~aoval basis_set%aoval none~compaos->none~aoval none~compmos xc_engine_t%compMOs none~compxc->none~compmos none~comprhoall xc_engine_t%compRhoAll none~compxc->none~comprhoall proc~compute~2 xc_libxc_t%compute none~compxc->proc~compute~2 xc_f03_func_end xc_f03_func_end none~destroy~2->xc_f03_func_end none~getslicenonzero->none~getbyid none~getenergy xc_lib_t%getEnergy none~getstats->none~getenergy none~check grid_3d_t%check none~get~5->none~check proc~init xc_libxc_t%init none~init~18->proc~init none~init~22 list_grid_3d_t%init none~init~21->none~init~22 none~resetprunedpointers xc_engine_t%resetPrunedPointers none~pruneaos->none~resetprunedpointers none~resetorbpointers~2 xc_engine_t%resetOrbPointers none~resetpointers->none~resetorbpointers~2 none~resetxcpointers xc_engine_t%resetXCPointers none~resetpointers->none~resetxcpointers proc~setpts xc_libxc_t%setPts none~resetpointers->proc~setpts unused_dummy unused_dummy none~screen_ij->unused_dummy none~screen_ijkl->unused_dummy none~set~4->none~get~5 none~push list_grid_3d_t%push none~set~4->none~push proc~mulquadgausshermite mulQuadGaussHermite proc~comp_allmult_int1_prim->proc~mulquadgausshermite fgrid fgrid proc~genr22->fgrid rfinc rfinc proc~genr22->rfinc rmr rmr proc~genr22->rmr xgrid xgrid proc~genr22->xgrid none~evaluate rys_root_t%evaluate proc~int2_rys_compute->none~evaluate proc~lebedev_get_grid->interface~show_message ab_x ab_x proc~libint_compute_eri->ab_x ab_y ab_y proc~libint_compute_eri->ab_y ab_z ab_z proc~libint_compute_eri->ab_z alpha1over_zetapluseta alpha1over_zetapluseta proc~libint_compute_eri->alpha1over_zetapluseta alpha1rho_over_zeta2 alpha1rho_over_zeta2 proc~libint_compute_eri->alpha1rho_over_zeta2 alpha2over_zetapluseta alpha2over_zetapluseta proc~libint_compute_eri->alpha2over_zetapluseta alpha2rho_over_zeta2 alpha2rho_over_zeta2 proc~libint_compute_eri->alpha2rho_over_zeta2 alpha3over_zetapluseta alpha3over_zetapluseta proc~libint_compute_eri->alpha3over_zetapluseta alpha3rho_over_eta2 alpha3rho_over_eta2 proc~libint_compute_eri->alpha3rho_over_eta2 alpha4over_zetapluseta alpha4over_zetapluseta proc~libint_compute_eri->alpha4over_zetapluseta alpha4rho_over_eta2 alpha4rho_over_eta2 proc~libint_compute_eri->alpha4rho_over_eta2 cd_x cd_x proc~libint_compute_eri->cd_x cd_y cd_y proc~libint_compute_eri->cd_y cd_z cd_z proc~libint_compute_eri->cd_z f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_0 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_0 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_0 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_1 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_1 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_1 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_10 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_10 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_10 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_11 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_11 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_11 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_12 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_12 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_12 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_13 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_13 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_13 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_14 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_14 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_14 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_15 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_15 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_15 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_16 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_16 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_16 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_17 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_17 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_17 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_18 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_18 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_18 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_19 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_19 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_19 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_2 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_2 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_2 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_20 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_20 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_20 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_3 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_3 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_3 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_4 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_4 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_4 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_5 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_5 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_5 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_6 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_6 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_6 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_7 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_7 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_7 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_8 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_8 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_8 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_9 f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_9 proc~libint_compute_eri->f_ab_s___0__s___1___twoprep_s___0__s___1___ab__up_9 proc~libint_compute_eri->fgrid igrid igrid proc~libint_compute_eri->igrid irgrd irgrd proc~libint_compute_eri->irgrd oo2e oo2e proc~libint_compute_eri->oo2e oo2z oo2z proc~libint_compute_eri->oo2z oo2ze oo2ze proc~libint_compute_eri->oo2ze pa_x pa_x proc~libint_compute_eri->pa_x pa_y pa_y proc~libint_compute_eri->pa_y pa_z pa_z proc~libint_compute_eri->pa_z qc_x qc_x proc~libint_compute_eri->qc_x qc_y qc_y proc~libint_compute_eri->qc_y qc_z qc_z proc~libint_compute_eri->qc_z proc~libint_compute_eri->rfinc rho12_over_alpha1 rho12_over_alpha1 proc~libint_compute_eri->rho12_over_alpha1 rho12_over_alpha2 rho12_over_alpha2 proc~libint_compute_eri->rho12_over_alpha2 rho34_over_alpha3 rho34_over_alpha3 proc~libint_compute_eri->rho34_over_alpha3 rho34_over_alpha4 rho34_over_alpha4 proc~libint_compute_eri->rho34_over_alpha4 proc~libint_compute_eri->rmr roe roe proc~libint_compute_eri->roe roz roz proc~libint_compute_eri->roz two_alpha0_bra two_alpha0_bra proc~libint_compute_eri->two_alpha0_bra two_alpha0_ket two_alpha0_ket proc~libint_compute_eri->two_alpha0_ket two_alpha1bra two_alpha1bra proc~libint_compute_eri->two_alpha1bra two_alpha1ket two_alpha1ket proc~libint_compute_eri->two_alpha1ket wp_x wp_x proc~libint_compute_eri->wp_x wp_y wp_y proc~libint_compute_eri->wp_y wp_z wp_z proc~libint_compute_eri->wp_z wq_x wq_x proc~libint_compute_eri->wq_x wq_y wq_y proc~libint_compute_eri->wq_y wq_z wq_z proc~libint_compute_eri->wq_z proc~pack_f90->interface~show_message proc~pack_f90->proc~oqp_dtrttp_i64 none~bf_label basis_set%bf_label proc~print_sym_labeled->none~bf_label none~compaov basis_set%compAOv none~aoval->none~compaov none~compaovg basis_set%compAOvg none~aoval->none~compaovg none~compaovgg basis_set%compAOvgg none~aoval->none~compaovgg proc~mo_tran_gemm_ mo_tran_gemm_ none~compmos->proc~mo_tran_gemm_ proc~mo_tran_symm_ mo_tran_symm_ none~compmos->proc~mo_tran_symm_ none~clear~2 list_grid_3d_t%clear none~init~22->none~clear~2 mpi_allreduce mpi_allreduce none~par_env_t_allreduce_byte->mpi_allreduce none~par_env_t_allreduce_c_bool->mpi_allreduce none~par_env_t_allreduce_dp_1d->mpi_allreduce none~par_env_t_allreduce_dp_2d->mpi_allreduce none~par_env_t_allreduce_dp_3d->mpi_allreduce none~par_env_t_allreduce_dp_4d->mpi_allreduce none~par_env_t_allreduce_dp_scalar->mpi_allreduce none~par_env_t_allreduce_int32_1d->mpi_allreduce none~par_env_t_allreduce_int32_scalar->mpi_allreduce none~par_env_t_allreduce_int64_1d->mpi_allreduce none~par_env_t_allreduce_int64_scalar->mpi_allreduce none~calc_evfxc functional_t%calc_evfxc proc~compute~2->none~calc_evfxc none~calc_evxc functional_t%calc_evxc proc~compute~2->none~calc_evxc none~calc_xc functional_t%calc_xc proc~compute~2->none~calc_xc none~scalexc xc_lib_t%scalexc proc~compute~2->none~scalexc none~clean~13 xc_lib_t%clean proc~init->none~clean~13 none~resetenergy xc_lib_t%resetEnergy proc~init->none~resetenergy abrt abrt proc~mulquadgausshermite->abrt none~calc_evfxc->interface~show_message none~calc_evfxc->xc_f03_func_info_get_family none~calc_evfxc->xc_f03_func_info_get_kind none~calc_evfxc->xc_f03_func_info_get_name xc_f03_gga_exc_vxc_fxc xc_f03_gga_exc_vxc_fxc none~calc_evfxc->xc_f03_gga_exc_vxc_fxc xc_f03_lda_exc_vxc_fxc xc_f03_lda_exc_vxc_fxc none~calc_evfxc->xc_f03_lda_exc_vxc_fxc xc_f03_mgga_exc_vxc_fxc xc_f03_mgga_exc_vxc_fxc none~calc_evfxc->xc_f03_mgga_exc_vxc_fxc none~calc_evxc->interface~show_message none~calc_evxc->xc_f03_func_info_get_family none~calc_evxc->xc_f03_func_info_get_kind none~calc_evxc->xc_f03_func_info_get_name xc_f03_gga_exc_vxc xc_f03_gga_exc_vxc none~calc_evxc->xc_f03_gga_exc_vxc xc_f03_lda_exc_vxc xc_f03_lda_exc_vxc none~calc_evxc->xc_f03_lda_exc_vxc xc_f03_mgga_exc_vxc xc_f03_mgga_exc_vxc none~calc_evxc->xc_f03_mgga_exc_vxc none~calc_xc->interface~show_message none~calc_xc->xc_f03_func_info_get_family none~calc_xc->xc_f03_func_info_get_kind none~calc_xc->xc_f03_func_info_get_name xc_f03_gga_exc_vxc_fxc_kxc xc_f03_gga_exc_vxc_fxc_kxc none~calc_xc->xc_f03_gga_exc_vxc_fxc_kxc xc_f03_lda_exc_vxc_fxc_kxc xc_f03_lda_exc_vxc_fxc_kxc none~calc_xc->xc_f03_lda_exc_vxc_fxc_kxc xc_f03_mgga_exc_vxc_fxc_kxc xc_f03_mgga_exc_vxc_fxc_kxc none~calc_xc->xc_f03_mgga_exc_vxc_fxc_kxc proc~mo_tran_gemm_->proc~oqp_dgemm_i64 proc~oqp_dsymm_i64 oqp_dsymm_i64 proc~mo_tran_symm_->proc~oqp_dsymm_i64 proc~oqp_dsymm_i64->interface~show_message dsymm dsymm proc~oqp_dsymm_i64->dsymm

Called by

proc~~tdhf_energy~~CalledByGraph proc~tdhf_energy tdhf_energy proc~tdhf_energy_c tdhf_energy_C proc~tdhf_energy_c->proc~tdhf_energy

Source Code

  subroutine tdhf_energy(infos)
    use io_constants, only: iw
    use oqp_tagarray_driver
    use types, only: information
    use strings, only: Cstring, fstring
    use basis_tools, only: basis_set
    use messages, only: show_message, with_abort

    use precision, only: dp
    use int2_compute, only: int2_compute_t
    use tdhf_lib, only: int2_td_data_t
    use tdhf_lib, only: &
      inivec, iatogen, mntoia, rparedms, rpaeig, rpavnorm, &
      rpaechk, rpaprint, rparesvec, rpaexpndv, rpanewb, esum, &
      tdhf_unrelaxed_density
    use dft, only: dft_initialize, dftclean
    use mod_dft_gridint_fxc, only: tddft_fxc
    use util, only: measure_time
    use mathlib, only: symmetrize_matrix, orthogonal_transform
    use mod_dft_molgrid, only: dft_grid_t
    use mathlib, only: unpack_matrix
    use printing, only: print_module_info

    implicit none

    character(len=*), parameter :: subroutine_name = "tdhf_energy"

    type(basis_set), pointer :: basis
    type(information), target, intent(inout) :: infos

    integer :: ok

    real(kind=dp), allocatable :: scr2(:)
    real(kind=dp), allocatable :: ab1_mo(:,:), ab2_mo(:,:), abxc(:,:), scr3(:,:)
    real(kind=dp), allocatable :: eex(:)
    real(kind=dp), allocatable :: abm_l(:,:), abp_r(:,:), amb(:,:), &
                                  apb(:,:), vlo(:,:), vro(:,:)
    real(kind=dp), allocatable, target :: vl(:), vr(:)
    real(kind=dp), pointer :: vl_p(:,:), vr_p(:,:)
    real(kind=dp), allocatable :: xm(:)
    real(kind=dp), allocatable :: bvec_mo(:,:)
    real(kind=dp), allocatable, target :: bvec(:,:,:)
    real(kind=dp), allocatable :: scr1(:,:)
    real(kind=dp), allocatable :: errors(:)
    real(kind=dp), pointer :: ab2(:,:,:)
    real(kind=dp), pointer :: ab1(:,:,:)
    real(kind=dp), allocatable :: dip(:,:)

    integer :: nocc, nvir
    integer :: nbf, nbf2, lexc
    integer :: ndsr, mxvec, nmax, ist, iend, nvec, novec
    integer :: iter, istart, nv, iv, ivec
    integer :: mxiter
    logical :: do_apb,do_amb, tamm_dancoff   ! SWITCH FOR a-b, a+b, tANDAMM COFF
    integer :: imax
    logical :: converged
    integer :: ierr
    real(kind=dp) :: mxerr, cnvtol, scale_exch, norm
    integer :: maxvec, nstates

    type(int2_compute_t) :: int2_driver
    type(int2_td_data_t), target :: int2_data
    type(dft_grid_t) :: molGrid

    logical :: dft

    ! tagarray
    real(kind=dp), contiguous, pointer :: &
      mo_energy_a(:), mo_a(:,:), td_t(:,:), &
      xpy(:,:), xmy(:,:), td_energies(:)
    character(len=*), parameter :: tags_alloc(4) = (/ character(len=80) :: &
      OQP_td_t, OQP_td_xpy, OQP_td_xmy, OQP_td_energies /)
    character(len=*), parameter :: tags_alpha(2) = (/ character(len=80) :: &
      OQP_E_MO_A, OQP_VEC_MO_A /)

    dft = infos%control%hamilton == 20

  ! Files open
  ! 3. LOG: Write: Main output file
    open (unit=IW, file=infos%log_filename, position="append")
  !
    call print_module_info('THDF_Energy','Computing Energy of TDDFT')

  ! Readings

  ! Load basis set
    basis => infos%basis
    basis%atoms => infos%atoms

  ! Allocate H, S ,T and D matrices
    nbf = basis%nbf
    nbf2 = nbf*(nbf+1)/2

    call data_has_tags(infos%dat, tags_alpha, module_name, subroutine_name, WITH_ABORT)
    call tagarray_get_data(infos%dat, OQP_E_MO_A, mo_energy_a)
    call tagarray_get_data(infos%dat, OQP_VEC_MO_A, mo_a)

    if (dft) call dft_initialize(infos, basis, molGrid, verbose=.true.)

    nstates = infos%tddft%nstate
    maxvec = infos%tddft%maxvec
    cnvtol = infos%tddft%cnvtol

    do_apb = .true.  ! Always do A+B part
    do_amb = .true.  ! = isGGA ! Do A-B part if a hybrid functional.
    tamm_dancoff = infos%tddft%tda  ! Tamm/Dancoff approximation

    nocc = infos%mol_prop%nocc
    nvir = nbf-nocc
    lexc = nocc*nvir

    mxvec = min(maxvec*nstates,lexc)
    nvec = min(nstates,mxvec)
    ndsr = nvec
    nmax = 2*nvec
    !nvec = 2*nvec

  ! Allocate TDDFT variables
    allocate(xm(lexc), &
             abxc(nbf,nbf), &
             bvec_mo(lexc,mxvec), &
             ab1_mo(lexc,mxvec), &
             ab2_mo(lexc,mxvec), &
             bvec(nbf,nbf,nmax), &
             eex(mxvec), &
             errors(mxvec), &
             apb(mxvec,mxvec), &
             amb(mxvec,mxvec), &
             vr(mxvec*mxvec), &
             vro(lexc,mxvec), &
             vl(mxvec*mxvec), &
             vlo(lexc,mxvec), &
             abp_r(lexc,mxvec), &
             abm_l(lexc,mxvec), &
             dip(3,nstates), &
             scr1(nbf,nbf), &
             scr2(mxvec*mxvec), &
             scr3(lexc,nmax), &
             source=0.0d0, &
             stat=ok)
    if( ok/=0 ) &
      call show_message('Cannot allocate memory', with_abort)


  ! Initialize ERI calculations
    call int2_driver%init(basis, infos)
    call int2_driver%set_screening()

    scale_exch = 1.0_dp
    if (dft) scale_exch = infos%dft%HFscale

  ! Construct TD trial vector
    call inivec(mo_energy_a,mo_energy_a,bvec_mo,xm,nocc,nocc,nvec)

    ist = 1
    istart = 1
    iend = nvec
    iter = 0
    mxiter = infos%control%maxit_dav
    ierr = 0

    do iter = 1, mxiter
      nv = iend-ist+1

!$omp parallel private(iv,scr1,abxc,ivec)
!$omp do schedule(static)
      do ivec = ist, iend
        iv = ivec-ist+1
        call iatogen(bvec_mo(:,ivec),abxc,nocc,nocc)
        call orthogonal_transform('t', nbf, mo_a, abxc, bvec(:,:,iv), scr1)
      end do
!$omp end do
!$omp end parallel

      int2_data = int2_td_data_t(d2=bvec(:,:,:nv), &
              int_apb=do_apb, int_amb=do_amb, tamm_dancoff=tamm_dancoff, &
              tamm_dancoff_coulomb=.true., &
              scale_exchange=scale_exch)

      call int2_driver%run(int2_data, &
                cam=dft.and.infos%dft%cam_flag, &
                alpha=infos%dft%cam_alpha, &
                beta=infos%dft%cam_beta,&
                mu=infos%dft%cam_mu)
      ab1 => int2_data%apb(:,:,:,1)
      ab2 => int2_data%amb(:,:,:,1)

      if (dft) then
        do ivec = ist, iend
          iv = ivec-ist+1
          call symmetrize_matrix(bvec(:,:,iv), nbf)
        end do
        call tddft_fxc(basis=basis, &
               molGrid=molGrid, &
               isVecs=.true., &
               wf=mo_a, &
               fx=ab1(:,:,:iv), &
               dx=bvec(:,:,:iv), &
               nmtx=iv, &
               !threshold=1.0d-15, &
               threshold=0.0d0, &
               infos=infos)
      end if

!$omp parallel private(iv,ivec)
!$omp do schedule(static)
      do ivec = ist, iend
        iv = ivec-ist+1
  !     Convert AO to MO basis
        if (tamm_dancoff) then
          ab1(:,:,iv) = 0.5_dp*ab1(:,:,iv) + ab2(:,:,iv)
        end if
        call mntoia(ab1(:,:,iv), ab1_mo(:,ivec), mo_a, mo_a, nocc, nocc)

  !     Product (A+B)*X
        call esum(mo_energy_a,ab1_mo,bvec_mo,nocc,ivec)

        if (.not.tamm_dancoff) then
!         Product (A-B)*X
          call mntoia(ab2(:,:,iv),ab2_mo(:,ivec),mo_a,mo_a,nocc,nocc)
          call esum(mo_energy_a,ab2_mo,bvec_mo,nocc,ivec)
        end if
      end do
!$omp end do
!$omp end parallel

      call rparedms(bvec_mo,ab1_mo,ab2_mo,apb,amb,nvec,tamm_dancoff)

      vl_p(1:nvec, 1:nvec) => vl(1:nvec*nvec)
      vr_p(1:nvec, 1:nvec) => vr(1:nvec*nvec)
      call rpaeig(eex,vl_p,vr_p,apb,amb,scr2,tamm_dancoff)
      call rpavnorm(vr_p,vl_p,tamm_dancoff)
      call rpaexpndv(vr_p,vl_p,vro,vlo,bvec_mo,bvec_mo,ndsr,tamm_dancoff)
      call rpaexpndv(vr_p,vl_p,abp_r,abm_l,ab1_mo,ab2_mo,ndsr,tamm_dancoff)

      call rpaechk(eex,nvec,ndsr,imax,tamm_dancoff)
!     Residual vectors W
!     Get perturbed vectors Q if required
      call rparesvec(scr3,abp_r,abm_l,vlo,vro,eex,xm,ndsr,errors,cnvtol,imax,tamm_dancoff)

      mxerr = maxval(errors(imax+1:ndsr))

      call rpaprint(eex, errors, cnvtol, iter, imax, ndsr)

!     Check convergence
      converged = mxerr<=cnvtol
      if (converged) exit

!     No space left for new vectors, exit
      if (nvec==mxvec) ierr = 1
      if (ierr/=0) exit

      call rpanewb(ndsr,bvec_mo,scr3,novec,nvec,ierr,tamm_dancoff)

  !   ierr=1 nvec over mxvec: not converged case
      if (ierr/=0) exit

      ist = novec+1
      iend = nvec
    end do

    if (iter >= mxiter .and. .not. converged) ierr = -1

    select case (ierr)
    case (-1)
      write(*,'(/,2X,"TD-DFT energies NOT CONVERGED after ",I4," iterations"/)') mxiter
      infos%mol_energy%Davidson_converged=.false.
!      call show_message("Aborting. Try to increase maxit or check your system.", WITH_ABORT)
    case (0)
      write(*,'(/,2X,"TD-DFT energies converged in ",I4," iterations"/)') iter
      infos%mol_energy%Davidson_converged=.true.
    case (1)
      write(*,'(/,2X,"..something is wrong.. nvec = mxvec")')
      infos%mol_energy%Davidson_converged=.false.
    case (2)
      write(*,'(/,2x,"..something is wrong..  nvec > mxvec")')
      write(*,'(3x,"nvec/mxvec =",I4,"/",I4)') nvec, mxvec
      infos%mol_energy%Davidson_converged=.false.
    case (3)
      write(*,'(/,2x,"..something is wrong.. No vectors were added")')
      infos%mol_energy%Davidson_converged=.false.
    end select

    call get_td_transition_dipole(basis, dip, mo_a, vro, vlo, nstates, nocc)

    call td_print_results(eex, dip, nstates)

    call measure_time(print_total=1, log_unit=iw)

    ! Bi-orthogonalize X+Y and X-Y:
    ! (X+Y)_i \dot (X-Y)_j = \delta_ij
    ! only normalization is needed
    ! RHF reference case: alpha == beta, additional factor of 1/sqrt(2)
    do ist = 1, nstates
        norm = 1/sqrt(2*dot_product(vlo(:,ist), vro(:,ist)))
        vlo(:,ist) = vlo(:,ist) * norm
        vro(:,ist) = vro(:,ist) * norm
    end do

    call infos%dat%remove_records(tags_alloc)

    call infos%dat%reserve_data(OQP_td_t, &
            TA_TYPE_REAL64, &
            nbf2, [nbf2, 1], &
            comment=OQP_td_t_comment)

    call infos%dat%reserve_data(OQP_td_xpy, &
            TA_TYPE_REAL64, &
            lexc*nstates, [lexc, nstates], &
            comment="(X+Y) vector for target state in TD-DFT calculations")

    call infos%dat%reserve_data(OQP_td_xmy, &
            TA_TYPE_REAL64, &
            lexc*nstates, [lexc, nstates], &
            comment="(X-Y) vector for target state in TD-DFT calculations")

    call infos%dat%reserve_data(OQP_td_energies, &
            TA_TYPE_REAL64, &
            nstates, [nstates], &
            comment=OQP_td_energies_comment)

    call tagarray_get_data(infos%dat, OQP_td_t, td_t)
    call tagarray_get_data(infos%dat, OQP_td_xpy, xpy)
    call tagarray_get_data(infos%dat, OQP_td_xmy, xmy)
    xpy = vro(:,:nstates)
    xmy = vlo(:,:nstates)

    call tagarray_get_data(infos%dat, OQP_td_energies, td_energies)
    td_energies = eex(:nstates)
    infos%mol_energy%excited_energy = td_energies(infos%tddft%target_state)

    call int2_driver%clean()

    if (dft) call dftclean(infos)

    close(iw)

  end subroutine tdhf_energy