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 a list of restricted ground state problems. |
Classes
Ground state problem builder. |
|
Protocol for classes that modify a GroundStateProblem. |
- 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_restricted_lazy(molecular_configuration: MolecularConfiguration) LazyRestrictedGroundStateProblem
Build the restricted ground state problem and return a lazy on-disk reference.
- Parameters:
molecular_configuration (MolecularConfiguration)
- Return type:
- build_unrestricted(molecular_configuration: MolecularConfiguration) UnrestrictedGroundStateProblem
Build the unrestricted ground state problem.
- Parameters:
molecular_configuration (MolecularConfiguration)
- Return type:
- build_unrestricted_lazy(molecular_configuration: MolecularConfiguration) LazyUnrestrictedGroundStateProblem
Build the unrestricted ground state problem and return a lazy on-disk reference.
- Parameters:
molecular_configuration (MolecularConfiguration)
- Return type:
- data_persister_manager() DataPersisterManager | None
Return the data persister manager, if any, used by this builder.
- Return type:
DataPersisterManager | None
- 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 (RestrictedGroundStateProblem | UnrestrictedGroundStateProblem) – The ground state problem to be modified.
- Return type:
RestrictedGroundStateProblem | UnrestrictedGroundStateProblem
- classmethod persistence_key() str
Provide a unique persistence key for checkpointing after this modifier is applied.
- Return type:
str
- classmethod short_name() str
Provide a short name for logging purposes.
- Return type:
str
- ground_state_problem_list_is_all_restricted(problem: list[RestrictedGroundStateProblem] | list[UnrestrictedGroundStateProblem]) TypeGuard[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:
TypeGuard[list[RestrictedGroundStateProblem]]