Create a Projective-Embedding Ground-State Problem
Projective embedding lets you treat a chosen embedded subsystem at higher level (wavefunction / correlated or quantum) while the environment is described at mean-field level (e.g., DFT). The builder below configures each stage of that pipeline.
Goal
Build a projective-embedding ground-state problem and understand the available configuration knobs.
Prerequisites
A molecular_configuration with
embedded_atoms=[...](indices of atoms to embed)
Specifying the Embedded Region
Projective embedding requires a partition of the system into:
Embedded region — the atoms you want to treat at the high-level wavefunction method
Environment region — the remaining atoms, treated at the mean-field level (e.g., DFT)
This partition is defined at the molecular configuration stage using the embedded_atoms keyword.
For example, suppose we have a water dimer and want to embed only one water molecule (first oxygen + its two hydrogens):
import qrunch as qc
water_separation = 2.5 # Angstrom between the two oxygen atoms
molecular_configuration = qc.build_molecular_configuration(
[
("O", 0.0, 0.0, 0.11779),
("H", 0.0, 0.75545, -0.47116),
("H", 0.0, -0.75545, -0.47116),
("O", water_separation, 0.0, 0.11779),
("H", water_separation, 0.75545, -0.47116),
("H", water_separation, -0.75545, -0.47116),
],
basis_set="sto3g",
embedded_atoms=[0, 1, 2], # indices of atoms in the embedded region
)
Here:
embedded_atomsis a sequence of integer atom indices (0-based)[0, 1, 2]selects the first oxygen and its two hydrogens (the embedded region)The remaining atoms (indices 3–5) form the environment (also called embedding region)
This molecular configuration can now be passed to the projective-embedding problem builder.
See Create a MolecularConfiguration for general molecule setup options.
Quick Start
The minimal embedded problem (defaults shown below) is:
import qrunch as qc
problem_builder = (
qc.problem_builder_creator()
.ground_state()
.projective_embedding()
.create()
)
# Build either restricted or unrestricted:
problem = problem_builder.build_unrestricted(molecular_configuration)
# or:
problem = problem_builder.build_restricted(molecular_configuration)
What the Defaults Are
Unless you override them, the builder uses:
Full-system solver: DFT
Embedded-region solver: MP2
Orbital localization: Pipek–Mezey with meta-Löwdin populations
Orbital assigner: total-weight-based (assigns localized orbitals to embedded vs environment)
Projector: Manby level-shift projector
ERI builder: standard two-electron integrals
Persistence: off by default
cubes: off by default
Putting It Together (Typical QC Setup)
A practical recipe for embedded QC runs:
import qrunch as qc
problem_builder = (
qc.problem_builder_creator()
.ground_state()
.projective_embedding()
.choose_full_system_solver()
.dft()
.choose_embedded_orbital_calculator()
.moller_plesset2()
.choose_localizer()
.pipek_mezey(population_method="meta-lowdin")
.choose_orbital_assigner()
.total_weight(assignment_tolerance=1e-4)
.choose_projector_builder()
.manby(level_shift_parameter=1.0)
.choose_repulsion_integral_builder()
.resolution_of_the_identity(auxiliary_basis="def2-universal-jkfit")
.add_problem_modifier()
.active_space(
number_of_active_spatial_orbitals=12,
number_of_active_alpha_electrons=7,
)
.add_problem_modifier()
.to_dense_integrals()
.create()
)
problem = problem_builder.build_unrestricted(molecular_configuration)
Notes & Tips
Embedded atoms must be specified in the molecular configuration via
embedded_atoms=[...].Active space + embedding is often the sweet spot for quantum resources: define a small, chemically meaningful active space in the embedded region.
RI ERI builders can dramatically reduce memory and disk space; test accuracy vs performance for your system.
Persistence helps when iterating on options—avoid recomputing identical intermediates.
See Also
Construct a Reaction-Path Problem (its even-handed variant assumes projective embedding)
API reference:
qrunch,qrunch.chemistry.ground_state_problem