Skip to content

Commit

Permalink
Output dipole method for TDDFT (#1981)
Browse files Browse the repository at this point in the history
  • Loading branch information
juerghutter committed Mar 7, 2022
1 parent e47857c commit f24ffc5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/qs_tddfpt2_methods.F
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ SUBROUTINE tddfpt(qs_env, calc_forces)
"the velocity form of dipole transition integrals")
END IF

CALL tddfpt_print_summary(log_unit, evects, evals, mult, dipole_op_mos_occ)
CALL tddfpt_print_summary(log_unit, evects, evals, mult, dipole_op_mos_occ, tddfpt_control%dipole_form)
CALL tddfpt_print_excitation_analysis(log_unit, evects, evals, gs_mos, matrix_s(1)%matrix, &
min_amplitude=tddfpt_control%min_excitation_amplitude)
CALL tddfpt_print_nto_analysis(qs_env, evects, evals, gs_mos, matrix_s(1)%matrix, &
Expand Down
16 changes: 14 additions & 2 deletions src/qs_tddfpt2_properties.F
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ END SUBROUTINE tddfpt_dipole_operator
!> \param mult multiplicity
!> \param dipole_op_mos_occ action of the dipole operator on the ground state wave function
!> [x,y,z ; spin]
!> \param dipole_form ...
!> \par History
!> * 05.2016 created [Sergey Chulkov]
!> * 06.2016 transition dipole moments and oscillator strengths [Sergey Chulkov]
Expand All @@ -558,12 +559,13 @@ END SUBROUTINE tddfpt_dipole_operator
!> \f[ t_d(spin) = Tr[evects^T dipole\_op\_mos\_occ(d, spin)] .\f]
!> \endparblock
! **************************************************************************************************
SUBROUTINE tddfpt_print_summary(log_unit, evects, evals, mult, dipole_op_mos_occ)
SUBROUTINE tddfpt_print_summary(log_unit, evects, evals, mult, dipole_op_mos_occ, dipole_form)
INTEGER, INTENT(in) :: log_unit
TYPE(cp_fm_p_type), DIMENSION(:, :), INTENT(in) :: evects
REAL(kind=dp), DIMENSION(:), INTENT(in) :: evals
INTEGER, INTENT(in) :: mult
TYPE(cp_fm_p_type), DIMENSION(:, :), INTENT(in) :: dipole_op_mos_occ
INTEGER, INTENT(in) :: dipole_form

CHARACTER(LEN=*), PARAMETER :: routineN = 'tddfpt_print_summary'

Expand All @@ -588,7 +590,17 @@ SUBROUTINE tddfpt_print_summary(log_unit, evects, evals, mult, dipole_op_mos_occ
! *** summary header ***
IF (log_unit > 0) THEN
CALL integer_to_string(mult, mult_str)
WRITE (log_unit, '(/,1X,A1,A,1X,A,/)') lsd_str, "-TDDFPT states of multiplicity", TRIM(mult_str)
WRITE (log_unit, '(/,1X,A1,A,1X,A)') lsd_str, "-TDDFPT states of multiplicity", TRIM(mult_str)
SELECT CASE (dipole_form)
CASE (tddfpt_dipole_berry)
WRITE (log_unit, '(1X,A,/)') "Transition dipoles calculated using Berry operator formulation"
CASE (tddfpt_dipole_length)
WRITE (log_unit, '(1X,A,/)') "Transition dipoles calculated using length formulation"
CASE (tddfpt_dipole_velocity)
WRITE (log_unit, '(1X,A,/)') "Transition dipoles calculated using velocity formulation"
CASE DEFAULT
CPABORT("Unimplemented form of the dipole operator")
END SELECT

WRITE (log_unit, '(T10,A,T19,A,T37,A,T69,A)') "State", "Excitation", &
"Transition dipole (a.u.)", "Oscillator"
Expand Down

0 comments on commit f24ffc5

Please sign in to comment.