qrunch.chemistry.ground_state_problem.builders.builders_protocols
Protocols for ground state problem builders.
Functions
|
Tell static type checkers that in the True-branch this is the restricted version. |
|
Tell static type checkers that in the True-branch this is the unrestricted version. |
Tell static type checkers that in the True-branch this is a list of restricted ground state problems. |
Classes
Ground state problem builder. |
|
Protocol for classes that modify a GroundStateProblem. |
|
Restricted ground state problem. |
|
Unrestricted ground state problem. |
- class GroundStateProblemBuilder
Bases:
ProtocolGround state problem builder.
- __init__(*args, **kwargs)
- build_restricted(molecular_configuration: MolecularConfiguration) RestrictedGroundStateProblem
Build the restricted ground state problem.
- Parameters:
molecular_configuration (MolecularConfiguration)
- Return type:
- build_unrestricted(molecular_configuration: MolecularConfiguration) UnrestrictedGroundStateProblem
Build the unrestricted ground state problem.
- Parameters:
molecular_configuration (MolecularConfiguration)
- Return type:
- class GroundStateProblemModifier
Bases:
ProtocolProtocol for classes that modify a GroundStateProblem.
- __init__(*args, **kwargs)
- modify(problem: RestrictedGroundStateProblem) RestrictedGroundStateProblem
- modify(problem: UnrestrictedGroundStateProblem) UnrestrictedGroundStateProblem
Modify the GroundStateProblem and return the modified instance.
- Parameters:
problem – The ground state problem to be modified.
- classmethod short_name() str
Provide a short name for logging purposes.
- Return type:
str
- class RestrictedGroundStateProblem
Bases:
objectRestricted ground state problem.
All fields are immutable (
frozen=True) so an instance can be safely reused.- Parameters:
electronic_structure_integrals – Integrals for the problem.
electron_configuration – Electronic configuration for the problem.
energy_contributions – Energy contributions needed for the final energy.
- __init__(electronic_structure_integrals: RestrictedElectronicStructureIntegrals, electron_configuration: MolecularElectronConfiguration, energy_contributions: MolecularEnergyContributions) None
- Parameters:
electronic_structure_integrals (RestrictedElectronicStructureIntegrals)
electron_configuration (MolecularElectronConfiguration)
energy_contributions (MolecularEnergyContributions)
- Return type:
None
- electron_configuration: MolecularElectronConfiguration
- electronic_structure_integrals: RestrictedElectronicStructureIntegrals
- energy_contributions: MolecularEnergyContributions
- property is_restricted: Literal[True]
Return True, if it is restricted.
- class UnrestrictedGroundStateProblem
Bases:
objectUnrestricted ground state problem.
All fields are immutable (
frozen=True) so an instance can be safely reused.- Parameters:
electronic_structure_integrals – Integrals for the problem.
electron_configuration – Electronic configuration for the problem.
energy_contributions – Energy contributions needed for the final energy.
- __init__(electronic_structure_integrals: UnrestrictedElectronicStructureIntegrals, electron_configuration: MolecularElectronConfiguration, energy_contributions: MolecularEnergyContributions) None
- Parameters:
electronic_structure_integrals (UnrestrictedElectronicStructureIntegrals)
electron_configuration (MolecularElectronConfiguration)
energy_contributions (MolecularEnergyContributions)
- Return type:
None
- electron_configuration: MolecularElectronConfiguration
- electronic_structure_integrals: UnrestrictedElectronicStructureIntegrals
- energy_contributions: MolecularEnergyContributions
- property is_restricted: Literal[False]
Return True, if it is restricted.
- ground_state_problem_is_restricted(problem: RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) TypeIs[RestrictedGroundStateProblem]
Tell static type checkers that in the True-branch this is the restricted version.
- Parameters:
problem (RestrictedGroundStateProblem | UnrestrictedGroundStateProblem)
- Return type:
TypeIs[RestrictedGroundStateProblem]
- ground_state_problem_is_unrestricted(problem: RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) TypeIs[UnrestrictedGroundStateProblem]
Tell static type checkers that in the True-branch this is the unrestricted version.
- Parameters:
problem (RestrictedGroundStateProblem | UnrestrictedGroundStateProblem)
- Return type:
TypeIs[UnrestrictedGroundStateProblem]
- ground_state_problem_list_is_all_restricted(problem: list[RestrictedGroundStateProblem] | list[UnrestrictedGroundStateProblem]) TypeIs[list[RestrictedGroundStateProblem]]
Tell static type checkers that in the True-branch this is a list of restricted ground state problems.
- Parameters:
problem (list[RestrictedGroundStateProblem] | list[UnrestrictedGroundStateProblem])
- Return type:
TypeIs[list[RestrictedGroundStateProblem]]