adc-connect / adcc

adcc: Seamlessly connect your program to ADC
https://adc-connect.org
GNU General Public License v3.0
32 stars 19 forks source link

Pandas DataFrame export #78

Closed maxscheurer closed 4 years ago

maxscheurer commented 4 years ago

This PR adds the feature to export ExcitedStates as a pandas.DataFrame for convenient post-processing and serialization.

Questions:

mfherbst commented 4 years ago

Regarding other properties: I think dominant amplitudes would be awesome, but that could be a bit of effort to properly map this. I'd rather have it as is than nothing, so your call if you want to do it or not.

maxscheurer commented 4 years ago

Regarding other properties: I think dominant amplitudes would be awesome

One could do this, but probably as a separate dataframe. The format of amplitudes does not fit the concise layout of the currently exported dataframe. I have something in mind that I could test tomorrow.

mfherbst commented 4 years ago

Awesome! Anything in this direction would be appreciated from my end. If you can somehow get a nice overview of this that would just be great.

mfherbst commented 4 years ago

About other properties: Absorption cross section? Also excitation is an index (0 to something) and the index of the dataframe itself is also 0 to something. I don't think I would keep excitation or did you have something particular in mind when you did that?

maxscheurer commented 4 years ago

Absorption cross section?

Done 😄 ... and I noticed that it was only accessible via plots before haha.

I don't think I would keep excitation or did you have something particular in mind when you did that?

Yes, I actually did! Say you do several calculations and merge dataframes with pd.concat or something of the sort with ignore_index=True, then you loose information about the number of the excited states. Having the excitation as an extra column thus comes in handy when comparing multiple calculations, because you can more easily filter and process the data

Update on amplitudes: I think right now I'd have to change stuff in FormatExcitationVector to access the "raw" data...

mfherbst commented 4 years ago

Say you do several calculations and merge dataframes

Ah good point. That I did not think about ...

Re amplitudes ... don't worry if it turns out to be too annoying.

maxscheurer commented 4 years ago

Okay, so the amplitudes are too much fiddling... I'm going to squash-merge this when the CI is done. I already have a new branch for the amplitude dataframe stuff.

maxscheurer commented 4 years ago

I guess #79 needs to go in to fix the checksum errors?