Skip to content
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

Transition dipole moments for asymmetric operators #158

Merged
merged 18 commits into from
Apr 27, 2023

Conversation

apapapostolou
Copy link
Contributor

@apapapostolou apapapostolou commented Nov 4, 2022

We have found that the second-order transition density matrices from the ground state, as currently implemented, can only be used for symmetric operators. For asymmetric operators, such as the magnetic dipole operator, we found a small error in the oo block.

Other changes:

  • generalized the modified_transition_moments function for arbitrary one-particle operators (the previous implementation was only for symmetric ones)
  • renamed dipole_operator to operator in the modified_transition_moments function
  • extended the tests to the magnetic dipole operator

The equations were taken from J. Schirmer, Phys. Rev. A 26, 2395 (1982), and we also compared them to the equations @jonasleitner created with his code generator.

In addition, we believe that a factor of 0.5 is missing in one of the terms in the vc block of the cvs transition dm. This is also missing in the MTMs in the corresponding term. Since this hardly affects the oscillator strengths, it was probably not noticed before.

ToDo: If the changes are approved, the reference data (state.transition_magnetic_dipole_moment and state.transition_dipole_moment_velocity) must be adjusted accordingly.

@apapapostolou apapapostolou marked this pull request as ready for review November 8, 2022 08:52
Copy link
Member

@maxscheurer maxscheurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this!!! 🚀 @mfherbst what is the best way to update the reference data from dump_reference_adcc.py? We need to update them because the deposited data for consistency checks of magnetic moments etc. are wrong 😄

adcc/adc_pp/test_modified_transition_moments.py Outdated Show resolved Hide resolved
adcc/adc_pp/transition_dm.py Show resolved Hide resolved
@maxscheurer
Copy link
Member

@apapapostolou can you maybe upload the testdata files here that need to be updated so @mfherbst can upload them to the server? Would that work in principle?

@mfherbst
Copy link
Member

Would that work in principle?

Yes. I'd be happy to do that. I could also download them from somewhere (in NRW we have something like an owncloud for such things. Maybe you have something similar in BaWü).

@mfherbst
Copy link
Member

I remember we had some tests which were disabled for some low-order ADC variants because they always failed. Could have something to do with this and it might be worth checking if it's now possible to activate them. They are marked as xfail in the test suite I think.

adcc/adc_pp/modified_transition_moments.py Outdated Show resolved Hide resolved
def mtm_adc1(mp, dipop, intermediates):
f1 = dipop.ov - einsum("ijab,jb->ia", mp.t2(b.oovv), dipop.ov)
def mtm_adc1(mp, op, intermediates):
f1 = op.ov if op.is_symmetric else op.vo.transpose() # zeroth order
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better not repeat. Just call mtm_adc0 to reuse the expression from above. Also makes the structure of the equations and the orders more explicit. If I remember correctly we do this for the matrix equations as well. (have not checked)

adcc/adc_pp/modified_transition_moments.py Show resolved Hide resolved
adcc/adc_pp/test_modified_transition_moments.py Outdated Show resolved Hide resolved
@apapapostolou
Copy link
Contributor Author

I remember we had some tests which were disabled for some low-order ADC variants because they always failed. Could have something to do with this and it might be worth checking if it's now possible to activate them. They are marked as xfail in the test suite I think.

The functionality tests for the CN ADC(0) transition dipole moments still fail, even with the new reference data.

@apapapostolou
Copy link
Contributor Author

I have now updated dump_adcc_reference.py to regenerate all reference data with adcc. The hdf5 files are named like the others, only reference was replaced by adcc_reference.

Since not all hfdata contained the magnetic dipole operator and the nabla operator, I also wanted to regenerate the hfdata. However, this has caused problems with some tests that still use the atd reference data, as these had been generated with the old hfdata. I have now solved the problem by continuing to use the old hfdata and only patching in the missing operators.

@apapapostolou
Copy link
Contributor Author

apapapostolou commented Dec 6, 2022

Yes. I'd be happy to do that. I could also download them from somewhere (in NRW we have something like an owncloud for such things. Maybe you have something similar in BaWü).

I could share the new reference data with you via heiBOX if that's okay with you. The file is too big to upload here.

This is the corresponding heiBOX link: https://heibox.uni-heidelberg.de/d/0d319a927839459badf8/

Copy link
Member

@maxscheurer maxscheurer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks for this important contribution 🚀

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.

3 participants