qrunch.chemistry.molecular_orbital_calculators.electron_correlation.moller_plesset_perturbation_theory

Restricted and unrestricted calculators for Møller-Plesset perturbation theory.

Module Attributes

DEFAULT_OPTIONS

The default options for the MP Calculator.

Classes

MollerPlesset2Calculator

A Møller-Plesset second order perturbation theory calculator.

MollerPlesset2CalculatorOptions

Default options for the MP2 calculator.

RestrictedMollerPlesset2Calculator

A Møller-Plesset second order perturbation theory calculator.

UnrestrictedMollerPlesset2Calculator

A Møller-Plesset second order perturbation theory calculator.

DEFAULT_OPTIONS = MollerPlesset2CalculatorOptions(convergence_tolerance=1e-09, convergence_tolerance_gradient=3.1622776601683795e-05, initial_guess='minao', max_iterations=50, level_shift=0.0, verbose=0, get_number_of_electrons_from_initial_guess=False, frozen_core_approximation=False, virtual_truncation_threshold=1e-05, frozen_virtual_threshold=100.0, fallback_options=('SOSCF',), do_density_fitting=False, degeneracy_threshold=0.1, break_spin_symmetry=False, stability_analysis=False, max_stability_iterations=10)

The default options for the MP Calculator.

class MollerPlesset2Calculator

Bases: MolecularOrbitalCalculator

A Møller-Plesset second order perturbation theory calculator.

The perturbation theory uses a Hartree-Fock solution as a starting point.

__init__(options: MollerPlesset2CalculatorOptions | None = None) None

Initialize Møller-Plesset second order perturbation theory calculator.

Parameters:

options (MollerPlesset2CalculatorOptions | None) – options for the Møller-Plesset calculator.

Return type:

None

solve_restricted(molecular_configuration: MolecularConfiguration, initial_guess: RestrictedDensityOperator | None = None, additional_potential: RestrictedElectronPotential | None = None) RestrictedMolecularOrbitalCalculatorResult

Solve the restricted problem.

Parameters:
Return type:

RestrictedMolecularOrbitalCalculatorResult

solve_unrestricted(molecular_configuration: MolecularConfiguration, initial_guess: UnrestrictedDensityOperator | None = None, additional_potential: UnrestrictedElectronPotential | None = None) UnrestrictedMolecularOrbitalCalculatorResult

Solve the unrestricted problem.

Parameters:
Return type:

UnrestrictedMolecularOrbitalCalculatorResult

class MollerPlesset2CalculatorOptions

Bases: DataclassPublicAPI

Default options for the MP2 calculator.

For details, see https://pyscf.org/user/scf.html. Options controlling MollerPlesset2Calculator. All fields are immutable (frozen=True) so an instance can be safely reused.

Parameters:
  • convergence_tolerance – Energy convergence tolerance. (default=1e-9)

  • convergence_tolerance_gradient – Gradient convergence tolerance. (default=3.1622776601683795e-05)

  • initial_guess – Minimal atomic orbital guess. (default=”minao”)

  • max_iterations – Maximum number of SCF iterations. (default=50)

  • level_shift – Energy level shift. (default=0.0)

  • verbose – Verbosity level. (default=0)

  • get_number_of_electrons_from_initial_guess – If true, the number of electrons in the initial guess will always overwrite the number of electrons in the molecular configuration. (default=False)

  • frozen_core_approximation – If true, core (or inner) orbitals are kept frozen during the MP2 calculation. (default=False)

  • virtual_truncation_threshold – Threshold below which virtual natural orbitals are discarded. (default=1.0e-5)

  • frozen_virtual_threshold – Disregard virtual orbitals with occupation numbers above this threshold. (default=100.0)

  • fallback_options – Fallback options in case default SCF settings fail to converge. (default=(“SOSCF”,))

  • do_density_fitting – Utilize density fitting. (default=False)

  • degeneracy_threshold – Minimum allowed gap between any occupied and virtual orbital energy. If \(|\varepsilon_a - \varepsilon_i| <\) degeneracy_threshold for any occupied orbital i and virtual orbital a, the calculation raises a ValueError to avoid numerically unstable MP2 energy denominators. (default=0.1)

  • break_spin_symmetry – If true, the UHF initial guess is constructed by mixing HOMO and LUMO orbitals from a preliminary RHF calculation, breaking alpha/beta symmetry. Only affects unrestricted calculations and is ignored when an explicit initial_guess is provided. (default=False)

  • stability_analysis – If true, a post-convergence UHF stability analysis is performed and the SCF is re-converged if an instability is detected. Only affects unrestricted calculations. (default=False)

  • max_stability_iterations – Maximum number of stability-check / re-convergence cycles when stability_analysis is enabled. (default=10)

__init__(*, convergence_tolerance: float = 1e-09, convergence_tolerance_gradient: float = 3.1622776601683795e-05, initial_guess: Literal['minao', 'atom', 'huckel', 'vsap', 'chk', '1e'] | str = 'minao', max_iterations: int = 50, level_shift: float = 0.0, verbose: int = 0, get_number_of_electrons_from_initial_guess: bool = False, frozen_core_approximation: bool = False, virtual_truncation_threshold: float = 1e-05, frozen_virtual_threshold: float = 100.0, fallback_options: tuple[Literal['SOSCF', 'LevelShift(0.1)']] = ('SOSCF',), do_density_fitting: bool = False, degeneracy_threshold: float = 0.1, break_spin_symmetry: bool = False, stability_analysis: bool = False, max_stability_iterations: int = 10) None
Parameters:
  • convergence_tolerance (float)

  • convergence_tolerance_gradient (float)

  • initial_guess (Literal['minao', 'atom', 'huckel', 'vsap', 'chk', '1e'] | str)

  • max_iterations (int)

  • level_shift (float)

  • verbose (int)

  • get_number_of_electrons_from_initial_guess (bool)

  • frozen_core_approximation (bool)

  • virtual_truncation_threshold (float)

  • frozen_virtual_threshold (float)

  • fallback_options (tuple[Literal['SOSCF', 'LevelShift(0.1)']])

  • do_density_fitting (bool)

  • degeneracy_threshold (float)

  • break_spin_symmetry (bool)

  • stability_analysis (bool)

  • max_stability_iterations (int)

Return type:

None

break_spin_symmetry: bool = False
convergence_tolerance: float = 1e-09
convergence_tolerance_gradient: float = 3.1622776601683795e-05
degeneracy_threshold: float = 0.1
do_density_fitting: bool = False
fallback_options: tuple[Literal['SOSCF', 'LevelShift(0.1)']] = ('SOSCF',)
frozen_core_approximation: bool = False
frozen_virtual_threshold: float = 100.0
get_number_of_electrons_from_initial_guess: bool = False
initial_guess: Literal['minao', 'atom', 'huckel', 'vsap', 'chk', '1e'] | str = 'minao'
level_shift: float = 0.0
max_iterations: int = 50
max_stability_iterations: int = 10
stability_analysis: bool = False
verbose: int = 0
virtual_truncation_threshold: float = 1e-05
class RestrictedMollerPlesset2Calculator

Bases: object

A Møller-Plesset second order perturbation theory calculator.

The perturbation theory uses a Hartree-Fock solution as a starting point.

__init__(options: MollerPlesset2CalculatorOptions = MollerPlesset2CalculatorOptions(convergence_tolerance=1e-09, convergence_tolerance_gradient=3.1622776601683795e-05, initial_guess='minao', max_iterations=50, level_shift=0.0, verbose=0, get_number_of_electrons_from_initial_guess=False, frozen_core_approximation=False, virtual_truncation_threshold=1e-05, frozen_virtual_threshold=100.0, fallback_options=('SOSCF',), do_density_fitting=False, degeneracy_threshold=0.1, break_spin_symmetry=False, stability_analysis=False, max_stability_iterations=10)) None

Initialize Møller-Plesset second order perturbation theory calculator.

Parameters:

options (MollerPlesset2CalculatorOptions) – options for the Møller-Plesset calculator.

Return type:

None

solve(molecular_configuration: MolecularConfiguration, initial_guess: RestrictedDensityOperator | None = None, additional_potential: RestrictedElectronPotential | None = None) RestrictedMolecularOrbitalCalculatorResult

Run the Møller-Plesset second order perturbation theory Calculator.

Parameters:
Return type:

RestrictedMolecularOrbitalCalculatorResult

class UnrestrictedMollerPlesset2Calculator

Bases: object

A Møller-Plesset second order perturbation theory calculator.

The perturbation theory uses a Hartree-Fock solution as a starting point.

__init__(options: MollerPlesset2CalculatorOptions = MollerPlesset2CalculatorOptions(convergence_tolerance=1e-09, convergence_tolerance_gradient=3.1622776601683795e-05, initial_guess='minao', max_iterations=50, level_shift=0.0, verbose=0, get_number_of_electrons_from_initial_guess=False, frozen_core_approximation=False, virtual_truncation_threshold=1e-05, frozen_virtual_threshold=100.0, fallback_options=('SOSCF',), do_density_fitting=False, degeneracy_threshold=0.1, break_spin_symmetry=False, stability_analysis=False, max_stability_iterations=10)) None

Initialize Møller-Plesset second order perturbation theory calculator.

Parameters:

options (MollerPlesset2CalculatorOptions) – options for the Møller-Plesset calculator. Defaults to None.

Return type:

None

solve(molecular_configuration: MolecularConfiguration, initial_guess: UnrestrictedDensityOperator | None = None, additional_potential: UnrestrictedElectronPotential | None = None) UnrestrictedMolecularOrbitalCalculatorResult

Run the Møller-Plesset second order perturbation theory solver.

Parameters:
Return type:

UnrestrictedMolecularOrbitalCalculatorResult