11/06/21 PH
Quick look at initial ePS results for orbs 8 - 11, 1eV step size, LF and AF results.
TODO:
For methods: https://epsproc.readthedocs.io/en/dev/demos/ePSproc_class_demo_161020.html
!hostname
!conda env list
import sys
import os
from pathlib import Path
import numpy as np
# import epsproc as ep
import xarray as xr
import matplotlib.pyplot as plt
from datetime import datetime as dt
timeString = dt.now()
import epsproc as ep
# Plotters
from epsproc.plot import hvPlotters
# Multijob class dev code
from epsproc.classes.multiJob import ePSmultiJob
hvPlotters.setPlotters(width = 700, snsStyle='whitegrid')
# For class, above settings don't take, not sure why, something to do with namespaces/calling sequence?
# Overriding snsStyle does work however... although NOT CONSISTENTLY????
# AH, looks like ordering matters - set_style LAST (.set seems to override)
import seaborn as sns
sns.set(rc={'figure.figsize':(10,6)}) # Set figure size in inches
sns.set_context("paper")
sns.set_style("whitegrid") # Set plot style
sns.set_palette("Paired") # Set colour mapping
# Try direct fig type setting for PDF output figs
from IPython.display import set_matplotlib_formats
# set_matplotlib_formats('png', 'pdf')
set_matplotlib_formats('svg', 'pdf')
# xr.set_options(display_style='html')
# # Scan for subdirs, based on existing routine in getFiles()
fileBase = Path('/home/paul/ePS/OCS/OCS_survey') # Data dir on Stimpy
# TODO: fix orb label here, currently relies on (different) fixed format
data = ePSmultiJob(fileBase, verbose = 0)
data.scanFiles()
data.jobsSummary()
# Fix labels for plots
for key in data.data.keys():
data.data[key]['jobNotes']['orbLabel'] = key
Note orbital numbering in table below:
Orb
is Gamess file output orbital numbering, but energy but not grouped by degeneracy.OrbGrp
is grouped numbering by degeneracy, also used by ePolyScat, and will be used for labels etc. below.BUT - file names are 0-indexed (oops), so give OrbGrp-1
here. Sorry.
data.molSummary()
These are from ePolyScat's getCro
function, and are LF (unaligned ensemble) results. This provides a good, if general, overview.
# Comparitive plot over datasets (all symmetries only)
Etype = 'Eke' # Set for Eke or Ehv energy scale
pGauge = 'L'
# Erange=[0, 100] # Plot range (full range if not passed to function below)
# data.plotGetCroComp(pType='SIGMA', Etype = Etype, Erange = Erange, backend = 'hv')
data.plotGetCroComp(pType='SIGMA', pGauge = pGauge, Etype = Etype)
# Comparative plot over datasets (all symmetries only)
data.plotGetCroComp(pType='BETA', Etype=Etype)
Same results as above, Ehv scale.
# Comparitive plot over datasets (all symmetries only)
Etype = 'Ehv' # Set for Eke or Ehv energy scale
pGauge = 'L'
# Erange=[0, 100] # Plot range (full range if not passed to function below)
# data.plotGetCroComp(pType='SIGMA', Etype = Etype, Erange = Erange, backend = 'hv')
data.plotGetCroComp(pType='SIGMA', pGauge = pGauge, Etype = Etype)
# Comparative plot over datasets (all symmetries only)
data.plotGetCroComp(pType='BETA', Etype=Etype)
Current status: almost working, but issue with combining degenerate symmetry components.
Results correct for A1 cases, and relative values and trends should be correct for E1 symmetries.
# Set ADMs for increasing alignment...
tPoints = 4
# inputADMs = np.asarray([[0,0,0, *np.ones(10)], [2,0,0, *np.linspace(0,1,tPoints)], [4,0,0, *np.linspace(0,0.5,tPoints)]])
inputADMs = [[0,0,0, *np.ones(tPoints)], [2,0,0, *np.linspace(0,1,tPoints)], [4,0,0, *np.linspace(0,0.5,tPoints)]]
ADMs = ep.setADMs(ADMs = inputADMs)
ep.lmPlot(ADMs, xDim='t');
# Compute AFBLMs for aligned case
data.AFBLM(AKQS = ADMs, selDims = {'Type':'L'})
data.padPlot(dataType='AFBLM', selDims = {'Labels':'z'}, pStyle='grid', reducePhi='sum', facetDims=['t', 'Eke'])
Note plot ordering above == file read order:
Top two are E1/P symmetries, bottom two A1/S.
# Betas vs. Gauge
data.plotGetCro(pType='BETA', Etype=Etype)
# print(data.jobInfo['ePolyScat'][0])
# print('Run: ' + jobInfo['Starting'][0].split('at')[1])
import scooby
scooby.Report(additional=['epsproc', 'xarray', 'jupyter'])
# Check current Git commit for local ePSproc version
!git -C {Path(ep.__file__).parent} branch
!git -C {Path(ep.__file__).parent} log --format="%H" -n 1
# Check current remote commits
!git ls-remote --heads git://github.com/phockett/ePSproc
!hostname
!conda env list