# DFTBDirectory¶

class DFTBDirectory(path)

Class for representing a DFTB parameter file directory.

Parameters: path (str) – The path of the directory to read files from.
fillingMethod(element)
Parameters: element (PeriodicTableElement) – The element for which to query the filling method. The method used for setting up the initial occupation for the given element. SphericalSymmetric | Anisotropic
onsiteSpinOrbitSplit(element)

Query the onsite spin-orbit split energies for a given element.

Parameters: element (PeriodicTableElement) – The element for which to query the spin-orbit split energies. The onsite spin-orbit split for this element. PhysicalQuantity of type energy
onsiteSpinSplit(element)

Query the onsite spin-split energies for a given element.

Parameters: element (PeriodicTableElement) – The element for which to query the spin splits. The onsite spin-split energies for this element as a square matrix of size n where n is the number of subshells of the given element. PhysicalQuantity of type energy
pairPotentials(configuration)

Query function for getting the pair potentials.

Parameters: configuration (MoleculeConfiguration | BulkConfiguration | DeviceConfiguration | SurfaceConfiguration) – The configuration defining which elements to load. The pair-potentials. list of PairPotential
setFillingMethod(element, filling_method)

Set the method used for setting up the initial occupation for the given element.

Parameters: element (PeriodicTableElement) – The element for which to set the filling method. filling_method (SphericalSymmetric | Anisotropic) – The method used for setting up the initial occupation.
setOnsiteSpinOrbitSplit(element, split)

Set the onsite spin-orbit split energies for a given element in the configuration.

Parameters: element (PeriodicTableElement) – The element for which to set the spin-orbit splits. split (PhysicalQuantity of type energy) – The onsite spin-split energies for this element as a square matrix of size n where n is the number of subshells of the given element.
setOnsiteSpinSplit(element, split)

Set the onsite spin split energies for a given element in the configuration.

Parameters: element (PeriodicTableElement) – The element for which to set the spin splits. split (PhysicalQuantity of type energy) – The on-site spin-split energies for each subshell pair of the element.
setVacuumLevel(element, vacuum_level)

Set the energy shift of the vacuum level for a given element.

Parameters: element (PeriodicTableElement) – The element for which to set the energy shift of the vacuum level. vacuum_level (PhysicalQuantity of type energy) – The energy shift of the vacuum level.
table(configuration)

Query function for getting the SlaterKosterTable representation of the parameter files in the directory.

Parameters: configuration (MoleculeConfiguration | BulkConfiguration | DeviceConfiguration | SurfaceConfiguration) – The configuration defining which elements to load. A SlaterKosterTable instance representing the parameter files in the directory. SlaterKosterTable
vacuumLevel(element)
Parameters: element (PeriodicTableElement) – The element for which to query the energy shift of the vacuum level. The energy shift of the vacuum level for the given element. PhysicalQuantity of type energy

## Usage Examples¶

Set up a self-consistent tight-binding calculation using parameters in the format developed by the DFTB consortium.

# Set up a graphene crystal
bulk_configuration = BulkConfiguration(
bravais_lattice=Hexagonal(2.4612*Angstrom, 6.709*Angstrom),
elements=[Carbon, Carbon],
cartesian_coordinates=[[ 0.        ,  0.        ,  0.        ],
[ 1.2306    ,  0.71050145,  0.        ]]*Angstrom
)

# setup slater-koster calculator with dftb parameters

basis_set = DFTBDirectory("dftb")

pair_potentials = DFTBDirectory("/dftb")

numerical_accuracy_parameters = NumericalAccuracyParameters(
k_point_sampling=(4, 4, 1) )

calculator = SlaterKosterCalculator(
basis_set=basis_set,
pair_potentials=pair_potentials,
numerical_accuracy_parameters=numerical_accuracy_parameters,
)
bulk_configuration.setCalculator(calculator)

initial_velocity = MaxwellBoltzmannDistribution(
temperature=1000.0*Kelvin
)

method = NVEVelocityVerlet(
time_step=1.0*femtoSecond,
initial_velocity=initial_velocity
)

molecular_dynamics = MolecularDynamics(
bulk_configuration,
constraints=[],
trajectory_filename='trajectory.nc',
steps=50,
log_interval=1,
method=method
)



## Notes¶

• QuantumATK can auto detect parameters stored in the directory share/tightbinding/dftb in the QuantumATK installation directory.
• Only some parameter sets include a spin-polarization splitting $$W$$. If this information is missing you can use the built-in database (see Spin polarization).
• The highest angular momentum per each element is officially not part of the DFTB Slater-Koster file format. However, some codes use the convention to parse this information from the third integer (s=1, p=2, d=3) in the first row of the onsite file. We follow the same convention. When the value is not present in the file, as a fall back we determine it by inspecting non-zero interactions.