This page was auto-generated from a Jupyter notebook: naphthalene/naphthalene_wf_1.0-30.1eV_orb33-45_S1.
Problems? Please raise any issues on Github.
ePSproc: Naphthalene S1 component Orb 33 > 45 (B3u) ionization¶
electronic structure input: naphthalene_aug-cc-pVTZ_E_orbLT76_240619.molden
ePS output file: naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out
Web version: https://phockett.github.io/ePSdata/naphthalene/naphthalene_wf_1.0-30.1eV_orb33-45_S1.html
Dataset: https://zenodo.org/record/3960685
DOI (dataset): 10.5281/zenodo.3960685
Licensed under Creative Commons Attribution-NonCommercial-ShareAlike 4.0 (CC BY-NC-SA 4.0)
Job details¶
ePS naphthalene, batch naphthalene_wf_1.0-30.1eV, orbital orb33-45_S1
Naphthalene S1 component Orb 33 > 45 (B3u) ionization, wavefn test run on AntonJr
E=1.0:1.0:30.1 (30 points)
Thu Jun 27 18:00:47 EDT 2019
Set-up¶
Load modules¶
[1]:
import sys
import os
import numpy as np
import epsproc as ep
from datetime import datetime as dt
timeString = dt.now()
* pyevtk not found, VTK export not available.
* plotly not found, plotly plots not available.
Load data¶
[2]:
# File path only, from env var DATAFILE
# dataPath = os.getcwd()
dataFile = os.environ.get('DATAFILE', '')
[3]:
jobInfo = ep.headerFileParse(dataFile)
molInfo = ep.molInfoParse(dataFile)
*** Job info from file header.
ePS naphthalene, batch naphthalene_wf_1.0-30.1eV, orbital orb33-45_S1
Naphthalene S1 component Orb 33 > 45 (B3u) ionization, wavefn test run on AntonJr
E=1.0:1.0:30.1 (30 points)
Thu Jun 27 18:00:47 EDT 2019
*** Found orbitals
1 1 Ene = -11.2404 Spin =Alpha Occup = 2.000000
2 2 Ene = -11.2392 Spin =Alpha Occup = 2.000000
3 3 Ene = -11.2327 Spin =Alpha Occup = 2.000000
4 4 Ene = -11.2326 Spin =Alpha Occup = 2.000000
5 5 Ene = -11.2324 Spin =Alpha Occup = 2.000000
6 6 Ene = -11.2323 Spin =Alpha Occup = 2.000000
7 7 Ene = -11.2312 Spin =Alpha Occup = 2.000000
8 8 Ene = -11.2311 Spin =Alpha Occup = 2.000000
9 9 Ene = -11.2304 Spin =Alpha Occup = 2.000000
10 10 Ene = -11.2304 Spin =Alpha Occup = 2.000000
11 11 Ene = -1.1831 Spin =Alpha Occup = 2.000000
12 12 Ene = -1.1161 Spin =Alpha Occup = 2.000000
13 13 Ene = -1.0537 Spin =Alpha Occup = 2.000000
14 14 Ene = -1.0119 Spin =Alpha Occup = 2.000000
15 15 Ene = -0.9880 Spin =Alpha Occup = 2.000000
16 16 Ene = -0.8549 Spin =Alpha Occup = 2.000000
17 17 Ene = -0.8402 Spin =Alpha Occup = 2.000000
18 18 Ene = -0.8174 Spin =Alpha Occup = 2.000000
19 19 Ene = -0.7077 Spin =Alpha Occup = 2.000000
20 20 Ene = -0.7057 Spin =Alpha Occup = 2.000000
21 21 Ene = -0.6823 Spin =Alpha Occup = 2.000000
22 22 Ene = -0.6254 Spin =Alpha Occup = 2.000000
23 23 Ene = -0.6157 Spin =Alpha Occup = 2.000000
24 24 Ene = -0.5877 Spin =Alpha Occup = 2.000000
25 25 Ene = -0.5868 Spin =Alpha Occup = 2.000000
26 26 Ene = -0.5689 Spin =Alpha Occup = 2.000000
27 27 Ene = -0.5385 Spin =Alpha Occup = 2.000000
28 28 Ene = -0.5241 Spin =Alpha Occup = 2.000000
29 29 Ene = -0.4896 Spin =Alpha Occup = 2.000000
30 30 Ene = -0.4785 Spin =Alpha Occup = 2.000000
31 31 Ene = -0.4529 Spin =Alpha Occup = 2.000000
32 32 Ene = -0.3870 Spin =Alpha Occup = 2.000000
33 33 Ene = -0.3215 Spin =Alpha Occup = 2.000000
34 34 Ene = -0.2944 Spin =Alpha Occup = 2.000000
35 35 Ene = 0.0295 Spin =Alpha Occup = 0.000000
36 36 Ene = 0.0309 Spin =Alpha Occup = 0.000000
37 37 Ene = 0.0316 Spin =Alpha Occup = 0.000000
38 38 Ene = 0.0424 Spin =Alpha Occup = 0.000000
39 39 Ene = 0.0447 Spin =Alpha Occup = 0.000000
40 40 Ene = 0.0579 Spin =Alpha Occup = 0.000000
41 41 Ene = 0.0625 Spin =Alpha Occup = 0.000000
42 42 Ene = 0.0794 Spin =Alpha Occup = 0.000000
43 43 Ene = 0.0798 Spin =Alpha Occup = 0.000000
44 44 Ene = 0.0803 Spin =Alpha Occup = 0.000000
45 45 Ene = 0.0892 Spin =Alpha Occup = 0.000000
*** Found atoms
Z = 6 ZS = 6 r = -0.7023900000 0.0000000000 0.0000000000
Z = 6 ZS = 6 r = 0.7023900000 0.0000000000 0.0000000000
Z = 6 ZS = 6 r = -1.3892300000 1.2396300000 0.0000000000
Z = 6 ZS = 6 r = 1.3892300000 1.2396300000 0.0000000000
Z = 6 ZS = 6 r = -1.3892300000 -1.2396300000 0.0000000000
Z = 6 ZS = 6 r = 1.3892300000 -1.2396300000 0.0000000000
Z = 6 ZS = 6 r = -0.7068400000 2.4097890000 0.0000000000
Z = 6 ZS = 6 r = 0.7068400000 2.4097890000 0.0000000000
Z = 6 ZS = 6 r = -0.7068400000 -2.4097890000 0.0000000000
Z = 6 ZS = 6 r = 0.7068400000 -2.4097890000 0.0000000000
Z = 1 ZS = 1 r = -2.4629990000 1.2381600000 0.0000000000
Z = 1 ZS = 1 r = 2.4629990000 1.2381600000 0.0000000000
Z = 1 ZS = 1 r = -2.4629990000 -1.2381600000 0.0000000000
Z = 1 ZS = 1 r = 2.4629990000 -1.2381600000 0.0000000000
Z = 1 ZS = 1 r = -1.2359200000 3.3433990000 0.0000000000
Z = 1 ZS = 1 r = 1.2359200000 3.3433990000 0.0000000000
Z = 1 ZS = 1 r = -1.2359200000 -3.3433990000 0.0000000000
Z = 1 ZS = 1 r = 1.2359200000 -3.3433990000 0.0000000000
[4]:
# Scan file(s) for various data types...
# For dir scan
# dataXS = ep.readMatEle(fileBase = dataPath, recordType = 'CrossSection')
# dataMatE = ep.readMatEle(fileBase = dataPath, recordType = 'DumpIdy')
# For single file
dataXS = ep.readMatEle(fileIn = dataFile, recordType = 'CrossSection')
dataMatE = ep.readMatEle(fileIn = dataFile, recordType = 'DumpIdy')
*** ePSproc readMatEle(): scanning files for CrossSection segments.
*** Scanning file(s)
['/mnt/femtobackSSHFS/FemtoShare/Results/ePolyScat_stuff/naphthalene/naphthalene_wf_1.0-30.1eV/naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out']
*** Reading ePS output file: /mnt/femtobackSSHFS/FemtoShare/Results/ePolyScat_stuff/naphthalene/naphthalene_wf_1.0-30.1eV/naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out
Expecting 30 energy points.
Expecting 3 symmetries.
Scanning CrossSection segments.
Expecting 4 CrossSection segments.
Found 4 CrossSection segments (sets of results).
Processed 4 sets of CrossSection file segments, (0 blank)
*** ePSproc readMatEle(): scanning files for DumpIdy segments.
*** Scanning file(s)
['/mnt/femtobackSSHFS/FemtoShare/Results/ePolyScat_stuff/naphthalene/naphthalene_wf_1.0-30.1eV/naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out']
*** Reading ePS output file: /mnt/femtobackSSHFS/FemtoShare/Results/ePolyScat_stuff/naphthalene/naphthalene_wf_1.0-30.1eV/naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out
Expecting 30 energy points.
Expecting 3 symmetries.
Scanning CrossSection segments.
Expecting 90 DumpIdy segments.
Found 90 dumpIdy segments (sets of matrix elements).
Processing segments to Xarrays...
Processed 90 sets of DumpIdy file segments, (0 blank)
Job & molecule info¶
[5]:
ep.jobSummary(jobInfo, molInfo);
*** Job summary data
ePS naphthalene, batch naphthalene_wf_1.0-30.1eV, orbital orb33-45_S1
Naphthalene S1 component Orb 33 > 45 (B3u) ionization, wavefn test run on AntonJr
E=1.0:1.0:30.1 (30 points)
Thu Jun 27 18:00:47 EDT 2019
Electronic structure input: '/home/paul/ePS_stuff/naphthalene/electronic_structure/naphthalene_aug-cc-pVTZ_E_orbLT76_240619.molden'
Initial state occ: [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 0 0 0
0 0 0 0 0 0 0 1]
Final state occ: [2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 1 2 0 0 0
0 0 0 0 0 0 0 0]
IPot (input vertical IP, eV): 8.144
*** Additional orbital info (SymProd)
Ionizing orb: [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1]
Ionizing orb sym: ['B2G']
Orb energy (eV): [2.42725563]
Orb energy (H): [0.0892]
Orb energy (cm^-1): [19577.13711872]
Threshold wavelength (nm): 510.79991621642455
*** Warning: some orbital convergences outside single-center expansion convergence tolerance (0.01):
[[ 3. 0.91375834]
[ 4. 0.91961138]
[ 5. 0.94192943]
[ 6. 0.93528526]
[ 7. 0.90773097]
[ 8. 0.91770688]
[ 9. 0.90059297]
[10. 0.8914772 ]]
*** Molecular structure
1-photon ePS Cross-Sections¶
Plot 1-photon cross-sections and \(beta_2\) parameters (for an unaligned ensemble) from ePS calculations. These are taken directly from the ePS output file, CrossSection
segments. See the ePS manual, ``GetCro` command, for further details <https://www.chem.tamu.edu/rgroup/lucchese/ePolyScat.E3.manual/GetCro.html>`__.
Cross-sections by symmetry & type¶
Types correspond to:
‘L’: length gauge results.
‘V’: velocity gauge results.
‘M’: mixed gauge results.
Symmetries correspond to allowed ionizing transitions for the molecular point group (IRs typically corresponding to (x,y,z) polarization geometries), see the ePS manual for a list of symmetries. Symmetry All
corresponds to the sum over all allowed sets of symmetries.
Cross-section units are MBarn.
[6]:
# Plot cross sections using Xarray functionality
# Set here to plot per file - should add some logic to combine files.
for data in dataXS:
daPlot = data.sel(XC='SIGMA')
daPlot.plot.line(x='Eke', col='Type')
\(\beta_{2}\) by symmetry & type¶
Types & symmetries as per cross-sections. Normalized \(\beta_{2}\) paramters, dimensionless.
[7]:
# Repeat for betas
for data in dataXS:
daPlot = data.sel(XC='BETA')
daPlot.plot.line(x='Eke', col='Type')
Dipole matrix elements¶
For 1-photon ionization. These are taken directly from ePS DumpIdy
segments. See the ePS manual, ``DumpIdy` command, for further details <https://www.chem.tamu.edu/rgroup/lucchese/ePolyScat.E3.manual/DumpIdy.html>`__.
[8]:
# Set threshold for significance, only matrix elements with abs values > thres % will be plotted
thres = 0.1
[9]:
# Plot for each fie
for data in dataMatE:
# Plot with sensible defaults - all dims with lmPlot()
# Plot only values > theshold
daPlot, daPlotpd, legendList, gFig = ep.lmPlot(data, thres = thres, thresType = 'pc', figsize = (15,10))
# Plot phases, with unwrap
daPlot, daPlotpd, legendList, gFig = ep.lmPlot(data, thres = thres, thresType = 'pc', figsize = (15,10), pType='phaseUW')
/home/paul/anaconda3/envs/ePSproc-v1.2/lib/python3.7/site-packages/xarray/core/nputils.py:223: RuntimeWarning: All-NaN slice encountered
result = getattr(npmodule, name)(values, axis=axis, **kwargs)
Plotting data naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out, pType=a, thres=1.9428333622816796, with Seaborn
/home/paul/anaconda3/envs/ePSproc-v1.2/lib/python3.7/site-packages/xarray/core/nputils.py:223: RuntimeWarning: All-NaN slice encountered
result = getattr(npmodule, name)(values, axis=axis, **kwargs)
/home/paul/anaconda3/envs/ePSproc-v1.2/lib/python3.7/site-packages/numpy/lib/function_base.py:1520: RuntimeWarning: invalid value encountered in greater
_nx.copyto(ddmod, pi, where=(ddmod == -pi) & (dd > 0))
/home/paul/anaconda3/envs/ePSproc-v1.2/lib/python3.7/site-packages/numpy/lib/function_base.py:1522: RuntimeWarning: invalid value encountered in less
_nx.copyto(ph_correct, 0, where=abs(dd) < discont)
Plotting data naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out, pType=phaseUW, thres=1.9428333622816796, with Seaborn
MFPADs¶
Calculated MF \(\beta\) parameters, using ePS dipole matrix elements. These are calculated by ep.mfblm()
, as a function of energy and polarization geometry. See the ePSproc docs on ``ep.mfblm()` <https://epsproc.readthedocs.io/en/latest/modules/epsproc.MFBLM.html>`__ for further details, and this demo notebook.
[10]:
# Set pol geoms - these correspond to (z,x,y) in molecular frame (relative to principle/symmetry axis)
eAngs = ep.setPolGeoms()
[11]:
# Drop threshold for MF calcs
thres = 1e-3
# Calculate for each fie & pol geom
# TODO - file logic, and parallelize
BLM = []
for data in dataMatE:
BLM.append(ep.mfblmEuler(data, selDims = {'Type':'L'}, eAngs = eAngs, thres = thres,
SFflag = True, verbose = 0)) # Run for all Eke, selected gauge only
[12]:
# Save BLM data - defaults to working dir and 'ep_timestamp' file
# TODO - testing for array/multiple file case
for data in BLM:
fileName = dataFile + '_BLM-L_' + timeString.strftime('%Y-%m-%d_%H-%M-%S')
ep.writeXarray(data, fileName = fileName)
['Written to h5netcdf format', '/mnt/femtobackSSHFS/FemtoShare/Results/ePolyScat_stuff/naphthalene/naphthalene_wf_1.0-30.1eV/naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out_BLM-L_2020-02-13_16-33-11.nc']
/home/paul/anaconda3/envs/ePSproc-v1.2/lib/python3.7/site-packages/h5netcdf/core.py:481: H5pyDeprecationWarning: other_ds.dims.create_scale(ds, name) is deprecated. Use ds.make_scale(name) instead.
h5ds.dims.create_scale(h5ds, scale_name)
[13]:
# Normalize and plot results
for BLMplot in BLM:
# Plot unnormalized B00 only, real part
# This is/should be in units of MBarn (TBC).
# BLMplot.where(np.abs(BLMplot) > thres, drop = True).real.squeeze().sel({'l':0, 'm':0}).plot.line(x='Eke', col='Euler');
BLMplot.XS.real.squeeze().plot.line(x='Eke', col='Euler');
# Plot values normalised by B00 - now set in calculation function
# Plot results with lmPlot(), ordering by Euler sets
# Version with (semi-manual) Euler grouping
daPlot, daPlotpd, legendList, gFig = ep.lmPlot(BLMplot.swap_dims({'Euler':'Labels'}), SFflag = False, eulerGroup = True,
thresType = 'pc', thres = thres,
plotDims = ('Labels','l','m'),
figsize = (15,10))
Plotting data naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out, pType=a, thres=0.001, with Seaborn
Error & consistency checks¶
[14]:
# Check SF values
for data in dataMatE:
# Plot values, single plot
data.SF.pipe(np.abs).plot.line(x='Eke')
data.SF.real.plot.line(x='Eke')
data.SF.imag.plot.line(x='Eke')
# Plot values, facet plot
# data.SF.pipe(np.abs).plot.line(x='Eke', col='Sym')
[15]:
# Compare calculated BLMs for L and V types (dafault above for L)
# Calculate for each fie & pol geom, and compare.
BLMv = []
BLMdiff = []
for n, data in enumerate(dataMatE):
BLMv.append(ep.mfblmEuler(data, selDims = {'Type':'V'}, eAngs = eAngs, thres = thres,
SFflag = True, verbose = 0)) # Run for all Eke, selected gauge only
BLMdiff.append(BLM[n] - BLMv[n])
BLMdiff[n]['dXS'] = BLM[n].XS - BLMv[n].XS # Set XS too, dropped in calc above
BLMdiff[n].attrs['dataType'] = 'matE'
[16]:
# Save BLM data - defaults to working dir and 'ep_timestamp' file
# TODO - testing for array/multiple file case
for data in BLMv:
fileName = dataFile + '_BLM-V_' + timeString.strftime('%Y-%m-%d_%H-%M-%S')
ep.writeXarray(data, fileName = fileName)
['Written to h5netcdf format', '/mnt/femtobackSSHFS/FemtoShare/Results/ePolyScat_stuff/naphthalene/naphthalene_wf_1.0-30.1eV/naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out_BLM-V_2020-02-13_16-33-11.nc']
/home/paul/anaconda3/envs/ePSproc-v1.2/lib/python3.7/site-packages/h5netcdf/core.py:481: H5pyDeprecationWarning: other_ds.dims.create_scale(ds, name) is deprecated. Use ds.make_scale(name) instead.
h5ds.dims.create_scale(h5ds, scale_name)
[17]:
# Normalize and plot results
for BLMplot in BLMv:
# Plot unnormalized B00 only, real part
# This is/should be in units of MBarn (TBC).
# BLMplot.where(np.abs(BLMplot) > thres, drop = True).real.squeeze().sel({'l':0, 'm':0}).plot.line(x='Eke', col='Euler');
BLMplot.XS.real.squeeze().plot.line(x='Eke', col='Euler');
# Plot values normalised by B00 - now set in calculation function
# Plot results with lmPlot(), ordering by Euler sets
# Version with (semi-manual) Euler grouping
daPlot, daPlotpd, legendList, gFig = ep.lmPlot(BLMplot.swap_dims({'Euler':'Labels'}), SFflag = False, eulerGroup = True,
thresType = 'pc', thres = thres,
plotDims = ('Labels','l','m'),
figsize = (15,10))
Plotting data naphthalene_wf_1.0-30.1eV_orb33-45_S1.inp.out, pType=a, thres=0.001, with Seaborn
[18]:
# Difference between 'L' and 'V' results
# NOTE - this currently drops XS
print('Differences, L vs. V gauge BLMs')
for BLMplot in BLMdiff:
maxDiff = BLMplot.max()
print(f'Max difference in BLMs (L-V): {0}', maxDiff.data)
if np.abs(maxDiff) > thres:
# Plot B00 only, real part
# BLMplot.where(np.abs(BLMplot) > thres, drop = True).real.squeeze().sel({'l':0, 'm':0}).plot.line(x='Eke', col='Euler');
BLMplot.dXS.real.squeeze().plot.line(x='Eke', col='Euler');
# Plot values normalised by B00 - now set in calculation function
# Plot results with lmPlot(), ordering by Euler sets
# Version with (semi-manual) Euler grouping
daPlot, daPlotpd, legendList, gFig = ep.lmPlot(BLMplot.swap_dims({'Euler':'Labels'}), SFflag = False, eulerGroup = True,
thresType = 'pc', thres = thres,
plotDims = ('Labels','l','m'),
figsize = (15,10))
Differences, L vs. V gauge BLMs
Max difference in BLMs (L-V): 0 (1.0222064761623288-6.697163561961564e-18j)
Plotting data (No filename), pType=a, thres=0.0010222064761623289, with Seaborn
[19]:
# Check imaginary components - should be around machine tolerance.
print('Machine tolerance: ', np.finfo(float).eps)
for BLMplot in BLM:
maxImag = BLMplot.imag.max()
print(f'Max imaginary value: {0}', maxImag.data)
# BLMplot.where(np.abs(BLMplot) > thres, drop = True).imag.squeeze().plot.line(x='Eke', col='Euler');
BLMplot = ep.matEleSelector(BLMplot, thres=thres, dims = 'Eke')
BLMplot.imag.squeeze().plot.line(x='Eke', col='Euler');
Machine tolerance: 2.220446049250313e-16
Max imaginary value: 0 6.490604556291761e-16
Version info¶
Original job details¶
[20]:
print(jobInfo['ePolyScat'][0])
print('Run: ' + jobInfo['Starting'][0].split('at')[1])
ePolyScat Version E3
Run: 2019-06-27 18:02:34.060 (GMT -0400)
ePSproc details¶
[21]:
templateVersion = '0.0.6'
templateDate = '12/01/20'
[22]:
%load_ext version_information
[23]:
%version_information epsproc, xarray
[23]:
Software | Version |
---|---|
Python | 3.7.5 64bit [GCC 7.3.0] |
IPython | 7.9.0 |
OS | Linux 5.0.0 36 generic x86_64 with debian buster sid |
epsproc | 1.2.4 |
xarray | 0.14.0 |
Thu Feb 13 22:36:33 2020 EST |
[24]:
print('Run: {}'.format(timeString.strftime('%Y-%m-%d_%H-%M-%S')))
host = !hostname
print('Host: {}'.format(host[0]))
Run: 2020-02-13_16-33-11
Host: jake
Cite this dataset¶
Hockett, Paul (2019). ePSproc: Naphthalene S1 component Orb 33 > 45 (B3u) ionization. Dataset on Zenodo. DOI: 10.5281/zenodo.3960685. URL: https://phockett.github.io/ePSdata/naphthalene/naphthalene_wf_1.0-30.1eV_orb33-45_S1.html
Bibtex:
@data{Naphthalene S1 component Orb 33 > 45 (B3u) ionization,
title = {ePSproc: Naphthalene S1 component Orb 33 > 45 (B3u) ionization}
author = {Hockett, Paul},
doi = {10.5281/zenodo.3960685},
publisher = {Zenodo},
year = {2019},
url = {https://phockett.github.io/ePSdata/naphthalene/naphthalene_wf_1.0-30.1eV_orb33-45_S1.html}
}
See citation notes on ePSdata for further details.