vibrav.vibronic.vibronic module¶
- class vibrav.vibronic.vibronic.Vibronic(config_file, *args, **kwargs)[source]¶
Bases:
object
Main class to run vibronic coupling calculations.
Required arguments in configuration file.
Argument
Description
Data Type
number_of_multiplicity
Number of multiplicities from calculation.
int
spin_multiplicity
List of the ordering of the spin multiplicities. Must be in the same order as was done in the calculation.
tuple
ofint
number_of_states
Number of states in each multiplicity.
tuple
ofint
number_of_nuclei
Number of nuclei in the system.
int
number_of_modes
Number of normal modes in the molecule.
int
zero_order_file
Filepath of the calculation at the equilibrium coordinate. Must contain the spin-free property of interest.
str
Default arguments in configuration file.
Argument
Description
Default Value
sf_energies_file
Filepath of the spin-free energies.
‘’
so_energies_file
Filepath of the spin-orbit energies.
‘’
angmom_file
Starting string of the angular momentum spin-orbit files.
angmom
dipole_file
Starting string of the transition dipole moment spin-orbit files.
dipole
quadrupole_file
Starting string of the transition quadrupole moment spin-orbit files.
quadrupole
degen_delta
Cut-off parameter for the energy difference in the denominator for the pertubation theory.
1e-7 Ha
eigvectors_file
Filepath of the spin-orbit eigenvectors.
eigvectors.txt
so_cont_tol
Cut-off parameter for the minimum spin-free contribution to each spin-orbit state.
None
THEORY
Here, we present a brief account of the theory that is implemented in this module. The equations listed below are taken from J. Phys. Chem. Lett. 2018, 9, 4, 887-994 (DOI: 10.1021/acs.jpclett.7b03441) and J. Chem. Theory Comput. 2020, 16, 8, 5189-5202 (DOI: 10.1021/acs.jctc.0c00386).
The vibronic method in this class computes the Herzberg-Teller approximation in a via a Sum-over-states perturbation theory approach
\[A = \sum_{k\neq 1}\left<\psi_k^0|\Lambda^e|\psi_2^0\right> \frac{\partial\left<\psi_1^0|H|\psi_k^0\right> / \partial Q_p}{E_1^0 - E_k^0}\]\[B = \sum_{k\neq 2}\left<\psi_1^0|\Lambda^e|\psi_k^0\right> \frac{\partial\left<\psi_1^0|H|\psi_k^0\right> / \partial Q_p}{E_1^0 - E_k^0}\]\[\frac{\partial\Lambda_{1,2}^{e}\left(Q\right)}{\partial Q_p} = A+B\]Where, \(\Lambda\) can be the electric, magnetic, or quadrupolar transition moments between any two states, 1, and 2. The equations above are computed by the
vibrav.numerical.vibronic_func.compute_d_dq_sf()
function.And spin-orbit coupling is then applied via
\[\left<\psi_1^{SO}|\mu^e|\psi_2^{SO}\right> = \sum_{k,m}U_{k1}^{0*}U_{m2}^{0} \left<\psi_k|\mu_{1,2}^{e,SF}\left(Q\right)|\psi_m\right>\]Where, \(U_{ij}^{0}\) is an element of the complex tranformation matrix from a set of spin-free to spin-orbit coupled states, and \(\left<\psi_k|\mu_{1,2}^{e,SF}\left(Q\right)|\psi_m\right>\) is the vibronic transition moment for a pair of spin-free states. This is, in practice, the transition moment derivative calculated by
vibrav.numerical.vibronic_func.compute_d_dq_sf()
. The equation above is computed by thevibrav.numerical.vibronic_func:compute_d_dq()
function.For an example on how to use this class please refer to the example that is available on the documentation under ‘Examples’.
- get_hamiltonian_deriv(delta, redmass, nmodes, select_fdx=-1, use_sqrt_rmass=True, sparse_hamiltonian=False, read_hamil=False, hamil_file=None)[source]¶
Find and read all of the Hamiltonian txt files in the different confg directories.
Note
The path of confg is hardcoded along with the names of the SF Hamiltonian files as ‘ham-sf.txt’.
- Parameters:
delta (
pd.DataFrame
) – Data frame with all the delta values used for each of the normal mode displacements. Read from the given delta_file input in the configuration file.redmass (
pd.DataFrame
) – Data frame with all of the reduced masses for each of the normal modes. Read from the given redmass_file input in the configuration file.nmodes (int) – The number of normal modes in the molecule.
select_fdx (
list
, optional) –use_sqrt_rmass (
bool
, optional) – The calculations used mass-weighted normal modes for the displaced structures. This should always be the case. Defaults to True.sparse_hamiltonian (
bool
, optional) – Input Hamiltonian files are sparse matrices made up of block diagonal values. Defaults to False.read_hamil (
bool
, optional) – Read the Hamiltonians from a CSV file. Defaults to False.hamil_file (
str
, optional) – Path to the CSV file with the Hamiltonian data. It expects that there will be an index column and header row. In addition we expect there to be a column called freqdx which is an index spanning 0 to 2*nmodes. Defaults to None.
- Returns:
dham_dq (pd.DataFrame) –
- Data frame with the derivative of the
Hamiltonians with respect to the normal mode.
- vibronic_coupling(prop_name, write_property=True, write_energy=True, write_oscil=True, print_stdout=True, temp=298, eq_cont=False, verbose=False, use_sqrt_rmass=True, select_fdx=-1, boltz_states=None, boltz_tol=1e-06, write_sf_oscil=False, write_sf_property=False, write_dham_dq=False, write_all_oscil=False)[source]¶
Vibronic coupling method to calculate the vibronic coupling by the equations as given in reference J. Phys. Chem. Lett. 2018, 9, 887-894. This code follows a similar structure as that from a perl script written by Yonaton Heit and Jochen Autschbach, authors of the cited paper.
Note
The script is able to calculate the vibronic contributions to the electric_dipole, magnetic_dipole and electric_quadrupole, currently. For more properties please reach out through github or via email.
This will only work with data from Molcas/OpenMolcas.
Warning
The value of the energy difference parameter (degen_delta in the configuration file) and the spin-free contribution to the spin-orbit states cutoff (so_cont_tol in the configuration file) can be very important in giving “reasonable” vibronic intensities. These values should be adjusted and tested accordingly on a per-system basis. We make no guarantees everything will work out of the box.
- Parameters:
prop_name (
str
) – Property of interest to calculate.write_property (
bool
, optional) – Write the calculated vibronic property values to file. Defaults to True.write_energy (
bool
, optional) – Write the vibronic energies to file. Defaults to True.write_oscil (
bool
, optional) – Write the vibronic oscillators to file. Defaults to True.print_stdout (
bool
, optional) – Print the progress of the script to stdout. Defaults to True.temp (
float
, optional) – Temperature for the boltzmann statistics. Defaults to 298.verbose (
bool
, optional) – Send all availble print statements listing where the program is in the calculation to stdout and timings. Recommended if you have a system with many spin-orbit states. Defaults to False.use_sqrt_rmass (
bool
, optional) – The calculations used mass-weighted normal modes for the displaced structures. This should always be the case. Defaults to True.select_fdx (
list
, optional) – Only use select normal modes in the vibronic coupling calculation. Defaults to -1 (all normal modes).boltz_states (
int
, optional) – Boltzmann states to calculate in the distribution. Defaults to None (all states with a distribution less than the boltz_tol value for the lowest frequency).boltz_tol (
float
, optional) – Tolerance value for the Boltzmann distribution cutoff. Defaults to 1e-5.write_sf_oscil (
bool
, optional) – Write the spin-free vibronic oscillators. Defaults to False.write_sf_property (
bool
, optional) – Write the spin-free vibronic property values. Defaults to False.write_dham_dq (
bool
, optional) – Write the hamiltonian derivatives for each normal mode. Defaults to False.write_all_oscil (
bool
, optional) – Write the entire matrix of the vibronic oscillator values instead of only those that are physically meaningful (positive energy and oscillator value). Defaults to False.
- Raises:
NotImplementedError – When the property requested with the property parameter does not have any output parser or just has not been coded yet.
ValueError – If the array that is expected to be Hermitian actually is not.