qrunch.chemistry.builders.problem

Functionality for creating ground state problem and reaction path problem builders.

Classes

EvenHandedReactionPathProblemBuilderCreator

Even handed reaction path problem builder creator.

FullGroundStateProblemBuilderCreator

Full ground state problem builder creator.

GroundStateProblemBuilderCreator

Builder for creating full ground state problem builder.

ProblemBuilderCreator

Builder for creating ground state problem builder.

ProjectiveEmbeddingGroundStateProblemBuilderCreator

Projective embedding ground state problem builder creator.

ReactionPathProblemBuilderCreator

Builder for creating full reaction path problem builder.

SimpleReactionPathProblemBuilderCreator

Create SimpleReactionPathProblemBuilder instances.

class EvenHandedReactionPathProblemBuilderCreator

Bases: object

Even handed reaction path problem builder creator.

__init__() None

Initialize the even handed reaction path problem builder creator.

Return type:

None

add_problem_modifier() ProblemModifierSubCreator[Self]

Add a problem modifier.

A problem modifier modifies the problem being solved, e.g. by changing the active space. If this is called more than once, the order matters.

This method returns a sub-builder prompting you to choose one of the available problem modifiers. The sub-builder method will then return this builder so you can keep building the problem. It can be called multiple times to chain multiple problem modifiers. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

ProblemModifierSubCreator[Self]

choose_data_persister_manager() DataPersisterManagerSubCreator[Self]

Choose the data persister manager to use and whether to save and/or load the data.

This method returns a sub-builder prompting you to choose one of the available ways to store the data. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

DataPersisterManagerSubCreator[Self]

choose_embedded_orbital_calculator() MolecularOrbitalCalculatorSubCreator[Self]

Choose the embedded system orbital calculator.

The embedded orbital calculator is in charge of building the molecular orbitals or the embedded system to be used in the subsequent correlated calculation on the embedded system once the modified integrals have been built.

This method returns a sub-builder prompting you to choose one of the available embedded orbital calculators. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

MolecularOrbitalCalculatorSubCreator[Self]

choose_full_system_solver() MeanFieldCalculatorSubCreator[Self]

Choose the full system solver.

The full system solver is in charge of solving the full molecular system using a simple mean field method.

This method returns a sub-builder prompting you to choose one of the available mean field calculators. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

MeanFieldCalculatorSubCreator[Self]

choose_localizer() LocalizerCreator[Self]

Choose the orbital localizer to use.

The orbital localizer is in charge of localizing the occupied molecular orbitals obtained from the full system solver. resulting in canonical molecular orbitals for the embedded region alone.

This method returns a sub-builder prompting you to choose one of the available ways to perform the localization of the orbitals. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

LocalizerCreator[Self]

choose_orbital_assigner() OrbitalAssignerCreator[Self]

Choose the orbital assigner to use.

The orbital assigner is in charge of assigning localized occupied orbitals to either the embedded or environment regions.

This method returns a sub-builder prompting you to choose one of the available ways to assign orbitals to either the embedded or environment regions. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

OrbitalAssignerCreator[Self]

choose_projector_builder() ProjectorBuilderCreator[Self]

Choose the projector builder to use.

The projector builder is in charge of removing any component of the embedded region orbitals that lies in the environment’s occupied subspace. This ensures that the two subsystems don’t “spill” into each other. In other words, it is building a projection onto either the occupied or virtual environment states.

This method returns a sub-builder prompting you to choose one of the available ways to build projections. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

ProjectorBuilderCreator[Self]

choose_repulsion_integral_builder() IntegralBuilderSubCreator[Self]

Choose the repulsion integral builder.

This method returns a sub-builder prompting you to choose one of the available ways to build repulsion integrals. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

IntegralBuilderSubCreator[Self]

create() EvenHandedReactionPathProblemBuilder

Create an instance of EvenHandedReactionPathProblemBuilder.

Return type:

EvenHandedReactionPathProblemBuilder

with_cube_generator(cube_generator: ProjectiveEmbeddingCubeGenerator) Self

Set the cube file generator to use.

This is only relevant if you want to generate cube files for the embedding orbitals.

Parameters:

cube_generator (ProjectiveEmbeddingCubeGenerator) – The cube file generator to use. Must be an instance of ProjectiveEmbeddingCubeGenerator.

Return type:

Self

class FullGroundStateProblemBuilderCreator

Bases: object

Full ground state problem builder creator.

__init__() None

Initialize the FullGroundStateProblemBuilderCreator.

Return type:

None

add_problem_modifier() ProblemModifierSubCreator[Self]

Add a problem modifier.

A problem modifier modifies the problem being solved, e.g. by changing the active space. If this is called more than once, the order matters.

This method returns a sub-builder prompting you to choose one of the available problem modifiers. The sub-builder method will then return this builder so you can keep building the problem. It can be called multiple times to chain multiple problem modifiers. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

ProblemModifierSubCreator[Self]

choose_data_persister_manager() DataPersisterManagerSubCreator[Self]

Choose the data persister manager to use and whether to save and/or load the data.

This method returns a sub-builder prompting you to choose one of the available ways to store the data. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

DataPersisterManagerSubCreator[Self]

choose_molecular_orbital_calculator() MolecularOrbitalCalculatorSubCreator[Self]

Choose the system orbital calculator.

The orbital calculator is in charge of building the molecular orbitals to be used in the subsequent correlated calculations.

This method returns a sub-builder prompting you to choose one of the available orbital calculators. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

MolecularOrbitalCalculatorSubCreator[Self]

choose_repulsion_integral_builder() IntegralBuilderSubCreator[Self]

Choose the repulsion integral builder.

This method returns a sub-builder prompting you to choose one of the available ways to build repulsion integrals. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

IntegralBuilderSubCreator[Self]

create() FullGroundStateProblemBuilder

Create an instance of FullGroundStateProblemBuilder.

Return type:

FullGroundStateProblemBuilder

class GroundStateProblemBuilderCreator

Bases: object

Builder for creating full ground state problem builder.

static projective_embedding() ProjectiveEmbeddingGroundStateProblemBuilderCreator

Narrow the problem type to a Projective embedding problem.

The projective embedding problem involves embedding systems of molecules in an environment consisting of the remaining molecule.

The embedding procedure consists of several elements:

  1. The full molecule is solved using the given mean field solver.

  2. The resulting orbitals are localized.

  3. The localized orbitals are assigned to either the embedded or environment regions.

  4. A projection onto the occupied environment states is built from the assigned orbitals.

  5. Modified integrals are built for the embedded region including an effective repulsion from the environment electrons and a cost preventing the embedded electrons to occupy the same orbitals as the environment electrons.

  6. The modified integrals are used to solve the embedded region using the given embedded orbital calculator resulting in canonical molecular orbitals for the embedded region alone.

  7. The modified integrals are transformed into the basis of the new molecular orbitals.

  8. The remaining energy contributions from the environment not included in the modified integrals are calculated.

  9. The modified integrals and the energy contributions are returned.

Return type:

ProjectiveEmbeddingGroundStateProblemBuilderCreator

static standard() FullGroundStateProblemBuilderCreator

Narrow the problem type to a full ground state energy problem.

This is a standard ground state problem without embedding, solving the full system at once, though the active space can still be modified.

Return type:

FullGroundStateProblemBuilderCreator

class ProblemBuilderCreator

Bases: object

Builder for creating ground state problem builder.

static ground_state() GroundStateProblemBuilderCreator

Narrow the problem type to a ground state problem.

A ground state problem consists of finding the ground state energy of a molecule.

Return type:

GroundStateProblemBuilderCreator

static reaction_path() ReactionPathProblemBuilderCreator

Narrow the problem type to a reaction path problem.

A reaction path problem consists of finding the ground state energy of each point in a sequence of molecular configurations / geometries.

Return type:

ReactionPathProblemBuilderCreator

class ProjectiveEmbeddingGroundStateProblemBuilderCreator

Bases: object

Projective embedding ground state problem builder creator.

__init__() None

Initialize the ProjectiveEmbeddingGroundStateProblemBuilderCreator.

Return type:

None

add_problem_modifier() ProblemModifierSubCreator[Self]

Add a problem modifier.

A problem modifier modifies the problem being solved, e.g. by changing the active space. If this is called more than once, the order matters.

This method returns a sub-builder prompting you to choose one of the available problem modifiers. The sub-builder method will then return this builder so you can keep building the problem. It can be called multiple times to chain multiple problem modifiers. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

ProblemModifierSubCreator[Self]

choose_data_persister_manager() DataPersisterManagerSubCreator[Self]

Choose the data persister manager to use and whether to save and/or load the data.

This method returns a sub-builder prompting you to choose one of the available ways to store the data. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

DataPersisterManagerSubCreator[Self]

choose_embedded_orbital_calculator() MolecularOrbitalCalculatorSubCreator[Self]

Choose the embedded system orbital calculator.

The embedded orbital calculator is in charge of building the molecular orbitals or the embedded system to be used in the subsequent correlated calculation on the embedded system once the modified integrals have been built.

This method returns a sub-builder prompting you to choose one of the available embedded orbital calculators. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

MolecularOrbitalCalculatorSubCreator[Self]

choose_full_system_solver() MeanFieldCalculatorSubCreator[Self]

Choose the full system solver.

The full system solver is in charge of solving the full molecular system using a simple mean field method.

This method returns a sub-builder prompting you to choose one of the available mean field calculators. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

MeanFieldCalculatorSubCreator[Self]

choose_localizer() LocalizerCreator[Self]

Choose the orbital localizer to use.

The orbital localizer is in charge of localizing the occupied molecular orbitals obtained from the full system solver.

This method returns a sub-builder prompting you to choose one of the available ways to perform the localization of the orbitals. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

LocalizerCreator[Self]

choose_orbital_assigner() OrbitalAssignerCreator[Self]

Choose the orbital assigner to use.

The orbital assigner is in charge of assigning localized occupied orbitals to either the embedded or environment regions.

This method returns a sub-builder prompting you to choose one of the available ways to assign orbitals to either the embedded or environment regions. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

OrbitalAssignerCreator[Self]

choose_projector_builder() ProjectorBuilderCreator[Self]

Choose the projector builder to use.

The projector builder is in charge of removing any component of the embedded region orbitals that lies in the environment’s occupied subspace. This ensures that the two subsystems don’t “spill” into each other. In other words, it is building a projection onto either the occupied or virtual environment states.

This method returns a sub-builder prompting you to choose one of the available ways to build projections. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

ProjectorBuilderCreator[Self]

choose_repulsion_integral_builder() IntegralBuilderSubCreator[Self]

Choose the repulsion integral builder.

This method returns a sub-builder prompting you to choose one of the available ways to build repulsion integrals. The sub-builder method will then return this builder so you can keep building the problem. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

IntegralBuilderSubCreator[Self]

create() ProjectiveEmbeddingGroundStateProblemBuilder

Create an instance of ProjectiveEmbeddingGroundStateProblemBuilder.

Return type:

ProjectiveEmbeddingGroundStateProblemBuilder

with_cube_generator(cube_generator: ProjectiveEmbeddingCubeGenerator) Self

Set the cube file generator to use.

This is only relevant if you want to generate cube files for the embedding orbitals.

Parameters:

cube_generator (ProjectiveEmbeddingCubeGenerator) – The cube file generator to use. Must be an instance of ProjectiveEmbeddingCubeGenerator.

Return type:

Self

class ReactionPathProblemBuilderCreator

Bases: object

Builder for creating full reaction path problem builder.

static even_handed() EvenHandedReactionPathProblemBuilderCreator

Narrow the problem type to a even handed reaction path problem.

The even handed reaction path problem uses the even-handed subsystem selection method described in https://doi.org/10.1063/1.5050533.

Return type:

EvenHandedReactionPathProblemBuilderCreator

static simple(ground_state_problem_builder: GroundStateProblemBuilder) SimpleReactionPathProblemBuilderCreator

Narrow the problem type builder type to a simple reaction path problem builder.

The simple reaction path problem consists of solving the ground state problem for each point in the reaction path independently.

Parameters:

ground_state_problem_builder (GroundStateProblemBuilder) – The ground state problem builder to use for each point in the reaction. An instance can be constructed using the path kqproblem_builder_creator().ground_state()..

Return type:

SimpleReactionPathProblemBuilderCreator

class SimpleReactionPathProblemBuilderCreator

Bases: object

Create SimpleReactionPathProblemBuilder instances.

__init__(ground_state_problem_builder: GroundStateProblemBuilder) None

Initialize an instance of the simple reaction path problem builder.

Parameters:

ground_state_problem_builder (GroundStateProblemBuilder) – Problem builder to be used on every molecular configuration in the reaction.

Return type:

None

create() SimpleReactionPathProblemBuilder

Create an instance of SimpleReactionPathProblemBuilder.

Return type:

SimpleReactionPathProblemBuilder

problem_builder_creator() ProblemBuilderCreator

Start creating a molecular problem builder.

This is the intended starting point for creating any type of problem builder. See https://qrunch.docs.kvantify.net/docs/explanations/builder_pattern.html for more information on using the builder pattern.

Return type:

ProblemBuilderCreator