AlgorithmParameters

class AlgorithmParameters(density_matrix_method=None, store_grids=None, store_basis_on_grid=None, store_energy_density_matrix=None, scf_restart_step_length=None, use_symmetries=None)

Class for representing the parameters for setting solver parameters.

Some parameter defaults are specific for each calculator, see HuckelCalculator, SlaterKosterCalculator, LCAOCalculator, or PlaneWaveCalculator.

Parameters:
  • density_matrix_method (DiagonalizationSolver | FeastSolver | ChebyshevExpansionSolver | PEXSISolver | PlaneWaveResidualMinimizer | GeneralizedDavidsonSolver | PPCGSolver) – The method used for obtaining the density matrix.
    Default: GeneralizedDavidsonSolver for PlaneWaveCalculator. DiagonalizationSolver for the other calculators.
  • store_grids (bool) – Enable or disable the storage of grids that can be reused in the SCF process. True will increase the memory usage, but reduce the computation time.
    Default: True
  • store_basis_on_grid (Automatic | True | False) – Control the storage of the basis functions on a real space grid. When enabled, increases the memory usage but reduces the computation time.
    Default: Automatic
  • store_energy_density_matrix (bool | Automatic) – Enable or disable the computation and storage of the energy density matrix while the density matrix is calculated. When enabled, can slow down the SCF loop but speeds up subsequent evaluations of forces and/or stress.
    Default: Disabled unless forces and/or stress will be evaluated immediately after the self-consistent calculation (Automatic).
  • scf_restart_step_length (PhysicalQuantity of type length) – The maximum distance by which an atom can move so that the calculation can be restarted from the previous initial state.
    Default: 0.1 * Ang
  • use_symmetries (bool) – Whether the symmetries of the configuration should be used to reduce the number of k-points.
    Default: True
densityMatrixMethod()
Returns:The advanced solver.
Return type:DiagonalizationSolver | FeastSolver | ChebyshevExpansionSolver | PEXSISolver | PlaneWaveResidualMinimizer | GeneralizedDavidsonSolver | PPCGSolver
scfRestartStepLength()
Returns:The SCF restart step length of this calculator.
Return type:PhysicalQuantity of type length
storeBasisOnGrid()
Returns:True if the storage of the basis functions on a real space grids is enabled
Return type:bool
storeEnergyDensityMatrix()
Returns:True if the simultaneous computation and storage of the energy density matrix during the calculation of the density matrix is enabled.
Return type:bool | Automatic
storeGrids()
Returns:True if the storage of grids is enabled
Return type:bool
useSymmetries()
Returns:Whether the symmetries of the configuration should be used to reduce the number of k-points.
Return type:bool

Usage Examples

Setup a calculation that uses the Diagonalization Solver.

density_matrix_method = DiagonalizationSolver()
algorithm_parameters = AlgorithmParameters(density_matrix_method)
calculator = LCAOCalculator(algorithm_parameters=algorithm_parameters)

Setup a calculation that uses the Feast Solver.

density_matrix_method = FeastSolver(lambda_min=-10*Hartree, lambda_max=10*Hartree, number_of_eigenvalues=10)
algorithm_parameters = AlgorithmParameters(density_matrix_method)
calculator = LCAOCalculator(algorithm_parameters=algorithm_parameters)