SemiEmpiricalCalculator

class SemiEmpiricalCalculator(hamiltonian_parametrization, pair_potentials=None, charge=None, numerical_accuracy_parameters=None, iteration_control_parameters=None, poisson_solver=None, checkpoint_handler=None, spin_polarization=None, fixed_spin_moment=None, algorithm_parameters=None, parallel_parameters=None)

Class for representing calculations using semi-empirical models for configurations of the type MoleculeConfiguration and BulkConfiguration.

Parameters:
  • hamiltonian_parametrization (HuckelHamiltonianParametrization | SlaterKosterHamiltonianParametrization | NRLHamiltonianParametrization) – An object describing the Hamiltonian parametrization for the semi-empirical calculation.
  • pair_potentials (PairPotential) – The repulsive pair potentials used for total energy and force calculations.
    Default: No pair potential
  • charge (float) – The charge of the system; a charge of -1 corresponds to one extra electron.
    Default: 0.0
  • numerical_accuracy_parameters (NumericalAccuracyParameters) –

    The NumericalAccuracyParameters used for the self-consistent semi-empirical calculation.
    Default:

    NumericalAccuracyParameters(
        density_mesh_cutoff=10.0*Hartree,
        k_point_sampling=MonkhorstPackGrid(1, 1, 1),
        radial_step_size=0.01*Angstrom,
        density_cutoff=1.0e-6,
        interaction_max_range=10.0*Angstrom,
        number_of_reciprocal_points=1024,
        reciprocal_energy_cutoff=1250.0*Hartree,
        occupation_method=FermiDirac(300.0*Kelvin))
    
  • iteration_control_parameters (IterationControlParameters) – The IterationControlParameters used for the self- consistent semi-empirical calculation. For non-self-consistent calculations set this parameter to NonSelfconsistent.
    Default: NonSelfconsistent.
  • poisson_solver (DirectSolver | MultigridSolver | FastFourierSolver | FastFourier2DSolver) – The Poisson solver used to determine the electrostatic potential.
    Default: Configuration dependent. FastFourierSolver for a BulkConfiguration without any metallic or dielectric SpatialRegion.
  • checkpoint_handler (CheckpointHandler) – The CheckpointHandler used for specifying the save-file and the time interval. between saving the calculation during the scf-loop.
    Default: A default CheckpointHandler object.
  • spin_polarization (Unpolarized | Polarized | Noncollinear | SpinOrbit) – Flag indicating if the calculation is spin-polarized or not.
    Default: Unpolarized
  • fixed_spin_moment (float | False) – Total spin moment (per unit cell) to use, defined as \(\Delta N = N_\up - N_\down\), where \(N_up\) and \(N_down\) 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
  • algorithm_parameters (AlgorithmParameters) –

    The AlgorithmParameters used for calculating the density matrix.
    Default:

    AlgorithmParameters(
        density_matrix_method=DiagonalizationSolver(),
        store_grids=True,
        store_basis_on_grid=Automatic,
        store_energy_density_matrix=Automatic,
        scf_restart_step_length=0.1*Angstrom)
    
  • parallel_parameters (ParallelParameters) –

    The parameters used to control parallelization options.
    Default:

    ParallelParameters(
        processes_per_neb_image=None,
        processes_per_individual=None,
        processes_per_bias_point=None,
        processes_per_saddle_search=1)
    
algorithmParameters()
Returns:The algorithm parameters.
Return type:AlgorithmParameters
basisSet()
Returns:The basis set associated with the Hamiltonian parametrization.
Return type:BasisSet
charge()
Returns:The charge of the system.
Return type:float
checkpointHandler()
Returns:The CheckpointHandler used for specifying the save-file and the time interval. between saving the calculation during the scf-loop.
Return type:CheckpointHandler
fixedSpinMoment()

Get the fixed spin moment.

Returns:The fixed spin moment or False if the spin moment is not held fixed.
Return type:float | False
hamiltonianParametrization()
Returns:The Hamiltonian parametrization associated with a semi-empirical calculator.
Return type:SemiEmpiricalHamiltonianParametrization
isConverged()
Returns:True when the call to “update()” resulted in a converged SCF loop.
Return type:bool
iterationControlParameters()
Returns:The IterationControlParameters used for a self-consistent calculation. For non-self-consistent calculations this parameter is NonSelfconsistent.
Return type:IterationControlParameters
metatext()
Returns:The metatext of the object or None if no metatext is present.
Return type:str | unicode | None
numberOfSpins()
Returns:The number of spins.
Return type:int
numericalAccuracyParameters()
Returns:The NumericalAccuracyParameters used for the self-consistent Huckel calculation.
Return type:NumericalAccuracyParameters
pairPotentials()
Returns:The repulsive pair potentials used for total energy and force calculations.
Return type:PairPotential
parallelParameters()
Returns:The parameters used to control parallelization options.
Return type:ParallelParameters
poissonSolver()
Returns:The Poisson solver used to determine the electrostatic potential.
Return type:DirectSolver | MultigridSolver | FastFourierSolver | FastFourier2DSolver
setCheckpointHandler(checkpoint_handler)

Set the the checkpoint handler.

Parameters:checkpoint_handler (CheckpointHandler) – The CheckpointHandler used for specifying the save-file and the time interval. between saving the calculation during the scf-loop.
setHamiltonianParametrization(hamiltonian_parametrization)

Set and check the Hamiltonian parametrization.

Parameters:hamiltonian_parametrization (HamiltonianParametrization) – An object describing the Hamiltonian parametrization for the semi-empirical calculation.
setIterationControlParameters(iteration_control_parameters)

Set the iteration control parameters.

Parameters:iteration_control_parameters (IterationControlParameters) – The IterationControlParameters used for a self-consistent calculation. For non-self-consistent calculations this parameter is NonSelfconsistent.
setMetatext(metatext)

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.
setNumericalAccuracyParameters(numerical_accuracy_parameters)

Set the numerical accuracy parameters.

Parameters:numerical_accuracy_parameters (NumericalAccuracyParameters) – The NumericalAccuracyParameters used for the self-consistent Huckel calculation.
setPairPotentials(pair_potentials)

Set the pair potentials.

Parameters:pair_potentials (PairPotential) – The repulsive pair potentials used for total energy and force calculations.
setParallelParameters(parallel_parameters)

Set the parallel paramters.

Parameters:parallel_parameters (ParallelParameters) – The parameters used to control parallelization options.
setPoissonSolver(poisson_solver)

Set the poisson solver.

Parameters:poisson_solver (DirectSolver | MultigridSolver | FastFourierSolver | FastFourier2DSolver) – The Poisson solver used to determine the electrostatic potential.
setSpinPolarization(spin_polarization)

Set the spin polarization.

Parameters:spin_polarization (Unpolarized | Polarized | Noncollinear | SpinOrbit) – Flag indicating if the calculation is spin-polarized or not.
spinPolarization()
Returns:Flag indicating if the calculation is spin-polarized or not.
Return type:Unpolarized | Polarized | Noncollinear | SpinOrbit
upgrade(configuration)
versionUsed()
Returns:The version of ATK used to update the calculator.
Return type:str

Usage Examples

Perform a self-consistent semi-empirical calculation for a maximum of 20 SCF steps by setting the IterationControlParameters.

iteration_control_parameters = IterationControlParameters(
    max_steps=20,
    )

# In this example, we use a default Huckel-type Hamiltonian parametrization.
hamiltonian_parametrization = HuckelHamiltonianParametrization()

calculator = SemiEmpiricalCalculator(
    hamiltonian_parametrization=hamiltonian_parametrization,
    iteration_control_parameters=iteration_control_parameters,
    )

Restart a semi-empirical calculation using the self-consistent state from a previous calculation

# Read in the BulkConfiguration with the old SCF state.
old_calculation = nlread('filename.hdf5', BulkConfiguration)[0]

# Define the BulkConfiguration with the same number of atoms and the same elements.
new_calculation = BulkConfiguration(...)

# Define the calculator.
old_calculator = old_calculation.calculator()

# Make a clone of the old calculator.
new_calculator = old_calculator()

# Attach the calculator and use the old initial state.
new_calculation.setCalculator(new_calculator, initial_state=old_calculation)

Notes

For the usage and details of the different Hamiltonian parametrizations, see HuckelHamiltonianParametrization, SlaterKosterHamiltonianParametrization and NRLHamiltonianParametrization.

Default is that the semi-empirical calculation is non-self-consistent. To make it self-consistent you must set the IterationControlParameters.