HuckelCalculator¶
- class HuckelCalculator(basis_set=None, pair_potentials=None, charge=None, numerical_accuracy_parameters=None, iteration_control_parameters=None, poisson_solver=None, weighting_scheme=None, checkpoint_handler=None, spin_polarization=None, fixed_spin_moment=None, dynamical_matrix_parameters=None, algorithm_parameters=None, hamiltonian_derivatives_parameters=None, parallel_parameters=None)¶
Class for representing calculations using the extended Huckel model for configurations of the type
MoleculeConfiguration
andBulkConfiguration
.- Parameters:
basis_set (list of
HuckelBasisParameters
) – An object describing the basis set used for the Extended-Huckel calculation. Default: HoffmannHuckelParameters.Allpair_potentials (
PairPotential
) – The repulsive pair potentials used for total energy and force calculations. Default: No pair potentialcharge (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 Huckel 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
) – TheIterationControlParameters
used for the self- consistent Huckel calculation. For non-self-consistent calculations set this parameter toNonSelfconsistent
. Default:NonSelfconsistent
.poisson_solver (
DirectSolver
|MultigridSolver
|FastFourierSolver
|FastFourier2DSolver
) – The Poisson solver used to determine the electrostatic potential. Default: Configuration dependent.FastFourierSolver
for aBulkConfiguration
without any metallic or dielectricSpatialRegion
.weighting_scheme (HoffmannWeighting | WolfsbergWeighting) – The weighting scheme used for calculating off-site matrix elements of the Huckel Hamiltonian. Default: WolfsbergWeighting
checkpoint_handler (
CheckpointHandler
) – TheCheckpointHandler
used for specifying the save-file and the time interval. between saving the calculation during the scf-loop. Default: A defaultCheckpointHandler
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 toFalse
the spin moment will not be fixed - a single Fermi level is used. Default:False
dynamical_matrix_parameters (not used) – Deprecated: from v2015, see the
DynamicalMatrix
analysis object.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, use_symmetries=False)
hamiltonian_derivatives_parameters (not used) – Deprecated: from v2015, see the
HamiltonianDerivatives
analysis object.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:
- basisSet()¶
- Returns:
The basis set associated with the Hamiltonian parametrization.
- Return type:
- 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:
- dynamicalMatrixParameters()¶
This method is deprecated.
- 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
- hamiltonianDerivativesParameters()¶
This method is deprecated.
- 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 isNonSelfconsistent
.- Return type:
- metatext()¶
- Returns:
The metatext of the object or None if no metatext is present.
- Return type:
str | None
- numberOfSpins()¶
- Returns:
The number of spins.
- Return type:
int
- numericalAccuracyParameters()¶
- Returns:
The
NumericalAccuracyParameters
used for the self-consistent Huckel calculation.- Return type:
- pairPotentials()¶
- Returns:
The repulsive pair potentials used for total energy and force calculations.
- Return type:
- parallelParameters()¶
- Returns:
The parameters used to control parallelization options.
- Return type:
- 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
) – TheCheckpointHandler
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
) – TheIterationControlParameters
used for a self-consistent calculation. For non-self-consistent calculations this parameter isNonSelfconsistent
.
- setMetatext(metatext)¶
Set a given metatext string on the object.
- Parameters:
metatext (str | 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
) – TheNumericalAccuracyParameters
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.
- setWeightingScheme(weighting_scheme)¶
Set the weighting scheme.
- Parameters:
weighting_scheme (HoffmannWeighting | WolfsbergWeighting) – The weighting scheme used for calculating off-site matrix elements of the Huckel Hamiltonian.
- spinPolarization()¶
- Returns:
Flag indicating if the calculation is spin-polarized or not.
- Return type:
Unpolarized
|Polarized
|Noncollinear
|SpinOrbit
- uniqueString()¶
Return a unique string representing the state of the object.
- upgrade(configuration)¶
Private method for updating the calculator from the configuration, if it is possible. @private
- versionUsed()¶
- Returns:
The version of ATK used to update the calculator.
- Return type:
str
- weightingScheme()¶
- Returns:
The weighting scheme used for calculating off-site matrix elements of the Huckel Hamiltonian.
- Return type:
Attention
The HuckelCalculator is being deprecated. Use the SemiEmpiricalCalculator with the HuckelHamiltonianParametrization instead.
Usage Examples¶
Perform a self-consistent Hückel calculation by setting the IterationControlParameters
iteration_control_parameters = IterationControlParameters(
damping_factor=0.05,
number_of_history_steps=12,
)
calculator = HuckelCalculator(
iteration_control_parameters=iteration_control_parameters,
)
Restart a Hückel calculation using the self-consistent state from a previous calculation
# Read in the BulkConfiguration with the old SCF state
old_calculation=nlread("filename.nc",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)
Calculate the spin-polarized band structure of iron. Note that spin-polarized calculations must be self-consistent.
# Set up iron in the BCC configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=BodyCenteredCubic(2.8665*Angstrom),
elements=[Iron],
cartesian_coordinates=[[ 0., 0., 0.]]*Angstrom
)
# Setup spin-polarized calculation
numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(4, 4, 4) )
calculator = HuckelCalculator(
basis_set=CerdaHuckelParameters.Iron_bcc_Basis,
numerical_accuracy_parameters=numerical_accuracy_parameters,
iteration_control_parameters=IterationControlParameters(),
spin_polarization=True,
)
bulk_configuration.setCalculator(calculator)
# Calculate the bandstructure
bandstructure = Bandstructure(
configuration=bulk_configuration,
route=['G', 'H', 'P', 'G', 'N', 'P', 'N', 'H'],
)
nlsave('fe_huckel.nc', bandstructure)
Notes¶
For the details of the extended-Hückel model, see the chapter on Semi Empirical.
Default is that the Hückel calculation is non-self-consistent. To make it self-consistent you must set the IterationControlParameters.
Note that most parameters are fitted for non-self-consistent situations, and to apply the parameters for self-consistent situations the vacuum_level
of each element must be shifted to cancel the additional onsite term in the reference structure where the parameters where fitted.