FCIDump files

ElemCo.FciDumpModule

Read and write fcidump format integrals. Individual arrays of integrals can also be in *.npy format

The FCIDump file format is a simple text file format for storing molecular integrals. It is used by many quantum chemistry programs.

Storage of molecular integrals

ElemCo.FciDump.FDumpType
FDump

Molecular integrals

The 2-e integrals are stored in the physicists' notation: int2[pqrs] $= <pq|rs>=v_{pq}^{rs}$ and for triang the last two indices are stored as a single upper triangular index (r <= s)

  • int2::Array{Float64}: 2-e⁻ integrals for restricted orbitals fcidump.

  • int2aa::Array{Float64}: αα 2-e⁻ integrals for unrestricted orbitals fcidump.

  • int2bb::Array{Float64}: ββ 2-e⁻ integrals for unrestricted orbitals fcidump.

  • int2ab::Array{Float64}: αβ 2-e⁻ integrals for unrestricted orbitals fcidump.

  • int1::Array{Float64}: 1-e⁻ integrals for restricted orbitals fcidump.

  • int1a::Array{Float64}: α 1-e⁻ integrals for unrestricted orbitals fcidump.

  • int1b::Array{Float64}: β 1-e⁻ integrals for unrestricted orbitals fcidump.

  • int0::Float64: core energy

  • head::Dict: header of fcidump file, a dictionary of arrays.

  • triang::Bool: ⟨true⟩ use an upper triangular index for last two indices of 2e⁻ integrals.

  • uhf::Bool: ⟨false⟩ a convinience variable, has to coincide with head["IUHF"][1] > 0.

Exported functions

ElemCo.FciDump.headvarMethod
headvar(head::Dict, key::String)

Check header for key, return value if a list, or the element or nothing if not there.

ElemCo.FciDump.headvarMethod
headvar(fd::FDump, key::String)

Check header for key, return value if a list, or the element or nothing if not there.

ElemCo.FciDump.integ1Function
integ1(fd::FDump, spincase::Symbol=:α)

Return 1-e⁻ integrals (for UHF fcidump: for spincase). spincase can be or .

ElemCo.FciDump.integ2Function
integ2(fd::FDump, spincase::Symbol=:α)

Return 2-e⁻ integrals (for UHF fcidump: for spincase). spincase can be , or :αβ.

ElemCo.FciDump.reorder_orbs_int2Method
reorder_orbs_int2(int2::AbstractArray, orbs)

Reorder orbitals in 2-e integrals according to orbs.

orbscan be a subset of orbitals or a permutation of orbitals. Return int2[orbs[p],orbs[q],orbs[r],orbs[s]] or the triangular version.

ElemCo.FciDump.transform_fcidumpMethod
transform_fcidump(fd::FDump, Tl::AbstractArray, Tr::AbstractArray)

Transform integrals to new basis using Tl and Tr transformation matrices. For UHF fcidump, Tl and Tr are arrays of matrices for α and β spin. If Tl and Tr are arrays of arrays, then the function transforms rhf fcidump to uhf fcidump.

Internal functions

ElemCo.FciDump.mmap_integralsMethod
mmap_integrals(fd::FDump, dir::AbstractString, key::AbstractString)

Memory-map integral file (from head[key])

ElemCo.FciDump.set_int2!Method
set_int2!(int2::AbstractArray, i1, i2, i3, i4, integ, triang, simtra, ab)

Set 2-e integral in int2 array to integ considering permutational symmetries.

For not ab: particle symmetry is assumed. Integrals are stored in physicists' notation. If triang: the last two indices are stored as a single upper triangular index.

ElemCo.FciDump.transform_int1Method
transform_int1(int1::AbstractArray, Tl::AbstractArray,  Tr::AbstractArray)

Transform 1-e integrals to new basis using Tl and Tr transformation matrices.

ElemCo.FciDump.transform_int2Method
transform_int2(int2::AbstractArray, Tl::AbstractArray, Tl2::AbstractArray, 
               Tr::AbstractArray, Tr2::AbstractArray, triang_in, triang_out)

Transform 2-e integrals to new basis using Tl/Tl2 and Tr/Tr2 transformation matrices.

$v_{pq}^{rs} = v_{p'q'}^{r's'}$* Tl[p',p] * Tl2[q',q] * Tr[r',r] * Tr2[s',s]

If triang: the last two indices are stored as a single upper triangular index.