-
Notifications
You must be signed in to change notification settings - Fork 170
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
Orca etoscs with SOC #1172
Orca etoscs with SOC #1172
Conversation
8f0c202
to
ebe3008
Compare
There is a regression test file cclib/cclib-data#169, note that this seems to actually pass in the current cclib version, but only because the check to make sure etsyms and etenergies are the same length hasn't been introduced yet. |
ebe3008
to
34757f5
Compare
34757f5
to
d64d877
Compare
…overwrites excited state data that has been previously parsed (previously broke SOC calcs)
…pectra is now ignored for etenergies and etoscs (as these are spin-mixed states). Other spectra are parsed as normal
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good so that most CIS/TDDFT output is now consistent with other programs , so no surprises. There are just a few code cleanup things left. I've also put some comments for longer-term changes we're thinking about if you're interested.
self.set_attribute('etoscs', etoscs) | ||
|
||
# Some of these sections contain data that we probably do not want to be populating etenergies | ||
# and/or etoscs with. For example, the SOC corrected spectra are for mixed singlet/triplet states, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not yet, but via #419 we should be able to handle impure states. We also need to be careful to not mix up the multiplicity of a state with its symmetry, even though they are related.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aye that makes sense. Something that I'm increasingly thinking would be a useful change is to split multiplicity and symmetry into separate attributes (as you say they are distinct properties). Technically this might not be backwards compatible though (if we're taking multiplicity OUT of the symmetry attribute), so might need to wait...
# so they do not correspond to the symmetries given in etsyms, and the energy values given are | ||
# probably not what the user would expect to find in etenergies anyway? | ||
# Also, there are twice as many SOC states as true spin states, so half of the etenergies wouldn't | ||
# have a symmetry in etsyms at all... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another technical limitation. If we end up wanting to support this, the question becomes one like struct-of-arrays vs. array-of-structs. Do we have SOC as the outermost grouping, and energies/symmetries/multiplicities/etc. inside there, or those attributes as top-level groupings, and the SOC-corrected states inside each of those attributes? Or something in between?
We are leaning towards the latter. Both still require a unifying marker for "these are from the SOC-corrected states".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm yeah I think I see what you're getting at. In terms of style I think the second is more in-line with the current cclib style, but I might be wrong. In terms of whether it's useful I'm not sure, I've only ever come across SOC used to describe the degree of mixing between states, not the actual mixed states themselves, but my view is rather narrow. I suppose if it's there and easy to parse it would be a shame not to eventually support...
Cheers for comments, I'll go through these soon. Sorry for some of messiness, there was quite a lot of back and forth trying to figure this one out and a lot of the comments were for my own sanity :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Spin-orbit coupling calculations in Orca generate a number of SOC-corrected absorption spectra. The current version of cclib parses all of these and uses the corresponding values to overwrite values of etenergies and etoscs. This is probably undesirable, as in most cases it is the bare electronic transitions that are of interest, rather than the spin-mixed ones.
Even if this is the desired behaviour, it is currently incompatible with the values of etsyms that are parsed, which are only for the un-mixed states (there are also more spin-mixed states than etsyms).
This PR changes this behaviour so only the etoscs corresponding to the unmixed states are parsed (but please note that this is technically a loss in functionality if it really was the spin-mixed states you were after). The test for the ORCA ROCIS file has been changed to reflect this.