OpenMCTDHB v2.3
|
This module contains core computational routines. More...
Functions/Subroutines | |
subroutine | evaluate_error (Delta_CVec, Delta_Psi, rho_jk_zero, CVecError, PsiError, nConf) |
This routine estimates the error of a propagation/relaxation step. The error estimator is documented in [M.H. Beck, H.D. Meyer, Z. f. Phys. D 42 113 (1997)]. | |
subroutine | FuncOrbs (AbsTime, Psi_WORK, DtPsi_WORK, CData, RData, IData, LData) |
This routine returns the RHS of the orbital equation of motion. The routine FuncOrbs is given to the ABM integrator of the abmlib of MCTDH. | |
subroutine | FuncCVecBandMat (AbsTime, CVec, DtCVec, BandMat, RData, IData, LData) |
This routine returns the RHS of the coefficent equation of motion. The routine FuncCVec is given to the SIL integrator of the sillib of MCTDH returns -i H|CVec> or -H|CVec> as DtCVec using the Band Matrix routine to comply with the SILstep routine StdForm flag. | |
subroutine | get_FullHamiltonianBandMatrix (NPar, MOrb, NDX, NDY, NDZ, Dims, nConf, nSuperDiags, lambda0, Psi, BandMat) |
This routine returns the Hamiltonian matrix <n|H|n'> for M=1,2 orbitals. The matrix is then a simple band matrix and can be given to the LAPACK routine ZHBMV. | |
subroutine | projector_MCTDHB (Chi, projectedChi, Psi) |
This routine implements the MCTDHB projector P given a vector of MOrb orbitals Psi_j = Psi(:,k), j=k,...,M, the SUBROUTINE returns the projection. | |
subroutine | get_hPsi (MOrb, NDX, NDY, NDZ, Dims, Psi, hPsi) |
This routine computes the vectors h|psi_1>, ..., h|psi_MOrb>, where the psi_j j=1,...,MOrb are the orbitals used. This function uses Fourier transform of the ACML library to compute the kinetic part of the one-body Hamiltonian. (the mass m and hbar are set to one, everywhere) | |
subroutine | get_Wsl_IMEST (Wsl, psi_s, psi_l) |
This routine evaluates Wsl using the IMEST algorithm. It needs vtilde as an input, either from get_vtilde or calculated analytically. vtilde is nothing but the Fourier transform of the interaction potential times (2pi)^(D/2) / dV where dV is the volume element of a grid point in D dimensions. The vector is orderd in FFT order. | |
subroutine | get_vtilde (NDX, NDY, NDZ, Dims, xi, xf, yi, yf, zi, zf, vtilde) |
This routine computes vtilde for the IMEST algorithm. It calls Wint_IMEST as interaction potential. vtilde is nothing but the Fourier transform W(k) of the interaction potential times (2pi)^(D/2) / dV. The vector is stored in FFT order. The following definition of the Fourier transform is used. | |
subroutine | get_h_jk (Psi, h_jk, NDX, NDY, NDZ, Dims, MOrb) |
This routine returns the matrix elements h_jk = <Psi_j|h|Psi_k> of the one-body part of the many-body Hamiltonian. | |
subroutine | get_Wsl (Wsl, s, l, Psi) |
This routine computes the vector Wsl(x) = Int[psi_s^*(x') W(x-x') psi_l(x')]. | |
subroutine | get_Wsl_phi_q (Wsl, phi_q, Wsl_phi_q) |
This routine multiplies Wsl(x) with psi_q. | |
subroutine | get_Wijkl (Wijkl, i, j, k, l, Psi) |
This routine computes the interaction matrix element W_ijkl. | |
subroutine | get_rho_jk (nConf, MOrb, NPar, CVec, rho_jk) |
This routine computes the matrix elements of the reduced one-body density matrix rho_jk for MOrb=1,2 orbitals. | |
subroutine | get_rho_ijkl (nConf, MOrb, NPar, CVec, rho_ijkl) |
This routine computes the matrix elements of the reduced two-body density matrix rho_ijkl for MOrb=1,2 orbitals. | |
subroutine | get_mu_kj (AbsTime, mu_kj, Psi, rho_jk, rho_ijkl) |
This routine returns the chemical potentials mu_kj. |
subroutine modulecomputationcore::evaluate_error | ( | COMPLEX*16,dimension(nconf),intent(in) | Delta_CVec, |
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Delta_Psi, | ||
COMPLEX*16,dimension(morb,morb),intent(in) | rho_jk_zero, | ||
REAL*8,intent(inout) | CVecError, | ||
REAL*8,intent(inout) | PsiError, | ||
INTEGER*4,intent(in) | nConf | ||
) |
This routine estimates the error of a propagation/relaxation step. The error estimator is documented in [M.H. Beck, H.D. Meyer, Z. f. Phys. D 42 113 (1997)].
Definition at line 21 of file modulecomputationcore.F90.
subroutine modulecomputationcore::FuncCVecBandMat | ( | REAL*8,intent(in) | AbsTime, |
COMPLEX*16,dimension(nconf),intent(in) | CVec, | ||
COMPLEX*16,dimension(nconf),intent(out) | DtCVec, | ||
COMPLEX*16,dimension(nsuperdiags+1,nconf),intent(in) | BandMat, | ||
REAL*8,dimension(10),intent(in) | RData, | ||
INTEGER,dimension(30),intent(in) | IData, | ||
logical,intent(in) | LData | ||
) |
This routine returns the RHS of the coefficent equation of motion. The routine FuncCVec is given to the SIL integrator of the sillib of MCTDH returns -i H|CVec> or -H|CVec> as DtCVec using the Band Matrix routine to comply with the SILstep routine StdForm flag.
Definition at line 235 of file modulecomputationcore.F90.
subroutine modulecomputationcore::FuncOrbs | ( | REAL*8,intent(in) | AbsTime, |
COMPLEX*16,dimension(ndx*ndy*ndz*morb),intent(inout) | Psi_WORK, | ||
COMPLEX*16,dimension(ndx*ndy*ndz*morb),intent(out) | DtPsi_WORK, | ||
COMPLEX*16,dimension(morb,morb,morb,morb,2),intent(in) | CData, | ||
REAL*8,dimension(10) | RData, | ||
INTEGER,dimension(30),intent(in) | IData, | ||
logical,intent(in) | LData | ||
) |
This routine returns the RHS of the orbital equation of motion. The routine FuncOrbs is given to the ABM integrator of the abmlib of MCTDH.
Definition at line 73 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_FullHamiltonianBandMatrix | ( | INTEGER,intent(in) | NPar, |
INTEGER,intent(in) | MOrb, | ||
INTEGER,intent(in) | NDX, | ||
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ, | ||
INTEGER,intent(in) | Dims, | ||
INTEGER,intent(in) | nConf, | ||
INTEGER,intent(in) | nSuperDiags, | ||
REAL*8,intent(in) | lambda0, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi, | ||
COMPLEX*16,dimension(nsuperdiags+1,nconf),intent(out) | BandMat | ||
) |
This routine returns the Hamiltonian matrix <n|H|n'> for M=1,2 orbitals. The matrix is then a simple band matrix and can be given to the LAPACK routine ZHBMV.
Definition at line 283 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_h_jk | ( | COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi, |
COMPLEX*16,dimension(morb,morb),intent(out) | h_jk, | ||
INTEGER,intent(in) | NDX, | ||
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ, | ||
INTEGER,intent(in) | Dims, | ||
INTEGER,intent(in) | MOrb | ||
) |
This routine returns the matrix elements h_jk = <Psi_j|h|Psi_k> of the one-body part of the many-body Hamiltonian.
Definition at line 810 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_hPsi | ( | intEGER,intent(in) | MOrb, |
intEGER,intent(in) | NDX, | ||
intEGER,intent(in) | NDY, | ||
intEGER,intent(in) | NDZ, | ||
intEGER,intent(in) | Dims, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(out) | hPsi | ||
) |
This routine computes the vectors h|psi_1>, ..., h|psi_MOrb>, where the psi_j j=1,...,MOrb are the orbitals used. This function uses Fourier transform of the ACML library to compute the kinetic part of the one-body Hamiltonian. (the mass m and hbar are set to one, everywhere)
h(x) = p^2/2m + V_ext(x) if Dims=1
h(x,y) = p^2/2m + V_ext(x,y) if Dims=2
h(x,y,z) = p^2/2m + V_ext(x,y,z) if Dims=3
Definition at line 442 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_mu_kj | ( | REAL*8,intent(in) | AbsTime, |
COMPLEX*16,dimension(morb,morb),intent(out) | mu_kj, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi, | ||
COMPLEX*16,dimension(morb,morb),intent(in) | rho_jk, | ||
COMPLEX*16,dimension(morb,morb,morb,morb),intent(in) | rho_ijkl | ||
) |
This routine returns the chemical potentials mu_kj.
Definition at line 1078 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_rho_ijkl | ( | INTEGER,intent(in) | nConf, |
INTEGER,intent(in) | MOrb, | ||
INTEGER,intent(in) | NPar, | ||
COMPLEX*16,dimension(nconf),intent(in) | CVec, | ||
COMPLEX*16,dimension(morb,morb,morb,morb),intent(out) | rho_ijkl | ||
) |
This routine computes the matrix elements of the reduced two-body density matrix rho_ijkl for MOrb=1,2 orbitals.
Definition at line 1000 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_rho_jk | ( | INTEGER,intent(in) | nConf, |
INTEGER,intent(in) | MOrb, | ||
INTEGER,intent(in) | NPar, | ||
COMPLEX*16,dimension(nconf),intent(in) | CVec, | ||
COMPLEX*16,dimension(morb,morb),intent(out) | rho_jk | ||
) |
This routine computes the matrix elements of the reduced one-body density matrix rho_jk for MOrb=1,2 orbitals.
Definition at line 946 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_vtilde | ( | INTEGER,intent(in) | NDX, |
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ, | ||
INTEGER,intent(in) | Dims, | ||
REAL*8,intent(in) | xi, | ||
REAL*8,intent(in) | xf, | ||
REAL*8,intent(in) | yi, | ||
REAL*8,intent(in) | yf, | ||
REAL*8,intent(in) | zi, | ||
REAL*8,intent(in) | zf, | ||
COMPLEX*16,dimension(ndx*ndy*ndz),intent(out) | vtilde | ||
) |
This routine computes vtilde for the IMEST algorithm. It calls Wint_IMEST as interaction potential. vtilde is nothing but the Fourier transform W(k) of the interaction potential times (2pi)^(D/2) / dV. The vector is stored in FFT order. The following definition of the Fourier transform is used.
W(k) = 1/(2pi)^(D/2) Int [dy W(y) exp(-iky)]
Here, y is the vector y=r_2-r_1 where r_1, r_2 are the position vectors of two particles.
Definition at line 693 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_Wijkl | ( | COMPLEX*16,intent(out) | Wijkl, |
INTEGER,intent(in) | i, | ||
INTEGER,intent(in) | j, | ||
INTEGER,intent(in) | k, | ||
INTEGER,intent(in) | l, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi | ||
) |
This routine computes the interaction matrix element W_ijkl.
Definition at line 913 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_Wsl | ( | COMPLEX*16,dimension(ndx*ndy*ndz),intent(out) | Wsl, |
INTEGER,intent(in) | s, | ||
INTEGER,intent(in) | l, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi | ||
) |
This routine computes the vector Wsl(x) = Int[psi_s^*(x') W(x-x') psi_l(x')].
The default is a delta function interaction W(x-x') = lambda0 delta(x-x') if useIMEST = .FALSE. . In this case the result is Wsl(x) = lambda0 psi_s^*(x) psi_l(x)
If useIMEST = .TRUE. the potential defined in Wint_IMEST is used to compute Wsl. The IMEST algorithm requires that the value of the interaction potential W(r_1,r_2) depends only on the position difference between two particles r_2-r_1, e.g. for a gaussian or 1/r^3 interaction.
Definition at line 853 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_Wsl_IMEST | ( | COMPLEX*16,dimension(ndx*ndy*ndz),intent(out) | Wsl, |
COMPLEX*16,dimension(ndx*ndy*ndz),intent(in) | psi_s, | ||
COMPLEX*16,dimension(ndx*ndy*ndz),intent(in) | psi_l | ||
) |
This routine evaluates Wsl using the IMEST algorithm. It needs vtilde as an input, either from get_vtilde or calculated analytically. vtilde is nothing but the Fourier transform of the interaction potential times (2pi)^(D/2) / dV where dV is the volume element of a grid point in D dimensions. The vector is orderd in FFT order.
the get_Wsl function needs to be streamlined to be able to switch between delta interaction and IMEST, vtilde should stay use associated to minimize the computational effort.
for time-dependent interaction strengths needs to be multiplied by the appropriate factor in the main program. do not recompute vtilde!
it would be nice to provide an option where vtilde is read in from an analytic calculation, e.g. for dipolar interaction or exponentially decaying ineraction
Definition at line 573 of file modulecomputationcore.F90.
subroutine modulecomputationcore::get_Wsl_phi_q | ( | COMPLEX*16,dimension(ndx*ndy*ndz),intent(in) | Wsl, |
COMPLEX*16,dimension(ndx*ndy*ndz),intent(in) | phi_q, | ||
COMPLEX*16,dimension(ndx*ndy*ndz),intent(out) | Wsl_phi_q | ||
) |
This routine multiplies Wsl(x) with psi_q.
Definition at line 889 of file modulecomputationcore.F90.
subroutine modulecomputationcore::projector_MCTDHB | ( | COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Chi, |
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(out) | projectedChi, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi | ||
) |
This routine implements the MCTDHB projector P given a vector of MOrb orbitals Psi_j = Psi(:,k), j=k,...,M, the SUBROUTINE returns the projection.
projected_Chi(:,j) = [1 - Sum_{k=1}^MOrb |Psi_k><Psi_k|] Chi(:,k) = P Chi(:,k)
Definition at line 378 of file modulecomputationcore.F90.