class PlaneWaveCalculator(wave_function_cutoff=None, basis_set=None, exchange_correlation=None, numerical_accuracy_parameters=None, iteration_control_parameters=None, poisson_solver=None, algorithm_parameters=None, charge=None, fixed_spin_moment=None, checkpoint_handler=None, store_wave_functions=None, processes_per_kpoint=None)

Class for representing calculations using the ATK-PW plane wave method for BulkConfigurations.

  • wave_function_cutoff (PhysicalQuantity of type energy) – The energy cutoff of the plane wave basis functions to include the basis set. This value determines the size of the basis set. See Wave function cutoff.
    Default: 20.0 * Hartree
  • basis_set (BasisSet | :class:`~.PAWDataSet’) – An object describing the basis set to use. Note that this parameter is only used to determine the pseudopotentials to use.
    Default: BasisGGAPseudoDojo.Medium
  • exchange_correlation (ExchangeCorrelation) – The exchange correlation to use for this calculation.
    Default: GGA.PBE
  • numerical_accuracy_parameters (NumericalAccuracyParameters) –

    The NumericalAccuracyParameters used for the calculation.

        k_point_sampling=MonkhorstPackGrid(1, 1, 1),
  • iteration_control_parameters (IterationControlParameters) –

    The IterationControlParameters used for the calculation. For non-self-consistent, set this to NonSelfconsistent.

  • poisson_solver (FastFourierSolver) – The Poisson solver to calculate the electrostatic potential.
    Default: A default FastFourierSolver object
  • algorithm_parameters (AlgorithmParameters) –

    The AlgorithmParameters used for calculating the density matrix.

  • charge (float) – The charge of the system, a charge of -1 corresponds to one extra electron.
    Default: 0.0
  • fixed_spin_moment (float | False) – Total spin moment (per unit cell) to use, defined as \(\Delta N = N_{\uparrow} - N_{\downarrow}\), where \(N_{\uparrow}\) and \(N_{\downarrow}\) are the number of electrons in the Up and Down spin channels, respectively. When specified the spin moment will be fixed at the given value by introducing separate Fermi levels for the Up and Down spin channels. Can only be specified when doing a calculation with polarized spin. If set to False the spin moment will not be fixed - a single Fermi level is used.
    Default: False
  • checkpoint_handler (CheckpointHandler) – The checkpoint handler used for specifying the save-file and the time interval.
    Default: No checkpoint handling.
  • store_wave_functions (bool) –

    Flag that decides whether or not the wave functions should be saved along with the potential.

    Default: True For Hybrid calculations
    False All other cases.
  • processes_per_kpoint (Automatic | int) – The number of processes to use per kpoint. When set to Automatic the number will be determined automatically from the total number of k-points and processes such as to keep the number as small as possible and at the same time minimize the number of idle processes. One may set this number manually in order to reduce the memory requirements for each process.
    Default: Automatic

Query method for the algorithm parameters.

Returns:The algorithm parameters object.
Return type:AlgorithmParameters

Get the basis set.

Returns:The basis set set on the calculator.
Return type:BasisSet

Get the charge of the system.

Returns:The charge in units of the electron charge.
Return type:float

Return the checkpoint handler.


Get the exchange-correlation.

Returns:The exchange correlation set on the calculator.
Return type:ExchangeCorrelation

Get the fixed spin moment.

Returns:The fixed spin moment or False if the spin moment is not held fixed.
Return type:float | False
Returns:True when the call to “update()” resulted in a converged SCF loop.
Return type:bool

Query method for the IterationControlParameters.

Returns:The iteration control parameters set on the calculator.
Return type:IterationControlParameters
Returns:The metatext of the object or None if no metatext is present.
Return type:str | unicode | None

Query method for the NumericalAccuracyParameters.

Returns:The numerical accuracy parameters set on the calculator.
Return type:NumericalAccuracyParameters
Returns:The Poisson solver set on the calculator.
Return type:DirectSolver | MultigridSolver | FastFourierSolver | FastFourier2DSolver
Returns:The number of processes to use per kpoint.
Return type:int

Set the basis set.

Parameters:basis_set (BasisSet) – The basis set to check and set.

Set the checkpoint handler. :param checkpoint_handler: The CheckpointHandler to set on the calculator. :type checkpoint_handler: CheckpointHandler


Set the exchange-correlation.

Parameters:exchange_correlation (ExchangeCorrelation) – The exchange correlation to set.

Set the iteration control parameters.

Parameters:iteration_control_parameters (IterationControlParameters) – The iteration control parameters to set.

Set a given metatext string on the object.

Parameters:metatext (str | unicode | None) – The metatext string that should be set. A value of “None” can be given to remove the current metatext.

Set the numerical accuracy parameters.

Parameters:numerical_accuracy_parameters (NumericalAccuracyParameters) – The numerical accuracy parameters to set.

Set the Poisson solver.

Parameters:poisson_solver (DirectSolver | MultigridSolver | FastFourierSolver | FastFourier2DSolver) – The Poisson solver to set on the calculator.
Returns:The flag that decides whether or not the wave functions should be stored on disk.
Return type:bool
Returns:The version of ATK used to update the calculator.
Return type:str

Get the plane wave cutoff energy.

Returns:The plane wave cutoff energy.
Return type:PhysicalQuantity of type energy


Wave function cutoff

A calculation with the PlaneWaveCalculator allows to represent the Bloch states in a systematically improvable discrete Fourier expansion:

\[\begin{split}\psi_{\mathbf{k},n}(\mathbf{r}) = \sum_\mathbf{G}^{|\mathbf{k} + \mathbf{G}| < Q_{\rm max}} C_{\mathbf{k} + \mathbf{G},n}~e^{i\left(\mathbf{k} + \mathbf{G}\right) \cdot \mathbf{r}},\end{split}\]

where \(\mathbf{G}\) is a reciprocal lattice vector. The number of plane waves to include in the expansion is determined by the reciprocal lattice vector cutoff length \(Q_{\rm max}=\frac{1}{2} E_{\rm cut}\) where \(E_{\rm cut}\) is the kinetic energy cutoff of the wave functions set by the keyword argument wave_function_cutoff. By increasing the wave function cutoff one increases the number of plane wave basis functions used in the calculation. This leads to a better approximation of the exact wave function, but at an increased computational cost.

Density mesh cutoff

Since the density is defined as the square of the wave function amplitudes:

\[\rho(\mathbf{r}) = \sum_{\mathbf{k},n} f(\epsilon_{\mathbf{k}, n}) |\psi_{\mathbf{k}, n}(\mathbf{r})|^2\]

we, in principle, need twice the wave function resolution for the density. By default, we set the density_mesh_cutoff on NumericalAccuracyParameters to 4 times the wave_function_cutoff. In some cases this may be unnecessary, and can be overwritten by the user by specifying it explicitly.

Bands per electron

Since the plane wave basis is typically very large, a direct diagonalization of the Hamiltonian will be very inefficient and very time consuming. Instead iterative eigensolvers (GeneralizedDavidsonSolver and PPCGSolver) are used to solve for the lowest eigenstates that are needed to describe the ground state. The number of bands to solve for is set by the bands_per_electron keyword in NumericalAccuracyParameters. One has to be sure to solve for all bands that are fully or partly occupied through the SCF cycle, but keeping the number as low as possible ensures the fastest calculation.

By default bands_per_electron is set to 1.2 which corresponds to adding upwards of 20% more bands than there are bands below the Fermi level (for a non-metal). This is a safe setting for semi-conductors. For metals one might need to increase the number of bands, especially when using a large smearing. For insulators fewer bands will likely suffice. For closed shell systems, one can set it to 1.0.

Initialization methods

The iterative eigensolvers generally need a starting guess for the wave functions and the density used in constructing the initial Hamiltonian. The initialization method is set on the eigensolver supplied to the AlgorithmParameters and can be one of the following three:

  • BasisSetInitialization uses the localized atomic orbitals from the BasisSet specified on the PlaneWaveCalculator to generate an initial guess for the wave functions. Also the neutral atom density from the basis set is used as the initial density.
  • RandomBlochWaveInitialization uses random orthogonal wave function as initial guess and uses the neutral atom density from the specified basis set as initial density.

Usage Examples

Si FCC calculation with default parameters

The following script is an example of how to set up a PlaneWaveCalculator for a Si FCC system with all defaults.

# Set up a Bravais lattice.
lattice = FaceCenteredCubic(5.4306*Angstrom)

# Define elements.
elements = [Silicon, Silicon]

# Define coordinates.
fractional_coordinates = [[0.0, 0.0, 0.0],
                     [0.25, 0.25, 0.25]]

# Set up configuration.
bulk_configuration = BulkConfiguration(

# Set up calculator.
calculator = PlaneWaveCalculator()

# Run the scf loop.

Accurate Si FCC calculation

If we want to perform a more accurate calculation, with a custom density_mesh_cutoff, an example script could be:

# Define a non-default cutoff.
wave_function_cutoff = 80 * Hartree

# Make some custom numerical accuracy parameters.
numerical_accuracy_parameters = NumericalAccuracyParameters(
    # Large k-point sampling.
    k_point_sampling=MonkhorstPackGrid(11, 11, 11),
    # Take the density mesh cutoff as 2.5 times the wave function cutoff instead of 4.
    density_mesh_cutoff=2.5 * wave_function_cutoff)

# Converge to a higher than default tolerance.
iteration_control_parameters = IterationControlParameters(tolerance=1.0e-7)

# Set up calculator.
calculator = PlaneWaveCalculator(
    # Take a higher number of bands (default for Si-fcc is 4).