Base classes for ebcc.ham
.
ebcc.ham.base.BaseHamiltonian(mf, space, mo_coeff=None)
Bases: Namespace[Any]
, ABC
Base class for Hamiltonians.
Initialise the Hamiltonian.
Parameters: |
|
---|
Source code in ebcc/ham/base.py
def __init__(
self,
mf: SCF,
space: tuple[SpaceType, ...],
mo_coeff: Optional[tuple[CoeffType, ...]] = None,
) -> None:
"""Initialise the Hamiltonian.
Args:
mf: Mean-field object.
space: Space object for each index.
mo_coeff: Molecular orbital coefficients for each index.
"""
Namespace.__init__(self)
# Parameters:
self.__dict__["mf"] = mf
self.__dict__["space"] = space
self.__dict__["mo_coeff"] = mo_coeff if mo_coeff is not None else (mf.mo_coeff,) * 4
ebcc.ham.base.BaseHamiltonian.__getitem__(key)
abstractmethod
Just-in-time getter.
Parameters: |
|
---|
Returns: |
|
---|
Source code in ebcc/ham/base.py
@abstractmethod
def __getitem__(self, key: str) -> Any:
"""Just-in-time getter.
Args:
key: Key to get.
Returns:
Slice of the Hamiltonian.
"""
pass
ebcc.ham.base.BaseRHamiltonian(mf, space, mo_coeff=None)
Bases: BaseHamiltonian
Base class for restricted Hamiltonians.
Initialise the Hamiltonian.
Parameters: |
|
---|
Source code in ebcc/ham/base.py
def __init__(
self,
mf: SCF,
space: tuple[SpaceType, ...],
mo_coeff: Optional[tuple[CoeffType, ...]] = None,
) -> None:
"""Initialise the Hamiltonian.
Args:
mf: Mean-field object.
space: Space object for each index.
mo_coeff: Molecular orbital coefficients for each index.
"""
Namespace.__init__(self)
# Parameters:
self.__dict__["mf"] = mf
self.__dict__["space"] = space
self.__dict__["mo_coeff"] = mo_coeff if mo_coeff is not None else (mf.mo_coeff,) * 4
ebcc.ham.base.BaseUHamiltonian(mf, space, mo_coeff=None)
Bases: BaseHamiltonian
Base class for unrestricted Hamiltonians.
Initialise the Hamiltonian.
Parameters: |
|
---|
Source code in ebcc/ham/base.py
def __init__(
self,
mf: SCF,
space: tuple[SpaceType, ...],
mo_coeff: Optional[tuple[CoeffType, ...]] = None,
) -> None:
"""Initialise the Hamiltonian.
Args:
mf: Mean-field object.
space: Space object for each index.
mo_coeff: Molecular orbital coefficients for each index.
"""
Namespace.__init__(self)
# Parameters:
self.__dict__["mf"] = mf
self.__dict__["space"] = space
self.__dict__["mo_coeff"] = mo_coeff if mo_coeff is not None else (mf.mo_coeff,) * 4
ebcc.ham.base.BaseGHamiltonian(mf, space, mo_coeff=None)
Bases: BaseHamiltonian
Base class for general Hamiltonians.
Initialise the Hamiltonian.
Parameters: |
|
---|
Source code in ebcc/ham/base.py
def __init__(
self,
mf: SCF,
space: tuple[SpaceType, ...],
mo_coeff: Optional[tuple[CoeffType, ...]] = None,
) -> None:
"""Initialise the Hamiltonian.
Args:
mf: Mean-field object.
space: Space object for each index.
mo_coeff: Molecular orbital coefficients for each index.
"""
Namespace.__init__(self)
# Parameters:
self.__dict__["mf"] = mf
self.__dict__["space"] = space
self.__dict__["mo_coeff"] = mo_coeff if mo_coeff is not None else (mf.mo_coeff,) * 4
ebcc.ham.base.BaseFock(mf, space, mo_coeff=None, g=None, shift=None, xi=None)
Bases: BaseHamiltonian
Base class for Fock matrices.
Initialise the Hamiltonian.
Parameters: |
|
---|
Source code in ebcc/ham/base.py
def __init__(
self,
mf: SCF,
space: tuple[SpaceType, ...],
mo_coeff: Optional[tuple[CoeffType, ...]] = None,
g: Optional[Namespace[Any]] = None,
shift: Optional[bool] = None,
xi: Optional[NDArray[float64]] = None,
) -> None:
"""Initialise the Hamiltonian.
Args:
mf: Mean-field object.
space: Space object for each index.
mo_coeff: Molecular orbital coefficients for each index.
g: Namespace containing blocks of the electron-boson coupling matrix.
shift: Shift the boson operators such that the Hamiltonian is normal-ordered with
respect to a coherent state. This removes the bosonic coupling to the static
mean-field density, introducing a constant energy shift.
xi: Shift in the bosonic operators to diagonalise the photon Hamiltonian.
"""
super().__init__(mf, space, mo_coeff=mo_coeff)
# Boson parameters:
self.__dict__["g"] = g
self.__dict__["shift"] = shift
self.__dict__["xi"] = xi
ebcc.ham.base.BaseERIs(mf, space, mo_coeff=None)
Bases: BaseHamiltonian
Base class for electronic repulsion integrals.
Initialise the Hamiltonian.
Parameters: |
|
---|
Source code in ebcc/ham/base.py
def __init__(
self,
mf: SCF,
space: tuple[SpaceType, ...],
mo_coeff: Optional[tuple[CoeffType, ...]] = None,
) -> None:
"""Initialise the Hamiltonian.
Args:
mf: Mean-field object.
space: Space object for each index.
mo_coeff: Molecular orbital coefficients for each index.
"""
Namespace.__init__(self)
# Parameters:
self.__dict__["mf"] = mf
self.__dict__["space"] = space
self.__dict__["mo_coeff"] = mo_coeff if mo_coeff is not None else (mf.mo_coeff,) * 4
ebcc.ham.base.BaseElectronBoson(mf, g, space, mo_coeff=None)
Bases: BaseHamiltonian
Base class for electron-boson coupling matrices.
Initialise the Hamiltonian.
Parameters: |
|
---|
Source code in ebcc/ham/base.py
def __init__(
self,
mf: SCF,
g: NDArray[float64],
space: tuple[SpaceType, ...],
mo_coeff: Optional[tuple[CoeffType, ...]] = None,
) -> None:
"""Initialise the Hamiltonian.
Args:
mf: Mean-field object.
g: The electron-boson coupling matrix array.
space: Space object for each index.
mo_coeff: Molecular orbital coefficients for each index.
"""
super().__init__(mf, space, mo_coeff=mo_coeff)
# Boson parameters:
self.__dict__["g"] = g