FCIDump files
ElemCo.FciDump — 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.FciDump.FDump — TypeFDumpMolecular 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 energyhead::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 withhead["IUHF"][1] > 0.
Exported functions
ElemCo.FciDump.fd_exists — Methodfd_exists(fd::FDump)Return true if the object is a non-empty FDump
ElemCo.FciDump.headvar — Methodheadvar(head::Dict, key::String)Check header for key, return value if a list, or the element or nothing if not there.
ElemCo.FciDump.headvar — Methodheadvar(fd::FDump, key::String)Check header for key, return value if a list, or the element or nothing if not there.
ElemCo.FciDump.integ1 — Functioninteg1(fd::FDump, spincase::Symbol=:α)Return 1-e⁻ integrals (for UHF fcidump: for spincase). spincase can be :α or :β.
ElemCo.FciDump.integ2 — Functioninteg2(fd::FDump, spincase::Symbol=:α)Return 2-e⁻ integrals (for UHF fcidump: for spincase). spincase can be :α, :β or :αβ.
ElemCo.FciDump.modify_header! — Methodmodify_header!(fd::FDump, norb, nelec; ms2=-1, isym=-1, orbsym=[])Modify header of FDump object
ElemCo.FciDump.read_fcidump — Methodread_fcidump(fcidump::String)Read ascii file (possibly with integrals in npy files).
ElemCo.FciDump.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.FciDump.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.FciDump.uppertriangular — Methoduppertriangular(i1, i2, i3)Return upper triangular index from three indices i1 <= i2 <= i3.
ElemCo.FciDump.uppertriangular — Methoduppertriangular(i1, i2)Return upper triangular index from two indices i1 <= i2.
ElemCo.FciDump.uppertriangular_range — Methoduppertriangular_range(i2)Return range for the upper triangular index (i1 <= i2) for a given i2.
ElemCo.FciDump.write_fcidump — Functionwrite_fcidump(fd::FDump, fcidump::String, tol=1e-12)Write fcidump file.
Internal functions
ElemCo.FciDump.mmap_integrals — Methodmmap_integrals(fd::FDump, dir::AbstractString, key::AbstractString)Memory-map integral file (from head[key])
ElemCo.FciDump.print_int_value — Methodprint_int_value(fdf, integ, i1, i2, i3, i4)Print integral value to fdf file.
ElemCo.FciDump.read_header — Methodread_header(fdfile::IOStream)Read header of fcidump file.
ElemCo.FciDump.read_integrals! — Methodread_integrals!(fd::FDump, dir::AbstractString)Read integrals from npy files.
ElemCo.FciDump.read_integrals! — Methodread_integrals!(fd::FDump, fdfile::IOStream)Read integrals from fcidump file
ElemCo.FciDump.set_int2! — Methodset_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.strict_uppertriangular_range — Methodstrict_uppertriangular_range(i2)Return range for the upper triangular index (i1 <= i2) without diagonal (i1 < i2) for a given i2.
ElemCo.FciDump.transform_int1 — Methodtransform_int1(int1::AbstractArray, Tl::AbstractArray, Tr::AbstractArray)Transform 1-e integrals to new basis using Tl and Tr transformation matrices.
ElemCo.FciDump.transform_int2 — Methodtransform_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.
ElemCo.FciDump.uppertriangular_diagonal — Methoduppertriangular_diagonal(i2)Return index of diagonal of upper triangular index (i1 <= i2) for a given i2.
ElemCo.FciDump.write_header — Methodwrite_header(fd::FDump, fdf)Write header of fcidump file.
ElemCo.FciDump.write_integrals — Methodwrite_integrals(fd::FDump, fdf, tol)Write integrals to fdf file.
ElemCo.FciDump.write_integrals1 — Methodwrite_integrals1(int1, fdf, tol, simtra)Write 1-e integrals to fdf file.
ElemCo.FciDump.write_integrals2 — Methodwrite_integrals2(int2, fdf, tol, triang, simtra)Write 2-e integrals to fdf file.