FCIDump files
ElemCo.FciDumps — ModuleRead 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.FciDumps.FDump — TypeFDump{N}Molecular integrals
The 2-e integrals are stored in the physicists' notation: int2[pqrs] $= <pq|rs>=v_{pq}^{rs}$
N denotes the number of indices in the 2-e-integral tensors, for N=3 (usual) the last two indices are stored as a single uppertriangular 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, 4}: αβ 2-e⁻ integrals for unrestricted orbitals fcidump.int1::Matrix{Float64}: 1-e⁻ integrals for restricted orbitals fcidump.int1a::Matrix{Float64}: α 1-e⁻ integrals for unrestricted orbitals fcidump.int1b::Matrix{Float64}: β 1-e⁻ integrals for unrestricted orbitals fcidump.int0::Float64: core energyhead::ElemCo.FciDumps.FDumpHeader: header of fcidump file, a dictionary of arrays.uhf::Bool:⟨false⟩a convinience variable, has to coincide withhead["IUHF"][1] > 0.
Exported functions
ElemCo.FciDumps.fd_exists — Methodfd_exists(fd::FDump)Return true if the object is a non-empty FDump
ElemCo.FciDumps.headvar — Methodheadvar(fd::FDump, key::String)Check header for key, return value if a list, or the element or nothing if not there.
ElemCo.FciDumps.headvar — Methodheadvar(head::FDumpHeader, key::String)Check header for key, return value if a list, or the element or nothing if not there.
ElemCo.FciDumps.headvar — Methodheadvar(fd::FDump, key::String, ::Type{T}) where {T}Check header for key, return the first element or nothing if not there.
ElemCo.FciDumps.headvar — Methodheadvar(head::FDumpHeader, key::String, ::Type{T}) where {T}Check header for key of type T, return the first element or nothing if not there.
ElemCo.FciDumps.headvars — Methodheadvars(fd::FDump, key::String, ::Type{T}) where {T}Check header for key, return a vector of values or nothing if not there.
ElemCo.FciDumps.headvars — Methodheadvars(head::FDumpHeader, key::String, ::Type{T}) where {T}Check header for key of type T, return a vector of values or nothing if not there.
ElemCo.FciDumps.int1_npy_filename — Functionint1_npy_filename(fd::FDump, spincase::Symbol=:α)Return filename for 1-e integrals in npy format. spincase can be :α or :β for UHF fcidump.
ElemCo.FciDumps.int2_npy_filename — Functionint2_npy_filename(fd::FDump, spincase::Symbol=:α)Return filename for 2-e integrals in npy format. spincase can be :α, :β or :αβ for UHF fcidump.
ElemCo.FciDumps.integ1 — Functioninteg1(fd::FDump, spincase::Symbol=:α)Return 1-e⁻ integrals (for UHF fcidump: for spincase). spincase can be :α or :β.
ElemCo.FciDumps.integ2 — Functioninteg2(fd::FDump, spincase::Symbol=:α)Return 2-e⁻ integrals (for UHF fcidump: for spincase). spincase can be :α, :β or :αβ.
Use type-stable versions instead: integ2_ss for same-spin integrals and integ2_os for opposite-spin integrals.
ElemCo.FciDumps.integ2_os — Methodinteg2_os(fd::FDump)Return αβ 2-e⁻ integrals for UHF fcidump
ElemCo.FciDumps.integ2_ss — Functioninteg2_ss(fd::FDump, spincase::Symbol=:α)Return 2-e⁻ integrals (for UHF fcidump: for spincase). spincase can be :α or :β.
ElemCo.FciDumps.is_similarity_transformed — Methodis_similarity_transformed(fd::FDump)Return true if the fcidump is similarity transformed
ElemCo.FciDumps.modify_header! — Methodmodify_header!(fd::FDump, norb, nelec; ms2=-1, isym=-1, orbsym=[])Modify header of FDump object
ElemCo.FciDumps.read_fcidump — Methodread_fcidump(fcidump::String)Read ascii file (possibly with integrals in npy files) to TFDump object.
ElemCo.FciDumps.read_fcidump — Methodread_fcidump(fcidump::String, ::Val{N})Read ascii file (possibly with integrals in npy files).
ElemCo.FciDumps.reorder_orbs_int2 — Methodreorder_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.FciDumps.transform_fcidump — Methodtransform_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.
ElemCo.FciDumps.write_fcidump — Functionwrite_fcidump(fd::FDump, fcidump::String, tol=1e-12)Write fcidump file.
Internal functions
ElemCo.FciDumps.FDumpHeader — TypeFDumpHeaderHeader of fcidump file
ElemCo.FciDumps.is_triang — Methodis_triang(fd::FDump)
If true: an uppertriangular index for last two indices of 2e⁻ integrals is used.
ElemCo.FciDumps.mmap_integrals — Methodmmap_integrals(fd::FDump, dir::AbstractString, key::AbstractString, ::Array{T,N})Memory-map integral file (from head[key])
ElemCo.FciDumps.print_int_value — Methodprint_int_value(fdf, integ, i1, i2, i3, i4)Print integral value to fdf file.
ElemCo.FciDumps.read_header — Methodread_header(fdfile::IOStream)Read header of fcidump file.
ElemCo.FciDumps.read_integrals! — Methodread_integrals!(fd::FDump, dir::AbstractString)Read integrals from npy files.
Returns true if successful.
ElemCo.FciDumps.read_integrals! — Methodread_integrals!(fd::FDump{N}, fdfile::IOStream)Read integrals from fcidump file
Returns true if successful.
ElemCo.FciDumps.set_int2! — Methodset_int2!(int2::Array{Float64,3}, i1, i2, i3, i4, integ, 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.
ElemCo.FciDumps.set_int2! — Methodset_int2!(int2::Array{Float64,4}, i1, i2, i3, i4, integ, 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.
ElemCo.FciDumps.set_zero! — Functionset_zero!(fd::FDump, norb::Int=0)Set all integrals to zero.
If norb is not provided, the integrals are set to zero with the same dimensions as before.
ElemCo.FciDumps.transform_int1 — Methodtransform_int1(int1::AbstractArray, Tl::AbstractArray, Tr::AbstractArray)Transform 1-e integrals to new basis using Tl and Tr transformation matrices.
ElemCo.FciDumps.transform_int2 — Methodtransform_int2(int2::Array{Float64,3}, Tl::AbstractArray, Tl2::AbstractArray,
Tr::AbstractArray, Tr2::AbstractArray)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]
The last two indices are stored as a single uppertriangular index.
ElemCo.FciDumps.transform_int2_Q — Methodtransform_int2_Q(int2::Array{Float64,3}, Tl::AbstractArray, Tl2::AbstractArray,
Tr::AbstractArray, Tr2::AbstractArray)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]
The result is a full 4-index tensor.
ElemCo.FciDumps.write_header — Methodwrite_header(fd::FDump, fdf)Write header of fcidump file.
ElemCo.FciDumps.write_integrals — Methodwrite_integrals(fd::FDump, fdf, tol)Write integrals to fdf file.
ElemCo.FciDumps.write_integrals1 — Methodwrite_integrals1(int1, fdf, tol, simtra)Write 1-e integrals to fdf file.
ElemCo.FciDumps.write_integrals2 — Methodwrite_integrals2(int2::Array{Float64,3}, fdf, tol, simtra)Write 2-e integrals to fdf file.