forte2.base_classes.params ========================== .. py:module:: forte2.base_classes.params Module Contents --------------- .. py:class:: ParamsBase Bases: :py:obj:`abc.ABC` Helper class that provides a standard way to create an ABC using inheritance. .. !! processed by numpydoc !! .. py:method:: copy(**kwargs) Create a copy of this Params object, optionally overriding some fields. .. !! processed by numpydoc !! .. py:class:: DavidsonLiuParams Bases: :py:obj:`ParamsBase` Parameters for the Davidson-Liu eigenvalue solver. :Parameters: **guess_per_root** : int, optional, default=2 The number of guess vectors for each root. **ndets_per_guess** : int, optional, default=10 The number of determinants per guess vector. **collapse_per_root** : int, optional, default=2 The number of determinants to collapse per root. **basis_per_root** : int, optional, default=4 The maximum number of basis vectors per root. **maxiter** : int, optional, default=100 The maximum number of iterations for the Davidson-Liu solver. **e_tol** : float, optional, default=1e-10 The energy convergence threshold for the solver. **r_tol** : float, optional, default=1e-5 The residual convergence threshold for the solver. .. !! processed by numpydoc !! .. py:attribute:: guess_per_root :type: int :value: 2 .. py:attribute:: ndets_per_guess :type: int :value: 10 .. py:attribute:: collapse_per_root :type: int :value: 2 .. py:attribute:: basis_per_root :type: int :value: 4 .. py:attribute:: maxiter :type: int :value: 100 .. py:attribute:: e_tol :type: float :value: 1e-12 .. py:attribute:: r_tol :type: float :value: 1e-06 .. py:class:: CIParams Bases: :py:obj:`ParamsBase` Parameters for the CI solver. :Parameters: **ci_algorithm: str, optional, default="hz"** The algorithm used for the CI sigma builder. Non-relativistic options are: - "hz" / "Harrison-Zarrabian" - "kh" / "Knowles-Handy" - "exact": Exact diagonalization Two-component (relativistic) options are: - "hz" / "Harrison-Zarrabian" - "exact": Exact diagonalization - "sparse": Sigma builder using sparse representation of the Hamiltonian and states. Recommended for debug use only. **ci_builder_memory: int, optional, default=1024** The maximum memory (in MB) to use for the CI sigma builder. This is used only if ci_algorithm is "hz" or "kh". **energy_shift: float, optional, default=None** An energy shift, used to find roots around a specific energy. If None, no shift is applied. .. !! processed by numpydoc !! .. py:attribute:: ci_algorithm :type: str :value: 'hz' .. py:attribute:: ci_builder_memory :type: int :value: 1024 .. py:attribute:: energy_shift :type: float :value: None .. py:class:: SelectedCIParams Bases: :py:obj:`ParamsBase` Parameters for the Selected CI solver. :Parameters: **maxcycle: int, optional, default=15** The maximum number of selection cycles. **e_tol: float, optional, default=1e-8** The energy convergence threshold for selected CI macroiterations. **var_threshold: float, optional, default=5e-4** The threshold for including determinants in the variational space based on their contribution to the wavefunction. **pt2_threshold: float, optional, default=1e-8** The threshold for including determinants in the perturbative correction based on their second-order energy contribution. **selection_algorithm: str, optional, default="hbci"** The algorithm used for selecting determinants. Options are "hbci" and "hbci_ref". **guess_occ_window: int, optional, default=2** The number of occupied orbitals to consider when generating guess determinants. **guess_vir_window: int, optional, default=2** The number of virtual orbitals to consider when generating guess determinants. **num_threads: int, optional, default=4** The number of threads to use for parallel selection and diagonalization. **ci_algorithm: str, optional, default="sparse"** The algorithm used for the CI diagonalization. Options are "exact" and "sparse". **num_batches_per_thread: int, optional, default=4** The number of batches of determinants to process per thread during selection and diagonalization. **do_spin_penalty: bool, optional, default=True** Whether to apply a spin penalty to the Hamiltonian to enforce correct spin symmetry. **guess_dets: list[Determinant], optional** A list of determinants to use as the initial guess for the CI wavefunction. Note that this set will be further filtered by `DavidsonLiuParams.ndets_per_guess` using the determinantal energies, before finally being enlarged to a spin-complete set. Therefore, it is not recommended to provide energetically disjoint guess determinants, as the higher energy ones will likely be filtered out. Use `pinned_guess_dets` to ensure certain determinants are included in the guess without relying on their energies. If not provided, the guess determinants will be generated based on the guess_occ_window and guess_vir_window parameters. **pinned_guess_dets: list[Determinant], optional** A list of determinants that are pinned to the initial guess, ensuring they are included in the variational space. **frozen_creation: list[int], optional** A list of orbital indices for which creation operators are frozen (i.e., not allowed to be occupied in the selected determinants). This is used to enforce certain symmetries or to exclude certain orbitals from the selection process. **frozen_annihilation: list[int], optional** A list of orbital indices for which annihilation operators are frozen (i.e., not allowed to be unoccupied in the selected determinants). This is used to enforce certain symmetries or to exclude certain orbitals from the selection process. **screening_criterion: str, optional, default="hbci"** The criterion used to screen determinants during selection. Options are "hbci" and "ehbci". **energy_correction: str, optional, default="pt2"** The method used to compute the energy correction from the determinants that are not included in the variational space. Options are "pt2" and "variational". **energy_shift: float, optional, default=None** An energy shift applied during selection to target specific roots. If None, no shift is applied. **pt2_regularizer: str, optional, default="none"** The method used to regularize the PT2 energy correction. Options are: - "none": No regularization. - "shift": Apply a small shift to the denominators in the PT2 expression to avoid divergences: 1 / denom -> 1 / (denom + pt2_regularizer_strength) Ept2 -> 0 as pt2_regularizer_strength -> inf - "dsrg": Use a DSRG-inspired regularization of the PT2 correction: 1 / denom -> (1 / denom) * (1 - exp(-denom^2 * pt2_regularizer_strength)) Ept2 -> 0 as pt2_regularizer_strength -> 0, Ept2 -> unregularized PT2 as pt2_regularizer_strength -> inf **pt2_regularizer_strength: float, optional, default=0.0** The strength of the PT2 regularization. Note that the interpretation of this parameter depends on the choice of pt2_regularizer (see above). .. !! processed by numpydoc !! .. py:attribute:: maxcycle :type: int :value: 15 .. py:attribute:: e_tol :type: float :value: 1e-08 .. py:attribute:: var_threshold :type: float :value: 0.0005 .. py:attribute:: pt2_threshold :type: float :value: 1e-08 .. py:attribute:: selection_algorithm :type: str :value: 'hbci' .. py:attribute:: guess_occ_window :type: int :value: 2 .. py:attribute:: guess_vir_window :type: int :value: 2 .. py:attribute:: num_threads :type: int :value: 4 .. py:attribute:: ci_algorithm :type: str :value: 'sparse' .. py:attribute:: num_batches_per_thread :type: int :value: 4 .. py:attribute:: do_spin_penalty :type: bool :value: True .. py:attribute:: guess_dets :type: list[forte2.Determinant] :value: [] .. py:attribute:: pinned_guess_dets :type: list[forte2.Determinant] :value: [] .. py:attribute:: frozen_creation :type: list[int] :value: [] .. py:attribute:: frozen_annihilation :type: list[int] :value: [] .. py:attribute:: screening_criterion :type: str :value: 'hbci' .. py:attribute:: energy_correction :type: str :value: 'pt2' .. py:attribute:: energy_shift :type: float :value: None .. py:attribute:: pt2_regularizer :type: str :value: 'none' .. py:attribute:: pt2_regularizer_strength :type: float :value: 0.0