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

AdcMatrix for different ADC schemes #129

Open
Drvanon opened this issue May 25, 2021 · 3 comments
Open

AdcMatrix for different ADC schemes #129

Drvanon opened this issue May 25, 2021 · 3 comments

Comments

@Drvanon
Copy link

Drvanon commented May 25, 2021

Currently this library is favoring the adc_pp a bit: the AdcMatrix class as well as the AdcAmplitudeVector and some others have attributes like ph and pphh or block_ph_ph_1, that are unique to the PP scheme. This makes it harder than necessary to extend the class for different schemes. At this point in time I am subclassing from AdcMatrix in my fork, but that means there are properties on my class that represent no physical thing.

My suggestion would be to use singles and doubles as properties (and use a format like block_singles_doubles_0(hf, mp, intermediates)) and let those be subclassed for different schemes, because this terminology overlaps for all ADC schemes. As far as I am aware, the workflow would not even need major overhaul to support multiple schemes.

I saw some remainders of a notation like this, but you have seemed to have stepped away from this, so it might also be the case that I am missing something that you found through the development process.

@maxscheurer
Copy link
Member

AmplitudeVector

This is just a dict, you can name the attributes/keys anything you want. AmplitudeVector(blabla=tensor2, bla=tensor3) is valid. Hence, no point creating a DipAmplitudeVector in your fork.
In case you got confused by the name blocks_ph, this will be removed/renamed anyways in v0.16.0.

that are unique to the PP scheme

Since the folder is called adc_pp, what else do you expect?!

Indeed, we found the terminology singles and doubles bad, that's why we stepped away from it.

I think most of what you want to achieve can be done by creating a clever AdcMatrix class and that's it. Probably some things could be moved around a little bit here and there, but I don't see the point "overhauling" major parts of the code.
What do you think, @mfherbst?

@mfherbst
Copy link
Member

Thanks @Drvanon for getting in touch and thanks for extending adcc ;).

I pretty much agree with @maxscheurer. Since we have not really looked into other ADC schemes a lot, there might be some rough edges at places that make some refactoring necessary, but overall I'd be surprised if an overhaul was really required as the general workflow should stay the same.

@maxscheurer maxscheurer changed the title Extendibility of the AdcMatrix/AdcAmplitudeVector class with respect to different schemes AdcMatrix for different ADC schemes May 25, 2021
@Drvanon
Copy link
Author

Drvanon commented May 25, 2021

Thank you for all of your quick replies! I see what you mean with the AmplitudeVector class.

@maxscheurer, I was trying to address the attributes/variables in the AdcMatrix class, particularly the default_blocks class variable, which currently is designed for PP only, as well as the sanity check and the matrix block function that is called (see my commits to https://github.com/Drvanon/adcc/blob/master/adcc/AdcMatrix.py).

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

No branches or pull requests

3 participants