qrunch.chemistry.ground_state_problem.builders.tools.localization.orbital_localizers
Molecular orbital localization.
Module Attributes
Default options for the PipekMezeyLocalization |
Functions
Extract the occupied molecular orbital coefficients. |
|
Extract the virtual molecular orbital coefficients. |
|
Extract the occupied molecular orbital coefficients. |
|
Extract the virtual molecular orbital coefficients. |
Classes
Configuration options for the localization algorithms. |
|
The Pipek-Mezey localization. |
|
Enumeration of population methods for orbital localization. |
|
The Pipek-Mezey localization. |
|
Unrestricted Pipek-Mezey localizer. |
- DEFAULT_OPTIONS = LocalizationOptions(convergence_tolerance=1e-06, convergence_tolerance_gradient=None, max_cycle=100, max_iterations=20, max_stepsize=0.05, initial_guess='molecular', exponent=2)
Default options for the PipekMezeyLocalization
- class LocalizationOptions
Bases:
DataclassPublicAPIConfiguration options for the localization algorithms.
Options controlling
PipekMezeyLocalizer. All fields are immutable (frozen=True) so an instance can be safely reused.- Parameters:
convergence_tolerance – Converge threshold. (default=1e-6)
convergence_tolerance_gradient – Converge threshold for orbital rotation gradients. (default=None)
max_cycle – The max. number of macro iterations. (default=100)
max_iterations – The max. number of iterations in each macro iteration. (default=20)
max_stepsize – The step size for orbital rotation. Small step (0.005 - 0.05) is preferred. (default=0.05)
initial_guess – Initial guess. “molecular” means mo_coeff will be used, “atomic” means atomic orbitals will be used.
exponent – The power to define norm. It can be 2 or 4. Default 2. (default=2)
- __init__(*, convergence_tolerance: float = 1e-06, convergence_tolerance_gradient: float | None = None, max_cycle: int = 100, max_iterations: int = 20, max_stepsize: float = 0.05, initial_guess: Literal['molecular', 'atomic'] = 'molecular', exponent: Literal[2, 4] = 2) None
- Parameters:
convergence_tolerance (float)
convergence_tolerance_gradient (float | None)
max_cycle (int)
max_iterations (int)
max_stepsize (float)
initial_guess (Literal['molecular', 'atomic'])
exponent (Literal[2, 4])
- Return type:
None
- convergence_tolerance: float = 1e-06
- convergence_tolerance_gradient: float | None = None
- exponent: Literal[2, 4] = 2
- initial_guess: Literal['molecular', 'atomic'] = 'molecular'
- max_cycle: int = 100
- max_iterations: int = 20
- max_stepsize: float = 0.05
- class PipekMezeyLocalizer
Bases:
OrbitalLocalizerThe Pipek-Mezey localization.
- __init__(population_method: PopulationMethod = PopulationMethod.META_LOWDIN, options: LocalizationOptions = LocalizationOptions(convergence_tolerance=1e-06, convergence_tolerance_gradient=None, max_cycle=100, max_iterations=20, max_stepsize=0.05, initial_guess='molecular', exponent=2)) None
Initialize the Pipek-Mezey localization.
This method transforms delocalized molecular orbitals into localized orbitals that are more chemically intuitive. The localized orbitals can be associated with specific bonds or lone pairs in a molecule, aiding in the interpretation of chemical structures and reactions.
Pipek-Mezey Localization Algorithm
The Pipek-Mezey localization procedure [PipekMezey1989] aims to maximize the sum of the squares of atomic partial charges (populations) for each orbital. By doing so, the method localizes orbitals on individual atoms or between pairs of atoms (chemical bonds), enhancing the chemical interpretability of the wavefunction.
The localization criterion Omega is defined as:
\[\Omega = \sum_{i}^{N_{\text{occ}}} \sum_{A}^{N_{\text{atoms}}} [q_{iA}]^2\]where:
\(N_{\text{occ}}\) is the number of occupied molecular orbitals.
\(N_{\text{atoms}}\) is the number of atoms in the molecule.
\(q_{iA}\) is the Mulliken population of orbital \(i\) on atom \(A\), calculated as:
\[q_{iA} = \sum_{\mu \in A} \sum_{\nu} C_{\mu i} S_{\mu \nu} C_{\nu i}\]Here:
\(C_{\mu i}\) are the coefficients of the molecular orbitals.
\(S_{\mu \nu}\) is the overlap between atomic orbitals \(\mu\) and \(\nu\).
The sum over \(\mu \in A\) includes all basis functions centered on atom \(A\).
Implementation Details
The method involves iteratively rotating pairs of occupied molecular orbitals to increase \(\Omega\) until convergence is achieved. This is typically done using a Jacobi-like rotation procedure that ensures the orthogonality of the resulting localized orbitals.
Advantages
Chemical Intuition: Produces orbitals that correspond closely to chemical bonds and lone pairs.
Computational Efficiency: Generally faster than other localization methods like Boys localization.
Applicability: Suitable for both ab initio and semiempirical wavefunctions.
- param population_method:
The method for calculating the orbital population
- param options:
The algorithmic options
- Parameters:
population_method (PopulationMethod)
options (LocalizationOptions)
- Return type:
None
- run(molecular_configuration: MolecularConfiguration, occupied_molecular_orbitals: RestrictedOccupiedMolecularOrbitals) RestrictedOccupiedMolecularOrbitals
- run(molecular_configuration: MolecularConfiguration, occupied_molecular_orbitals: UnrestrictedOccupiedMolecularOrbitals) UnrestrictedOccupiedMolecularOrbitals
Run the localization algorithm that maximizes the orbital population.
- Parameters:
molecular_configuration (MolecularConfiguration) – Molecule configuration
occupied_molecular_orbitals (RestrictedOccupiedMolecularOrbitals | UnrestrictedOccupiedMolecularOrbitals) – The molecular occupied orbitals
- Return type:
RestrictedOccupiedMolecularOrbitals | UnrestrictedOccupiedMolecularOrbitals
- class PopulationMethod
Bases:
EnumEnumeration of population methods for orbital localization.
- LOWDIN = 'lowdin'
- META_LOWDIN = 'meta-lowdin'
- MULLIKEN = 'mulliken'
- class RestrictedPipekMezeyLocalizer
Bases:
objectThe Pipek-Mezey localization.
- __init__(population_method: PopulationMethod = PopulationMethod.META_LOWDIN, options: LocalizationOptions = LocalizationOptions(convergence_tolerance=1e-06, convergence_tolerance_gradient=None, max_cycle=100, max_iterations=20, max_stepsize=0.05, initial_guess='molecular', exponent=2)) None
Initialize the Pipek-Mezey localization.
This method transforms delocalized molecular orbitals into localized orbitals that are more chemically intuitive. The localized orbitals can be associated with specific bonds or lone pairs in a molecule, aiding in the interpretation of chemical structures and reactions.
Pipek-Mezey Localization Algorithm
The Pipek-Mezey localization procedure [PipekMezey1989] aims to maximize the sum of the squares of atomic partial charges (populations) for each orbital. By doing so, the method localizes orbitals on individual atoms or between pairs of atoms (chemical bonds), enhancing the chemical interpretability of the wavefunction.
The localization criterion Omega is defined as:
\[\Omega = \sum_{i}^{N_{\text{occ}}} \sum_{A}^{N_{\text{atoms}}} [q_{iA}]^2\]where:
\(N_{\text{occ}}\) is the number of occupied molecular orbitals.
\(N_{\text{atoms}}\) is the number of atoms in the molecule.
\(q_{iA}\) is the Mulliken population of orbital \(i\) on atom \(A\), calculated as:
\[q_{iA} = \sum_{\mu \in A} \sum_{\nu} C_{\mu i} S_{\mu \nu} C_{\nu i}\]Here:
\(C_{\mu i}\) are the coefficients of the molecular orbitals.
\(S_{\mu \nu}\) is the overlap between atomic orbitals \(\mu\) and \(\nu\).
The sum over \(\mu \in A\) includes all basis functions centered on atom \(A\).
Implementation Details
The method involves iteratively rotating pairs of occupied molecular orbitals to increase \(\Omega\) until convergence is achieved. This is typically done using a Jacobi-like rotation procedure that ensures the orthogonality of the resulting localized orbitals.
Advantages
Chemical Intuition: Produces orbitals that correspond closely to chemical bonds and lone pairs.
Computational Efficiency: Generally faster than other localization methods like Boys localization.
Applicability: Suitable for both ab initio and semiempirical wavefunctions.
- param population_method:
The method for calculating the orbital population
- param options:
The algorithmic options
- Parameters:
population_method (PopulationMethod)
options (LocalizationOptions)
- Return type:
None
- run(molecular_configuration: MolecularConfiguration, occupied_molecular_orbitals: RestrictedOccupiedMolecularOrbitals) RestrictedOccupiedMolecularOrbitals
Run the localization algorithm that maximizes the orbital population.
- Parameters:
molecular_configuration (MolecularConfiguration) – Molecule configuration
occupied_molecular_orbitals (RestrictedOccupiedMolecularOrbitals) – The molecular occupied orbitals
- Return type:
- class UnrestrictedPipekMezeyLocalizer
Bases:
objectUnrestricted Pipek-Mezey localizer.
- __init__(population_method: PopulationMethod = PopulationMethod.META_LOWDIN, options: LocalizationOptions = LocalizationOptions(convergence_tolerance=1e-06, convergence_tolerance_gradient=None, max_cycle=100, max_iterations=20, max_stepsize=0.05, initial_guess='molecular', exponent=2)) None
Initialize the Pipek-Mezey localization.
This method transforms delocalized molecular orbitals into localized orbitals that are more chemically intuitive. The localized orbitals can be associated with specific bonds or lone pairs in a molecule, aiding in the interpretation of chemical structures and reactions.
Pipek-Mezey Localization Algorithm
The Pipek-Mezey localization procedure [PipekMezey1989] aims to maximize the sum of the squares of atomic partial charges (populations) for each orbital. By doing so, the method localizes orbitals on individual atoms or between pairs of atoms (chemical bonds), enhancing the chemical interpretability of the wavefunction.
The localization criterion Omega is defined as:
\[\Omega = \sum_{i}^{N_{\text{occ}}} \sum_{A}^{N_{\text{atoms}}} [q_{iA}]^2\]where:
\(N_{\text{occ}}\) is the number of occupied molecular orbitals.
\(N_{\text{atoms}}\) is the number of atoms in the molecule.
\(q_{iA}\) is the Mulliken population of orbital i on atom A, calculated as:
\[q_{iA} = \sum_{\mu \in A} \sum_{\nu} C_{\mu i} S_{\mu \nu} C_{\nu i}\]Here:
\(C_{\mu i}\) are the coefficients of the molecular orbitals.
\(S_{\mu \nu}\) is the overlap between atomic orbitals \(\mu\) and \(\nu\).
The sum over \(\mu \in A\) includes all basis functions centered on atom \(A\).
Implementation Details
The method involves iteratively rotating pairs of occupied molecular orbitals to increase \(\Omega\) until convergence is achieved. This is typically done using a Jacobi-like rotation procedure that ensures the orthogonality of the resulting localized orbitals.
Advantages
Chemical Intuition: Produces orbitals that correspond closely to chemical bonds and lone pairs.
Computational Efficiency: Generally faster than other localization methods like Boys localization.
Applicability: Suitable for both ab initio and semiempirical wavefunctions.
- param options:
The algorithmic options
- param population_method:
The method for calculating the orbital population
- Parameters:
population_method (PopulationMethod)
options (LocalizationOptions)
- Return type:
None
- run(molecular_configuration: MolecularConfiguration, occupied_molecular_orbitals: UnrestrictedOccupiedMolecularOrbitals) UnrestrictedOccupiedMolecularOrbitals
Run the localization algorithm that maximizes the orbital population.
- Parameters:
molecular_configuration (MolecularConfiguration) – Molecule configuration
occupied_molecular_orbitals (UnrestrictedOccupiedMolecularOrbitals) – The occupied molecular orbitals
- Return type:
- restricted_occupied_molecular_orbital_coefficients(molecular_orbitals: RestrictedMolecularOrbitals, molecular_orbital_occupations: RestrictedMolecularOrbitalOccupations) RestrictedOccupiedMolecularOrbitals
Extract the occupied molecular orbital coefficients.
- Parameters:
molecular_orbitals (RestrictedMolecularOrbitals) – Molecular orbitals.
molecular_orbital_occupations (RestrictedMolecularOrbitalOccupations) – Occupation numbers for each orbital.
- Return type:
- restricted_virtual_molecular_orbital_coefficients(molecular_orbitals: RestrictedMolecularOrbitals, molecular_orbital_occupations: RestrictedMolecularOrbitalOccupations) RestrictedOccupiedMolecularOrbitals
Extract the virtual molecular orbital coefficients.
- Parameters:
molecular_orbitals (RestrictedMolecularOrbitals) – Molecular orbitals.
molecular_orbital_occupations (RestrictedMolecularOrbitalOccupations) – Occupation numbers for each orbital.
- Return type:
- unrestricted_occupied_molecular_orbital_coefficients(molecular_orbitals: UnrestrictedMolecularOrbitals, molecular_orbital_occupations: UnrestrictedMolecularOrbitalOccupations) UnrestrictedOccupiedMolecularOrbitals
Extract the occupied molecular orbital coefficients.
- Parameters:
molecular_orbitals (UnrestrictedMolecularOrbitals) – Coefficients of the molecular orbitals.
molecular_orbital_occupations (UnrestrictedMolecularOrbitalOccupations) – Occupation numbers for each orbital.
- Return type:
- unrestricted_virtual_molecular_orbital_coefficients(molecular_orbitals: UnrestrictedMolecularOrbitals, molecular_orbital_occupations: UnrestrictedMolecularOrbitalOccupations) UnrestrictedOccupiedMolecularOrbitals
Extract the virtual molecular orbital coefficients.
- Parameters:
molecular_orbitals (UnrestrictedMolecularOrbitals) – Coefficients of the molecular orbitals.
molecular_orbital_occupations (UnrestrictedMolecularOrbitalOccupations) – Occupation numbers for each orbital.
- Return type: