qsh¶
-
libra_py.workflows.nbra.qsh.
compute_freqs
(H_vib, params)[source]¶ Compute a matrix of frequencies for each matrix element
- Parameters
H_vib (list of CMATRIX objects) – the vibronic Hamiltonian for all time-points H_vib[istep].get(i,j) - i,j matrix element for the step istep
params (dictionary) –
the parameters that control the execution of this function
SeeAlso: influence_spectrum.compute_mat_elt for the description of other parameters:
filename
logname
nfreqs
SeeAlso: influence_spectrum.recipe1(data, params) for the description of other parameters:
dt
wspan
dw
do_output
acf_filename
spectrum_filename
do_center
acf_type
data_type
- Returns
(freqs, dev), where:
SeeAlso: influence_spectrum.compute_mat_elt for the description of the output freqs
- dev ( list of lists of double ):
dev[i][j] is the standard deviation the QSH terms (sum over frequencies)
- Return type
-
libra_py.workflows.nbra.qsh.
compute_qs_Hvib
(Nfreqs, freqs, t, H_vib_re_ave, H_vib_re_std, dw_Hvib_re, up_Hvib_re, H_vib_im_ave, H_vib_im_std, dw_Hvib_im, up_Hvib_im, dev)[source]¶ Compute the QSH Hamiltonians
- Parameters
Nfreqs (int) – the number of frequencies we want to use in the QSH calculations (upper limit, the actual number could be smaller)
freqs (list of lists of doubles) – contains the spectral info for various matrix elements of the sampled Hvib SeeAlso: influence_spectrum.compute_mat_elt for the description of the output freqs
t (double) – time at which we want to reconstruct the QSH [ units: a.u. ]
H_vib_re_ave (MATRIX(nstates, nstates)) – average of energies for direct Hamiltonian
H_vib_im_ave (MATRIX(nstates, nstates)) – average of couplings for direct Hamiltonian
H_vib_re_std (MATRIX(nstates, nstates)) – std of energies for direct Hamiltonian
H_vib_im_std (MATRIX(nstates, nstates)) – std of couplings for direct Hamiltonian
up_Hvib_re (MATRIX(nstates, nstates)) – maximum value of energies for direct Hamiltonian
up_Hvib_im (MATRIX(nstates, nstates)) – maximum value of couplings for direct Hamiltonian
dw_Hvib_re (MATRIX(nstates, nstates)) – minimal value of energies for direct Hamiltonian
dw_Hvib_im (MATRIX(nstates, nstates)) – minimal value of couplings for direct Hamiltonian
dev (list of lists of doubles, nstates x nstates) – std for direct Hamiltonian SeeAlso: compute_freqs for the description of the output dev
- Returns
contains QSH vibronic Hamiltonian at a given time
- Return type
CMATRIX(nstates, nstates)
-
libra_py.workflows.nbra.qsh.
run
(H_vib, params)[source]¶ The procedure to convert the results of QE/model Hvib calculations to longer timescales using the QSH approach
- Parameters
H_vib (list of lists of CMATRIX) –
the vibronic Hamiltonian for all data sets and all time-points
Such that H_vib[idata][istep].get(i,j) is the i,j matrix element for the data set
`idata`
and step in that data set`istep`
params (dictionary) –
controls the present and all underlying level calculations
- params[“dt”] ( double ): nuclear dynamics integration time step
this is also the spacing between initial data points [ units: a.u. of time, default: 41.0]
params[“nfreqs”] ( int ): maximal number of frequencies to use to reconstruct all the matrix elements [ default: 1]
params[“nsteps”] ( int ): how many time-steps of QSH to generate [ default: 10]
- params[“do_QSH_output”] ( Boolean ): the flag that determines whether to generate the
output files containing the QSH Hamiltonians. [ default : False]
- params[“output_set_paths”] ( list of strings ):
Directories where the resulting QSH Hvib files will be printed out. These directories should already exist [default: QSH_#_of_data_set, e.g. QSH_0, QSH_1, etc.]
- params[“qsh_Hvib_re_prefix”] ( string ): prefixes of the output files with real part
of the QSH vibronic Hamiltonian at time t
- params[“qsh_Hvib_re_suffix”] ( string ): suffixes of the output files with real part
of the QSH vibronic Hamiltonian at time t
- params[“qsh_Hvib_im_prefix”] ( string ): prefixes of the output files with imaginary part
of the QSH vibronic Hamiltonian at time t
- params[“qsh_Hvib_im_suffix”] ( string ): suffixes of the output files with imaginary part
of the QSH vibronic Hamiltonian at time t
- Returns
- qsh_H_vib, such as
qsh_H_vib[idata][istep] - is a CMATRIX(nstates, nstates) object representing a vibronic Hamiltonian predicted for the time step istep using the training dataset idata
- Return type
( list of lists )