Molcas parser API¶
Imports to get the resource files¶
[1]:
from vibrav.base import resource
from vibrav.util.open_files import uncompress_file
import os
Uncompress the resource file
[2]:
decomp = uncompress_file(resource('molcas-rassi-nien.out.xz'))
Read the output file¶
[3]:
from vibrav.molcas import Output
[4]:
ed = Output(decomp)
Parse the spin-free dipole moments¶
[5]:
ed.parse_sf_dipole_moment()
ed.sf_dipole_moment
[5]:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ... | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | component | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | -9.376636e-06 | -9.383159e-04 | -5.259894e-04 | -6.844936e-07 | 8.287023e-04 | 5.784427e-04 | -3.305595e-08 | -7.190377e-08 | -8.454175e-04 | -4.697420e-04 | ... | -8.798365e-20 | 1.388980e-19 | -7.326883e-20 | 2.544445e-18 | -1.419502e-18 | -1.440886e-21 | 9.137218e-19 | 2.811453e-20 | 4.550291e-18 | x |
1 | -9.383159e-04 | 4.938038e-03 | 8.086204e-03 | 8.956935e-03 | -2.483163e-03 | -5.127446e-03 | -3.889645e-03 | -5.159244e-03 | 3.840473e-03 | 6.217030e-03 | ... | 1.989800e-18 | 1.577644e-18 | 2.620320e-18 | -1.807584e-19 | -2.453048e-19 | -9.210226e-20 | -6.286158e-19 | 1.502377e-18 | 5.741586e-20 | x |
2 | -5.259894e-04 | 8.086204e-03 | -4.955820e-03 | -1.598368e-02 | -5.128130e-03 | 2.482465e-03 | -2.178772e-03 | -2.890120e-03 | 6.220213e-03 | -3.840069e-03 | ... | -1.843977e-18 | 8.185865e-18 | -2.640023e-18 | -8.216381e-19 | 1.244695e-19 | -1.027803e-19 | -5.960823e-19 | -2.427264e-19 | 2.866196e-19 | x |
3 | -6.844936e-07 | 8.956935e-03 | -1.598368e-02 | -5.832545e-06 | 8.057229e-03 | -1.155555e-02 | 8.588415e-07 | -2.991994e-07 | -6.062807e-03 | 1.092611e-02 | ... | -1.797950e-18 | 3.197102e-20 | 1.497748e-18 | 1.218254e-19 | -1.471458e-19 | 3.094076e-18 | -4.012417e-19 | 6.367794e-18 | -1.113868e-19 | x |
4 | 8.287023e-04 | -2.483163e-03 | -5.128130e-03 | 8.057229e-03 | 3.184097e-03 | 8.667119e-03 | -2.491305e-03 | -2.237622e-03 | 1.024558e-05 | 1.718904e-05 | ... | 4.998033e-18 | 1.080093e-18 | 2.621471e-19 | -1.356941e-18 | 4.851931e-18 | -4.377820e-19 | -2.460354e-19 | -2.222575e-18 | 1.050619e-19 | x |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
70 | 2.798133e-20 | -7.494509e-21 | 1.837413e-19 | 4.658169e-20 | -4.350311e-20 | -4.986815e-19 | 4.598024e-19 | -2.752256e-19 | 3.880373e-20 | -2.264951e-19 | ... | -3.439530e-05 | 3.746701e-03 | 4.879674e-05 | -4.470660e-06 | -1.853061e-08 | -5.129429e-07 | -2.733188e-04 | -3.820681e-07 | -4.882723e-07 | z |
71 | 1.697245e-19 | 7.001676e-21 | -5.006348e-20 | 2.464600e-20 | 4.468406e-20 | -1.822131e-19 | -6.176509e-19 | 3.473685e-19 | 8.654902e-22 | 2.792257e-20 | ... | 1.109199e-05 | -9.979060e-04 | -2.022896e-05 | -2.518394e-04 | -5.129429e-07 | 8.667985e-08 | 2.121827e-05 | -2.716501e-06 | 1.468724e-06 | z |
72 | -1.933543e-22 | -1.599636e-19 | 6.460808e-20 | -9.327870e-20 | 5.560524e-20 | 1.639681e-20 | 5.806210e-20 | 1.996194e-20 | 1.152501e-19 | 3.058508e-20 | ... | 1.010293e-03 | 1.111767e-05 | 3.031995e-06 | 4.642385e-07 | -2.733188e-04 | 2.121827e-05 | -8.201143e-08 | -1.724641e-05 | 9.633586e-06 | z |
73 | 3.674293e-20 | -1.132336e-20 | 2.856421e-19 | 4.001355e-21 | 1.449966e-20 | -1.046807e-19 | 2.573478e-19 | -1.295672e-19 | 7.010531e-21 | -3.302352e-19 | ... | -4.566679e-06 | -3.468737e-05 | 3.051234e-03 | 2.725762e-06 | -3.820681e-07 | -2.716501e-06 | -1.724641e-05 | 4.697866e-09 | 2.735140e-08 | z |
74 | 6.389150e-20 | -5.825257e-20 | 4.447751e-20 | 4.439398e-21 | 6.247369e-20 | 1.103016e-18 | -1.104416e-18 | -6.566795e-19 | -1.603367e-20 | -7.502357e-20 | ... | 1.344133e-05 | 1.051371e-04 | -1.062807e-02 | 2.906158e-06 | -4.882723e-07 | 1.468724e-06 | 9.633586e-06 | 2.735140e-08 | -1.426067e-08 | z |
75 rows × 26 columns
Parse the spin-free quadrupole moment¶
This will only parse the upper triangular elements of the matrix. I.e., the xx
, xy
, xz
, yy
, yz
, and zz
compoenents.
[6]:
ed.parse_sf_quadrupole_moment()
ed.sf_quadrupole_moment
[6]:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ... | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | component | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | -3.500140e+01 | 1.173247e-02 | 6.580265e-03 | 6.674075e-06 | -6.331848e-02 | -4.415315e-02 | 6.546761e-02 | 7.538489e-02 | 6.657617e-02 | 3.695543e-02 | ... | -1.867184e-18 | 4.938135e-17 | -1.525615e-17 | 1.081891e-15 | -9.495733e-17 | 2.103179e-17 | 4.890426e-17 | 2.152580e-19 | 8.784260e-17 | xx |
1 | 1.173247e-02 | -3.545854e+01 | 3.780688e-02 | 8.820404e-02 | -1.373307e-02 | -1.262719e-01 | -1.128179e-01 | -6.731629e-02 | -3.009900e-02 | 1.232099e-01 | ... | 5.989637e-16 | 1.370153e-16 | 4.590252e-17 | -2.581924e-18 | 9.026816e-18 | -2.041515e-16 | -1.408774e-16 | 2.477513e-16 | -1.763594e-17 | xx |
2 | 6.580265e-03 | 3.780688e-02 | -3.550478e+01 | -1.574149e-01 | -1.361030e-01 | 1.133322e-01 | -6.321337e-02 | -3.770022e-02 | 1.223889e-01 | -1.817725e-01 | ... | -1.936954e-16 | 1.032403e-16 | 6.011572e-16 | -9.821624e-17 | 6.937587e-18 | -1.406346e-17 | -8.820235e-18 | 2.148651e-17 | -4.197851e-18 | xx |
3 | 6.674075e-06 | 8.820404e-02 | -1.574149e-01 | -3.536689e+01 | 1.440698e-01 | -2.066119e-01 | -1.561867e-06 | -1.181690e-06 | -1.660243e-01 | 2.991383e-01 | ... | 4.826918e-16 | 2.534805e-17 | 3.788097e-17 | -1.250331e-18 | -1.986380e-17 | 5.757652e-16 | 1.283977e-17 | -2.825176e-16 | -9.258153e-18 | xx |
4 | -6.331848e-02 | -1.373307e-02 | -1.361030e-01 | 1.440698e-01 | -3.560160e+01 | 1.089867e-01 | -1.045581e-01 | -2.487637e-01 | -3.690626e-01 | -1.178888e-01 | ... | -1.661790e-17 | 6.268158e-17 | 1.005471e-17 | -1.190769e-17 | 6.305117e-16 | -1.235855e-16 | -5.809364e-17 | -3.989386e-16 | 1.953748e-17 | xx |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
145 | -5.353959e-17 | 1.553045e-17 | -1.791974e-18 | -1.280992e-18 | 4.663912e-16 | 1.120435e-17 | -2.605852e-16 | 5.946732e-17 | 2.563243e-16 | 2.339960e-17 | ... | 4.950885e-02 | 4.527462e-04 | 1.221739e-04 | -1.649518e-08 | -4.447863e+01 | 2.213497e-01 | -4.169294e-04 | 1.124140e-03 | -9.071752e-04 | zz |
146 | 1.213004e-17 | -1.731779e-16 | -2.041465e-17 | 4.170898e-16 | -1.109232e-16 | -5.616328e-18 | -9.997202e-17 | 5.529510e-19 | -3.207592e-16 | -2.334154e-17 | ... | -1.656264e-01 | -1.831634e-03 | -3.086526e-04 | -4.184335e-04 | 2.213497e-01 | -4.444879e+01 | -4.720966e-06 | -1.793273e-03 | -1.499529e-03 | zz |
147 | 2.583342e-17 | -9.382642e-17 | -1.365728e-17 | 1.874459e-17 | -2.270473e-17 | -3.131737e-16 | -8.067280e-16 | 6.148585e-16 | 7.953961e-18 | 5.520967e-16 | ... | 1.843311e-03 | -1.667328e-01 | -2.148542e-03 | -2.219409e-01 | -4.169294e-04 | -4.720966e-06 | -4.445048e+01 | 2.823250e-04 | 2.339333e-04 | zz |
148 | -6.567873e-20 | 1.772268e-16 | 2.677679e-17 | -3.526988e-16 | -2.759673e-16 | -1.073295e-16 | -1.361126e-18 | 2.109195e-18 | -1.163318e-16 | 1.769014e-17 | ... | 2.558363e-05 | -1.311877e-06 | 1.763864e-07 | 1.743400e-04 | 1.124140e-03 | -1.793273e-03 | 2.823250e-04 | -4.411257e+01 | 3.167020e-01 | zz |
149 | -1.611504e-18 | 1.750389e-17 | -2.846105e-21 | -1.510383e-17 | 1.040778e-17 | -2.532659e-18 | 2.078083e-19 | 8.150862e-20 | -1.091187e-17 | -1.905165e-18 | ... | 4.111305e-05 | -3.663114e-06 | 1.212405e-06 | -1.338341e-04 | -9.071752e-04 | -1.499529e-03 | 2.339333e-04 | 3.167020e-01 | -4.388516e+01 | zz |
150 rows × 26 columns
Parse the spin-free angular momentum¶
[7]:
ed.parse_sf_angmom()
ed.sf_angmom
[7]:
0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | ... | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | component | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 6.626731e-18 | -1.553359e+00 | -8.705123e-01 | -1.015200e-04 | -3.127997e-02 | -2.182243e-02 | 4.095653e-06 | 1.191905e-06 | 7.531522e-03 | 4.182673e-03 | ... | -1.552690e-16 | 1.180405e-16 | -4.020604e-17 | 2.068694e-20 | 5.867911e-18 | -7.130628e-17 | -2.947106e-17 | 3.162611e-17 | 1.128699e-18 | x |
1 | 1.553359e+00 | -4.571222e-16 | -4.233573e-05 | 2.585774e-01 | 6.076944e-01 | 1.254894e+00 | -8.535142e-01 | 2.196790e-01 | 2.134496e-01 | 3.456598e-01 | ... | -1.017408e-16 | 6.327755e-17 | 1.062884e-16 | -5.816560e-17 | 1.698517e-17 | -1.018386e-16 | 1.189779e-17 | 1.037624e-16 | 5.340634e-17 | x |
2 | 8.705123e-01 | 4.233573e-05 | -8.710006e-17 | -4.614284e-01 | 1.254876e+00 | -6.077587e-01 | -4.782594e-01 | 1.231310e-01 | 3.456392e-01 | -2.134668e-01 | ... | -8.478716e-18 | -4.990680e-17 | -1.430057e-16 | -1.092594e-16 | 9.307636e-17 | 3.730760e-18 | 6.864208e-18 | 5.863639e-17 | 7.663078e-17 | x |
3 | 1.015200e-04 | -2.585774e-01 | 4.614284e-01 | 9.882260e-17 | 5.559758e-01 | -7.970499e-01 | -1.958799e-05 | 2.570007e-05 | 1.382345e-01 | -2.489937e-01 | ... | 1.859949e-16 | -1.407091e-17 | -1.315167e-17 | 6.863221e-17 | -6.336027e-17 | -6.016258e-17 | 1.522854e-16 | 2.035658e-17 | 5.194333e-17 | x |
4 | 3.127997e-02 | -6.076944e-01 | -1.254876e+00 | -5.559758e-01 | 7.815008e-16 | -4.359339e-05 | -9.501658e-01 | 6.395912e-01 | 2.098857e-03 | 4.315184e-03 | ... | -1.402546e-17 | -8.147693e-18 | 4.681586e-17 | -2.209597e-17 | 8.914598e-17 | -1.445746e-17 | 8.168061e-17 | -1.067923e-17 | 1.460346e-17 | x |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
70 | 1.076297e-18 | 5.058259e-18 | -6.958368e-17 | 2.276363e-17 | -9.803107e-18 | -1.241716e-16 | 1.548133e-16 | -1.197104e-16 | 1.781604e-17 | -1.709743e-17 | ... | -1.553752e-02 | 1.692434e+00 | 1.661221e-02 | 4.493845e-01 | -2.242914e-16 | 2.756765e-03 | 1.461629e+00 | -9.076902e-04 | -1.548385e-06 | z |
71 | 6.871715e-17 | 5.650068e-18 | 1.206950e-17 | 7.114093e-18 | 9.970490e-18 | 1.560849e-16 | -1.724995e-16 | 5.840906e-17 | -9.425148e-18 | 1.035572e-16 | ... | 4.561864e-03 | -4.111893e-01 | -9.155088e-03 | -1.458302e+00 | -2.756765e-03 | -4.688703e-16 | -1.174555e+00 | 8.376364e-04 | 2.041596e-05 | z |
72 | -5.002503e-19 | -2.315452e-18 | 2.365850e-17 | -4.725534e-17 | 7.158064e-17 | 9.121058e-18 | 1.574381e-17 | -7.206228e-20 | -4.742131e-17 | 7.152212e-18 | ... | 4.138430e-01 | 4.560828e-03 | 1.376082e-03 | 2.744145e-03 | -1.461629e+00 | 1.174555e+00 | 4.949914e-17 | 5.342435e-03 | 1.209511e-04 | z |
73 | 1.875531e-17 | -1.439694e-18 | 9.718745e-17 | -8.412248e-19 | 5.580965e-18 | -2.975092e-17 | 6.093322e-17 | -1.302164e-17 | 1.966598e-18 | -9.145873e-17 | ... | -1.756205e-03 | -1.334722e-02 | 1.224967e+00 | -5.833379e-03 | 9.076902e-04 | -8.376364e-04 | -5.342435e-03 | -6.160120e-16 | -1.337943e-06 | z |
74 | 4.219490e-18 | -2.262157e-17 | -8.309751e-18 | -1.200748e-19 | 2.796168e-18 | 6.910406e-17 | -3.962958e-16 | -6.394910e-17 | 3.122763e-18 | -2.303865e-17 | ... | 9.977237e-04 | 7.759110e-03 | -8.003581e-01 | -1.392226e-05 | 1.548385e-06 | -2.041596e-05 | -1.209511e-04 | 1.337943e-06 | -9.249594e-16 | z |
75 rows × 26 columns
Parse the spin-free energies¶
[8]:
ed.parse_sf_energy()
ed.sf_energy
[8]:
energy | rel_energy | |
---|---|---|
0 | -2077.953987 | 0.000000 |
1 | -2077.903019 | 0.050968 |
2 | -2077.903018 | 0.050969 |
3 | -2077.902361 | 0.051626 |
4 | -2077.870278 | 0.083709 |
5 | -2077.870275 | 0.083712 |
6 | -2077.868713 | 0.085274 |
7 | -2077.816677 | 0.137310 |
8 | -2077.816249 | 0.137738 |
9 | -2077.816240 | 0.137747 |
10 | -2077.885925 | 0.068062 |
11 | -2077.885754 | 0.068233 |
12 | -2077.835508 | 0.118479 |
13 | -2077.834321 | 0.119666 |
14 | -2077.834318 | 0.119669 |
15 | -2077.834244 | 0.119743 |
16 | -2077.807731 | 0.146256 |
17 | -2077.807723 | 0.146264 |
18 | -2077.807293 | 0.146694 |
19 | -2077.766660 | 0.187327 |
20 | -2077.766605 | 0.187382 |
21 | -2077.763766 | 0.190221 |
22 | -2077.763634 | 0.190353 |
23 | -2077.763618 | 0.190369 |
24 | -2077.666439 | 0.287548 |
Parse the spin-orbit energies¶
[9]:
ed.parse_so_energy()
ed.so_energy
[9]:
energy | rel_energy | |
---|---|---|
0 | -2077.954390 | 0.000000e+00 |
1 | -2077.954390 | 9.999894e-09 |
2 | -2077.954387 | 3.260000e-06 |
3 | -2077.904739 | 4.965116e-02 |
4 | -2077.904733 | 4.965666e-02 |
5 | -2077.903867 | 5.052263e-02 |
6 | -2077.903867 | 5.052302e-02 |
7 | -2077.903745 | 5.064452e-02 |
8 | -2077.902419 | 5.197119e-02 |
9 | -2077.901899 | 5.249087e-02 |
10 | -2077.901899 | 5.249126e-02 |
11 | -2077.901295 | 5.309470e-02 |
12 | -2077.886226 | 6.816392e-02 |
13 | -2077.886066 | 6.832363e-02 |
14 | -2077.873816 | 8.057348e-02 |
15 | -2077.871850 | 8.254028e-02 |
16 | -2077.871342 | 8.304758e-02 |
17 | -2077.871340 | 8.304971e-02 |
18 | -2077.868206 | 8.618360e-02 |
19 | -2077.868206 | 8.618428e-02 |
20 | -2077.867139 | 8.725046e-02 |
21 | -2077.866569 | 8.782112e-02 |
22 | -2077.866563 | 8.782704e-02 |
23 | -2077.835769 | 1.186211e-01 |
24 | -2077.835337 | 1.190529e-01 |
25 | -2077.835334 | 1.190561e-01 |
26 | -2077.834799 | 1.195913e-01 |
27 | -2077.817396 | 1.369943e-01 |
28 | -2077.817393 | 1.369973e-01 |
29 | -2077.816481 | 1.379089e-01 |
30 | -2077.816285 | 1.381048e-01 |
31 | -2077.816284 | 1.381056e-01 |
32 | -2077.815347 | 1.390425e-01 |
33 | -2077.815342 | 1.390480e-01 |
34 | -2077.815145 | 1.392451e-01 |
35 | -2077.814290 | 1.400999e-01 |
36 | -2077.807559 | 1.468304e-01 |
37 | -2077.807552 | 1.468383e-01 |
38 | -2077.807127 | 1.472626e-01 |
39 | -2077.766475 | 1.879153e-01 |
40 | -2077.766420 | 1.879702e-01 |
41 | -2077.763621 | 1.907691e-01 |
42 | -2077.763489 | 1.909009e-01 |
43 | -2077.763480 | 1.909094e-01 |
44 | -2077.666114 | 2.882755e-01 |
Parse the spin-free oscillators and the respective Einstein coefficients¶
[10]:
ed.parse_sf_oscillator()
ed.sf_oscillator
[10]:
nrow | ncol | oscil | a_x | a_y | a_z | a_tot | |
---|---|---|---|---|---|---|---|
0 | 0 | 1 | 3.930999e-08 | 2.496945e+00 | 7.840636e-01 | 9.657002e-07 | 3.281010e+00 |
1 | 0 | 2 | 3.933130e-08 | 7.846762e-01 | 2.498241e+00 | 4.025564e-08 | 3.282917e+00 |
2 | 0 | 3 | 2.102329e-07 | 1.380900e-06 | 2.857155e-07 | 1.800309e+01 | 1.800309e+01 |
3 | 0 | 4 | 5.696867e-08 | 8.628428e+00 | 4.197526e+00 | 2.811387e-06 | 1.282596e+01 |
4 | 0 | 5 | 5.706843e-08 | 4.204379e+00 | 8.644959e+00 | 7.061455e-08 | 1.284934e+01 |
... | ... | ... | ... | ... | ... | ... | ... |
145 | 21 | 23 | 2.536118e-09 | 5.299360e-07 | 1.254916e-06 | 5.124162e-13 | 1.784852e-06 |
146 | 21 | 24 | 2.492648e-06 | 2.252458e+02 | 5.333962e+02 | 4.259893e-05 | 7.586421e+02 |
147 | 22 | 23 | 2.766291e-10 | 1.599847e-09 | 6.754759e-10 | 2.609615e-14 | 2.275349e-09 |
148 | 22 | 24 | 2.512245e-06 | 5.361555e+02 | 2.263767e+02 | 1.825265e-03 | 7.625340e+02 |
149 | 23 | 24 | 6.365324e-11 | 3.192207e-03 | 1.612189e-02 | 1.470600e-08 | 1.931411e-02 |
150 rows × 7 columns
Parse the spin-orbit oscillators and the respective Einstein coefficients¶
[11]:
ed.parse_so_oscillator()
ed.so_oscillator
[11]:
nrow | ncol | oscil | a_x | a_y | a_z | a_tot | |
---|---|---|---|---|---|---|---|
0 | 0 | 1 | 4.318828e-18 | 2.016091e-23 | 3.312361e-24 | 2.343992e-30 | 2.347327e-23 |
1 | 0 | 2 | 3.911798e-15 | 4.156324e-16 | 9.189764e-16 | 5.844245e-24 | 1.334609e-15 |
2 | 0 | 3 | 5.394123e-08 | 8.279098e-01 | 1.537588e-01 | 3.290899e+00 | 4.272568e+00 |
3 | 0 | 4 | 1.236666e-08 | 1.529829e-01 | 8.254572e-01 | 1.313496e-03 | 9.797536e-01 |
4 | 0 | 5 | 9.356059e-08 | 4.234016e+00 | 1.078398e+00 | 2.360747e+00 | 7.673160e+00 |
... | ... | ... | ... | ... | ... | ... | ... |
985 | 41 | 43 | 2.430109e-09 | 4.575384e-07 | 1.079441e-06 | 4.469775e-13 | 1.536979e-06 |
986 | 41 | 44 | 2.508080e-06 | 2.274764e+02 | 5.386792e+02 | 4.296662e-05 | 7.661557e+02 |
987 | 42 | 43 | 1.483332e-10 | 2.427076e-10 | 1.020911e-10 | 3.948815e-15 | 3.448027e-10 |
988 | 42 | 44 | 2.527732e-06 | 5.414604e+02 | 2.286106e+02 | 1.839430e-03 | 7.700729e+02 |
989 | 43 | 44 | 8.138990e-11 | 1.570466e-03 | 2.322060e-02 | 6.346128e-09 | 2.479108e-02 |
990 rows × 7 columns
[12]:
os.remove(decomp)
[ ]: