PROGRESS  master
prg_quantumdynamics_mod Module Reference

A module to add in common quantum dynamical operations. More...

Functions/Subroutines

subroutine, public prg_kick_density (kick_direc, kick_mag, dens, norbs, mdim, S, SINV, which_atom, r, bmltype, thresh)
 Provides perturbation to initial density matrix in the form of an electric field kick. This routine does: \(\hat{\rho_{kick}} = \exp{\frac{-i}{\hbar}\hat{V}}\hat{\rho}\hat{S}\exp{\frac{i}{\hbar}\hat{V}}\hat{S^{-1}}\) where \(\hat{V}\) is the field disturbance. More...
 
subroutine, public prg_get_sparsity_cplxmat (matrix_type, element_type, thresh, a_dense)
 This computes the sparsity of a complex matrix given a threshold value This routine does: \( f = \frac{N_0}{N_{tot}}\) where \(f\) is the sparsity, \(N_0\) is the number of values less than the threshold, and \(N_{tot}\) is the total number of values. The sparsity and threshold are printed to the screen. More...
 
subroutine, public prg_get_sparsity_realmat (matrix_type, element_type, thresh, a_dense)
 This computes the sparsity of a real matrix given a threshold value This routine does: \( f = \frac{N_0}{N_{tot}}\) where \(f\) is the sparsity, \(N_0\) is the number of values less than the threshold, and \(N_{tot}\) is the total number of values. The sparsity and threshold are printed to the screen. More...
 
subroutine, public prg_kick_density_bml (kick_direc, kick_mag, rho_bml, s_bml, sinv_bml, mdim, which_atom, r, matrix_type, thresh)
 Provides perturbation to initial density matrix in the form of an electric field kick given input matricies in BML format. This routine does: \(\hat{\rho_{kick}} = \exp{\frac{-i}{\hbar}\hat{V}}\hat{\rho}\hat{S}\exp{\frac{i}{\hbar}\hat{V}}\hat{S^{-1}}\) where \(\hat{V}\) is the field disturbance. More...
 
subroutine, public prg_lvni_bml (h1_bml, sinv_bml, dt, hbar, rhoold_bml, rho_bml, aux_bml, matrix_type, mdim, thresh)
 Performs Liouville-von Neumann integration using leap-frog method. This routine does: \(\hat{\rho}(t+\Delta t)=\hat{\rho}(t-\Delta t) +2\Delta t\frac{\partial \hat{\rho}(t)}{\partial t}\) where the time derivative of the density matrix is defined as follows: \(\frac{\partial\hat{\rho}(t)}{\partial t}=\frac{-i}{\hbar}\left(S^{-1}\hat{H}(t)\hat{\rho}(t)-\hat{\rho}(t)\hat{H}(t)S^{-1}\right)\). More...
 
subroutine, public prg_getcharge (rho_bml, s_bml, charges, aux_bml, z, spindex, N, nats, thresh)
 Constructs the charges from the density matrix. More...
 
subroutine, public prg_getdipole (charges, r, mu)
 This routine computes the dipole moment of the system with units determined by the units of the coordinate matrix and charges given. More...
 
subroutine, public prg_excitation (fill_mat, orbit_orig, orbit_exci)
 Produce an excitation in the initially calculated density matrix to. More...
 

Variables

integer, parameter dp = kind(1.0d0)
 

Detailed Description

A module to add in common quantum dynamical operations.

This module contains routines that perform the following tasks: apply a apply an excitation or perturbation to the initial density matrix, compute the comutator of two two matricies, calculate the sparsity of a real or complex matrix, and time evolve a density matrix using Liouville-von Neumann equation with the leap-frog method of integration.

Function/Subroutine Documentation

◆ prg_excitation()

subroutine, public prg_quantumdynamics_mod::prg_excitation ( integer, dimension(:), intent(inout)  fill_mat,
integer, intent(in)  orbit_orig,
integer, intent(in)  orbit_exci 
)

Produce an excitation in the initially calculated density matrix to.

Definition at line 306 of file prg_quantumdynamics_mod.F90.

◆ prg_get_sparsity_cplxmat()

subroutine, public prg_quantumdynamics_mod::prg_get_sparsity_cplxmat ( character(len=*), intent(in)  matrix_type,
character(len=*), intent(in)  element_type,
real(dp), intent(in)  thresh,
complex(dp), dimension(:,:), intent(in)  a_dense 
)

This computes the sparsity of a complex matrix given a threshold value This routine does: \( f = \frac{N_0}{N_{tot}}\) where \(f\) is the sparsity, \(N_0\) is the number of values less than the threshold, and \(N_{tot}\) is the total number of values. The sparsity and threshold are printed to the screen.

Parameters
matrix_typethe BML matrix type
element_typethe BML element type
threshthe threshold for sparsity evaluation
a_densethe dense complex matrix to be evaluated for sparsity

Definition at line 97 of file prg_quantumdynamics_mod.F90.

◆ prg_get_sparsity_realmat()

subroutine, public prg_quantumdynamics_mod::prg_get_sparsity_realmat ( character(len=*), intent(in)  matrix_type,
character(len=*), intent(in)  element_type,
real(dp), intent(in)  thresh,
real(dp), dimension(:,:), intent(in)  a_dense 
)

This computes the sparsity of a real matrix given a threshold value This routine does: \( f = \frac{N_0}{N_{tot}}\) where \(f\) is the sparsity, \(N_0\) is the number of values less than the threshold, and \(N_{tot}\) is the total number of values. The sparsity and threshold are printed to the screen.

Parameters
matrix_typethe BML matrix type
element_typethe BML element type
threshthe threshold for sparsity evaluation
a_densethe dense real matrix to be evaluated for sparsity

Definition at line 121 of file prg_quantumdynamics_mod.F90.

◆ prg_getcharge()

subroutine, public prg_quantumdynamics_mod::prg_getcharge ( type(bml_matrix_t), intent(in)  rho_bml,
type(bml_matrix_t), intent(in)  s_bml,
real(dp), dimension(:), allocatable  charges,
type(bml_matrix_t)  aux_bml,
real(dp), dimension(:), intent(in)  z,
integer, dimension(:), intent(in), allocatable  spindex,
integer, dimension(:), intent(in), allocatable  N,
integer  nats,
real(dp), intent(in)  thresh 
)

Constructs the charges from the density matrix.

Parameters
rho_bmlDensity matrix in BML format.
over_bmlOverlap matrix in BML format.
chargesthe array of charges.
aux_bmlthe auxiliary matrix in BML format.
spindexStart and end index for every atom in the system.
z
natsthe number of atoms
N
threshthreshold for the BML matrix

Definition at line 246 of file prg_quantumdynamics_mod.F90.

◆ prg_getdipole()

subroutine, public prg_quantumdynamics_mod::prg_getdipole ( real(dp), dimension(:), intent(in)  charges,
real(dp), dimension(:,:), intent(in)  r,
real(dp), dimension(3), intent(inout)  mu 
)

This routine computes the dipole moment of the system with units determined by the units of the coordinate matrix and charges given.

Parameters
chargesCharge on each atom.
rCoordinate matrix of the atoms.
pDipole moment vector.

Definition at line 281 of file prg_quantumdynamics_mod.F90.

◆ prg_kick_density()

subroutine, public prg_quantumdynamics_mod::prg_kick_density ( integer, intent(in)  kick_direc,
real(dp kick_mag,
complex(dp), dimension(:,:), intent(inout), allocatable  dens,
integer, intent(in)  norbs,
integer, intent(in)  mdim,
complex(dp), dimension(:,:), allocatable  S,
complex(dp), dimension(:,:), allocatable  SINV,
integer, dimension(:), intent(in), allocatable  which_atom,
real(dp), dimension(:,:), allocatable  r,
character(len=*), intent(in)  bmltype,
real(dp thresh 
)

Provides perturbation to initial density matrix in the form of an electric field kick. This routine does: \(\hat{\rho_{kick}} = \exp{\frac{-i}{\hbar}\hat{V}}\hat{\rho}\hat{S}\exp{\frac{i}{\hbar}\hat{V}}\hat{S^{-1}}\) where \(\hat{V}\) is the field disturbance.

Parameters
kick_directhe direction of the kick in the electric field
kick_magthe magnitude of the kick in the electric field
densthe initial density matrix to be kicked.
norbsthe number of orbitals in the density matrix
Sthe overlap matrix
SINVthe inverse of the overlap matrix
which_atomvector containing atom identification
rdirection vector for kick based on atom and kick_direc
bmltypetype of BML matrix desired for faster computation
threshthreshold for BML matrix conversion

Definition at line 41 of file prg_quantumdynamics_mod.F90.

◆ prg_kick_density_bml()

subroutine, public prg_quantumdynamics_mod::prg_kick_density_bml ( integer, intent(in)  kick_direc,
real(dp kick_mag,
type(bml_matrix_t)  rho_bml,
type(bml_matrix_t)  s_bml,
type(bml_matrix_t)  sinv_bml,
integer  mdim,
integer, dimension(:), intent(in), allocatable  which_atom,
real(dp), dimension(:,:), allocatable  r,
character(len=*), intent(in)  matrix_type,
real(dp thresh 
)

Provides perturbation to initial density matrix in the form of an electric field kick given input matricies in BML format. This routine does: \(\hat{\rho_{kick}} = \exp{\frac{-i}{\hbar}\hat{V}}\hat{\rho}\hat{S}\exp{\frac{i}{\hbar}\hat{V}}\hat{S^{-1}}\) where \(\hat{V}\) is the field disturbance.

Parameters
kick_directhe direction of the kick in the electric field
kick_magthe magnitude of the kick in the electric field
rho_bmlthe initial density matrix to be kicked in BML format.
s_bmlthe overlap matrix
sinv_bmlthe inverse of the overlap matrix
mdimmaximum number of nonzero values per row in BML matrix
which_atomvector containing atom identification
rposition vector for kicked atom
matrix_typethe type of BML format
threshthe threshold for the BML matrix

Definition at line 152 of file prg_quantumdynamics_mod.F90.

◆ prg_lvni_bml()

subroutine, public prg_quantumdynamics_mod::prg_lvni_bml ( type(bml_matrix_t)  h1_bml,
type(bml_matrix_t)  sinv_bml,
real(dp dt,
real(dp hbar,
type(bml_matrix_t)  rhoold_bml,
type(bml_matrix_t)  rho_bml,
type(bml_matrix_t)  aux_bml,
character(len=*), intent(in)  matrix_type,
integer  mdim,
real(dp), intent(in)  thresh 
)

Performs Liouville-von Neumann integration using leap-frog method. This routine does: \(\hat{\rho}(t+\Delta t)=\hat{\rho}(t-\Delta t) +2\Delta t\frac{\partial \hat{\rho}(t)}{\partial t}\) where the time derivative of the density matrix is defined as follows: \(\frac{\partial\hat{\rho}(t)}{\partial t}=\frac{-i}{\hbar}\left(S^{-1}\hat{H}(t)\hat{\rho}(t)-\hat{\rho}(t)\hat{H}(t)S^{-1}\right)\).

Parameters
Hthe Hamiltonian matrix at time t
sinv_bmlthe inverse overlap matrix
dtthe timestep for integration
hbarthe Dirac constant (generally taken to be 1 in simulation units)
rho_oldthe density matrix at previous time-step
rho_bmlthe density matrix at current time-step
aux_bmlthe temp matrix used for value storage during computation
matrix_typethe type of BML matrix
threshthe threshold for the BML matrix

Definition at line 210 of file prg_quantumdynamics_mod.F90.

Variable Documentation

◆ dp

integer, parameter prg_quantumdynamics_mod::dp = kind(1.0d0)
private

Definition at line 14 of file prg_quantumdynamics_mod.F90.