qrunch.chemistry.problem_builders.ground_state_problem.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)
- apply_restricted_post_active_space_modifiers(problem: RestrictedGroundStateProblem) RestrictedGroundStateProblem
Apply modifiers that follow the active space modifier to a restricted problem.
- Parameters:
problem (RestrictedGroundStateProblem)
- Return type:
- apply_restricted_post_active_space_modifiers_lazy(problem: RestrictedGroundStateProblem, molecular_configuration: MolecularConfiguration) LazyRestrictedGroundStateProblem
Apply post-active-space modifiers, persist the final restricted problem and return a lazy reference.
- Parameters:
problem (RestrictedGroundStateProblem)
molecular_configuration (MolecularConfiguration)
- Return type:
- apply_unrestricted_post_active_space_modifiers(problem: UnrestrictedGroundStateProblem) UnrestrictedGroundStateProblem
Apply modifiers that follow the active space modifier to an unrestricted problem.
- Parameters:
problem (UnrestrictedGroundStateProblem)
- Return type:
- apply_unrestricted_post_active_space_modifiers_lazy(problem: UnrestrictedGroundStateProblem, molecular_configuration: MolecularConfiguration) LazyUnrestrictedGroundStateProblem
Apply post-active-space modifiers, persist the final unrestricted problem and return a lazy reference.
- Parameters:
problem (UnrestrictedGroundStateProblem)
molecular_configuration (MolecularConfiguration)
- Return type:
- 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_restricted_pre_active_space_problem(molecular_configuration: MolecularConfiguration) RestrictedGroundStateProblem
Build the restricted problem up to (but not including) the active space modifier.
- 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:
- build_unrestricted_pre_active_space_problem(molecular_configuration: MolecularConfiguration) UnrestrictedGroundStateProblem
Build the unrestricted problem up to (but not including) the active space modifier.
- 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
- is_mean_field() bool
Return whether the molecular orbital calculator is a mean-field method.
- Return type:
bool
- 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]]