DataHfProvider
- class adcc.DataHfProvider(data)
Bases:
libadcc.HartreeFockProvider
Initialise the DataHfProvider class with the data being a supported data container (currently python dictionary or HDF5 file). Let nf denote the number of Fock spin orbitals (i.e. the sum of both the alpha and the beta orbitals) and nb the number of basis functions. With array we indicate either a np.array or an HDF5 dataset. The following keys are required in the container:
restricted (bool): True for a restricted SCF calculation, False otherwise
conv_tol (float): Tolerance value used for SCF convergence, should be roughly equivalent to l2 norm of the Pulay error.
orbcoeff_fb (.array with dtype float, size (nf, nb)): SCF orbital coefficients, i.e. the uniform transform from the basis to the molecular orbitals.
occupation_f (array with dtype float, size (nf, ): Occupation number for each SCF orbitals (i.e. diagonal of the HF density matrix in the SCF orbital basis).
orben_f (array with dtype float, size (nf, ): SCF orbital energies
fock_ff (array with dtype float, size (nf, nf): Fock matrix in SCF orbital basis. Notice, the full matrix is expected also for restricted calculations.
eri_phys_asym_ffff (array with dtype float, size (nf, nf, nf, nf): Antisymmetrised electron-repulsion integral tensor in the SCF orbital basis, using the Physicists’ indexing convention, i.e. that the index tuple (i,j,k,l) refers to the integral , i.e.
The full tensor (including zero blocks) is expected.
As an alternative to eri_phys_asym_ffff, the user may provide
eri_ffff (array with dtype float, size (nf, nf, nf, nf): Electron-repulsion integral tensor in chemists’ notation. The index tuple (i,j,k,l) thus refers to the integral , which is
Notice, that no antisymmetrisation has been applied in this tensor.
The above keys define the least set of quantities to start a calculation in adcc. In order to have access to properties such as dipole moments or to get the correct state energies, further keys are highly recommended to be provided as well.
energy_scf (float): Final total SCF energy of both electronic and nuclear energy terms. (default: 0.0)
multipoles: Container with electric and nuclear multipole moments. Can be another dictionary or simply an HDF5 group.
elec_1 (array, size (3, nb, nb)): Electric dipole moment integrals in the atomic orbital basis (i.e. the discretisation basis with nb elements). First axis indicates cartesian component (x, y, z).
nuc_0 (float): Total nuclear charge
nuc_1 (array size (3, ): Nuclear dipole moment
The defaults for all entries are all-zero multipoles.
spin_multiplicity (int): The spin mulitplicity of the HF ground state described by the data. A value of 0 (for unknown) should be supplied for unrestricted calculations. (default: 1 for restricted and 0 for unrestricted calculations)
A descriptive string for the backend can be supplied optionally as well. In case of using a python dict as the data container, this should be done using the key backend. For an HDF5 file, this should be done using the attribute backend. Defaults based on the filename are generated.
- Parameters
data (dict or h5py.File) – Dictionary containing the HartreeFock data to use. For the required keys see details above.
Methods Summary
fill_eri_ffff
(self, arg0, arg1)Fill the passed numpy array arg1 with a part of the electron-repulsion integral tensor in the molecular orbital basis.
fill_eri_phys_asym_ffff
(self, arg0, arg1)Fill the passed numpy array arg1 with a part of the antisymmetrised electron-repulsion integral tensor in the molecular orbital basis.
fill_fock_ff
(self, arg0, arg1)Fill the passed numpy array arg1 with a part of the Fock matrix in the molecular orbital basis.
fill_occupation_f
(self, arg0)Fill the passed numpy array of size (2 * nf, ) with the occupation number for each SCF orbital.
fill_orbcoeff_fb
(self, arg0)Fill the passed numpy array of size (2 * nf, nb) with the SCF orbital coefficients, i.e. the uniform transform from the one-particle basis to the molecular orbitals.
fill_orben_f
(self, arg0)Fill the passed numpy array of size (2 * nf, ) with the SCF orbital energies.
get_backend
()get_conv_tol
(self)Returns the tolerance value used for SCF convergence.
get_energy_scf
(self)Returns the final total SCF energy (sum of electronic and nuclear terms.
get_n_bas
(self)Returns the number of spatial one-electron basis functions.
get_n_orbs_alpha
(self)Returns the number of HF spin orbitals of alpha spin.
get_nuclear_multipole
(self, arg0)Returns the nuclear multipole of the requested order.
get_restricted
(self)Return True for a restricted SCF calculation, False otherwise.
get_spin_multiplicity
(self)Returns the spin multiplicity of the HF ground state.
has_eri_phys_asym_ffff_inner
()Methods Documentation
- fill_eri_ffff(self: libadcc.HartreeFockProvider, arg0: tuple, arg1: numpy.ndarray) None
Fill the passed numpy array arg1 with a part of the electron-repulsion integral tensor in the molecular orbital basis. The indexing convention is the chemist’s notation, i.e. the index tuple (i,j,k,l) refers to the integral . The block to store is specified by the provided tuple of ranges arg0, which gives the range of indices to place into the buffer along each of the axis. The index counting is done in spin orbitals, so the full range in each axis is range(0, 2 * nf).
- fill_eri_phys_asym_ffff(self: libadcc.HartreeFockProvider, arg0: tuple, arg1: numpy.ndarray) None
Fill the passed numpy array arg1 with a part of the antisymmetrised electron-repulsion integral tensor in the molecular orbital basis. The indexing convention is the physicist’s notation, i.e. the index tuple (i,j,k,l) refers to the integral . The block to store is specified by the provided tuple of ranges arg0, which gives the range of indices to place into the buffer along each of the axis. The index counting is done in spin orbitals, so the full range in each axis is range(0, 2 * nf).
- fill_fock_ff(self: libadcc.HartreeFockProvider, arg0: tuple, arg1: numpy.ndarray) None
Fill the passed numpy array arg1 with a part of the Fock matrix in the molecular orbital basis. The block to store is specified by the provided tuple of ranges arg0, which gives the range of indices to place into the buffer along each of the axis. The index counting is done in spin orbitals, so the full range in each axis is range(0, 2 * nf). The implementation should not assume that the alpha-beta and beta-alpha blocks are not accessed even though they are zero by spin symmetry.
- fill_occupation_f(self: libadcc.HartreeFockProvider, arg0: numpy.ndarray) None
Fill the passed numpy array of size (2 * nf, ) with the occupation number for each SCF orbital.
- fill_orbcoeff_fb(self: libadcc.HartreeFockProvider, arg0: numpy.ndarray) None
Fill the passed numpy array of size (2 * nf, nb) with the SCF orbital coefficients, i.e. the uniform transform from the one-particle basis to the molecular orbitals.
- fill_orben_f(self: libadcc.HartreeFockProvider, arg0: numpy.ndarray) None
Fill the passed numpy array of size (2 * nf, ) with the SCF orbital energies.
- get_backend()
- get_conv_tol(self: libadcc.HartreeFockProvider) float
Returns the tolerance value used for SCF convergence. Should be roughly equivalent to the l2 norm of the Pulay error.
- get_energy_scf(self: libadcc.HartreeFockProvider) float
Returns the final total SCF energy (sum of electronic and nuclear terms.
- get_n_bas(self: libadcc.HartreeFockProvider) int
Returns the number of spatial one-electron basis functions. This value is abbreviated by nb in the documentation.
- get_n_orbs_alpha(self: libadcc.HartreeFockProvider) int
Returns the number of HF spin orbitals of alpha spin. It is assumed the same number of beta spin orbitals are used. This value is abbreviated by nf in the documentation.
- get_nuclear_multipole(self: libadcc.HartreeFockProvider, arg0: int) numpy.ndarray[numpy.float64]
Returns the nuclear multipole of the requested order. For 0 returns the total nuclear charge as an array of size 1, for 1 returns the nuclear dipole moment as an array of size 3.
- get_restricted(self: libadcc.HartreeFockProvider) bool
Return True for a restricted SCF calculation, False otherwise.
- get_spin_multiplicity(self: libadcc.HartreeFockProvider) int
Returns the spin multiplicity of the HF ground state. A value of 0* (for unknown) should be supplied for unrestricted calculations.
- has_eri_phys_asym_ffff_inner()