Closed avcopan closed 7 years ago
Also, to avoid confusion about whether norb
is the total number of orbitals or the number of non-frozen orbitals, replace the attributes nfrz
, norb
, naocc
, etc. with a common function in the base class. The signature should look like this:
def get_orbital_count(self, mo_type='alpha', mo_space='ov'):
"""Return the number of orbitals in a given space.
Args:
mo_type (str): Orbital type, 'alpha', 'beta', or 'spinorb'.
mo_space (str): Any contiguous combination of 'c' (core),
'o' (occupied), and 'v' (virtual). Defaults to 'ov',
which denotes all unfrozen orbitals.
Returns:
np.ndarray: The orbital energies.
"""
That will also simplify the get_mo_slice
function.
All that should be required are the energies and coefficients themselves. The construction of spin-orbitals can then be made automatic by defining a function to get the spin-orbital sorting order in the base class. Something like the following:
In this case, it also makes more sense to make
mo_energies
andmo_coefficients
public attributes.