OpenMCTDHB v2.3
|
This module contains routines that deal with I/O to the screen and to files. More...
Functions/Subroutines | |
subroutine | print_header |
This routine prints the OpenMCTDHB header to the screen. | |
subroutine | print_runInfo (lambda0, NPar, MOrb, Dims, NDX, NDY, NDZ, xi, xf, yi, yf, zi, zf, tinyStep, printStep, printAllStep, printCorrelationFuncs, AbsTime, maxTime, TolError, restart, Relax, readPotential, propDirection, tag) |
This routine prints info about the current run to the screen and performs a few basic consistency checks. | |
subroutine | get_doubleAsString (x, doubleString) |
This routine writes a double value in ten digit format, useful for naming files without blanks. | |
subroutine | get_identifier (MOrb, NPar, tag, identifier) |
This routine creates a character string 'identifier' that is used to identify a given run in all outputfiles. | |
subroutine | get_cumulativeProbability (Psi, rho_jk, x, cumulativeProbability) |
This routine computes the integral over the density from -infty up to x Int{G1(x',x'),(x,-infty,x)} if Psi is provided. | |
subroutine | write_probabilityLeft (AbsTime, cumulativeProbability, MOrb, NPar, identifier) |
This routine writes the integral of the probability density from -infty up to zero to a file. | |
subroutine | get_energy (CVec, BandMat, energy, nConf) |
This routine computes the total energy of the system E = <Psi|H|Psi> | |
subroutine | write_energy (AbsTime, lambda0, NPar, energy, identifier) |
This routine writes the energy <Psi|H|Psi> to a file. On the first call a header in the file is created. | |
subroutine | write_mu_kj (AbsTime, mu_kj, identifier) |
This routine writes the chemical potentials mu_kj to a file. On the first call a header in the file is created. | |
subroutine | get_defect (nConf, nSuperDiags, BandMat, CVec, energy, defect) |
This routine computes the norm ||d|| of the defect d in the equation H|Psi> = E|Psi> + d. Only the coefficent vector is used. The routine is useful in relaxation computations to check whether an eigenstate is reached. In that case ||d||=0 is satisfied. | |
subroutine | get_meanDensity (Psi, rho_jk, meanDensity) |
This routine computes the mean density of the system Int[rho(x)**2 / N]. It is used to compute the Lieb Liniger parameter for inhomogeneous 1D systems, as defined in Lieb, Seiringer PRL 91, 105401 (2003). | |
subroutine | write_liebLinigerParameter (AbsTime, lambda0, NPar, meanDensity, identifier) |
This routine writes the generalized Lieb-Liniger parameter to a file. On the first call a header in the file is created. | |
subroutine | get_naturalOrbitals (MOrb, NDX, NDY, NDZ, rho_jk, Psi, noccs, norbs) |
This routine returns the natural orbitals (norbs) and their occupations (noccs) given the reduced one-body density matrix rho_jk and the corresponding orbitals array Psi. | |
subroutine | write_PsiToFile (AbsTime, Psi, NDX, NDY, NDZ, MOrb, fileID, identifier) |
This routine writes the orbital array to a file. If fileID == 0, the file <AbsTime>.orbs.dat is written, else if fileID == 1 the file restart.orbs.out is written. | |
subroutine | write_norbsToFile (AbsTime, norbs, NDX, NDY, NDZ, MOrb, identifier) |
This routine writes the natural orbital array to a file. | |
subroutine | write_CVecFile (AbsTime, CVec, fileID, identifier) |
This routine writes the coefficent vector CVec to a file. If fileID == 0, the file <AbsTime>.coef.dat is written else if fileID == 1, the file restart.coef.out. | |
subroutine | read_potentialFromFile (V_ext, NDX, NDY, NDZ) |
This routine reads the external potential V_ext from the file V_ext.inp. Only the potential (fourth column) is read in, nothing else. All other columns are ignored. This allows to read in any potential from an orbital file of a previous run. | |
subroutine | read_PsiFromFile (Psi, NDX, NDY, NDZ, MOrb) |
This routine reads the array of orbitals Psi from the file restart.orbs.inp. The orbitals are orthonormalized. | |
subroutine | read_CVecFile (CVec, nConf) |
This routine reads the array of coefficients from the file restart.coef.inp. The vector is normalized in the process. | |
subroutine | write_noccsToFile (AbsTime, MOrb, noccs, identifier) |
This routine writes the natural orbital occupations noccs to a file. On the first call a header in the file is created. | |
subroutine | write_firstFragmentationTimes (AbsTime, MOrb, NPar, noccs, lambda0, identifier) |
This routine writes the times at which a certain fragmentation is reached for the first time to a file. On the first call a header in the file is created. |
This module contains routines that deal with I/O to the screen and to files.
subroutine moduleinputoutput::get_cumulativeProbability | ( | COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi, |
COMPLEX*16,dimension(morb,morb),intent(in) | rho_jk, | ||
REAL*8,intent(in) | x, | ||
REAL*8,intent(out) | cumulativeProbability | ||
) |
This routine computes the integral over the density from -infty up to x Int{G1(x',x'),(x,-infty,x)} if Psi is provided.
Definition at line 270 of file moduleinputoutput.F90.
subroutine moduleinputoutput::get_defect | ( | INTEGER,intent(in) | nConf, |
INTEGER,intent(in) | nSuperDiags, | ||
COMPLEX*16,dimension(nsuperdiags+1,nconf),intent(in) | BandMat, | ||
COMPLEX*16,dimension(nconf),intent(in) | CVec, | ||
REAL*8,intent(in) | energy, | ||
REAL*8,intent(out) | defect | ||
) |
This routine computes the norm ||d|| of the defect d in the equation H|Psi> = E|Psi> + d. Only the coefficent vector is used. The routine is useful in relaxation computations to check whether an eigenstate is reached. In that case ||d||=0 is satisfied.
Definition at line 487 of file moduleinputoutput.F90.
subroutine moduleinputoutput::get_doubleAsString | ( | real(kind=DBL),intent(in) | x, |
CHARACTER(len=10),intent(out) | doubleString | ||
) |
This routine writes a double value in ten digit format, useful for naming files without blanks.
Definition at line 183 of file moduleinputoutput.F90.
subroutine moduleinputoutput::get_energy | ( | COMPLEX*16,dimension(nconf),intent(in) | CVec, |
COMPLEX*16,dimension(nsuperdiags+1,nconf),intent(in) | BandMat, | ||
REAL*8,intent(out) | energy, | ||
INTEGER,intent(in) | nConf | ||
) |
This routine computes the total energy of the system E = <Psi|H|Psi>
Definition at line 359 of file moduleinputoutput.F90.
subroutine moduleinputoutput::get_identifier | ( | INTEGER,intent(in) | MOrb, |
INTEGER,intent(in) | NPar, | ||
CHARACTER(len=55),intent(in) | tag, | ||
CHARACTER(len=255),intent(out) | identifier | ||
) |
This routine creates a character string 'identifier' that is used to identify a given run in all outputfiles.
Definition at line 211 of file moduleinputoutput.F90.
subroutine moduleinputoutput::get_meanDensity | ( | COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi, |
COMPLEX*16,dimension(morb,morb),intent(in) | rho_jk, | ||
REAL*8,intent(out) | meanDensity | ||
) |
This routine computes the mean density of the system Int[rho(x)**2 / N]. It is used to compute the Lieb Liniger parameter for inhomogeneous 1D systems, as defined in Lieb, Seiringer PRL 91, 105401 (2003).
Definition at line 530 of file moduleinputoutput.F90.
subroutine moduleinputoutput::get_naturalOrbitals | ( | INTEGER,intent(in) | MOrb, |
INTEGER,intent(in) | NDX, | ||
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ, | ||
COMPLEX*16,dimension(morb,morb),intent(in) | rho_jk, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi, | ||
REAL*8,dimension(morb),intent(out) | noccs, | ||
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(out) | norbs | ||
) |
This routine returns the natural orbitals (norbs) and their occupations (noccs) given the reduced one-body density matrix rho_jk and the corresponding orbitals array Psi.
Definition at line 622 of file moduleinputoutput.F90.
subroutine moduleinputoutput::print_header | ( | ) |
This routine prints the OpenMCTDHB header to the screen.
Definition at line 19 of file moduleinputoutput.F90.
subroutine moduleinputoutput::print_runInfo | ( | REAL*8,intent(in) | lambda0, |
INTEGER,intent(in) | NPar, | ||
INTEGER,intent(in) | MOrb, | ||
INTEGER,intent(in) | Dims, | ||
INTEGER,intent(in) | NDX, | ||
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ, | ||
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, | ||
REAL*8,intent(in) | tinyStep, | ||
REAL*8,intent(in) | printStep, | ||
REAL*8,intent(in) | printAllStep, | ||
INTEGER,intent(in) | printCorrelationFuncs, | ||
REAL*8,intent(in) | AbsTime, | ||
REAL*8,intent(in) | maxTime, | ||
REAL*8,intent(in) | TolError, | ||
LOGICAL,intent(in) | restart, | ||
LOGICAL,intent(in) | Relax, | ||
LOGICAL,intent(in) | readPotential, | ||
INTEGER,intent(in) | propDirection, | ||
CHARACTER(55),intent(in) | tag | ||
) |
This routine prints info about the current run to the screen and performs a few basic consistency checks.
Definition at line 48 of file moduleinputoutput.F90.
subroutine moduleinputoutput::read_CVecFile | ( | COMPLEX*16,dimension(nconf),intent(out) | CVec, |
INTEGER,intent(in) | nConf | ||
) |
This routine reads the array of coefficients from the file restart.coef.inp. The vector is normalized in the process.
Definition at line 990 of file moduleinputoutput.F90.
subroutine moduleinputoutput::read_potentialFromFile | ( | REAL*8,dimension(ndx*ndy*ndz),intent(out) | V_ext, |
INTEGER,intent(in) | NDX, | ||
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ | ||
) |
This routine reads the external potential V_ext from the file V_ext.inp. Only the potential (fourth column) is read in, nothing else. All other columns are ignored. This allows to read in any potential from an orbital file of a previous run.
Definition at line 829 of file moduleinputoutput.F90.
subroutine moduleinputoutput::read_PsiFromFile | ( | COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(out) | Psi, |
INTEGER,intent(in) | NDX, | ||
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ, | ||
INTEGER,intent(in) | MOrb | ||
) |
This routine reads the array of orbitals Psi from the file restart.orbs.inp. The orbitals are orthonormalized.
Definition at line 896 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_CVecFile | ( | REAL*8,intent(in) | AbsTime, |
COMPLEX*16,dimension(nconf),intent(in) | CVec, | ||
INTEGER,intent(in) | fileID, | ||
CHARACTER (LEN=255),intent(in) | identifier | ||
) |
This routine writes the coefficent vector CVec to a file. If fileID == 0, the file <AbsTime>.coef.dat is written else if fileID == 1, the file restart.coef.out.
Definition at line 777 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_energy | ( | REAL*8,intent(in) | AbsTime, |
REAL*8,intent(in) | lambda0, | ||
INTEGER,intent(in) | NPar, | ||
REAL*8,intent(in) | energy, | ||
CHARACTER(255),intent(in) | identifier | ||
) |
This routine writes the energy <Psi|H|Psi> to a file. On the first call a header in the file is created.
Definition at line 391 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_firstFragmentationTimes | ( | REAL*8,intent(in) | AbsTime, |
INTEGER,intent(in) | MOrb, | ||
INTEGER,intent(in) | NPar, | ||
REAL*8,dimension(morb),intent(in) | noccs, | ||
REAL*8,intent(in) | lambda0, | ||
CHARACTER (len=255),intent(in) | identifier | ||
) |
This routine writes the times at which a certain fragmentation is reached for the first time to a file. On the first call a header in the file is created.
Definition at line 1110 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_liebLinigerParameter | ( | REAL*8,intent(in) | AbsTime, |
REAL*8,intent(in) | lambda0, | ||
INTEGER,intent(in) | NPar, | ||
REAL*8,intent(in) | meanDensity, | ||
CHARACTER(255),intent(in) | identifier | ||
) |
This routine writes the generalized Lieb-Liniger parameter to a file. On the first call a header in the file is created.
Definition at line 575 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_mu_kj | ( | REAL*8,intent(in) | AbsTime, |
COMPLEX*16,dimension(morb,morb),intent(in) | mu_kj, | ||
CHARACTER(255),intent(in) | identifier | ||
) |
This routine writes the chemical potentials mu_kj to a file. On the first call a header in the file is created.
Definition at line 438 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_noccsToFile | ( | REAL*8,intent(in) | AbsTime, |
INTEGER,intent(in) | MOrb, | ||
REAL*8,dimension(morb),intent(in) | noccs, | ||
CHARACTER(len=255),intent(in) | identifier | ||
) |
This routine writes the natural orbital occupations noccs to a file. On the first call a header in the file is created.
Definition at line 1051 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_norbsToFile | ( | REAL*8,intent(in) | AbsTime, |
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | norbs, | ||
INTEGER,intent(in) | NDX, | ||
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ, | ||
INTEGER,intent(in) | MOrb, | ||
CHARACTER(255),intent(in) | identifier | ||
) |
This routine writes the natural orbital array to a file.
Definition at line 732 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_probabilityLeft | ( | REAL*8,intent(in) | AbsTime, |
REAL*8,intent(in) | cumulativeProbability, | ||
INTEGER,intent(in) | MOrb, | ||
INTEGER,intent(in) | NPar, | ||
CHARACTER(255),intent(in) | identifier | ||
) |
This routine writes the integral of the probability density from -infty up to zero to a file.
Definition at line 318 of file moduleinputoutput.F90.
subroutine moduleinputoutput::write_PsiToFile | ( | REAL*8,intent(in) | AbsTime, |
COMPLEX*16,dimension(ndx*ndy*ndz,morb),intent(in) | Psi, | ||
INTEGER,intent(in) | NDX, | ||
INTEGER,intent(in) | NDY, | ||
INTEGER,intent(in) | NDZ, | ||
INTEGER,intent(in) | MOrb, | ||
INTEGER,intent(in) | fileID, | ||
CHARACTER(255),intent(in) | identifier | ||
) |
This routine writes the orbital array to a file. If fileID == 0, the file <AbsTime>.orbs.dat is written, else if fileID == 1 the file restart.orbs.out is written.
Definition at line 678 of file moduleinputoutput.F90.