D3Potential¶
- class D3Potential(file=None, S6=None, a1=None, S8=None, a2=None, S6r=None, r_cut=None, bond_rcut=None, triple_rcut=None, k3=None, taper_factor=None, ATM=None)¶
Constructor of the potential.
- Parameters:
file (str) – The name of the file that contains the D3 parameters.
S6 (float) – The dimensionless BJ/Z parameter S6
a1 (float) – The dimensionless BJ parameter a1 By setting S6r = 0 and a1!=0 or a2!=0 one chooses BJ damping
S8 (float) – The dimensionless BJ/Z parameter S8
a2 (PhysicalQuantity of type length) – The BJ parameter a2 By setting S6r = 0 and a1!=0 or a2!=0 one chooses BJ damping
S6r (float) – The dimensionless Z parameter S6r By setting S6r != 0 and a1=a2=0 one chooses Z damping
r_cut (PhysicalQuantity of type length) – The cutoff radius for the interactions
bond_rcut (PhysicalQuantity of type length) – The cutoff radius for the coordination numbers
triple_rcut (PhysicalQuantity of type length) – The cutoff radius for the ATM interaction
k3 (float) – The dimensionless k3 smoothing parameter
taper_factor (float) – The dimensionless taper_factor for bond_rcut and r_cut
ATM (bool) – The parameter to switch on the Axilrod-Teller-Muto three-body terms
- classmethod getAllParameterNames()¶
Return the names of all used parameters as a list.
- getAllParameters()¶
Return all parameters of this potential and their current values as a <parameterName / parameterValue> dictionary.
- static getDefaults()¶
Get the default parameters of this potential and return them in form of a dictionary of <parameter name, default value> key-value pairs.
- getParameter(parameterName)¶
Get the current value of the parameter parameterName.
- setParameter(parameterName, value)¶
Set the parameter parameterName to the given value.
- Parameters:
parameterName (str) – The name of the parameter that will be modified.
value – The new value that will be assigned to the parameter parameterName.
Usage Examples¶
Define a D3 potential for a SiC/SiO2 interface to be used with an MTPPotential by adding particle types and interaction functions to the TremoloXPotentialSet.
# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------
# Set up lattice
vector_a = [9.228, 0.0, 0.0]*Angstrom
vector_b = [4.613999999999999, -2.663894142040934, 0.0]*Angstrom
vector_c = [0.0, 0.0, 9.185292029012857]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
elements = [Silicon, Silicon, Silicon, Carbon, Carbon, Carbon, Silicon, Silicon,
Silicon, Carbon, Carbon, Carbon, Oxygen, Oxygen, Oxygen, Silicon,
Oxygen, Silicon]
# Define coordinates
fractional_coordinates = [[-0. , 0.666666666667, 0. ],
[ 0.333333333333, 0.666666666667, 0. ],
[ 0.666666666667, 0.666666666667, 0. ],
[-0. , 0.666666666667, 0.211586087177],
[ 0.333333333333, 0.666666666667, 0.211586087177],
[ 0.666666666667, 0.666666666667, 0.211586087177],
[ 0. , 0.333333333333, 0.274787126204],
[ 0.333333333333, 0.333333333333, 0.274787126204],
[ 0.666666666667, 0.333333333333, 0.274787126204],
[ 0. , 0.333333333333, 0.486373213382],
[ 0.333333333333, 0.333333333333, 0.486373213382],
[ 0.666666666667, 0.333333333333, 0.486373213382],
[ 0.833330938737, 0.333338122527, 0.676754885757],
[ 0.833330938737, 0.833338122527, 0.676754885757],
[ 0.333330938737, 0.833338122527, 0.676754885757],
[-0.000002394597, 0.333338122527, 0.733058104206],
[-0.000002394597, 0.333338122527, 0.901967759553],
[-0.000002394597, 0.333338122527, 1.0708774149 ]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
# Create a new MTP potential set
mtp_potential_set = TremoloXPotentialSet('MTP')
mtp_potential_set.addParticleType(ParticleType('Si'))
mtp_potential_set.addParticleType(ParticleType('O'))
mtp_potential_set.addParticleType(ParticleType('C'))
mtp_potential_set.addPotential(MTPPotential(
file = 'mtp-file.mtp',
suppress_intercept = False,
))
# Create a new D3 potential set
d3_potential_set = TremoloXPotentialSet('D3')
d3_potential_set.addParticleType(ParticleType('Si'))
d3_potential_set.addParticleType(ParticleType('O'))
d3_potential_set.addParticleType(ParticleType('C'))
# D3BJ parameters for PBE
d3_potential_set.addPotential(D3Potential(
S6=+1.0000000000e+00,
S8=+7.8750000000e-01,
a1=+4.2890000000e-01,
a2=+4.4407000000e+00*Bohr,
))
calculator = TremoloXCalculator(
parameters=[mtp_potential_set, d3_potential_set]
)
bulk_configuration.setCalculator(calculator)
Define a D3 potential for a SiC/SiO2 interface to be used in an LCAO-DFT CombinedCalculator by adding particle types and interaction functions to the TremoloXPotentialSet.
# -------------------------------------------------------------
# Bulk Configuration
# -------------------------------------------------------------
# Set up lattice
vector_a = [9.228, 0.0, 0.0]*Angstrom
vector_b = [4.613999999999999, -2.663894142040934, 0.0]*Angstrom
vector_c = [0.0, 0.0, 9.185292029012857]*Angstrom
lattice = UnitCell(vector_a, vector_b, vector_c)
# Define elements
elements = [Silicon, Silicon, Silicon, Carbon, Carbon, Carbon, Silicon, Silicon,
Silicon, Carbon, Carbon, Carbon, Oxygen, Oxygen, Oxygen, Silicon,
Oxygen, Silicon]
# Define coordinates
fractional_coordinates = [[-0. , 0.666666666667, 0. ],
[ 0.333333333333, 0.666666666667, 0. ],
[ 0.666666666667, 0.666666666667, 0. ],
[-0. , 0.666666666667, 0.211586087177],
[ 0.333333333333, 0.666666666667, 0.211586087177],
[ 0.666666666667, 0.666666666667, 0.211586087177],
[ 0. , 0.333333333333, 0.274787126204],
[ 0.333333333333, 0.333333333333, 0.274787126204],
[ 0.666666666667, 0.333333333333, 0.274787126204],
[ 0. , 0.333333333333, 0.486373213382],
[ 0.333333333333, 0.333333333333, 0.486373213382],
[ 0.666666666667, 0.333333333333, 0.486373213382],
[ 0.833330938737, 0.333338122527, 0.676754885757],
[ 0.833330938737, 0.833338122527, 0.676754885757],
[ 0.333330938737, 0.833338122527, 0.676754885757],
[-0.000002394597, 0.333338122527, 0.733058104206],
[-0.000002394597, 0.333338122527, 0.901967759553],
[-0.000002394597, 0.333338122527, 1.0708774149 ]]
# Set up configuration
bulk_configuration = BulkConfiguration(
bravais_lattice=lattice,
elements=elements,
fractional_coordinates=fractional_coordinates
)
# -------------------------------------------------------------
# Calculator
# -------------------------------------------------------------
# Create a new D3 potential set
d3_potential_set = TremoloXPotentialSet('D3')
d3_potential_set.addParticleType(ParticleType('Si'))
d3_potential_set.addParticleType(ParticleType('O'))
d3_potential_set.addParticleType(ParticleType('C'))
# D3BJ parameters for PBE
d3_potential_set.addPotential(D3Potential(
S6=+1.0000000000e+00,
S8=+7.8750000000e-01,
a1=+4.2890000000e-01,
a2=+4.4407000000e+00*Bohr,
))
calculators = [
TremoloXCalculator(parameters=d3_potential_set),
LCAOCalculator()
]
calculator = CombinedCalculator(calculators)
bulk_configuration.setCalculator(calculator)
Notes¶
For most use cases it is more convenient to replace the the definition of the D3 potential through the TremoloXPotentialSet with a DispersionD3Z (zero damping) [1] or DispersionD3BJ (Becke-Johnson damping) [2] object which automatically supply the correct parameters for the chosen exchange-correlation functional.