Skip to content

First version for calculating the transition matrix elements between … #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 5, 2024

Conversation

fmoramore
Copy link
Member

…bound states.

It only works for transitions between M=0 states, and the filename is fixed.

…bound states.

It only works for transitions between M=0 states, and the filename is fixed.
@serguei-patchkovskii
Copy link
Member

Some comments:

  1. Variable wt_tme breaks naming conventions: all variables with the prefix wt_ are expected to be imported from wavefunction_tools.f90

  2. The code segment:

if (wt_tme.and.wt_enable_memory_caches(1).and.(cap_name=="none")) then call wt_transition_matrix_elements(wt_tme,iu_tme) else stop 'spherical_tdse%input_error - wt_tme' end if

contains a logic error - if transition matrix elements are not calculated, it crashes the program.

  1. subroutine wt_transition_matrix_elements duplicated code for the internal subroutines in wt_dipole. Since these are used in more than one place now, they should be made module subroutines, and called from both places.

Otherwise, it's good.

@fmoramore
Copy link
Member Author

  1. I will move it to wavefuction_tools.f90 then
  2. And also move the logic here
  3. I will make them subroutines in wavefunction_tools.f90 then!
    Will re-commit as soon as possible

fmoramore and others added 6 commits December 21, 2023 16:41
I have changed the logic for the transition matrix element routine, and moved wt_tme to wavefunction_tools.f90
I have moved wt_tme and the logic to wavefunction_tools.f90 leaving just the call
Fixed :: removed an extra - sign in the loop_m_right loop, avoiding the calculation of extra 0 rows.
Cleaned-up transition-dipoles code, to conform with the common style.
Added a test case (hydrogen_TME.inp). Additionally, performed a minor
cleanup of the RCS strings embedded in the sources.
@serguei-patchkovskii
Copy link
Member

I've made some style changes and added a functioning test case. I've also modified the output format to include state energies (because I assume you need them anyways).
Please check whether anything got broken in the process!

@fmoramore
Copy link
Member Author

Changes are perfect! I think it is ready to be merged.

@serguei-patchkovskii serguei-patchkovskii merged commit 5fe1b9e into main Jan 5, 2024
@serguei-patchkovskii serguei-patchkovskii deleted the transition_matrix_elements_v1 branch January 5, 2024 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants