Skip to content

Conversation

@JonathonMisiewicz
Copy link
Contributor

@JonathonMisiewicz JonathonMisiewicz commented Mar 31, 2022

Description

This PR exposes Einstein Coefficients and Rotary Strengths to psivar. As of this PR, cc tests 1-33, 35-45, 47, 49-53, 55-56 are ported. Four tests to go.

I'm not ultimately happy with these tests (see the six issues I filed this evening), but it's as good as we have right now.

Questions

  • Please confirm the descriptions and units of the glossary additions.

Checklist

  • Newly added tests pass

Status

  • Ready for review
  • Ready for merge

@JonathonMisiewicz JonathonMisiewicz added this to the Psi4 1.6 milestone Mar 31, 2022
@lothian
Copy link
Contributor

lothian commented Mar 31, 2022

How did you obtain the units? When I look at the code (I can't find my notes on the Einstein coefficients), in SI, I get:
B <-- m^3 J^-1 s^-2
A <-- s^-1 (which is the unit reported in the tabular output that includes A)

@JonathonMisiewicz
Copy link
Contributor Author

That's right. I made three different mistakes in the units (missed the section you pointed out, didn't realize you were converting to not from SI at the end, and mixed up the probability-from-mean-intensity definition vs. the probability-from-energy-density definition of the Einstein B.)

Documentation updated.

Copy link
Member

@loriab loriab left a comment

Choose a reason for hiding this comment

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

excellent idea on the qcvars saver

### Transition checks

test_data = { # TEST
"ROOT 0 (B1) -> ROOT 0 (A2)": {"OSCILLATOR STRENGTH (LEN)": 0.00407528, "EINSTEIN A (LEN)": 3.86413231e+07, "EINSTEIN B (LEN)": 1.36907729e+18}, # TEST
Copy link
Member

Choose a reason for hiding this comment

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

I hate to suggest it now, but what are your thoughts on ROOT n (h) always meaning all-root ordering and ROOT n OF (h) always meaning within-symmetry-ordering?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I hate to admit it now, but that is cleaner.

We're keeping "ROOT n OF (h)", but do you want "ROOT n (h)" notation, to boot?

Copy link
Member

Choose a reason for hiding this comment

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

"OF" or "IN", do you think?

do you want "ROOT n (h)" notation, to boot?

I don't know. may as well for now. up to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You're right, "IN" is better.

I think the plan for right now is to keep with the current notation, then have a cleanup PR once the series is over (we're very close), where switch all excited state variables to "IN" notation and add the new "ROOT n (h)" notation as well.

.. psivar:: CCname ROOT n (h) -> ROOT m (i) EINSTEIN B (LEN)

The Einstein B coefficient, the stimulated emission 'probability'
in terms of energy density. Units are in [m^3 / J / s^2].
Copy link
Member

Choose a reason for hiding this comment

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

I periodically forget this, but we now try to save qcvars in au for compatibility with QCSchema and to avoid unit conversion error. I should plan on a pass (before v1.6) to switch to au. But that'll involve tests to check pint can to the au -> SI conversion easily. For now, it's great to get these saved and in at least one set of known units :-)

@JonathonMisiewicz
Copy link
Contributor Author

Reminder that this PR could use @lothian review now that the units are clarified.

@JonathonMisiewicz
Copy link
Contributor Author

I rebased the PR.

In addition to eliminating the redundant argument, I did some const marking.

@JonathonMisiewicz JonathonMisiewicz merged commit f2179db into psi4:master Apr 5, 2022
zachglick pushed a commit to zachglick/psi4 that referenced this pull request Apr 18, 2022
* Fix bad print in CCLambda. Expose quantities Py-side for test purposes.

* Update docs

* Forgot some variables

* Update references

* Correct units

* Loosen conv. crit.

* Remove MintsHelper from arg list

* Const

* More const
zachglick pushed a commit to zachglick/psi4 that referenced this pull request Apr 18, 2022
* Fix bad print in CCLambda. Expose quantities Py-side for test purposes.

* Update docs

* Forgot some variables

* Update references

* Correct units

* Loosen conv. crit.

* Remove MintsHelper from arg list

* Const

* More const
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.

4 participants