A simple package to store with the 1 and 2 electron integrals that appear in quantum chemistry calculations. Because the focus is on active-space type models where the number of molecular orbitals is not expected to grow beyond around 200, this just holds everything in memory.
ints_0 = npzread("data_h6/h0.npy");
ints_1 = npzread("data_h6/h1.npy");
ints_2 = npzread("data_h6/h2.npy");
ints = InCoreInts(ints_0, ints_1, ints_2)
# rotate orbitals by some random transformation
A = rand(size(ints.h1)...)
F = svd(A)
U = F.U * F.Vt
ints2 = orbital_rotation(ints, U);
orbital_rotation!(ints, U); # in placeIn this example ints_0 is a scalar, providing any energy constant (nuclear repulsion, core orbital energy, etc),
ints_1 is a matrix,
and ints_2 is a 4-index tensor,
The energy can be computed for a given 1 and 2 RDM with:
compute_energy(ints::InCoreInts, rdm1, rdm2)as