step2_analysis

libra_py.workflows.nbra.step2_analysis.compute_oscillator_strengths(Hvib, Hprime_x, Hprime_y, Hprime_z, params)[source]

Auxiliary function for the computation of the absorption/emission spectrum of the system

https://en.wikipedia.org/wiki/Oscillator_strength

Parameters
  • Hvib (list of CMATRIX) – “vibronic” Hamiltonians along the trajectory [units: a.u.]

  • Hprime_x (list of CMATRIX) – i*hbar*<i|p_x|j> matrices along the trajectory [units: a.u.]

  • Hprime_y (list of CMATRIX) – i*hbar*<i|p_y|j> matrices along the trajectory [units: a.u.]

  • Hprime_z (list of CMATRIX) – i*hbar*<i|p_z|j> matrices along the trajectory [units: a.u.]

Returns

  • dE ( double ): energy gap [units: a.u.]

  • f_ij ( double ): oscillator strength for a given transition [units: a.u.]

  • istep ( int ): index of the time step along the given trajectory

  • i ( int ): index of the initial (from where) state

  • j ( int ): index of the final (to where) state

Return type

[ [dE, f_ij, istep, i, j] ..], where

libra_py.workflows.nbra.step2_analysis.compute_spectrum(Hvib, Hprime_x, Hprime_y, Hprime_z, params)[source]

Auxiliary function for the computation of the absorption/emission spectrum of the system

https://en.wikipedia.org/wiki/Oscillator_strength

Parameters
  • Hvib (list of CMATRIX) – “vibronic” Hamiltonians along the trajectory [units: a.u.]

  • Hprime_x (list of CMATRIX) – i*hbar*<i|p_x|j> matrices along the trajectory [units: a.u.]

  • Hprime_y (list of CMATRIX) – i*hbar*<i|p_y|j> matrices along the trajectory [units: a.u.]

  • Hprime_z (list of CMATRIX) – i*hbar*<i|p_z|j> matrices along the trajectory [units: a.u.]

Returns

( E, osc_str, istep, init_st, fin_st ), where are the sorted data:

  • E ( list of doubles ): energy gaps [units: a.u.]

  • osc_str ( list of doubles ): oscillator strengths [units: a.u.]

  • istep ( list of ints ): indices of the time steps

  • init_st ( int ): indices of the initial states

  • fin_st ( int ): indices of the final states

Return type

tuple

libra_py.workflows.nbra.step2_analysis.get_step2_mb_sp_properties(params)[source]

This function extracts information from es output files. It currently works for cp2k, dftb+, gaussian

Parameters
  • params (dictionary) – parameters controlling the function execution

  • **params["ks_orbital_indicies"] (*) –

  • params["logfile_directory"] (*) –

  • params["es_software"] (*) –

  • params["isUKS"] (*) –

  • params["number_of_states"] (*) –

  • params["tolerance"] (*) –

  • params["start_time"] (*) –

  • params["finish_time"] (*) –

Returns

S_sd_job

a time series of matrices

Time-overlaps of SD at each step: St_sd_job

a time series of Hvib matrices

One of each of the SP transitions (and its spin) that made up the considered CI states: sd_basis_states_unique

ex) [ [‘1, 2’], ‘alp’ ] # 1 = homo, 2 = lumo

SP transitions for each excitation for each step: ci_basis_states_job

ex) [ [‘1 ,2’] ]

CI coefficients for each excitation for each step: ci_coefficients_job

[ [1.0] ]

Spin components (alpha or beta excitaiton?) for each excitation for each step: spin_components_job

[ [‘alp’] ]

Return type

Overlaps of SD at each step